0

aw9523 all output pins are "on" for one second at power-up
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

aw9523 all output pins are "on" for one second at power-up

by tw_cem on Mon May 03, 2021 5:35 pm

When I power on my arduino and aw9523 system, all pins of the aw9523 are enabled for about one second.
So I have LEDs attached to each output pin, and they all turn on (at unknown current level) for a second.
If the current is too high it could damage the LEDs; I already blitzed 2 using the blink demo (OUTPUT mode, HIGH/LOW blink).
... and couldn't I damage the Arduino too as they are all pulling from it's regulator through the STEMMA?
My system will eventually have 48 LEDs (rated at 3V 20mA) all run with 3 aw9523 breakouts.

So how can I prevent all the pins enabling on boot up?

Many thanks!

tw_cem
 
Posts: 12
Joined: Mon Jan 25, 2021 10:37 am

Re: aw9523 all output pins are "on" for one second at power-

by Sparklebeard on Thu May 06, 2021 7:26 pm

I was going to ask this same question, but I looked at table 1 on the data sheet https://cdn-shop.adafruit.com/product-files/4886/AW9523+English+Datasheet.pdf and it appears that if you pull both address pins high to change the I2C address it will set the boot output state high rather than low. If your LEDs are wired for constant current, the high output state should keep them off.

I also noticed that the default max current limit is 37mA per pin, which is higher than I had anticipated since it isn't called out on the Adafruit product guide. On the plus side, if you look at table 10 you can write to the ISEL address on the GCR register to reduce the max current though I don't think that functionality is exposed in the Adafruit library for this board.

Sparklebeard
 
Posts: 22
Joined: Thu Feb 11, 2021 12:09 am

Re: aw9523 all output pins are "on" for one second at power-

by tw_cem on Sun May 09, 2021 8:30 pm

Thx sparkle.
But if I pull both address pins high, then how do I assign a unique address for multiple boards? I need to address 3 on the same i2c bus.

tw_cem
 
Posts: 12
Joined: Mon Jan 25, 2021 10:37 am

Re: aw9523 all output pins are "on" for one second at power-

by Sparklebeard on Mon May 10, 2021 9:03 pm

tw_cem wrote:Thx sparkle.
But if I pull both address pins high, then how do I assign a unique address for multiple boards? I need to address 3 on the same i2c bus.


That's definitely a downside I have discovered with this board; I don't really understand the chip manufacturer's thinking by designing the address select pins to also affect the boot behaviour, but here we are.

Likely the most straightforward solution would be to use a i2c multiplexer like https://www.adafruit.com/product/2717. I use these quite a lot to use multiple identical sensors on the same project.

Sparklebeard
 
Posts: 22
Joined: Thu Feb 11, 2021 12:09 am

Re: aw9523 all output pins are "on" for one second at power-

by tw_cem on Tue May 11, 2021 7:43 am

Really? How disappointing. I wish that were more clear in the product write-up on the product page.
... why are they even called address pins if they need to be wired for boot setup?

Is there another way to prevent a full power on at boot?
Or a way to prevent damage with the full on state?
What about a hard wire current limit on the 5V supply to the array of aw9523 boards? And use an Arduino GPIO to lift the throttle after boot?

tw_cem
 
Posts: 12
Joined: Mon Jan 25, 2021 10:37 am

Re: aw9523 all output pins are "on" for one second at power-

by adafruit2 on Tue May 11, 2021 1:12 pm

its written on the product page:
"One oddity about this chip is the default I2C address determines the initial boot-state of the pins. Our libraries immediately soft-reset and configure all the pins to inputs and push-pull so you can expect the same behavior no matter what the I2C address is. However, we recommend you check the datasheet Table 1 to make sure this doesn't affect your hardware."

adafruit2
Site Admin
 
Posts: 20058
Joined: Fri Mar 11, 2005 7:36 pm

Re: aw9523 all output pins are "on" for one second at power-

by tw_cem on Tue May 11, 2021 1:26 pm

adafruit2 wrote:its written on the product page:
"One oddity about this chip is the default I2C address determines the initial boot-state of the pins. Our libraries immediately soft-reset and configure all the pins to inputs and push-pull so you can expect the same behavior no matter what the I2C address is. However, we recommend you check the datasheet Table 1 to make sure this doesn't affect your hardware."


Yes adafruit2, I saw that, but it is misleading. The description gives you the impression you can set the the behavior as you need, but still use the addressing: "so you can expect the same behavior no matter what the I2C address is". It does not say any pin wired as an output will turn on for a second at boot and you can't change that without loosing the ability to assign an address.

SB stated I must wire the address pins high to set the boot state. Is that accurate? How can I tie the pins high but also set a unique address?

tw_cem
 
Posts: 12
Joined: Mon Jan 25, 2021 10:37 am

Re: aw9523 all output pins are "on" for one second at power-

by adafruit2 on Wed May 12, 2021 1:48 pm

you can't the pins are the same usage

adafruit2
Site Admin
 
Posts: 20058
Joined: Fri Mar 11, 2005 7:36 pm

Re: aw9523 all output pins are "on" for one second at power-

by Sparklebeard on Wed May 12, 2021 2:03 pm

tw_cem wrote:What about a hard wire current limit on the 5V supply to the array of aw9523 boards? And use an Arduino GPIO to lift the throttle after boot?


Depending how you're wiring your LED circuit you could maybe use a NPN transistor/mosfet to block the + supply to all the LEDs until the AW9523 is running and configured for the appropriate constant current.

Sparklebeard
 
Posts: 22
Joined: Thu Feb 11, 2021 12:09 am

Please be positive and constructive with your questions and comments.