Whats a good way to turn off TWI ICs to save battery life?

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've finally plunged and been having lots of fun learning TWI/I2C with my AVR. I've got RTC and EEPROM both working great through TWI.

Next I'd like to make a complex circuit that actually monitors something, and saves the value into EEPROM.

So I wanted to make a data logger I can run off batteries efficiently.

I want to make a circuit that uses 2 TWI slaves that are always powered but 3 TWI slaves that I'd only power every 5 min.

I was thinking I would have the 3 TWI slaves flipped on or off through a mosfet on their VCC line. Then I remember someone mentioning that the ICs might try to power themselves through the TWI lines. Is this something I have to worry about? If so what are real alternatives or is it a bad idea what I want to do all together?

Thanks,
Emmanuel

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You may have problems with unpowered devices connected to an active I2C bus. They would like "load down" the bus.

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi, emmannuel,

emmannuel wrote:
I was thinking I would have the 3 TWI slaves flipped on or off through a mosfet on their VCC line. Then I remember someone mentioning that the ICs might try to power themselves through the TWI lines. Is this something I have to worry about?Emmanuel

You are right.
Keep an eye on the invisible input protection diodes.
While Vcc is down, they will suck much more current than the resistors, which keep SDA and SCL high.
For saving maximum current you might need transmission gates for SDA and SCL, such as 4066.

Ciao
Wolfgang Horn

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Exactly what TWI devices do you want to switch off ? Some ADCs have the possibility to go in power-down mode, other TWI chips might also have this.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could have two TWI buses, always on and switched. No need to use external switches then like FETs or 4066s.

If the TWI devices are low power enough, you might power them from AVR IO pins then.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Its not a specific IC that will be pulling lots of power. I was just curious how such things were acomplished. Thanks for those suggestions.

I am contemplating not having any kind of power down features cause I started thinking of using the 4066 one dedicated for TWI, then ADC, then SPI and the circuit got kinda scary for me.

I got a 4066B chip that I will play around with when I find the time. Classes started today :(

Looking at the datasheet I think every I/O has an enable pin. Is there a version that has a single enable pin for the full IC?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Consider adding a circuit to your schematic to measure your own current consumption via a free ADC input. I found this very helpfull in debugging and analysing current consumption.