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

#### kent@idma

Joined Dec 28, 2020
17
I am attempting to determine when a motor is running and the direction the motor is running - the output being two relays so that I can close a circuit to indicate clockwise or anticlockwise running (or not running at all)

Input: varies between 14 and 36 volts DC. +/- = clockwise, -/+ = anticlockwise.

Output: Two Relays: NO & NO = not running, NC & NO = Clockwise, NO & NC = anticlockwise.

I've drawn a diagram of what I have worked out (but this is just guesswork, so wanting confirmation if this is the best approach, if I have my items correct). I'm pretty sure that 3A is overkill for my needs also - so there is room for change there also.

Input:
1) https://www.jaycar.co.nz/diode-1n5822-schottky-40v-3a-do-27/p/ZR1048 (diode, to limit flow to +/- only)
2) https://www.jaycar.co.nz/330nf-50vdc-low-leakage-electrolytic-capacitor/p/RL6408 (capacitor, across +/- input for regulator)
3) https://www.jaycar.co.nz/mc78t12-12v-3a-voltage-regulator/p/ZV1634 (regulator, to limit output to 12 volts)
4) https://www.jaycar.co.nz/100nf-50vdc-low-leakage-electrolytic-capacitor/p/RL6402 (capacitor, across +/- output from regulator)
5) https://www.jaycar.co.nz/alarm-relay-module-2-x-15a/p/LA5558 (relay, NC when no power / Input is -/+, NO when input is +/- )

I'm fairly new to all this - so would appreciate any suggestions, etc.

Kent.

#### Tonyr1084

Joined Sep 24, 2015
5,491
So when you have the motor running in one direction you also have one relay closed, and when it's running in the other direction the Other relay is closed. Motor not running - no closed relays. Correct?
This part confuses me:
the output being two relays so that I can close a circuit to indicate clockwise or anticlockwise running (or not running at all)
Unsure if you're saying the relays can be closed by you? If all you want is a directional indication then yes, you're overthinking the problem. Since you're using a relay I'll assume you want to switch something running on a different voltage (higher, lower, AC or DC) to give an indication. Perhaps it's something you want to be able to see, like a light bulb you can see from across the room or a factory floor.

My approach would be to use a couple of LED's with associated resistors to hold the current to the LED down to some specified level. If I want a visual indicator of motor direction a simple ultra-bright LED of one color for one direction and another of a different color for a different direction.

If you need the relay then instead of a resistor, use a diode to block current in one direction for one relay and a reversed diode for the other direction. I think that will work, but I have to draw it out to see if what I'm thinking won't result in a short circuit and blow the diodes. Another option would be to use a couple Opto-Isolators. But then you need a 12V source for your 12V relays. Whatever relay you use would require the appropriate voltage; whether using 5V relays (& 5V supply) or 24V relays (& 24V supply) - etc.

I'll bang out a couple drawings and wait to hear back from you before posting again.

Last edited:

#### Dodgydave

Joined Jun 22, 2012
9,837
Here is a circuit using two relays with series diodes to enable only one relay in each direction, also a bi-coloured led..

#### crutschow

Joined Mar 14, 2008
25,980
Here is a circuit using two relays with series diodes
What kind of relay would you use to operate reliably between 14V to 36V as the TS wants?

#### MisterBill2

Joined Jan 23, 2018
7,687
The circuit shown in the first post should work, except that the 0.1 mFD capacitors at the LM7812 regulators are needed. THOSE capacitors are not optional, they prevent oscillations that will cause problems.
What is not clear is why use relays instead of indicators.
The simplest indicator circuit would be two LEDs of different current in series, reversed, with a current limiting resistor, and anti-parallel shunt diodes to avoid excessive reverse voltage on each, and then a pair of shunt 5volt zener diodes across the LED portion to limit the max voltage across the LEDs. No active devices to be unstable and no highly stressed devices at all.

A variation of this circuit could also be used with relays, if the relays were put in place of the LEDs. The resistors and zener voltages would probably be a bit different.

#### Dodgydave

Joined Jun 22, 2012
9,837
What kind of relay would you use to operate reliably between 14V to 36V as the TS wants?
Probably a 15V relay will work for this ,.

#### crutschow

Joined Mar 14, 2008
25,980
Probably a 15V relay will work for this ,.
A standard 15V relay would likely overheat at 36V.

#### eetech00

Joined Jun 8, 2013
2,162
Maybe use two 12v, or two 14v, volt zener regulators instead to drop the voltage to the relays.
Oh wait...the TS has shown reverse polarity, so the second circuit won't work unless the regulator supports negative input/output.

Why not just polarize the relays.....maybe with a diode in series with each one.

Last edited:

#### Tonyr1084

Joined Sep 24, 2015
5,491
I've been running numbers for using Blue SBLED's (super bright LED) and I'm coming up with 16mA (@36V).
The numbers for running in (clockwise) direction:
(36V - [Blue SBLED] 3.2Vf - [1N4002] 0.6Vf) / 2KΩ = 16.1mA
(14V - [Blue SBLED] 3.2Vf - [1N4002] 0.6Vf) / 2KΩ = 10.2mA

The numbers for running in (counter-clockwise) direction:
(36V - [Red SBLED] 2Vf - [1N4002] 0.6Vf) / 1150Ω = 29mA
(14V - [Red SBLED] 2Vf - [1N4002] 0.6Vf) / 1150Ω = 10mA

It would require three resistors, two LED's and two diodes. For the blue SBLED using a single 2KΩ resistor and a diode will produce a range of 10.2mA to 16.1mA running the motor from 14 to 36 volts, running clockwise. For the red SBLED using a 680Ω and a 470Ω resistor and a diode will produce a range of 10mA to 29mA running the motor from 14 to 36 volts, running counter clockwise.

If using SBLED's is not the preferred method then I would suggest using opto isolators because they can handle those ranges. Their outputs, depending on the data sheet, I looked up the 4N35 and its collector current is 100mA. IF you connect that to a relay that doesn't draw more current than that then you can use the relay to switch whatever you want.

Last edited:

#### Tonyr1084

Joined Sep 24, 2015
5,491
As usual we're waiting for greater clarification on what is acceptable. kent@idma please provide more information. So far we're just guessing, and that suits no one well.

#### Dodgydave

Joined Jun 22, 2012
9,837
Maybe use two 12v, or two 14v, volt zener regulators instead to drop the voltage to the relays.
Oh wait...the TS has shown reverse polarity, so the second circuit won't work unless the regulator supports negative input/output.

Why not just polarize the relays.....maybe with a diode in series with each one.
Like in my post #3..

#### Tonyr1084

Joined Sep 24, 2015
5,491
I came up with this in keeping with the Relay part of it.

But if all that is needed is some indication of which way the motor is running, This:

But to be 100% honest, we just don't know what the requirements are because we haven't heard from the TS.

#### MisterBill2

Joined Jan 23, 2018
7,687
I already suggested a shunt zener and a bit of series resistor to limit the relay current by limiting the relay voltage. Go back and look at the second paragraph of post #5. I realize that the concept is rather complicated but it could indeed work for relays just as well as for LEDs.

#### sghioto

Joined Dec 31, 2017
1,796
would appreciate any suggestions, etc.
Circuit will work but suggest:
Replace each 1N5822 with two 1N4002 diodes in series to reduce the max supply below 35 volts to the regulators.
MC78T12 is obsolete. Use a standard 7812 regulator, rated at 1 amp.

#### kent@idma

Joined Dec 28, 2020
17
The motor is attached to a Garage Door opener. I already have switches to indicate when the door is open / closed. I'm now wanting to detect when the motor is opening / closing / neither.

The voltage varies between 14 and 36 volts. It starts high, then towards the end the voltage drops. There appears to be less voltage when closing - I'm assuming because the demand is less on the motor.

The four (opened, closed + opening & closing) are part of a separate circuit connected to four GPIO ports on a computer.

Thanks for the feedback and apologies for not making it clear what I'm trying to achieve.

Given this - and hence why I'm using relays to close the GPIO circuits - what would be the ideal circuit now (keeping in mind the lowest voltage I measured was 14volts and the max was 36volts).

Thanks
Kent.

#### sghioto

Joined Dec 31, 2017
1,796
Given this - and hence why I'm using relays to close the GPIO circuits - what would be the ideal circuit now
Forget the relays use opto-isolators to control the GPIO inputs. Do you really need 4 inputs?

Last edited:

#### MisterBill2

Joined Jan 23, 2018
7,687
Certainly opto-isolators would work very well with the circuit I described in post#5 , and the LEDs could be added to aid the checkout process. It could all be wired up on a small project board and then be wrapped in tape and stuck inside some junction box very easily. WE JUST NEED SOMEBODY TO DRAW THE CIRCUIT BASED ON THE VERBAL DESCRIPTION.

#### Tonyr1084

Joined Sep 24, 2015
5,491
The motor is attached to a Garage Door opener.
A GDO (Garage Door Opener) like the one I have runs a small PM motor rated at 140VDC @ 2.0A. Mine is a Genie GDO, but the motor is probably a very common motor used in probably most GOD's now-a-days. The electronics control the speed of the motor based on how I set mine up. I can have a fast moving door, which will probably draw more than 36VDC. I don't KNOW that, but I suspect that's probably the case.

You want to know when the door is opening or closing. HMMMMmmmm. How to tell if the door is transiting and which way ? ? ? Perhaps you should look to see if the door is moving. It's how I do it. But I suppose if I were to use indicator lights, I'd do it this way: given the variance of the voltages possible I'd probably opt for a christmas light bulb rated for 110 volts and a diode. One for one direction and one for the other. Here, give me 25 minutes and I'll bang out another idea.

Last edited: