Share this project


Share this project

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.
292 backers pledged $18,637 to help bring this project to life.

Voltage Dividers

Posted by Nathan Bergey (Creator)

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!)

  • Image 85353 original.png?ixlib=rb 1.1


Only backers can post comments. Log In
    1. Nathan Bergey Creator on

      @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. Missing avatar

      Reed Martin on

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

    3. Missing avatar

      Mark Mitchell on

      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. :-)