Hardware‎ > ‎BeeStalker - UsbLog‎ > ‎

Power Board - V1

Enable Power

On startup the boost-converter is activated using the power-switch (pmos).

After a power-disable using I2C, a power loss, a reset or a level-change on PD2 (PCINT18) will re-enable the power.

I2c Protocol

The ATMega168pa on this board is used to control the power switch and to read back the battery voltage. This is done using I2C.

To read the battery voltage use following code on a bash command-line:

i2cget -y 0 9 1 w

Since the ATMega has quite a large range for the reference voltage, calibration is necessary. This can be done using following command:

i2cset 0 9 1 1143 w

This sets the reference to 1.143V.

The power-switch (actually the pmos disconnecting the boost converter) can be controlled by writing to adress 0x00.

Writing 0 to this address disconnects the power:

i2cset 0 9 0 0 b

To enable power again, simply write 1 to this address:

i2cset 0 9 0 1 b


384
Comments