Main Site Documentation

UsbDP module to measure supplied voltage?


#1

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


#2

Use a divider and a analog input should do thrick

Edit: and connect the battery power to it…


#3

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

Will this work?

       

AnalogInput batteryvoltagesensor = new AnalogInput((Cpu.AnalogChannel)Cpu.AnalogChannel.ANALOG_7);
         
double batteryvoltage = 0;
 
         while (true)
         {
            batteryvoltage = batteryvoltagesensor.Read();
            Debug.Print(batteryvoltage.ToString());
            Thread.Sleep(500);
          }
  

#4

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?


#5

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?


#6

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


#7

This is the beast http://midsummerenergy.co.uk/buy/solar-regulators/morningstar-sunguard-solar-regulator.html

But it might be feasible to upgrade for a soc?


#8

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)


#9

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


#10

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.