change resistor agains NPN to prevent battery drain

This commit is contained in:
King Kévin 2016-04-06 00:31:52 +02:00
parent b7709355be
commit 11dc330d74
1 changed files with 2 additions and 1 deletions

View File

@ -26,8 +26,9 @@ Preferably use a [blue pill](https://wiki.cuvoodoo.info/doku.php?id=stm32f1xx#bl
The board needs to be powered by an external 5 V power supply (e.g. using the USB port).
To set the time connect using serial over the USB port (providing the CDC ACM profile) or USART1 port (TX and RX are on pin PA9 and PA10) and enter "time HH:MM:SS".
Optionally connect a 3 V coin battery on the VBAT pin for the RTC to keep the correct time in case the main power supply gets disconnected.
To know the charge of the coin cell connect its positive terminal to ADC channel 1 on pin PA1 through a 10 kOhm resistor, else connect it to ground.
To know the charge of the coin cell connect its positive terminal to ADC channel 1 on pin PA1.
The level of the battery will be shown on the LEDs just after a restart, and the voltage will be shown over serial.
To avoid the micro-controller to drain the battery trough the GPIO when un-powered use an NPN transistor, with the collector on the battery, the emitter on the pin, and the base to Vcc.
For the LEDs use a 1 meter LED strip with 60 red-green-blue WS2812b LEDs.
Tape the LED strip along the border/edge of the clock.