Arduino digital input, 80Vdc

dhenry:

the internal pullup resistor from the arduino active.

That pull-up "resistance" is too high and you may not be able to turn off the phototransistor and generate a logic 0.

Use a resistor and its value will generally be < 10k.

From the data sheet, the off-state collector current of the 4N35 is 50nA max at 25C. So the internal pullup resistor will be fine unless the OP puts the opto isolator somewhere very hot, or he needs a faster turn-off time (but we're only talking about a few hundreds of microseconds at most).

Thanks dc42, i will try both internal and external pullup resistor and decide. I dont need such a short timing.
The circuit so far...

Thanks, any additional information is welcome.
Still trying to figure out where the zener would be at use, maybe its after the R1 to ground.

dc42:
See attached. The diode in parallel with the input side of the optocoupler is needed only if there is a possibility of the polarity of the 60-80V input reversing. Enable the internal pullup on the digital input pin.

Sorry to bump this up, but I finally need to build this circuit.
I was just wondering, what is the difference between setting the diode in series with positive, or to put it in parellel with the optocoupler?

Please correct me if I am wrong
In series: Acts as a polarity protection. In case + and - are connected the wrong way it will not allow current to flow.

In parallel: Acts as a short circuit in case voltage is over "reverse voltage", but it was suggested that any 1N400x however for example 1N4007 has 700V reverse voltage, and I am just putting in 80V, so any surge will be much lower. however 1n4148 does have a "reverse voltage" of 100V so that makes more sense.

Both? If I am correct, both diodes would be needed for extra security?

Thank you very much

series.JPG

A diode such as 1N4007 will have a lot of capacitance and a slow reverse recovery time. This means that if you get a sudden negative going transient, it will initially be passed through the 1N4007 and cause the opto diode to break down - although probably not for long enough to cause damage. However, using a small signal diode such as 1N4148 (which is also much faster than a 1N4007) in parallel with the opto diode avoids that.

dc42:
A diode such as 1N4007 will have a lot of capacitance and a slow reverse recovery time. This means that if you get a sudden negative going transient, it will initially be passed through the 1N4007 and cause the opto diode to break down - although probably not for long enough to cause damage. However, using a small signal diode such as 1N4148 (which is also much faster than a 1N4007) in parallel with the opto diode avoids that.

thanks dc42, so I dont need both?
Is my description of the function of each diode correct? or am I missing something?

thanks!

Sergegsx:
thanks dc42, so I dont need both?
Is my description of the function of each diode correct? or am I missing something?

Your description is correct, and you don't need both diodes.

btw you can also get opto isolators that have two back-to-back LEDs on the input side. If you used on of those, then it wouldn't matter which way round you connected the 80V input, because it would work either way. Here's an example: http://www.farnell.com/datasheets/54263.pdf.

Hi, I noticed this long drawn out discussion, here is my bit, find in the attached schematic that if you use a zener diode in series with the input to the opto, the input will not conduct until the input is above the zener voltage.
Using 10mA as the starting current is just a suggestion.
Just some quick calcs and you don't need high wattage components. It will need some more work to check current at 80V, but hey there's the challenge.
A lot of industrial CNC and other control equipment use this method to check if all the supply rails in its system are present before commencing and continuing any sequence.

TomGeorge:
Hi, I noticed this long drawn out discussion, here is my bit, find in the attached schematic that if you use a zener diode in series with the input to the opto, the input will not conduct until the input is above the zener voltage.
Using 10mA as the starting current is just a suggestion.
Just some quick calcs and you don't need high wattage components. It will need some more work to check current at 80V, but hey there's the challenge.
A lot of industrial CNC and other control equipment use this method to check if all the supply rails in its system are present before commencing and continuing any sequence.

Tom thank you very much for your suggestion also, as well as dc42, you have helped me a lot to understand all this.
I have actually build your suggestion but using 2 zener diodes as I couldnt get 55V zeners plus this way I get double power dissipation as each of them has 1/2 the voltage.
Things get warm but just that, and optocouplers are sending the signal completely correct to the arduino! great !
It is also a very good improvement having the 55V trigger instead of just allowing voltage to build up until the 4N25 activated. This way I can detect ON/OFF states much more precisely.
Thanks !!

I attached my unfinished PCB, although the part we are discussing here is indeed completed. I included a onboard led to show the status of each input. any suggestion on improvement is of course welcome

UPDATE !

Sorry to bring this up again, but I need a little further help.

As I said earlier, I finally build this system and works perfectly, however I am a bit concerned on the temperature the diodes are getting up to.

There are 2 diodes (1N4750A with a 27V drop). First one to drop from 72V to 45V and then to 18V.
With a 15mA current.

1st diode)
Power Dissipated:
P=I?E=0.015?(72.73-45.73)=0.405W=405 mW

2nd diode)
Power Dissipated:
P=I?E=0.015?(45.73-18.73)=0.405W=405 mW

This diodes are 1 Watt, however they get very hot to the touch.

Any suggestion on how to upgrade the system to prevent them getting so hot?

Thank you very much for your help :slight_smile:

Lower the current and/or lower the voltage drop over the zeners, (change from 2 to 3 zeners)

Pelle

Pelleplutt:
Lower the current and/or lower the voltage drop over the zeners, (change from 2 to 3 zeners)

Pelle

Hello Pelle,

I can not lower the current as it is already powering the minimum things requiered (ie: pcb status led + 4N25).
I can add a third zener diode but I wanted to know if there was any other option as i am already with too many components (2zener+2diodes) per channel. If i add a third diode means another 6 diodes in the pcb + having to make the pcb bigger.

any other option?

thanks for the help

A fan? Moving air has a profound effect on heat dissipation.

The problem with power ratings is that they assume certain conditions that your setup may not include. A certain amount of free space around the component, mounting height above the board, not having more hot components nearby, those sorts of things.

What I can see from your layout you have the indication LED in parallell with the optocoupler.
Connect the indication LED in series with the optocoupler and the current are half of what is now.

One less component (2,2K?)

Pelle

Pelleplutt:
What I can see from your layout you have the indication LED in parallell with the optocoupler.
Connect the indication LED in series with the optocoupler and the current are half of what is now.

One less component (2,2K?)

Pelle

Thats a very good idea Pelle !! Just cant believe how easy it was.

I did the simulation in livewire and we went from 402mW to 192mW !! Plus as you say, I can get rid of 6 resistors !! $)

So whats happening here is that by using only 1 resistor, the current "lost" in the extra resistor to drop the voltage is not required any more. The leds need very little current.
Is this correct? I just want to fully understand whats happening now.

Once again thanks ! When I fully understand whats happening I will modify my PCB to test it. Thank you :slight_smile:

When the input is 80V you are running the opto isolators at more than 10mA , which is far more than they need. I suggest you increase the 2k2 resistors to 4K7 or 10K. If you do rewire the PCB to put the LEDs in series with the opto isolators, then this will make the LEDs less bright, but unless you view them in direct sunlight they should still be bright enough, especially if they are green ones.

With the latest change, arent they running at seven mA? According to the simulation at least.
Could i get a one or two line explanation on the change of putting the led in series ? Is what i said earlier correct?
There are only 0.7 volts to the second led, should i worry about this?
Thanks everyone

Your revised schematics need amending. If you are going to connect the indicator LED in series with the opto isolator, then the 1N4148 diode should be in parallel with the series combination of the indicator and the opto isolator. Otherwise, if the 80V input is reversed, you will blow the LED.

Another issue with both the original and the revised circuit is that if you reverse the 80V input, then almost the full 80V appears across the 2.2k resistor, and it will dissipate about 3W. This is a consequence of adding the zener diodes and reducing the series resistor.

You haven't told us what the forward voltage of your indicator LEDs is (or even what colour they are), so I can't calculate the exact current flowing through the circuit.

dc42:
Your revised schematics need amending. If you are going to connect the indicator LED in series with the opto isolator, then the 1N4148 diode should be in parallel with the series combination of the indicator and the opto isolator. Otherwise, if the 80V input is reversed, you will blow the LED.

Absolutely right, I forgot about that, Thanks for looking into it and telling me.
Attached the corrected schematic. (I left the SW2 switch to do some tests in the simulator)

dc42:
Another issue with both the original and the revised circuit is that if you reverse the 80V input, then almost the full 80V appears across the 2.2k resistor, and it will dissipate about 3W. This is a consequence of adding the zener diodes and reducing the series resistor.

Anything that can be done with this? I understand what you are saying but I cant see this can be fixed, right?

dc42:
You haven't told us what the forward voltage of your indicator LEDs is (or even what colour they are), so I can't calculate the exact current flowing through the circuit.

Sorry about that, its a regular 5mm green led. I dont know the forward voltage as I got them from the store without further information. According to LED - Basic Green 5mm - COM-09592 - SparkFun Electronics
Could we say "1.8-2.2VDC forward drop
Max current: 20mA
Suggested using current: 16-18mA
Luminous Intensity: 150-200mcd"

I really appreciate your help dc42, now and also in the past you have helped me.

btw. I dont need very bright leds on the PCB, just the minimum to see if the channel is ON or OFF. So the current through the LED+optocoupler can be lowered, 5mA is ok?

Skip the 1N4148 and put an 1N400X in serie with the zeners, no revers voltage and not possible to burn 2k2.
What current do the optokopplare LED need?
Look in the daasheet after CTR current transfer ratio.

LED current x CTR = phototransistor current.

LED current 10mA x CTR 50% = possible phototransistor current 5 mA

If you use 10kohm pullup = 0,5 mA from optocoupler you only need 1 mA LED current.

Look in the datasheet what CTR your optocoupler have and calculate the current needed.
Calculate the resistor with 60 volts input.

Pelle, sorry about the spelning, my Pad talkning swedish

The full design is here, as you can see there are already 2 x 1n400x at the begining as protection. however, previously I was told to put also this other diode across the optocoupler as it was a faster diode. Is this correct? should I leave it or remove it?

Let me go through your calculations, CRT is new to me. After I read about it I will post again.
Thanks again pelle