Electronics > Beginners
Sensing (interfacing) high voltage with arduino or any Microcontroller
Ian.M:
Also, R3 is essential if you keep the clamping Zener, but pointless if you omit it as then it simply adds to the Thévenin equivalent resistance of the R1:R2 divider.
If you are going to add a second Zener, put it in series with the opto LED to give a higher and better defined threshold voltage.
fourfathom:
--- Quote from: ledtester on September 11, 2019, 08:55:33 pm ---
--- Quote from: fourfathom on September 11, 2019, 03:28:33 pm ---R1 and r2 form the voltage divider that establishes the drive source for the opto.
--- End quote ---
Ok, after thinking about it here's my reasoning on why R2 is desirable -- it effectively raises the trigger voltage of the opto. If we assume the opto's LED doesn't conduct until it has a forward voltage of, say, 1V, then the voltage divider requires the input voltage to be >= 1V * 153/3 = 50V before the opto LED starts to turn on. Without R2 the LED would start to turn on at a much lower voltage.
--- End quote ---
Yes, exactly.
--- Quote from: Ian.M on September 11, 2019, 09:56:56 pm ---Also, R3 is essential if you keep the clamping Zener, but pointless if you omit it as then it simply adds to the Thévenin equivalent resistance of the R1:R2 divider.
If you are going to add a second Zener, put it in series with the opto LED to give a higher and better defined threshold voltage.
--- End quote ---
Yes.
I would have been less terse in my explanation, but I was posting from my phone.
Since the on/off threshold voltage requirement is so loose, I decided that the simple resistive divider (without a series Zener) would be adequate, and would make it easier to control the opto-diode current. Using a series Zener would have tightened up the switching threshold, but would have made the opto-diode current range be greater over the wide input voltage range. You can play with this in simulation to get a feel for the tradeoffs. There is no single "correct" answer.
Looking at the reverse-voltage spec for the 4N32N opto, I see a -3V maximum. If you want to protect against reversed input connections (and you probably should) then you want either the Zener as shown in my schematic, or a simple diode (1N400X) reverse-polarity across the opto-diode. The forward current spec is high enough that you really don't need the Zener or the series resistor R3. If you eliminate R3 you could increase the values of R1 and R2, which has the benefit of reducing the load on your input. By the way, that 4N32N opto isn't particularly sensitive, but it should work OK.
As far as worrying about the ruggedness of the components, as long as the voltage and power dissipation specs are kept in mind there isn't really anything to worry about. To be extra-sure you could specify a special high-voltage resistor for R1, or use two 1/4W 75K resistors in series to double the power and standoff-voltage values. Component layout and human factors will be more critical than component failure.
fourfathom:
--- Quote from: Laszlo on September 11, 2019, 03:07:34 pm ---The other reasons why I was thinking of doing 2 stages of attenuation is to reduce the effect of EMI on the device.
--- End quote ---
Here's a simplified schematic. The opto is just one chosen at random from the LTSpice library, there are no doubt more sensitive ones available. I used a 1N4148 diode to clamp the reverse voltage, and even with 1 1KV sinewave applied the opto and D1 currents are under 6mA. Of course at 1KV, R1 is getting fried. Remember that with this simple resistive divider the switching threshold is not tightly controlled.
EMI suppression can be accomplished with a simple 0.1uF capacitor across the opto-diode. With the approx 4K effective source resistance the -3dB frequency will be around 300Hz. Any EMI in to 100 KHz-100 MHz will be well-suppressed. For EMI over 100 MHz you might want a 0.01uF cap in parallel with the 0.1uF part. For really bad EMI we can give you advice on more effective filters, but for normal bad EMI the single capacitor should work well. Also, if your opto has the base of the phototransistor brought out (as does the one in my schematic), you can tie this to the output-side emitter through a small capacitor (say 0.01uF) to provide additional noise filtering. This will slow down the on/off switching time, but since you are following this section with a Schmitt trigger this shouldn't matter.
Navigation
[0] Message Index
[*] Previous page
Go to full version