Author Topic: Circuit for resetting an I2C device  (Read 4171 times)

0 Members and 1 Guest are viewing this topic.

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: gb
Circuit for resetting an I2C device
« on: March 04, 2024, 04:43:48 pm »
Troublesome I2C slave devices - don't you just love 'em? Of course, one strategy to deal with slaves that have locked up and are no longer communicative is - if they don't have a dedicated reset pin - to cycle power to them. I was all ready to slap a P-ch MOSFET on to the VCC line and call it a day, when it occurred to me that this isn't ideal when dealing with devices that have a relatively large amount of decoupling capacitance (which mine does).

Ideally, in order to ensure a full, proper (and timely) cycling of power, you want to ensure the decoupling capacitance on the slave device is discharged fully, right? So it got me thinking that instead of just disconnecting VCC, what if we switch VCC from power to ground? This will quickly discharge the decoupling capacitor(s) and ensure the slave device is fully powered-down.

One way of doing this that came to mind was using a common 74-series 2-to-1 multiplexer to do this switching. I can connect the 'select' input to my reset signal, connect the two inputs to power and ground, and the output to the slave device's VCC, upstream of the decoupling cap(s).

However, one reservation I have about this idea is whether something like a 74LVC1G157 will be able to handle this. The output of the mux will essentially be sourcing the power. In my scenario, the I2C slave device consumes at most 40mA, and it's decoupled with 2.3uF (2.2+0.1). In theory, I can see from datasheets that a '157 is generally rated for 50mA maximum output source/sink, but I'm not sure if it's a good idea to get too near that limit. Especially as, for example the Nexperia datasheet headline is for "±24 mA output drive (VCC = 3.0V)".

Also concerning is the in/out-rush current from charging/discharging the cap(s) when switching. I'm thinking a series current-liming resistor of a couple of ohms is probably a good idea, no?
 

Offline Peabody

  • Super Contributor
  • ***
  • Posts: 2008
  • Country: us
 

Online selcuk

  • Regular Contributor
  • *
  • Posts: 125
  • Country: tr
Re: Circuit for resetting an I2C device
« Reply #2 on: March 04, 2024, 07:56:16 pm »
Do you send 18 bits of clock to the slave and check the SDA line before deciding to turn off its power?
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: gb
Re: Circuit for resetting an I2C device
« Reply #3 on: March 04, 2024, 08:30:23 pm »
How about an ADG849?

Oof, not for the prices they're asking. :o

Do you send 18 bits of clock to the slave and check the SDA line before deciding to turn off its power?

Yeah, I'll be doing that too. But the power switching is the belt-and-braces measure. ;D
 

Offline HwAoRrDkTopic starter

  • Super Contributor
  • ***
  • Posts: 1482
  • Country: gb
Re: Circuit for resetting an I2C device
« Reply #4 on: March 04, 2024, 08:43:38 pm »
I've just had a epiphany. I'm working with 5V, need to switch a non-trivial current, the output should be off when control logic is low (active-low reset), and I need the output to discharge when turned off... Wait, I've used a chip that does all this before!

USB load switch ICs to the rescue! They handle 0.5A or more, many are available with an output discharge feature, and the enable pin suits the polarity of my control logic. And, most importantly, they cost about the same as a 74-series mux (i.e. pennies). :-+

They also satisfy the other question mark I had with the mux, and that was suitability of control by 3.3V logic levels (my I2C slave device only runs on 5V, but everything else on the board is 3.3V). The mux datasheets typically specified VIH as being 0.7*VCC - and with VCC of 5V, that's 3.5V. So it's questionable whether I could interface with 3.3V. :-\ All the USB load switches I've seen have VIH on EN of around 1.5V, which is much more suitable.
 
The following users thanked this post: Smokey


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf