Electronics > Beginners
Sensing (interfacing) high voltage with arduino or any Microcontroller
<< < (5/7) > >>
Laszlo:
Hi,

Thanks for pointing out the different type of optos, I am new to electronics design, so most components are new to me, as well as most design quirks.  :-[
I've done a little search, and a 4N32M looks also suitable (and I can get those cheap in small quantities.) This is going to be a one off trial solution, so price is a big factor for me to consider.

After looking around some more, I've seen some similar circuit with a flyback diode before the optocoupler led. Can I go around this by adding an additional TVS diode after the first stage of the voltage divider?

Cheers,
Laszlo


fourfathom:
Something like this should be pretty robust, and is about as simple as you can get.  The 6.2V zener will protect the optoisolator against overvoltage (over-current) and reverse-voltage.  You could add a capacitor in parallel with the Zener for noise suppression, say a 0.1uF part.  I have no idea if the optoisolator I picked is appropriate, but it does work in the circuit.  A high-sensitivity opto would be best.  To adjust the on/off switching voltage, change the value of R1 (the 150K resistor).  This circuit will draw less than 1mA from your high-voltage input.  You want to follow the opto with a cmos schmitt trigger.

I have the input and output grounds connected together, just to make the simulation easier.  You would obviously want to keep these isolated.
fourfathom:

--- Quote from: fourfathom on September 09, 2019, 06:01:49 pm ---Something like this should be pretty robust, and is about as simple as you can get.
--- End quote ---

Just to be clear, my circuit above is far from precise, and will have a very sloppy on/off threshold.  Your specifications are still quite loose, so I am assuming that any additional precision is not necessary.  If you do need more precision, the previously suggested circuits that had zener diodes as voltage dropping elements will provide a sharper and better-defined switching point.

Also, the zener diode and resistor values as shown will provide a good degree of protection from voltage spikes, etc, but it's entirely possible that some outsized transient might cause damage.  Again, without a specification we don't know if more is required.
Laszlo:
Hi,

Thanks for the input Fourfathom, it's much appreciated.


--- Quote from: fourfathom on September 10, 2019, 12:54:20 am --- Your specifications are still quite loose, so I am assuming that any additional precision is not necessary.

--- End quote ---

Precision is not necessary. The signals are coming from various limit switches, auxiliary microswitch contacts, relays and long as the speed of switching is within 0.5s I am happy, There is the chance of odd transients, hence I was thinking a TVS is necessary.
This thing will only provide an indication that certain equipment was energized, preferably by taking as little current as possible from the source. This is an absolute must requirement because it's going to be used on rolling stock and trust me, battery power is not something I want to drain off  :)

I've been working on this for quite some time now, and I've tried multiple solutions, like;

* Driving the Arduino straight from the Opto - what a stupid idea that was   :palm:
* Drving a relay from an LM324, and have the relay switch in between 10k \$\Omega\$ to ground and 5vDc to the Arduino digital input. - This worked like a charm but uses too much power due to the relays and it still needed an LM324+the opto for isolation.   
* Using an inverting Schmitt trigger, but I didn't like the idea of inverted logic.
* And finally the 74HC4050, and this seems to be the best  solution so far
I know that a single voltage divider would work in this case, but I would like to minimize the stresses on components, so I think multiple levels of attenuation with two voltage dividers+2 zeners will be something I will implement. This is where I was struggling the most because there just isn't anything I could find regarding good design practices with multiple stages of "signal" attenuation. I'd be extremely grateful if someone could point me towards a book or something where I can try to understand more about this topic. I've got Horowitses AOE, but I can't seem to find much about this in that book.

Cheers,
Laszlo
 
mariush:
If you want fewer components, you could look into LR8 linear regulators: http://ww1.microchip.com/downloads/en/DeviceDoc/20005399B.pdf

They can work with minimum 12v, max 440v, and they can output as little as 1.2v ...

Has a 1.2v reference voltage, so if you want it to output 1.2v you only need a single resistor between output and adjust (datasheet says 2.4k) and maybe a couple capacitors at input and output.

The datasheet says  typical 0.3mA, max 0.5mA output current (through the adjust voltage resistor divider and the load), so it may be a bit higher heat produced if you have some optocoupler that needs less than this to operate.

They're cheap at 50 cents each and they're available in to92, dpak, to243 ... yeah a zener is cheaper at less than 10 cents but maybe a regulator will be more rugged and have some additional protections inside and tolerate heat better.


Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod