Pages: 1 [2] 3 4   Go Down
Author Topic: Arduino digital input, 80Vdc  (Read 6282 times)
0 Members and 1 Guest are viewing this topic.
Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 150
Posts: 5638
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

0
Offline Offline
Edison Member
*
Karma: 17
Posts: 1413
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 !
Logged

* Si preguntas, pon el código de tu programa, hace mucho mas fácil ayudarte. Y me ahorro un mensaje pidiendo que lo hagas.
* Si consigues solucionar tu problema, dedica unos minutos a explicar en tu post como lo conseguiste para beneficio de todos.
* Cambia el 'Subject' de tu hilo y añade 'SOLUCIONADO' cuando hayas llegado a una solución al problema que planteaste.
* Utiliza un 'Subject' para tu hilo que explique de que va el hilo.
Si estas empezando:
* Comienza a usar Arduino
* Guías de iniciación a Arduino
* Ejemplos
* Referencia del Lenguaje
* Conceptos básicos
Guia de usuario de arduino
Tutoriales en Ingles
Si necesitas que alguien te escriba el código: http://www.freelancer.com/  o esta  http://www.guru.com/

0
Offline Offline
Edison Member
*
Karma: 17
Posts: 1413
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* scheme3.png (15.65 KB, 1213x434 - viewed 52 times.)
« Last Edit: October 11, 2012, 07:55:22 am by Sergegsx » Logged

* Si preguntas, pon el código de tu programa, hace mucho mas fácil ayudarte. Y me ahorro un mensaje pidiendo que lo hagas.
* Si consigues solucionar tu problema, dedica unos minutos a explicar en tu post como lo conseguiste para beneficio de todos.
* Cambia el 'Subject' de tu hilo y añade 'SOLUCIONADO' cuando hayas llegado a una solución al problema que planteaste.
* Utiliza un 'Subject' para tu hilo que explique de que va el hilo.
Si estas empezando:
* Comienza a usar Arduino
* Guías de iniciación a Arduino
* Ejemplos
* Referencia del Lenguaje
* Conceptos básicos
Guia de usuario de arduino
Tutoriales en Ingles
Si necesitas que alguien te escriba el código: http://www.freelancer.com/  o esta  http://www.guru.com/

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

0
Offline Offline
Edison Member
*
Karma: 17
Posts: 1413
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

* Si preguntas, pon el código de tu programa, hace mucho mas fácil ayudarte. Y me ahorro un mensaje pidiendo que lo hagas.
* Si consigues solucionar tu problema, dedica unos minutos a explicar en tu post como lo conseguiste para beneficio de todos.
* Cambia el 'Subject' de tu hilo y añade 'SOLUCIONADO' cuando hayas llegado a una solución al problema que planteaste.
* Utiliza un 'Subject' para tu hilo que explique de que va el hilo.
Si estas empezando:
* Comienza a usar Arduino
* Guías de iniciación a Arduino
* Ejemplos
* Referencia del Lenguaje
* Conceptos básicos
Guia de usuario de arduino
Tutoriales en Ingles
Si necesitas que alguien te escriba el código: http://www.freelancer.com/  o esta  http://www.guru.com/

0
Offline Offline
Edison Member
*
Karma: 17
Posts: 1413
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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
Logged

* Si preguntas, pon el código de tu programa, hace mucho mas fácil ayudarte. Y me ahorro un mensaje pidiendo que lo hagas.
* Si consigues solucionar tu problema, dedica unos minutos a explicar en tu post como lo conseguiste para beneficio de todos.
* Cambia el 'Subject' de tu hilo y añade 'SOLUCIONADO' cuando hayas llegado a una solución al problema que planteaste.
* Utiliza un 'Subject' para tu hilo que explique de que va el hilo.
Si estas empezando:
* Comienza a usar Arduino
* Guías de iniciación a Arduino
* Ejemplos
* Referencia del Lenguaje
* Conceptos básicos
Guia de usuario de arduino
Tutoriales en Ingles
Si necesitas que alguien te escriba el código: http://www.freelancer.com/  o esta  http://www.guru.com/

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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).
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Edison Member
*
Karma: 17
Posts: 1413
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* scheme4.png (33.1 KB, 1142x471 - viewed 38 times.)
Logged

* Si preguntas, pon el código de tu programa, hace mucho mas fácil ayudarte. Y me ahorro un mensaje pidiendo que lo hagas.
* Si consigues solucionar tu problema, dedica unos minutos a explicar en tu post como lo conseguiste para beneficio de todos.
* Cambia el 'Subject' de tu hilo y añade 'SOLUCIONADO' cuando hayas llegado a una solución al problema que planteaste.
* Utiliza un 'Subject' para tu hilo que explique de que va el hilo.
Si estas empezando:
* Comienza a usar Arduino
* Guías de iniciación a Arduino
* Ejemplos
* Referencia del Lenguaje
* Conceptos básicos
Guia de usuario de arduino
Tutoriales en Ingles
Si necesitas que alguien te escriba el código: http://www.freelancer.com/  o esta  http://www.guru.com/

0
Offline Offline
Edison Member
*
Karma: 17
Posts: 1413
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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





* parallel.JPG (52.49 KB, 1653x1165 - viewed 34 times.)

* series.JPG (17.15 KB, 445x227 - viewed 43 times.)
Logged

* Si preguntas, pon el código de tu programa, hace mucho mas fácil ayudarte. Y me ahorro un mensaje pidiendo que lo hagas.
* Si consigues solucionar tu problema, dedica unos minutos a explicar en tu post como lo conseguiste para beneficio de todos.
* Cambia el 'Subject' de tu hilo y añade 'SOLUCIONADO' cuando hayas llegado a una solución al problema que planteaste.
* Utiliza un 'Subject' para tu hilo que explique de que va el hilo.
Si estas empezando:
* Comienza a usar Arduino
* Guías de iniciación a Arduino
* Ejemplos
* Referencia del Lenguaje
* Conceptos básicos
Guia de usuario de arduino
Tutoriales en Ingles
Si necesitas que alguien te escriba el código: http://www.freelancer.com/  o esta  http://www.guru.com/

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

0
Offline Offline
Edison Member
*
Karma: 17
Posts: 1413
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

* Si preguntas, pon el código de tu programa, hace mucho mas fácil ayudarte. Y me ahorro un mensaje pidiendo que lo hagas.
* Si consigues solucionar tu problema, dedica unos minutos a explicar en tu post como lo conseguiste para beneficio de todos.
* Cambia el 'Subject' de tu hilo y añade 'SOLUCIONADO' cuando hayas llegado a una solución al problema que planteaste.
* Utiliza un 'Subject' para tu hilo que explique de que va el hilo.
Si estas empezando:
* Comienza a usar Arduino
* Guías de iniciación a Arduino
* Ejemplos
* Referencia del Lenguaje
* Conceptos básicos
Guia de usuario de arduino
Tutoriales en Ingles
Si necesitas que alguien te escriba el código: http://www.freelancer.com/  o esta  http://www.guru.com/

United Kingdom
Offline Offline
Tesla Member
***
Karma: 227
Posts: 6637
Hofstadter's Law: It always takes longer than you expect, even when you take into account Hofstadter's Law.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Formal verification of safety-critical software, software development, and electronic design and prototyping. See http://www.eschertech.com. Please do not ask for unpaid help via PM, use the forum.

Victoria, Australia
Offline Offline
Edison Member
*
Karma: 46
Posts: 1612
Electronics Engineer/Industrial Control
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


* 60Vcircuit.jpg (110.68 KB, 1721x831 - viewed 44 times.)
Logged

Everything runs on smoke, let the smoke out, it stops running......VK3DMK

0
Offline Offline
Edison Member
*
Karma: 17
Posts: 1413
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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


* z.JPG (164.88 KB, 867x545 - viewed 39 times.)
« Last Edit: August 17, 2013, 05:06:44 am by Sergegsx » Logged

* Si preguntas, pon el código de tu programa, hace mucho mas fácil ayudarte. Y me ahorro un mensaje pidiendo que lo hagas.
* Si consigues solucionar tu problema, dedica unos minutos a explicar en tu post como lo conseguiste para beneficio de todos.
* Cambia el 'Subject' de tu hilo y añade 'SOLUCIONADO' cuando hayas llegado a una solución al problema que planteaste.
* Utiliza un 'Subject' para tu hilo que explique de que va el hilo.
Si estas empezando:
* Comienza a usar Arduino
* Guías de iniciación a Arduino
* Ejemplos
* Referencia del Lenguaje
* Conceptos básicos
Guia de usuario de arduino
Tutoriales en Ingles
Si necesitas que alguien te escriba el código: http://www.freelancer.com/  o esta  http://www.guru.com/

Pages: 1 [2] 3 4   Go Up
Jump to: