36Volt DC (reversible) to control two Relays based on DC current flow

Thread Starter

kent@idma

Joined Dec 28, 2020
20
You can use a five volt zener diode to limit the voltage across the opto. That has been my point all along.
So if I was to use a 5.1 volt Zener Diode: https://www.jaycar.co.nz/5-1v-1n4733-1-watt-zener-diode/p/ZR1403

Instead of the 1N4007 Diode: https://www.jaycar.co.nz/1n4007-1a-1000v-diode-pk-4/p/ZR1007

Then this would limit the voltage going into the opto to 5.1 volts maximum (regardless of the input voltage being 14 up to 36 volt), and therefore could also remove the 2.7K Resistor from the circuit as well ?

Attached is what I now have. The right is existing in place, the Zener Diode and Opto are to be added to the circuit.

Cheers
Kent.
 

Attachments

Thread Starter

kent@idma

Joined Dec 28, 2020
20
See post #41modified by bertus. This is all you need.
Okay, so the 2.7K resistor will reduce the current to protect the opto, and because the opto's also have a diode within them, they will only work when the DC current is one way - thus removing the original diodes from the circuit is possible (even though this may mean up to 36 volts will be entering the opto's ?

Per the original diagram - keeping the 1N4733 Zener Diodes in the circuit will limit the voltage to 12 volts, and the resistor will reduce the current. This will also work and is potentially a safer option ?

Thanks
Kent.
 

MisterBill2

Joined Jan 23, 2018
18,167
So if I was to use a 5.1 volt Zener Diode: https://www.jaycar.co.nz/5-1v-1n4733-1-watt-zener-diode/p/ZR1403

Instead of the 1N4007 Diode: https://www.jaycar.co.nz/1n4007-1a-1000v-diode-pk-4/p/ZR1007

Then this would limit the voltage going into the opto to 5.1 volts maximum (regardless of the input voltage being 14 up to 36 volt), and therefore could also remove the 2.7K Resistor from the circuit as well ?

Attached is what I now have. The right is existing in place, the Zener Diode and Opto are to be added to the circuit.

Cheers
Kent.
No, that circuit is not what will work with the zener diodes. And it seems that I am not able to see the circuit that you have. I am on a different computer now and the circuit that I am seeing will not work with the zener diodes because the two opto-isolators are tied together. If that works it will be simpler than what I am suggesting. And replacing the resistors with the 1N4733s is not what I was suggesting. With the two optos tied as shown adding the zeners will not work. So ignore my suggestion if you use the circuit shown.
 
Last edited:

sghioto

Joined Dec 31, 2017
5,376
thus removing the original diodes from the circuit is possible (even though this may mean up to 36 volts will be entering the opto's ?
Yes. The voltage is not an issue it's the current.
Again post 41 is correct, no zeners or diodes required.
Logic is HIGH when opto is not activated.
 

Thread Starter

kent@idma

Joined Dec 28, 2020
20
Thanks everyone - especially @sghioto and @bertus - your assistance is greatly appreciate and apologies for all the dumb questions.

Heading out now to JayCar (the only local supplier I know of) to get a 2.7K resistor and a couple of 4N25 opto's

Cheers
Kent.


--------

Hello,

The circuit can be made a little simpler.
As only one opto is active, it will protect the reverse opto from over voltage.
I have taken the image from @sghioto and modified it:
View attachment 226196

Bertus
Yes. The voltage is not an issue it's the current.
Again post 41 is correct, no zeners or diodes required.
 

Thread Starter

kent@idma

Joined Dec 28, 2020
20
Hi Again,

I've wired up the circuit and all is working (well once I realised my silly mistake of getting the output's the wrong way around).

The only issue I've identified so far is the GPIO is toggling off then immediately on again a few times - I suspect this is happening when the door opener changes voltage (eg. it starts with one voltage, then once moving changes to another and as it gets near the end it slows down / lower voltage).

Not a biggie as I can program around this happening as it's almost instantly toggling on again - but is there a simple fix to avoid this happening ?

Thanks
Kent.
 

sghioto

Joined Dec 31, 2017
5,376
Possible the voltage is erratic. It should still function with only 14 volts.
Possible fixes: Reduce the 2.7K resistor to 2.2K
Add 1uf capacitors across the 10K resistors R4,R6.
 

Thread Starter

kent@idma

Joined Dec 28, 2020
20
Possible the voltage is erratic. It should still function with only 14 volts.
Possible fixes: Reduce the 2.7K resistor to 2.2K
Add 1uf capacitors across the 10K resistors R4,R6.
I just did more testing - mu Multimeter shows the voltage briefly dropping down to about 9 volts for a brief moment when the motor changes speed. It's hard to know for sure as the multimeter takes a bit to show a voltage stop.

I've drawn my circuit as it currently stands and added in the capacitors as I understand your instructions:
1) is this what you meant by across the resistors ?
2) Given I'm only using .39K resistors - would I still use a 1uf capacitor ?

The resistors at the GPIO end are as Numato instructed.

Thanks
Kent.Circuit_Diagram_v3.png
 

Thread Starter

kent@idma

Joined Dec 28, 2020
20
I have some 106 10+ capacitors - will these do ? (I'm assuming that the 16 is 16 volts, and the 106 is their uf rating ?


The resistors are what Numato support told me to use - there is a 2.2K in addition to the 1K and 0.39k.
 

Thread Starter

kent@idma

Joined Dec 28, 2020
20
I have some 106 10+ capacitors - will these do ? (I'm assuming that the 16 is 16 volts, and the 106 is their uf rating ?
The resistors are what Numato support told me to use - there is a 2.2K in addition to the 1K and 0.39k.
Sorry, I meant 106 16+ capacitors.

If I understand correctly, this makes them 10uF capacitance instead of just 1uF as you suggest.

106_16p_Capacitors.png
 

Thread Starter

kent@idma

Joined Dec 28, 2020
20
10uf might work if you raise the resistor values to 27K and 10K

The 10uf did appear to work when I temporarily added it to the circuit as a test while I was waiting for your reply - but I confess my understanding of 'current' is limited to too much will overheat / blow the circuit.


I'll have to wait to get 27K and 10K resistors, plus 1uf capacitors as JayCar is closed now and won't be open tomorrow (New Years Day after all).


I do understand using: Vout = Vin * R2 / (R1+r2)
• Current: 12 * 390 / 1390 = 3.36 Volts. + the 2.2k resistor to reduce the current going into the Numato GPIO board.
• Proposed: 12 * 10 / 37 = 3.24 Volts - no other resistor needed as these will reduce the current enough ?

I also understand that: Current = Voltage / Resistance, and realise that too much current may overload the circuits - but I've been using the current setup with no issues for a while now with the other inputs (most are just switches - hence why the original query started with Relays).


I have a 32 port Numato board, and I have a circuit board using the 0.390K + 1K + 2.2K setup (per my diagram) for the 24 input ports I'm using. I'm trying to avoid having to redo all 24 input's again (72 resistors in total) - but if this means it'll be more reliable in the long run, then so be it.

I'm also using a https://numato.com/product/7812-12v-voltage-regulator-breakout-board/ for the 12Volt, 1Amp power supply used for the circuit. This only appears to output ~11.5 Volts according to my multimeter.


On the Numato Technical specifications for the 32port board, they say the maximum IO draw is 25mA https://numato.com/docs/32-channel-usb-gpio-module-with-analog-inputs/


Questions:
1) If I swap to 27K & 10K resistors, will I still need the 2.2K resistor to reduce the current ?
2) Can I put a 1uf Capacitor across the 10K resistor for all GPIO's - and will this mean brief voltage drops won't falsely trigger a GPIO event ?


Thanks
Kent.

PS. Apologies for the long posting.
 

Thread Starter

kent@idma

Joined Dec 28, 2020
20
10uf is correct and might work if you raise the resistor values to 27K and 10K.
Meaning R1 and R5.
0.5 watt
• 10K: https://www.jaycar.co.nz/10k-ohm-0-5-watt-metal-film-resistors-pack-of-8/p/RR0596
• 27K: https://www.jaycar.co.nz/27k-ohm-0-5-watt-metal-film-resistors-pack-of-8/p/RR0606

OR

1.0 watt
• 10K: https://www.jaycar.co.nz/10k-ohm-1-watt-carbon-film-resistors-pack-of-2/p/RR2798
• 27K: https://www.jaycar.co.nz/27k-ohm-1-watt-carbon-film-resistors-pack-of-2/p/RR2808

AND

25 volt capacitor
https://www.jaycar.co.nz/1uf-25vdc-tantalum-capacitor/p/RZ6627


Is this what you are suggesting ?
I'm only using the 0.5 watt resistors currently.

Thanks
Kent.
 

sghioto

Joined Dec 31, 2017
5,376
Kent, you should only need to change the resistors on the two GPIO inputs associated with the optocouplers. If you are not having any problems with the other inputs then I would not modify.
You can leave the 2.2K resistors as well.
The 10 and 27K can be .25 watt.
The 10uf caps you have now should be fine.
 

MisterBill2

Joined Jan 23, 2018
18,167
PLEASE NOTE that the "106" 16 volt capacitors ARE POLARIZED, and that the "+" indicated the positive side. That is, the large capacitance value comes at the expense of using a different technology for the capacitors. They will work for the application,but it is important to connect them with the correct polarity.
That is the price for getting so very much capacitance in such a small package. They appear to be dipped tantalum types, which are polarity sensitive.
 
Top