Measure battery Voltage 4V using optocoupler and read voltage value use Arduino

I will use 4N25 Optocoupler WhatsApp Image 2024-01-04 at 15.22.41_a585ebc5|666x500

Can you help me develop this circuit .. plz share the knowledge about that ,

You can't measure the voltage with the 4N25. You can only detect if the battery is connected or not.
If you want to measure the battery voltage, you can connect it to A0 through a 1K resistor but make sure the voltage never goes over 5V

2 Likes

An optocoupler is a logic device 0 or 1.

The idea is POSSIBLE - but you would need eg V-f converter, optocoupler, measure the frequency with the arduino. Or some sort of feedback system.

But basically you are trying to do this the wrong way.

Perhaps if you told us a bit more?

1 Like

That will not work, that optocoupler is a digital device. You will need to find an another optocoupler that will do linear but realize the range will be less then 5V so you need to also design some analog circuity to make it work. When you get that far post your schematic we will happily check it for you.

1 Like

@rumesh12

This simple circuit will work and the Uno will be proteced from overvoltage.

1 Like

Thanks for your response sir. Actually, I want to measure battery voltage not use connect common ground. Are you know to do it?

Thanks for your response sir.

Thanks for your response .

Isolated Diff Amp?

1 Like


ISOLATED DIFF AMP is not clear. I try to do it, but I can't do it yet. do you have any idea?

Are you trying to measure a single cell in a 24volt supercap battery? (your previous thread)

Maybe you should look at the "flying capacitor" principle, with small signal relays.
Leo..

2 Likes

https://www.mouser.com/ProductDetail/Texas-Instruments/AMC1351DWVR?qs=Rp5uXu7WBW914eP72355rg%3D%3D

1 Like

No, my supercapsitor bank voltage is 16V because I use voltage divider circuit ( 4 Sirius resistor). I try to measure the voltage between one resistor. i want to measure Vale and print value use Arduino

Do you have any idea how to do it?

Tell us exactly what you're trying to measure (each individual cell, or only the total battery voltage),
and why you think you should measure that isolated from Arduino ground.

A flying capacitor is nothing more than a capacitor, switched between the cell of a battery and the Arduino. Which can be done with a DPDT relay. Not sure if this will be right for you until you tell us more about your setup.
Leo..

1 Like

The SI8932 may be easier to work with. It has a 2.5V max input

1 Like

I am an undereducation student, my research is the development supercapacitor assistant LED system. So

this is my system (basic sketch ) ,
when S1 is on S2 is off supercapacitor charge (charging loop) then reach (not full charge) capacitor voltage is 14V. then S1 is off and S2 is off (discharging loop).

Do you have any idea measure the capacitor voltage and read value use Arduino

The LED and cap are in series, so you can swap them in your diagram. Then the cap negative is connected to ground, which makes it easier to use a voltage divider for the Arduino (common ground).

Not sure why you charge the cap through the LED (with reverse current).
Please explain.

Do you also use a balance circuit for your 5-cell super-cap bank (needed).
Leo..

1 Like

yes, it is true.. but i want to measure the voltage. plz, tell me how to do it.

You can use an AD7740 voltage to frequency converter and an H11L1 optoisolator.
In the AD7740 datasheet there is a diagram of the general configuration to use

1 Like