Arduino digital input, 80Vdc

Sergegsx:
I might get some voltage surges and would not like to fry my arduino, also its a good oportunity to use them for the first time. Can you help me out on how to choose the appropiate one?

You could put in a protection diode for that. Get a 5V Zener diode and connect it in parallel with the lower resistor. If a voltage higher than 5V appears at the resistor junction the diode will short it to ground.

If the resistors have large values (75k, 5k) then there'll hardly be any amps, it should be enough protection.

fungus in parallel? like this... see picture. or maybe as the second option i have drawn?

dhenry thank you so much for the explanation. will reread it a couple of times for fully understanding it.

dc42, you are right, that is max. thanks !

mm...maybe i understood it wrong. maybe like this?
and the internal pullup resistor from the arduino active.

D4 is redundant in this circuit, unless you accidentally short the input of the opto isolator to the output. It might be a useful protection device if you were not using optical isolation. It is also connected the wrong way round.

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.

dc42:
D4 is redundant in this circuit, unless you accidentally short the input of the opto isolator to the output. It might be a useful protection device if you were not using optical isolation. It is also connected the wrong way round.

thanks, i thought this is what fungus ment to be able to give aditional protection in case there is a surge in the 80Vdc.
dont understand what he ment then.

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.

ok i just say the internal pullup resistor of the arduino is 20Kohms.
I will use a 10k then ! thanks for the information dhenry

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