Author Topic: Will this work (optocoupler over shunt)?  (Read 8354 times)

0 Members and 3 Guests are viewing this topic.

Offline stenespenTopic starter

  • Newbie
  • Posts: 4
Will this work (optocoupler over shunt)?
« on: December 04, 2018, 06:40:13 pm »
See attachment.

Trying to detect broken lamps in a simple circuit.

Will this work?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6152
  • Country: de
Re: Will this work (optocoupler over shunt)?
« Reply #1 on: December 04, 2018, 07:29:14 pm »
No.

Lots of things wrong:
CNY17 LED voltage drop
CNY17 CTR
CNY17 max.output current
...
 

Offline stenespenTopic starter

  • Newbie
  • Posts: 4
Re: Will this work (optocoupler over shunt)?
« Reply #2 on: December 04, 2018, 07:41:52 pm »
Which optocoupler should I choose?
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Will this work (optocoupler over shunt)?
« Reply #3 on: December 04, 2018, 08:15:44 pm »
no optocoupler will do that; they use infrared led, which actually have quite a low forward voltage, but not low enough for a shunt drop voltage, additionally it will need a considerable amount of current to drive the led, so no way.

the common way is to amplify a shunt voltage to a level easier to operate with.

the maximal current of the phototransistor also has to be taken into consideration; the magic word also here: amplifying
 

Offline jmelson

  • Super Contributor
  • ***
  • Posts: 2815
  • Country: us
Re: Will this work (optocoupler over shunt)?
« Reply #4 on: December 04, 2018, 08:43:47 pm »
Yes, I have used this to detect overcurrent in a servo amplifier.

Jon
 

Offline HB9EVI

  • Frequent Contributor
  • **
  • Posts: 722
  • Country: ch
Re: Will this work (optocoupler over shunt)?
« Reply #5 on: December 04, 2018, 08:51:08 pm »
well, over 2V drop can drive the IR, but isn't the whole circuit silly:

- burning almost 4,5W over shunt, what is pretty much 1/5 of the loads power rating
- loose over 2V to drive the bulb which are missing to drive the load

who would do that in real world?
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19826
  • Country: gb
  • 0999
Re: Will this work (optocoupler over shunt)?
« Reply #6 on: December 04, 2018, 09:35:16 pm »
The trouble is you'l lose >1.2V tuning on that opto-coupler.

Does it need to be isolated? You already have a relay so there seems little point in having an opto-coupler.

Here's a crude discrete circuit, similar to one I've used before.

The threshold current is about an Amp and the voltage across the sense resistor is clamped by D1, thus limiting the voltage loss, when the current greatly exceeds the threshold. If the current will never significantly exceed the threshold or the additional loss is acceptable, then it's fine to omit D1.

EDIT:
I've just realised the original poster's relay coil has a resistance of 100R, not 500R, in which case R2 should be reduced to 1k. It will also increase the sensitivity of the circuit, since the voltage drop on D2 will be a bit higher.
« Last Edit: December 05, 2018, 03:57:21 pm by Hero999 »
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Will this work (optocoupler over shunt)?
« Reply #7 on: December 05, 2018, 01:56:51 pm »
Hi stenespen,

Afraid that your circuit has a few issues but, attached below, is a schematic showing a circuit that will do your job.

The two diodes are to catch the back EMF of the relay when it switches. I have just put two diodes in because I don't know what the favored snubber arrangements are on EEV- it's always a subject of great debate.

If you want to know anything about the circuit please ask me and don't be discouraged by any negative statements you may get from certain parties. That is not to say that I don't welcome genuine critics who point out real problems with any designs.
« Last Edit: December 05, 2018, 03:56:28 pm by spec »
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 22269
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Will this work (optocoupler over shunt)?
« Reply #8 on: December 05, 2018, 02:10:38 pm »
Right, to get a smaller offset voltage you need some kind of gain; the best we can do for single devices is the antiquated germanium bipolar transistor, with a Vbe around 0.3V.  To do any better (with silicon or otherwise), we need more transistors/diodes, to adjust the voltage drop smaller.  Typically a differential amplifier is used, to remove the temperature and bias dependence that a Vbe drop has.

Physics presents us with other opportunities, which can be more generally useful.  If we apply the Hall effect, we can generate a sense voltage proportional to a magnetic field, in turn proportional to a current flow.  The current flow can be isolated, AC or DC, and with a little circuitry we can see what's going on.

Hall effect sensors are cheap and abundant; though "cheap" is relative (a few bucks).  You're likely better off with a resistor, reference and comparator, if they are suitable.

For AC only, we can use Faraday's law to induce a sense voltage, adding an arbitrarily small voltage drop to the sensed line.  In other words, a current transformer.  (Obviously, this doesn't work so well at DC, so doesn't apply to the present case.)

So, we must consider suitability.  Is power always available?  (Kind of a silly question maybe, but important when we're looking at whether the lamp circuit itself is live, versus just the lamp.)  Is it always in the same direction?  Do we have to worry about it being plugged in backwards or anything?  (If the sense were on the lamp itself, we might need protection to deal with the lamp being plugged in wrong.  Depending on type of course.)  Given answers to these and other questions, we can solve for a perfect solution -- if the requirements are very modest, then the above examples already given will be close already. :)  Likely any better-suited solution will still follow the same plan, just with different sorts of comparators, or output signaling, or signal filtering, or etc.  Simple stuff.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: Will this work (optocoupler over shunt)?
« Reply #9 on: December 05, 2018, 02:23:59 pm »
An infra-red photo transistor pointing at the bulb. >:D
.  That took much longer than I thought it would.
 

Offline Mark Hennessy

  • Frequent Contributor
  • **
  • Posts: 305
  • Country: gb
    • My electronics and audio website
Re: Will this work (optocoupler over shunt)?
« Reply #10 on: December 05, 2018, 04:06:34 pm »
This can be done with a few turns of wire around a reed switch. I like this idea because it minimises losses, is nice and simple, and reed switches are cheap.

About 25 years ago I found a module made by Audi that monitors brake lights using this technique - I probably still have it somewhere. The only added complexity was a couple of transistors to latch the faulty state on IIRC.

Depending on your application, you might need a transistor to invert the logic, but if you don't need that, you might not need any other parts. Here's a reed switch that is good for 500mA, so should drive the relay coil (or possibly even the load you want to switch with the relay?) directly:

https://uk.farnell.com/hamlin/mdsr-4-22-38/switch-reed-spst-no-0-5a-200v/dp/2103636
 
The following users thanked this post: oPossum, Ian.M

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Will this work (optocoupler over shunt)?
« Reply #11 on: December 05, 2018, 04:25:10 pm »
While it is obviously good idea to reduce the senor voltage drop, the OP seemed quite happy with the voltage drop of 2V in his original circuit. Don't forget that the battery voltage varies from car to car and according to battery state of charge and temperature. There is another point too, if the bulb is incandescent the filament resistance has a strongly positive temperature coefficient and the absolute  cold resistance of the filament will have a wide spread from one bulb to another and one manufaturer to another. So it is very important to put all these theories in perspective, especially as the human perception of light is logarithmic. 

The -2.2mV deg C temp coefficient of a Si forward biased junction is not significant in this application where the difference being measured is 0A and 2A. The effect of this coefficient is often overstated: it only amounts to a change of voltage of -0.37% Deg C

The only thing the OP asked is will his circuit work, and afraid to say that the answer is no. But, if a low forward drop were required, it would be a simple design task to achieve that. One cheap opamp or comparator would do the job for next to nothing.

The current activated reed relay approach is clever, but it does introduce an electro-mechanical part, and a hall effect sensor would be another approach as already mentioned. The infrared detector is the Rolls Royce approach, because, rather than by proxy, it measures the actual parameter of interest, the light output.
« Last Edit: December 05, 2018, 05:44:43 pm by spec »
 

Offline ArthurDent

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: us
Re: Will this work (optocoupler over shunt)?
« Reply #12 on: December 05, 2018, 04:50:46 pm »
Here's a circuit that has been around for some time. I haven't tried it but it should work. The advantage of current sensing in the supply going to the bulb is that it can be done remotely whereas a light sensing circuit needs the sensor next to the bulb which may not be possible as in auto taillights.

If you can put a photo diode or photo resistor near the bulb the circuit becomes very simple.

http://www.discovercircuits.com/DJ-Circuits/bad-bulb.htm
 
The following users thanked this post: oPossum

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Will this work (optocoupler over shunt)?
« Reply #13 on: December 05, 2018, 05:01:38 pm »
The advantage of current sensing in the supply going to the bulb is that it can be done remotely whereas a light sensing circuit needs the sensor next to the bulb which may not be possible as in auto taillights.
Good point.
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Will this work (optocoupler over shunt)?
« Reply #14 on: December 05, 2018, 08:18:05 pm »
UPDATE #1  2018_12_06 (decoupling and filtering added)

Attached below is the schematic for a bulb current monitor with a voltage overhead of 50mV. It uses a colossally expensive precision dual comparator costing 33 pence. ::)

The 25mR resistor could just be a four terminal resistor made from a piece of wire.
« Last Edit: December 06, 2018, 05:20:23 am by spec »
 

Offline ArthurDent

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: us
Re: Will this work (optocoupler over shunt)?
« Reply #15 on: December 06, 2018, 03:39:22 am »
spec - "Attached below is the schematic for a bulb current monitor with a voltage overhead of 50mV."

Even less voltage drop than the previous circuits but is the optocoupler and the second 12VDC supply necessary? Seems like the two halves could be combined with the comparator driving Q4
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Will this work (optocoupler over shunt)?
« Reply #16 on: December 06, 2018, 04:35:05 am »
spec - "Attached below is the schematic for a bulb current monitor with a voltage overhead of 50mV."

Even less voltage drop than the previous circuits but is the optocoupler and the second 12VDC supply necessary? Seems like the two halves could be combined with the comparator driving Q4
Of course, but that is not what the OP has asked for. We can only assume that the OP has a reason for having two isolated supplies. The resolution would be to ask him. :)

Another aspect of simplifying the design is to ask what the relay is for. Maybe that could be eliminated too.
« Last Edit: December 06, 2018, 06:53:34 am by spec »
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Will this work (optocoupler over shunt)?
« Reply #17 on: December 06, 2018, 06:05:36 am »
spec - "Attached below is the schematic for a bulb current monitor with a voltage overhead of 50mV."

Even less voltage drop than the previous circuits but is the optocoupler and the second 12VDC supply necessary? Seems like the two halves could be combined with the comparator driving Q4

AD, is this what you had in mind >>
« Last Edit: December 06, 2018, 06:46:48 am by spec »
 

Offline ArthurDent

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: us
Re: Will this work (optocoupler over shunt)?
« Reply #18 on: December 06, 2018, 02:27:44 pm »
spec - "AD, is this what you had in mind >>"

That is what I had in mind and I couldn't see why there would need to be 2 supplies. The only question I have with the circuit is the input connections on the unused comparator. I think connecting the unused inputs directly to ground is recommended as in section 8.1 of this application note.

http://www.ti.com/lit/ds/symlink/lm393-n.pdf
« Last Edit: December 06, 2018, 02:30:44 pm by ArthurDent »
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Will this work (optocoupler over shunt)?
« Reply #19 on: December 06, 2018, 03:05:56 pm »
spec - "AD, is this what you had in mind >>"

That is what I had in mind and I couldn't see why there would need to be 2 supplies. The only question I have with the circuit is the input connections on the unused comparator. I think connecting the unused inputs directly to ground is recommended as in section 8.1 of this application note.

http://www.ti.com/lit/ds/symlink/lm393-n.pdf
Well well well- I have been doing it wrong for all these years! Thanks for the info, but I am not too happy with tying both unused inputs to 0V because, it seems to me, that then the comparator would be in an undefined state and likely to oscillate (the inputs are still active at 0V input).

UPDATE #1 2018_12_06 I just sent a report to TI about the recommendation to tie both inputs of unused comparators to 0V- be interesting to see there response, if it's from and applications engineer that is. 
« Last Edit: December 06, 2018, 03:29:09 pm by spec »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19826
  • Country: gb
  • 0999
Re: Will this work (optocoupler over shunt)?
« Reply #20 on: December 06, 2018, 03:30:38 pm »
spec - "AD, is this what you had in mind >>"

That is what I had in mind and I couldn't see why there would need to be 2 supplies. The only question I have with the circuit is the input connections on the unused comparator. I think connecting the unused inputs directly to ground is recommended as in section 8.1 of this application note.

http://www.ti.com/lit/ds/symlink/lm393-n.pdf
Well well well- I have been doing it wrong for all these years! Thanks for the info, but I am not too happy with tying both unused inputs to 0V because, it seems to me, that then the comparator would be in an undefined state and likely to oscillate (the inputs are still active at 0V input).
Some hysteresis would also be a good idea.
« Last Edit: December 06, 2018, 03:32:14 pm by Hero999 »
 

Offline spec

  • Frequent Contributor
  • **
  • Posts: 833
  • Country: england
  • MALE
Re: Will this work (optocoupler over shunt)?
« Reply #21 on: December 06, 2018, 03:35:48 pm »
I think you just made an oscillator  ::)

There is no real need for hysteresis in this application, because the inputs are never close to one another.
« Last Edit: December 06, 2018, 03:41:35 pm by spec »
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19826
  • Country: gb
  • 0999
Re: Will this work (optocoupler over shunt)?
« Reply #22 on: December 06, 2018, 04:56:23 pm »
I think you just made an oscillator  ::)
How? Please take another look.

Quote
There is no real need for hysteresis in this application, because the inputs are never close to one another.
The inputs do get quite close, about 12mV between them, when the bulb is working and C5 makes it worse, as it increases the length of time when the comparator will be in its linear region.

I do agree, hysteresis not essential, as the relay has some hysteresis built-in, there's no hysteresis on any of the discrete designs posted here, but the relay will last longer with it and it's only two extra resistors, so why not?
« Last Edit: December 06, 2018, 05:23:49 pm by Hero999 »
 

Offline ArthurDent

  • Super Contributor
  • ***
  • Posts: 1193
  • Country: us
Re: Will this work (optocoupler over shunt)?
« Reply #23 on: December 06, 2018, 07:51:23 pm »
Hero999 - "Some hysteresis would also be a good idea."

Although it probably isn't necessary, if I were adding hysteresis I would put a 1M resistor between pin1 (output of LM393) and pin3 (+ input) instead of the way the schematic shows it between pin2 (- input) and the collector of Q2, which is the noisiest point in the circuit. I also might go with .1uF for C5 and C6 with C6 moved to be across R15..
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 19826
  • Country: gb
  • 0999
Re: Will this work (optocoupler over shunt)?
« Reply #24 on: December 06, 2018, 09:51:17 pm »
Hero999 - "Some hysteresis would also be a good idea."

Although it probably isn't necessary, if I were adding hysteresis I would put a 1M resistor between pin1 (output of LM393) and pin3 (+ input) instead of the way the schematic shows it between pin2 (- input) and the collector of Q2, which is the noisiest point in the circuit. I also might go with .1uF for C5 and C6 with C6 moved to be across R15..
Yes, that was my first instinct, but then I noticed Q2's base clamps the comparatot's output voltage to around 700mV, which would make it less effective, so I opted for the collector and pin 2 instead.

How is Q2's collector noisy? It just goes to the relay coil? There's no active noise source.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf