Optocoupler for sensing current flow over wide voltage / current range

Thread Starter

memotronics

Joined Apr 9, 2021
8
I need to sense a flow of 20mA or more. I don't need to know how much, just that it's at roughly 20mA, at supply voltages of 11 to 15VDC (automotive).

I envisioned using an opto-coupler and a fixed voltage regulator, but instead of connecting the regulator's ground to GND, I was going to have that go to the terminal where the load is to be sensed. That way, if no load is connected then the voltage regulator will do nothing, but as soon as a load is connected (effectively providing ground to the regulator), the regulator output will drive the LED in the coupler.

1697405305565.png

My questions are about the voltage and current flow in the above, based on different loads, different supply voltages etc. Also, with no load connected, how do I calculate the voltage at the regulators ground terminal with respect to GND ? And finally, if the load resistance is 600 Ohms, then (at 12V system voltage), the current flowing through the regulator cannot be more than 20mA, correct? So if the supply to the regulator is "choked" to 20mA, it will hardly output 20mA on the regulated side, correct?
 

dendad

Joined Feb 20, 2016
4,426
Does the load require the full 12V and you really mean the load could be 0.1 ohm to 600 ohms?
A little more info could help.
A lot depends on what your load is and how accurate you want the reading to be. Do you need just a yes/no result of an actual current reading?
 

MisterBill2

Joined Jan 23, 2018
17,814
The current flowing from the input to the negative common of a typical IC voltage regulator is often not specified very closely. AND that circuit will not deliver usable results.
The good news is that you do not require a voltage regulator for this application. You DO need to know what the maximum current will be, AND you need to select an opto-isolator with a low forward voltage requirement. AND you need to know the current required to switch on that opto-isolator. To provide the drive you will need two silicon power diodes rated for at least the anticipated load current constantly.
In the working arrangement the two diodes will be connected in series between the voltage source and the unknown load positive connection. The opto-isolator with a series resistor will be connected with it's current inlet toward the diode's anode and the second diode's cathode. Then with a current flow through the two power diodes about 1.4 volts will be developed, causing current to flow through the LED in the isolator. the series resistor value should be selected to drop about 0.2 volts at the current specified to operate the opto-isolator.. So the scheme is rather simple
 

Thread Starter

memotronics

Joined Apr 9, 2021
8
I just need a yes/no reading, and it should indicate "yes" when the current is at least 20mA. I need to clarify: Once the connected microcontroller gets the signal that current is flowing, it will pull in a relay that supplies power directly to the load (and it's OK that, at that point, the circuit will no longer get a signal).

As for the load (resistance), this could be a dead short which mustn't fry the circuit, so I think a 300 Ohms or so resistor in series with the diodes is needed, this will limit the current to 40mA or less (down to 13mA if the load itself adds another 600 Ohms).

So now the question is: If the load is 600 Ohms, and I only have 13mA total current flow: How much of that flows through the power diode vs. the paralell-connected LED ? Assume LED is Vf=1.4 and If=20mA. Obviously at most 13mA is going to flow, but is it going to be 50 percent of that through the Opto-LED and 50% of that through the power diode? If that's the case, I'm not sure if 6.5mA is going to be too little to turn on the opto output
 

Tonyr1084

Joined Sep 24, 2015
7,777
Once the connected microcontroller gets the signal that current is flowing, it will pull in a relay that supplies power directly to the load (and it's OK that, at that point, the circuit will no longer get a signal).
Jumping in here - - - If you only need Y/N, and once you've gotten a Y then a relay kicks in and bypasses the sense circuit. OK, I understand so far. But what happens when the sense circuit drops back to N when the relay kicks in? Will the circuit act like an oscillator, switching back and forth between the relay being on and off? The µProcessor will sense a N situation and shut the relay off, won't it? Then as soon as the relay shuts off - the µP senses a Y and switches the relay back on. Do you have a timer circuit included we don't yet know about? Have you planned for this situation?
 

Thread Starter

memotronics

Joined Apr 9, 2021
8
Tony,
Yes, when the relay pulls in and provides power directly to the load, so the uC will sense a "no current" situation. This is not a problem. The uC only needs to know "once". When the relay drops out, and the load is still connected, then the uC will sense the "current flowing" again.
 

dendad

Joined Feb 20, 2016
4,426
Why use a relay at all?
If all you really need is to just sense current is flowing, something like this would work...
PowerSense.jpg
Add a Polyswitch to the load circuit as a re-settable fuse.
 
Top