Relay not working

Thread Starter

arduinolego611

Joined Jan 23, 2022
75
I bought these relays ( https://www.amazon.com/gp/product/B00LW15D1M/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1 ) to automate a brushless motor. My 6 coils and 4 magnets interact as expected when charged with a 9v battery. When power from the battery is applied to each coil, the magnets (stuck on a skateboard bearing, and resting on a center bolt) make a quarter turn, just as I want them to. The next step is to automate the energizing of each coil in a sequence, making the magnets spin in a circle.

In order to control the timing and sequence of the energizing of each coil, I bought six of those relays at the link I provided above. Just to see if the relays work, I programmed my arduino/signal pin to blink at intervals of half a second, and connected that blinking pin to the relay's "IN" terminal. The arduino is supposed to trigger the relay, which would go out to a 9v battery and energize one of the coils.

The part i'm having trouble with is using the relay. Its hooked up to an arduino uno and one of the coils as follows:

relay DC+ - arduino 5v (I've also tried 3.3v)
relay DC- - arduino GND
relay IN - arduino pin 1 (I've tried other pins as well)

relay NO - 9v battery
9v battery - coil +
relay COM - coil -
(NO > battery + > battery - > coil > COM)

I've tried swapping COM and NO a few times, that doesn't seem to work.

The reason I decided to post this was because in all the reading I've done and all the schematics I've looked at, my wiring is right...but even so I cant seem to get the relay to work properly. Is it broken or is my wiring off somewhere?

Also you should know that the output terminals are getting full power, but the relay isn't shutting off at all, its not "blinking". My battery has lost some power but it's outputting a little less than 6.5v...and the output terminals are getting that full power according to my meter, but not the coil leads themselves, and the power is not "blinking". It's just a steady 6.5v (And my magnets aren't spinning).

The coil leads themselves are reading 0.04v, although the connecting wires between NO and COM are getting full power. That I don't understand either.

The LED on the relay is blinking at the right intervals.

Why won't the relay output properly?
 
Last edited:

sagor

Joined Mar 10, 2019
1,049
The picture shows a 12V relay, Your Arduino DC+ cannot power that relay properly.
Now, depending on schematic of that relay board, it may be possible to power the DC+ with 12V as long as both the relay supply and the Arduino ground are connected together. But that is just a guess without a proper schematic of that relay board design. There is a chance you might blow something if that relay board is not designed for this type of setup.
PS: They do make 5V versions of that board, safer to use those....
 

Thread Starter

arduinolego611

Joined Jan 23, 2022
75
The picture shows a 12V relay, Your Arduino DC+ cannot power that relay properly.
Now, depending on schematic of that relay board, it may be possible to power the DC+ with 12V as long as both the relay supply and the Arduino ground are connected together. But that is just a guess without a proper schematic of that relay board design. There is a chance you might blow something if that relay board is not designed for this type of setup.
PS: They do make 5V versions of that board, safer to use those....
Ok thank you. I didn't realize that, because the triggering current was so small that I never thought it would be that high of a voltage to trigger. My bad.

I will look for a 5V version.
 

Thread Starter

arduinolego611

Joined Jan 23, 2022
75
The picture shows a 12V relay, Your Arduino DC+ cannot power that relay properly.
Now, depending on schematic of that relay board, it may be possible to power the DC+ with 12V as long as both the relay supply and the Arduino ground are connected together. But that is just a guess without a proper schematic of that relay board design. There is a chance you might blow something if that relay board is not designed for this type of setup.
PS: They do make 5V versions of that board, safer to use those....
This one looks like a better choice, right?

https://www.amazon.com/HiLetgo-Chan...3&sprefix=5v+relay+for+arduino,aps,157&sr=8-3
 

MaxHeadRoom

Joined Jul 18, 2013
30,661
On those type boards there is often a jumper to set the opto-isolator input level, the pic shows you have this feature.
The relay themselves have 5v coils.
The first pic, 12vdc.
 

Tonyr1084

Joined Sep 24, 2015
9,744
The reason I decided to post this was because in all the reading I've done and all the schematics I've looked at, my wiring is right...but even so I cant seem to get the relay to work properly. Is it broken or is my wiring off somewhere?
Hard to say without a schematic to compare to. This schematic; did you make it or is it something you got from somewhere else and are trying to emulate it?
 

LowQCab

Joined Nov 6, 2012
5,101
Even with correctly selected Relays etc.,
the Relays are not particularly "fast" at switching.

How fast do You expect your Motor to spin when using Relays for Commutation ?
Even if everything is perfect, it still won't spin very fast at all.
You need MOSFETS for switching, not Relays.
.
.
.
 

MisterBill2

Joined Jan 23, 2018
27,522
First, that board is a relay module, it is NOT "a relay", and in addition the listing lacks the information you need. Are you hoping to drive the brushless DC motor with three of those modules an arduino??? Relays are not nearly fast enough to drive a motor at a useful speed. Aside from that the other posts are right, the arduino does not have enough output capability to drive the relay. The words on the amazon page are just as useless as amazon help always is.
 

Ya’akov

Joined Jan 27, 2019
10,235
The datasheet for the relay (Songle SLD-12V-SL-C) claims a must make voltage of at least 9V. The 5V or 3V3 your are powering it with will not energize the coil.

Ok thank you. I didn't realize that, because the triggering current was so small that I never thought it would be that high of a voltage to trigger. My bad.
It’s not the logic level signal needed to turn on the optoisolator, it’s the 12V needed to energize the coil that is the problem. “Triggering” is working fine, as the LED indicates.

Yes, a 5V version will be a better choice.
 

MaxHeadRoom

Joined Jul 18, 2013
30,661
Aside from that the other posts are right, the arduino does not have enough output capability to drive the relay.
And you know that how?
I have reverse-engineered those types of relay boards, they come in several varieties, the common thing is that the input side has a Opto Isolator input as can be seen in the Pic.
All it requires from the driven source is 20ma current, of which is jumper selectable.
After the opto, the board relies on the power for the relay which can be either 5v or 12vdc.
The 5v or 12v power has absolutely no effect on the input requirements.
 
Last edited:

Ya’akov

Joined Jan 27, 2019
10,235
And you know that how?
I have reverse-engineered those types of relay boards, they come in several varieties, the common thing is that the input side has a Opto Isolator input as can be seen in the Pic.
All it requires from the driven source is 20ma current, of which is jumper selectable.
After the opto, the board relies on the power for the relay which can be either 5v or 12vdc.
The 5v or 12v power has absolutely no effect on the input requirements.
The TS’ report that the indicator LED operates properly is evidence that the circuit on the LED side of the opto is working, but the TS’ report that they tried both “3V3 and 5V” on the DC input terminals shows they did not provide enough voltage to drive the relay which, according to its datasheet, has a must make voltage of 9V for the nominal 12V relay.

It should be possible to put a ≈12V supply on the DC input and a 3V3 or 5V logic level signal from the MCU’s GPIO pin on the INPUT pin, sharing the 0V common pin (marked DC -). But, I think it is most safe for the TS to use a board that has a 5V relay to avoid potential any potential MCU gender reveal parties—which are always disappointing since it is inevitably gender neutral.
 

MaxHeadRoom

Joined Jul 18, 2013
30,661
The TS’ report that the indicator LED operates properly is evidence that the circuit on the LED side of the opto is working, but the TS’ report that they tried both “3V3 and 5V” on the DC input terminals shows they did not provide enough voltage to drive the relay which, according to its datasheet, has a must make voltage of 9V for the nominal 12V relay.

It should be possible to put a ≈12V supply on the DC input and a 3V3 or 5V logic level signal from the MCU’s GPIO pin on the INPUT pin, sharing the 0V common pin (marked DC -). But, I think it is most safe for the TS to use a board that has a 5V relay to avoid potential any potential MCU gender reveal parties—which are always disappointing since it is inevitably gender neutral.
The first link shows a 12v board version.
The 12v relay board requires 12vdc on the power input terminals, conversely, the 5v relay version requires a 5v supply, this has nothing to do with the opto trigger input.
IOW, the board link shown in the OP will not work with 5v power.
 

Tonyr1084

Joined Sep 24, 2015
9,744
Relays are not nearly fast enough to drive a motor at a useful speed.
Can you imagine the noise relays switching fast enough to drive a motor at a useful speed would generate?

Like others are suggesting - forget the relay approach.

One experiment I never got around to is using one relay to activate the next. Then the next relay activate the as yet next relay - and so on. Imagine 100 relays in that configuration. Switch the first on and wait and see how long it takes the last relay to switch on. I don't know the answer to that - but I can imagine I'd hear a sound like a loud zipper when going from the first to the last relay.

Back in high school, yes they had high schools way back then, I got a hold of a very large coiled relay. I wired it to switch itself on when powered. As soon as the power was applied the NC contacts would open. Once open the relay fell unpowered. As soon as it fell it would re-power itself. This would go on until I removed power. By way of memory and guesswork I'd say the relay would open and close twice per second. Likely due to the large magnetic force it took and generated to operate.
 

Ya’akov

Joined Jan 27, 2019
10,235
The first link shows a 12v board version.
The 12v relay board requires 12vdc on the power input terminals, conversely, the 5v relay version requires a 5v supply, this has nothing to do with the opto trigger input.
IOW, the board link shown in the OP will not work with 5v power.
The board has a jumper for "high and low level trigger”. Own the high level trigger position the input goes through a resistor to the opto; in the low level position the input goes directly to the optometrist. You can see this win the photo of the reverse of the board.

The trigger input is separate from the DC power in, which is switched by the MOSFET on the board to the coil. They are isolated.
 

MaxHeadRoom

Joined Jul 18, 2013
30,661
The board has a jumper for "high and low level trigger”. Own the high level trigger position the input goes through a resistor to the opto; in the low level position the input goes directly to the optometrist. You can see this win the photo of the reverse of the board.

The trigger input is separate from the DC power in, which is switched by the MOSFET on the board to the coil. They are isolated.
Not what I see, the opto goes to a 220ohm on low, on high it places the two 220ohm in series with the input.
This is similar to the other boards i have reverse-engineered.
 

MisterBill2

Joined Jan 23, 2018
27,522
Does the TS REALLY want to drive a brushless DC motor using relays???I see problems with that approach. Only one other commented about that issue.
 

Ya’akov

Joined Jan 27, 2019
10,235
Not what I see, the opto goes to a 220ohm on low, on high it places the two 220ohm in series with the input.
This is similar to the other boards i have reverse-engineered.
You could be right. I have used boards like it that can use 5V or whatever the relay drive voltage is, and they use a similar arrangement of a jumper. But, looking at the (not great for the purpose) photos, I am not sure.

I will just assume you are right since you seem to have more experience with this particular board.
 
Top