Offline
Newbie
Karma: 0
Posts: 10
|
 |
« on: January 18, 2013, 04:08:13 am » |
Hi, I want to switch the following relay TE JWD-107-5 (data sheet is attached) with an Arduino but the switch stays allways closed. Does the Arduino fail to deliver enough current to switch the relay? What could I do to fix it?
Best, math
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 45
Posts: 2237
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #1 on: January 18, 2013, 06:47:42 am » |
I wish these data sheet writers would learn to write better data sheets.
I am guessing that the coil power of 50/75 mW is the "hold" and "switch" ratings. If so, at 5V, the coil should draw about 14mA while switching, and less while holding. So, that should be perfectly within bounds of the Arduino.
However, it seems that specific model has a built-in flyback diode.
Do you have it connected up the right way to the Arduino? If it is backwards, then you will be bypassing the coil through the diode and nothing at all will happen.
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #2 on: January 18, 2013, 08:13:23 am » |
I think I connected it the right way.
Pin 2 ist connected to 2/13 of the relais and GND is connected to 6/9. Then I switch Pin 2 between low and high every second but nothing happens.
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 45
Posts: 2237
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #3 on: January 18, 2013, 08:18:43 am » |
I think I connected it the right way.
Pin 2 ist connected to 2/13 of the relais and GND is connected to 6/9. Then I switch Pin 2 between low and high every second but nothing happens.
Yep, that looks like the right way of connecting it. Have you tried disconnecting pin 2 and connecting it instead to +5v to check it switches manually?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #4 on: January 18, 2013, 08:21:22 am » |
oh, that works. What could be the problem?
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 45
Posts: 2237
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #5 on: January 18, 2013, 08:34:02 am » |
oh, that works. What could be the problem?
Ok, have you checked that the output is actually changing HIGH/LOW every second?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #6 on: January 18, 2013, 08:41:28 am » |
Yes, checked it, but what I notice is that the LED is much brighter if it's connected directly to 5V than if it's connected to the digital Output...
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #7 on: January 18, 2013, 08:42:08 am » |
Are you sure you used the pinMode command to put the pin in question into output pin mode? That's a pretty common mistake for beginners to make.
Lefty
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #8 on: January 18, 2013, 08:52:46 am » |
forgot it, fixed it, but still the relay doesn't switch.
Btw. the 3,3V output is not switching the relay. I have an Arduino UNO. There should be 5V at the digital outputs, right?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #9 on: January 18, 2013, 10:22:13 am » |
Ok, new findings  If I connect the relay manually to 5V the relay doesn't switch but the whole Arduino gets switched off. So it seems to suck too much power?!
|
|
|
|
|
Logged
|
|
|
|
|
UK
Offline
Edison Member
Karma: 45
Posts: 2237
What a host of balls she had seen: gaity, the brass buttons...
|
 |
« Reply #10 on: January 18, 2013, 10:23:41 am » |
Ok, new findings  If I connect the relay manually to 5V the relay doesn't switch but the whole Arduino gets switched off. So it seems to suck too much power?! That sounds like you are causing a short circuit. Are you *certain* you have it the right way round?
|
|
|
|
|
Logged
|
|
|
|
|
Offline
Newbie
Karma: 0
Posts: 10
|
 |
« Reply #11 on: January 18, 2013, 10:27:25 am » |
hm, thought it should be right but the schematic seems to be the other way round than I thought. Now everything is working  So the problem was: 1. Relay connected the wring way 2. pinMode to Output forgotten Big thanks to all of you!
|
|
|
|
|
Logged
|
|
|
|
|
Left Coast, CA (USA)
Offline
Brattain Member
Karma: 279
Posts: 15314
Measurement changes behavior
|
 |
« Reply #12 on: January 18, 2013, 11:31:22 am » |
hm, thought it should be right but the schematic seems to be the other way round than I thought. Now everything is working  So the problem was: 1. Relay connected the wring way 2. pinMode to Output forgotten Big thanks to all of you! And that is why we almost always ask if a poster having a problem can post both their sketch code and an accurate drawing of their wiring. The solution is almost always very simple as most of the common mistakes in coding and wiring have been made before by many other beginners. On your problem #1, the relay wasn't wired the wrong way, as DC relays work with either polarity, but it was the diode wired backwards which created a short circuit condition. Lefty
|
|
|
|
« Last Edit: January 18, 2013, 11:34:00 am by retrolefty »
|
Logged
|
|
|
|
|
|