I have a two way 30a relay module with a 5v trigger. It was switching just fine for a while, but now acts like it doesn't have enough power. I was looking at the nanos specs and realized that you hook up to 7v-12v directly to pin 30. the usb is feed off a 12.1-12.2v power supply. Right now I'm only reading around 4v and it can dip to around 3.6 which isn't ideal. I'm using usb to power it which now I'm reconsidering how much power it takes to switch those relays and power the module in general. Neither relay will switch now when both where working prior. Would switching to the 12v bring my 5v pin back up to normal. Is there another way you would hook up this relay module. the digital pin seems to only output voltage for a very brief amount of time. when I hardline the 5v to the trigger I've got it to switch once but still not enough power. My guess is the 3.6-4v is not enough to trigger it, but is this module within the nanos capabilities in general. Thanks for you thoughts hopefully you can make sense of what I'm saying I'm having a hard time putting it into words, but a drew an equally awful picture so thanks again if you can make sense of it.
Without knowing which relay module you are using, we are only guessing. How much current does the 5V to the relay module require?
Yes, your description is pretty unclear, but your drawing is much better.
OK, your drawing is poorly formatted so I have cropped it.
There is a wire missing to the lower relay.
You need to explain what this "12.1-12.2v power supply" actually is. If you are getting only 4 V out of it (but where are you measuring it?), then it is clearly non-functional.
No, you do not feed the Nano via "Vin" - pin 30 - for any serious project, it is only for powering the Nano if you have almost nothing else connected. Unfortunately the "specs" are badly misleading in this matter.
Your relays require of the order of 180 mA if you were to actuate both - though for motor reversing you will generally only ever operate one or the other. Powering via the USB jack is not a good idea either as for one thing there is a diode of some sort between this and the 5 V rail.
The proper way to power it is with a reliable regulated 5 V supply, connected to the "5V" pin and ground - as well as your relay module.
Thank you both for the advice. Looking up the specs for the relay module
Maximum Current: 5V: 190mA; 12V: 80mA; 24V: 50mA
Trigger Current: 5mA
So this is embarrassing, I will switch the nano to its own 5v supply connecting that to the nano's 5v and ground pins. The obvious choice for the relay module is hook it directly to the 12v 16a power supply. I'm guessing the nano can at least pump out 5mA? As for the 12v supply I'm just haven't measured what it puts out during load conditions. Its actually a xbox 360 power brick. Its nice that it will power fault if anything goes haywire.
nsmith0723:
The obvious choice for the relay module is hook it directly to the 12v 16a power supply.
How? What voltage are the relay coils? Are they not 5 V? Give a Web link to the module.
nsmith0723:
I'm guessing the Nano can at least pump out 5mA?
Indeed.
nsmith0723:
As for the 12v supply I'm just haven't measured what it puts out during load conditions. Its actually a xbox 360 power brick. Its nice that it will power fault if anything goes haywire.
Will it? 16 Amps is a lot. It would be absurd that it could not provide at least an Amp. But what is the 12 V to 5 V converter you have that seems to be the problem?
Paul,
Sorry I am just bleeding ignorance. I have no clue how it works but from the description it appears to support multiple voltages. Could be dead wrong. Heres a link in all its generic glory.
https://www.ebay.com/itm/2-Channel-5V-30A-Relay-Board-Module-Optocoupler-Isolation-High-Low-Trigger-W9C1/133412185844?epid=20003422602&hash=item1f0ffc66f4:g:C1YAAOSw-qNev6Aw
I don't think its the usb adapter (its a 1amp cell phone car charger, often time cars will run up to 14v so its possible thats why my voltage is low, but then you would think the wall adapter would solve this?). It is rated at 1 amp so it should run it. I'm measuring the 5v to ground on the arduino. it gives me about 4v most of the time which the arduino seems happy with but the relay module doesn't like it. I've tired it on 120v 2.4 amp usb adapters as well. Should I get a normal 12v to 5v power converter? probably couldn't hurt.
The relay itself is SLA-05vdc-sl-c so the relay coils are indeed 5v
I am indeed missing a wire in the picture. The positive should go to the normally closed terminal on the bottom relay.
What I can do is solder a wire directly to the adapter 5v pin and ground and hook it directly to the arduino 5v and ground. As well as another one going from the adapter to the relay module.
Yes the xbox power supply seems to reliably power fault almost instantly anytime the motor gets into a overloaded condition. That said I understand that's still enough to fry everything except the motor and it probably has the capability of throwing a spark I'm sure.
The motor can spike up over 20amps if it gets overloaded, however during normal operation it runs pretty low like 5 amps. The relays still don't switch with no motor.
nsmith0723:
Sorry I am just bleeding ignorance. I have no clue how it works but from the description it appears to support multiple voltages. Could be dead wrong. Heres a link in all its generic glory.
nsmith0723:
The relay itself is SLA-05vdc-sl-c so the relay coils are indeed 5v
They are indeed 5 V relay coils, not for use on any other voltage. At 27 Ohms, they will indeed require 180 mA.
nsmith0723:
I don't think its the USB adapter (its a 1amp cell phone car charger, often time cars will run up to 14v so its possible that's why my voltage is low, but then you would think the wall adapter would solve this?). It is rated at 1 amp so it should run it.
Generally the "car chargers" have to use a switchmode converter - otherwise a 1 Amp device would dissipate 8 Watts or more and that would be unpleasant.
nsmith0723:
I'm measuring the 5v to ground on the Arduino. it gives me about 4v most of the time which the Arduino seems happy with but the relay module doesn't like it.
Well, 4 V is clearly not 5 V, and those "heavy-duty" relays may be more critical on voltage. You are clearly losing too much in the diode on the Nano - presumably a "clone" and not the best choice of parts.
nsmith0723:
I've tried it on 120v 2.4 amp USB adapters as well. Should I get a normal 12v to 5v power converter? probably couldn't hurt.
The 2.4 amp USB adapters certainly should be adequate. But as you say below ...
nsmith0723:
I am indeed missing a wire in the picture. The positive should go to the normally closed terminal on the bottom relay.
That is how you wire them for reversing.
nsmith0723:
What I can do is solder a wire directly to the adapter 5v pin and ground and hook it directly to the Arduino 5v and ground. As well as another one going from the adapter to the relay module.
If you avoid the USB connector (and possibly, ridiculously thin wire) and connect to the "5V" pin (and ground), that is the most sensible approach. This is always how to do it.
nsmith0723:
Yes the xbox power supply seems to reliably power fault almost instantly anytime the motor gets into a overloaded condition. That said I understand that's still enough to fry everything except the motor and it probably has the capability of throwing a spark I'm sure.The motor can spike up over 20amps if it gets overloaded, however during normal operation it runs pretty low like 5 amps. The relays still don't switch with no motor.
But 20 Amps will also be the instantaneous current at the moment of switching the motor on, so if that is the case, the power supply is under-rated.
I appreciate all the help Paul,
I get where your coming from with the power supply, continually briefly overloading it will cause me big problems in the future. I was hoping since the motor only runs about 6 seconds a day I could potentiality charge a set of 18650's or even a small deep cycle 12v battery and run the motor off of that. I'm completely inexperienced at properly controlling/protecting batteries so that route seems a little intimidating. If it comes down to it I can just use a computer power supply that can put out 40amps and it also has 5v rails as well. I picked the xbox one since it was cheap and fairly robust for the location I intend to use it in.
Yet another option I suppose would be to use some type of soft start controller or inrush current limiter, though I wouldn't even know where to start with that either. The motor is fairly oversized for the application so it doesn't need full torque, not even close. If there is anything else you can think of to limit its draw would be cool too.
I have a feeling your just going to tell me to use the bigger supply, but thought I would run the ideas across you.
I think now that you mention it I will add some heavier wires supplying the 5v and have a separate one direct to the power for the relays.
I'll do some research into 5v supplies that will run off 12v, any recommendations? I was looking at some of those 3amp step downs.
Trying not to turn this into a xy problem. I'll keep it a little more open ended and do it the "proper" way.
Thanks again for all the help, I don't know what you get out of trying to help the clearly helpless, but I appreciate that you do.