Maker Pro
Maker Pro

Is it possible to power relay and relay circuit with same battery?

Mat17

Oct 13, 2015
23
Joined
Oct 13, 2015
Messages
23
I need to solar power my project, but the arduino output pin doesn't give enough juice, so I'm going to put a TIP120 and a SPST relay. The relay circuit will power a 12V solenoid momentarily, so it only needs to be on for about 3 seconds if conditions are met. But my problem is, can I power the arduino with the 12V power supply AND power the solenoid separate?
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
you can power them from the same 12V source
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
How would I wire them? And just for safe measure, it's okay to power the arduino on 12V, right?

going by that link, the arduino requires 5V. so from a 12V supply you would use a 5V regulator ( 7805) to supply the
arduino and the 12V to supply the solenoid/relay

eg ... basic diagram ....

Arduino Relay-Motor Sw.GIF


Dave
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Could not open the link for whatever reason, however, depends on the Arduino model, they will accept (up to) 12v on the raw input and 3.3v or 5v on Vcc (depending on the type)
 

Mat17

Oct 13, 2015
23
Joined
Oct 13, 2015
Messages
23
going by that link, the arduino requires 5V. so from a 12V supply you would use a 5V regulator ( 7805) to supply the
arduino and the 12V to supply the solenoid/relay

eg ... basic diagram ....

View attachment 22622


Dave

Do I need to power the relay with the 12V, or can I hook one end of the relay to the output pin on the arduino and the other to the ground. And then power the solenoid with the 12V. Do you know what I mean?
 

Bluejets

Oct 5, 2014
6,901
Joined
Oct 5, 2014
Messages
6,901
Most micros can only handle 20 to 40 mA on their output pins, depending on how many outputs you are using as well.
So best to stick with the layout Davenn showed you above.

Also it is best to draw your circuit ideas as it can be much clearer what you are expecting to do.
I've just taken a punt on what you mean in your last post.
 

Mat17

Oct 13, 2015
23
Joined
Oct 13, 2015
Messages
23
Most micros can only handle 20 to 40 mA on their output pins, depending on how many outputs you are using as well.
So best to stick with the layout Davenn showed you above.

Also it is best to draw your circuit ideas as it can be much clearer what you are expecting to do.
I've just taken a punt on what you mean in your last post.

Honestly, I'm not very experienced in electronics. I'm sorry :(

But okay, I'll stick with his layout. Would a charge controller keep this powered 24/7? The solenoid is for a feral hog trap. If hogs are in the trap, the switch will activate the solenoid and in turn, drop the trap door. That's what all this is for.

P.S. Could I put an LED around the voltage regulator or something, so some voltage is dropped and the 7805 doesn't heat up so much?

Also, the relay in his schematic, what kind is that for clarification?
 
Last edited:

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
P.S. Could I put an LED around the voltage regulator or something, so some voltage is dropped and the 7805 doesn't heat up so much?


not gonna make any difference

also as I said its a really basic and quick layout I drew up

there should be input and output capacitors on the voltage regulator
check out the datasheet

Dave
 

Mat17

Oct 13, 2015
23
Joined
Oct 13, 2015
Messages
23
not gonna make any difference

also as I said its a really basic and quick layout I drew up

there should be input and output capacitors on the voltage regulator
check out the datasheet

Dave
Why? To steady the current? And that is an SPST relay? Right?
 

davenn

Moderator
Sep 5, 2009
14,254
Joined
Sep 5, 2009
Messages
14,254
we are all trying to get you to do a little learning research ;)

type 7805 datasheet into google or your other fav search engine :)
 

Alec_t

Jul 7, 2015
3,587
Joined
Jul 7, 2015
Messages
3,587
Since the Arduino can take 12V on its Power-in jack and has an internal 5V regulator, here's how I'd do it.
ArduinoPower.PNG
M1 is a power MOSFET (logic-level type) to switch the solenoid directly (no relay used). D1 protects against the back-emf pulse when the solenoid switches off. D2, R1, C1 and C2 provide additional belt-and-braces filtering to keep any spikes away from the Arduino.
 
Top