# Im_int

17

## Achievements

10K+ Views Earned a bronze medal
• Im_int's instructable IoT Water Alarm's weekly stats: 6 months ago
• 6,154 views
113 favorites
• Im_int entered IoT Water Alarm in the Wireless Contest contest 7 months ago
• Im_int posted an instructable IoT Water Alarm7 months ago
• Im_int commented on Im_int's instructable NiMH Battery Over-discharge Protection Circuit9 months ago

The cut-off voltage for 3 NiMH batteries in series should be around 3.3 V. The built-in voltage reference on attiny85 is only 2.56 V, so the battery voltage would have to be decreased in order to be measured against the internal reference. The easiest way to do it is with a simple voltage divider (https://learn.sparkfun.com/tutorials/voltage-divid...) which is just two resistors in series between the battery voltage input and the ground: [Vbat terminal] —/\/\/\/\/-(R5)— [attiny85 sensing point] —/\/\/\/\/\/-(R6)— [GND terminal]Here's what the underside would look like: https://imgur.com/4mR6iV4Aiming for R5+R6 ~10 kOhm (so the parasitic current through the divider stays under 0.5 mA) we could use R5 = 3.3 kOhm and R6 = 6.8 kOhm which give a scaling factor of 0.67...

see more »

The cut-off voltage for 3 NiMH batteries in series should be around 3.3 V. The built-in voltage reference on attiny85 is only 2.56 V, so the battery voltage would have to be decreased in order to be measured against the internal reference. The easiest way to do it is with a simple voltage divider (https://learn.sparkfun.com/tutorials/voltage-divid...) which is just two resistors in series between the battery voltage input and the ground: [Vbat terminal] —/\/\/\/\/-(R5)— [attiny85 sensing point] —/\/\/\/\/\/-(R6)— [GND terminal]Here's what the underside would look like: https://imgur.com/4mR6iV4Aiming for R5+R6 ~10 kOhm (so the parasitic current through the divider stays under 0.5 mA) we could use R5 = 3.3 kOhm and R6 = 6.8 kOhm which give a scaling factor of 0.673 at the sensing point. 3.3 V cut-off then becomes 3.3*0.673 = 2.22 V. The cut-off threshold in the code ("const uint16_t threshold = 800;") would need to be changed to 2.22/2.56*1024 = 888.

• Im_int followed Gabse1 year ago
• Im_int's instructable NiMH battery over-discharge protection circuit's weekly stats: 1 year ago
• 1,682 views
40 favorites