## ISS-Notify

I made a light that shines when the International Space Station is in the sky. I'm raising money to make a whole bunch and sell them.
Created by
292 backers pledged \$18,637 to help bring this project to life.

## Voltage Dividers

I wanted ISS Notify to work for a while not plugged in, so I've worked out a rechargeable backup battery system.  But if you have a battery in a circuit you want to know how much charge it has left so you don't run it down too low (damaging the battery) and so the other parts of the circuit maintain proper voltage.

The microcontroller and everything else is running at 3.3V, but the battery can be higher, up to about 4.4 V, so how can you measure the higher voltages? Use of voltage divider. A basic voltage divider is just two resistors in series connected to ground. The voltage in between the two resistors will always be lower than the input voltage by a fraction based on the ratio of the resistor values.

But there is a problem, this will drain a small amount of power continuously! One thing you can do is make the resistors really big so they drain less power. I started with this, but I can do better. I don't need to measure the battery voltage continuously. So by adding a digital switch, is this case something called a MOSFET. Then I can periodically switch the battery sensing circuit on, measure the voltage, and turn it back off. This will eat up almost no power at all.

But that introduces another problem, the switch needs to be on the high side of the voltage divider, which is not at the same voltage as the microcontroller. In order to keep the microcontroller isolated and safe, a second MOSFET is used to switch the other.

The final circuit diagram is attached.

Q1 turns on the voltage divider (R10 and R11), while Q2 gets attached to the microcontroller. The other two resistors keep the MOSFETS off when nothing else is happening. By turning on Q2, and using an analog pin attached to the divider I can measure how much voltage is left in the battery and let you know if you need to plug it in.

Next week: Full parts list (I hope!)

1. ### Nathan BergeyCreator on January 12, 2012

@Mark: Ah, thanks. I'll think about that. Luckily +/- one FET isn't too big a deal.

@Reed Thanks! I'll try to explain all that pieces of the board in the next few posts.

2. ### Reed Martin on January 12, 2012

Nathan,
Very nice update. I appreciate the circuit design details and learning how the individual components work together is fascinating!

3. ### Mark Mitchell on January 11, 2012

Hi Nathan,
Sounds like you have made some great progress! One comment about the voltage divider switch: You don't necessarily have to switch the high side of the circuit. Often the outputs on a microcontroller can be configured to be either floating or pull to ground. This way you can float the divider circuit when you don't want to use it, and switch the bottom side to ground when you do. Just make sure the resistors are high enough to not overload the output pin with too much current. :-)