When button pressed, send 12v to one wire for 5 secs, then 12v to another for 5 secs

Thread Starter

bodrehorzo

Joined Jan 30, 2024
1
For a project to wink my popup headlight, I need to send 12v to one wire for 5 seconds, then 12v to another wire for 5 seconds after a button is pressed. I plan to do this using an Arduino nano, which uses 5v logic. I am wondering if I should use relays or MOSFETS for this project?

I have a 12v source inside the car cabin, which I plan to use to power the nano as well as for the 12v to send to the wires. So the Nano will activate a relay/MOSFET to allow the 12v to pass through to the given wire.

I have noticed in most wiring diagrams, the relay/MOSFET is wired to the ground wire, however the ground for the headlights is in the engine bay and is hard to access. Is it okay to wire the relay/MOSFET to the 12v instead of ground?
 

MisterBill2

Joined Jan 23, 2018
18,519
The headlights ground should not be an issue because you certainly need a relay for each ardino output to interface with the vehicle powered circuits.
 

panic mode

Joined Oct 10, 2011
2,751
Is it okay to wire the relay/MOSFET to the 12v instead of ground?
you can wire it any way you like but... if you want it to work correctly, the connection need to be correct as well.
NMOS is more common, cheaper and generally has better specs than PMOS. that is why examples you see are usually using NMOS. to drive NMOS you need to bring positive voltage to gate that is several volts higher than potential of the Source terminal. so for automotive application you would need some thing that is above 12V (17-10V would be fine). that complicates things so why not forget NMOS and go with PMOS - it may cost slightly more but we are talking about tiny overall cost change.
btw there would be need to intermediate stage with small transistor (open drain or open collector) to drive it.

something like this

1708363562865.png
 

Irving

Joined Jan 30, 2016
3,887
Automotive circuits can be very noisy - the 12v can easily have spikes well in excess of that. Personally I'd go with relays as they are intrinsically safer, it doesn't take much to blow up a Nano. But if you want to go the MOSFET route this is a safer approach:

1708373016141.png
 
Top