I am running into a problem with I2C devices trying to cut off power to them.
I was wondering if anyone could push me in the right direction.
I have had no formal education in electronics and I am learning by trial and error so perhaps there is a obvious simple solution to my problem which I am not seeing at this point.
When I disconnect the VCC lines of I2C devices by using the latching control board the problem occurs.
Some, not all I2C modules, will send power back to the latching control board.
This keeps the latching control board in a ON state there where it should be OFF when commanded by the MCU.
I wonder why not all I2C devices give this problem and some do. Is there a way to keep the I2C bus powering the latching control board?
The reason for using Pololu’s latching control board is because I am trying to build a battery powered system with 3 ATMEGA328P-PU’s and multiple I2C devices. To reduce power consumption I want to cut off power to the devices connected to the master and 2 slaves when not needed.
Each MCU will have a separate function with some of them sharing I2C devices.
Here under I will try to describe the whole system:
All ATMEGA328P-PU’s will communicate with eachother via I2C and some of them will share modules.
All ATMEGA328P-PU’s will be in a deep sleep mode (using 0.15µA each) and woken up when needed trough and interrupt on the digital pin’s 2.
The primary ATMEGA328P-PU is the master which gives commands to both slaves via I2C. Until a user presses a button the master will be in a deep sleep.
This one also keeps a log of button presses, runtime etc saving it all to the FRAM module. The FRAM module is also there for reading a configuration set by an administrator.
The slave devices will only be woken up by the master within certain hours and will be in deep sleep the rest of the time, even if the master is awake to do other stuff.
The following devices are connected to the master:
- Adafruit DS3231 RTC module (I2C)
- Adafruit FRAM module (I2C)
- Adafruit VS5310 Audio module (SPI)
The secondary ATMEGA328P-PU is for power control. This one will be woken up by the master and measure power usage of the whole system through the INA260 module. The measurements will be written to the FRAM module (connected to the master) via I2C.
This slave will supply power the the devices connected to the master and other slaves when needed and cut off power when not.
The following devices are connected to slave_1:
- Adafruit INA260 module (I2C)
- Multiple Pololu 2808 latching power control boards
The tertiary ATMEGA328P-PU is for communications with an administrator via GSM. This slave will be woken up by the master only withing certain hours. When woke this slave will read the data stored in the masters FRAM module via I2C. When needed the administrator will send new data or a new configuration via SMS to be stored into the FRAM module of the master.
The following devices are connected to slave_2:
- Adafruit FONA module (UART)