# UsbDP module to measure supplied voltage?

UsbDP is a great little power-module. I am planing to use it to supply my Spider-based system with power, coming from a car-batteri, that is charged by a solar-panel through a regulator (just ensuring that no more than 12 volts are coming from the solar-panel).

But when the battery is not charged and the voltage is dropping, I need the system to alert me so I can come an swap the the battery - preferably before the system dies caused by missing power.

Is there a way to measure the supplied voltage, or should I add the voltage-measurement module?

Thanks

Edit: and connect the battery power to it…

Great, sounds like good news, what is a divider (sorry I am noob)!

Will this work?

``````

double batteryvoltage = 0;

while (true)
{
Debug.Print(batteryvoltage.ToString());
}

``````

Just found the divider stuff on the http://www.ghielectronics.com/docs/8/analog-inputs

And tried calculating with http://www.sengpielaudio.com/calculator-voltagedivider.htm

But I am still lost, which design to choose (type 1 or 2 in the calculator)? Based on the battery/solar-panel case?

In your case you need to know the soc value, But… based on voltage y8u can only get this in a unloaded state with a simple divider. Is there a soc output on the solar charger?

@ njbuch -

We are ALL ‘Noobs’ sometime. Maybe all the time for some things… I’m + 70 years old and still learning.

Great little application you can use. It is safe to download… I use it all the time!

http://www.electronics2000.co.uk/

But I am still lost, which design to choose …

I would say forget about you program for a moment. If you have some resistors, a power supply and any old volt meter… make up a few different resistor dividers and measure the node voltage. Maybe use a potentiometer at the positive and negative ends of the divider and ‘see’ what happens… Eyes and the meter tell you ALOT!

(Forget about the Z’s and whatever unless your a math wizard!) The drawing at the side tell you much more as I see it…

Hell, just poke around with you meter and SEE what changes and WHERE it changes.

AND most of all HAVE FUN DOING IT!

EDIT: I forgot to say… Change the Potentiometers while you are doing it.

But it might be feasible to upgrade for a soc?

Depends, you talk ab8ut a car (lead accid?) Battery?
And second, when do y need a allert? (critical point or some time left to act)

Yes its a car battery, and I need a few days before its not able to power The system.

Have a look at
batteryuniversity.com/learn/article/how_to_measure_state_of_charge
But you will have to find the trigger level by testing, because you messure while loaded.