Voltage divider using OptoCoupler

Thread Starter

athulascc

Joined Aug 15, 2014
94
hello
I need Isolated voltage divider , I have input 10-20V voltage that should be map to 0-5v to read by micro controller , but problem is they have not common ground. but + side is common.
I think optocoupler will be work. but I am not sure.

I appreciate your great ideas.

Thanks
 

Alec_t

Joined Sep 17, 2013
14,280
but + side is common.
:confused: If input amd output must have a common connection then they are not isolated, so an opto-isolator won't help.

Edit:
Approximately-linear transfer via an opto is possible with the sort of circuit attached, but the output would need scaling and offsetting either in software or by use of an opamp.
IsolatedRamp.PNG
 
Last edited:

ian field

Joined Oct 27, 2012
6,536
hello
I need Isolated voltage divider , I have input 10-20V voltage that should be map to 0-5v to read by micro controller , but problem is they have not common ground. but + side is common.
I think optocoupler will be work. but I am not sure.

I appreciate your great ideas.

Thanks
In principle, there's no reason you can't use an opto coupler as an element in a voltage divide - but it won't be very linear and can be tricky to control.

Its probably worth seeking out the appnotes that describe using opto couplers in linear circuits.

The gist of it is; you use 2 opto couplers - one feeds the next stage, while one is included in the feedback loop of the amp that drives the 2 series connected diode sections.
 

Thread Starter

athulascc

Joined Aug 15, 2014
94
well my application is solar controller. we need to charge battery when solar voltage is enough. but problem is i cant read solar voltage since GND is not common. check my image.
circled mosfet disconnect when there is no battery but i need to read voltage of battery and solar anytime .
hope u get and idea.
panel voltage varies between 10 to 22v.
Need to map it to 0-5v.. micro controller GND is battery GND.
 

Attachments

PeterCoxSmith

Joined Feb 23, 2015
148
Will this work my solar valtage varies between 10-22v i need to map to 0-5v. how to do it using this? is there any gain or attenuation there?
You must read the datasheet. The max input is 200mV so you need an resistive divider to limit 22v to 200mV. The gain is 8.2. So you will need an instrumentation amp on the output side to adjust the span to 5V and a Vref pin to move the voltage down to a range of 0-5V.
 
Voltage divider using Optocouplers is only possible if the switch or signal being detected is within an electrically noisy environment. The output can be used to operate an external circuit, light or as an input to a PC or microprocessor.
 

Thread Starter

athulascc

Joined Aug 15, 2014
94
my idea is to shift micro-controller GND to up. then battery GND and mcu GND is different. since + is common always, i hope it will work.
i think 7905 regulator will do this.
 
Top