Arduino digital input, 80Vdc

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

Current for the 4N25

4N25 CTR 50 %

I dont understand very well your formulas, but:
if indicator LED current is choosen to be 10mA (maybe lower as i dont need it to be bright)

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.
I dont understand this last phrase.
as they are in series, if 10mA go through the status led, arent there going to be the same 10mA through the optocoupler led?

We take it backwards.

What pullup resistans do you use? I prefer 10kohms
To make aurdino input low you need 0.5 mA thru the phototransistor.

You have to calculate with CTRmin = 20%

LED current must be 5 times higher = 2.5 mA

If you change pullup you have to recalculate.

Pelle

Sergegsx:
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?

Without the zener diodes in the circuit, the 1N4148 in reverse-parallel connection provides the best protection. With the zener diodes added, you should either use a much higher value series resistor (so that the power dissipation isn't a problem even with the polarity reversed), or add back a single 1N400x diode as protection against reverse polarity. I would keep the 1N4148 as additional protection, because the capacitance of a 1N400x will let transients through.

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

When doing calculations on the current transfer ratio, be sure to use the minimum guaranteed current transfer ratio, and check whether the Vce at which the current transfer ratio is measured is applicable to your circuit.

1st part ---> Completely clear! :smiley:
I will leave the 1n4148

2nd part ---> :fearful:

This is my first project with optocouplers and all the tutorials on the internet are much simpler than all this. they dont go into CTR, they just talk about the optocoupler as a led diode, current limiting resistor and not much more.

Do not belive everything on the net.
CTR are important to calculate with. Look at the 4N27, 10% up to what I have seen as max, 600%.
The solution with the zeners are not optimal when the input signal varies 20 volts (60-80)
I have read earlier in this tread why the design was made like this.
Was it nessecery to let voltage in the span 0-50 volts be absolutly off.
With only a resistor, 0-10 volts can be off and over 60 on.

Pelle

Pelleplutt:
Do not belive everything on the net.
CTR are important to calculate with. Look at the 4N27, 10% up to what I have seen as max, 600%.
The solution with the zeners are not optimal when the input signal varies 20 volts (60-80)
I have read earlier in this tread why the design was made like this.
Was it nessecery to let voltage in the span 0-50 volts be absolutly off.
With only a resistor, 0-10 volts can be off and over 60 on.

Pelle

Thanks for reading the thread to understand.
It was initially suggested to use zener diodes and it seemed a good idea, thats why i went that way. I also found it interesting to be able to make sure if the channel was really on or off, and by using the zener I would know for sure if the voltage is above 57V.
Apart from that, yes, the voltage can vary between 60V and 80V but I guess using the zenner diodes we are dropping the voltage enough to be save after that, right?

What is your suggestion? I am always open to learning new things, maybe there a much better way of doing all this.

dc42 I am still trying to figure out all the CTR things :roll_eyes:

Pelleplutt:
Do not belive everything on the net.
CTR are important to calculate with. Look at the 4N27, 10% up to what I have seen as max, 600%.
The solution with the zeners are not optimal when the input signal varies 20 volts (60-80)
I have read earlier in this tread why the design was made like this.
Was it nessecery to let voltage in the span 0-50 volts be absolutly off.
With only a resistor, 0-10 volts can be off and over 60 on.

Pelle

Hello Pelle,
I am looking into this again after some real tests i have done and I am starting to understand you point on why this could be not a good way to go.

With voltages varying so much, I am having problems choosing the components. Either they use too much power, or the resistors do not suit to all cases.

Please could you suggest another method ? Anyone else?

I will post now some simulations which are very close to what I have been seeing in real tests.
thank you very much.

Option1H - Supply of 74V
Works ok. Problem that at 50V it will not work and that the Led D3 can not be very bright due to power dissipation in 10k resistors

Option1L - Supply of 50V
Does not work due to low voltage after zenner

Option2H - Supply of 74V
Works ok, but if voltage lowers then leds do not behave the same due to different resistors

Option2L - Supply of 50V
does not work, not enough current through resistor VR1, if I reduce VR1 value, then the Zener need to dissipate too much current.

I wanted to send this online to make the PCB and build my first SMD pcb, so power dissipation of components is crucial.

Sergegsx:
With voltages varying so much, I am having problems choosing the components. Either they use too much power, or the resistors do not suit to all cases.

Please could you suggest another method ? Anyone else?

You need to state your requirements better. You have said that you want to detect the difference between (1) 60 to 80V, and (b) 0V. Anything else? e.g. do you require a particular behaviour when there is more than 0V but less than 60V? Do you need to allow for more than 80V input, if so what is the maximum voltage? And what is an acceptable power consumption at 80V input?

Hello dc42 !

Sorry about that.
Requirements.

  1. Voltage can vary between 50 to 80Vdc (although it should be nominal at 75Vdc)
  2. For each input, I need to put 1 led onboard, and 1 led in a case (that means there will be a 7 pin connector in the PCB to connect the external leds)
  3. Voltage supply (75Vdc) has no power supply restrictions, (it can use far more than this board will need)
  4. Reverse voltage requiered (in case its connected wrongly, or to prevent a certain channel feeding another one)
  5. Negative for the 75Vdc will be common to all inputs
  6. At first I wanted to use zener diode to make a clear distinction between voltages under around 50Vdc and over it. The reason was that it should be around 75, so anything lower than 50Vdc does not make sense. However, I wouldnt mind if it can detect a range like under 50Vdc (logic 0) over 50Vdc (logic 1)
  7. Using SMD components (0805, 1206) so 250mW for the latest as max power dissipation I guess.
  8. One of the two leds (the external mounted) will need to be hocked afterwards directly to ground. That way for 6 inputs I only need to extend a 7 wire cable (6 leds+1ground). If the led is between the circuit I would have to extend 2 wires for each input. Also that would make this external led necesary for the rest of the circuit to work which I dont want.

please let me know if more details are required, and thanks for looking into it.
screenshot Option1H is working correctly, but as I mentions has some problems when voltages go under 60Vdc, also the 10K resistors can not be replaced to allow more power to the led as they will get too hot.

Thanks again !

I think I'd probably use a comparator with high value resistors.

One more question: how many 72V inputs are there that you wish to monitor?

dc42:
One more question: how many 75V inputs are there that you wish to monitor?

Initially I need 6 or 8.
Ideally for the future, I would like to have the possibility to expand to around 10 to 20.

Thanks dc42!

polymorph:
I think I'd probably use a comparator with high value resistors.

hi polymorph and thank you.
I will try to figure out what you mean cause I have no idea right now. Time for google. please let me know if you can develop a bit your answer.

thanks !