1
\$\begingroup\$

I would like to use my arduino pins to control a 12 V light that has its own power supply. So what I need is something that can be used as a switch (here is in pink color) but I don't know much about electronics so I don't know what part to put there. I don't want to use transistors as they require to use the same ground potential.

enter image description here

\$\endgroup\$
  • 1
    \$\begingroup\$ "I don't want to use transistors as they require to use the same ground potential", and why is this a problem for you? Or is this just a random preference you've acquired? \$\endgroup\$ – Harry Svensson Sep 24 '18 at 10:28
  • \$\begingroup\$ I need the arduino to be on always and the car battery requires a key to let the power trough so conneting it together would break the power at the arduino \$\endgroup\$ – Jumperz Ko Sep 24 '18 at 10:30
  • 1
    \$\begingroup\$ You can still share the same ground, regardless of if the battery is powering something up or not. If the Arduino is on a separate supply, then it can still be always on, and have the whole circuit share a ground. Use transistors. That's the best way \$\endgroup\$ – MCG Sep 24 '18 at 10:33
  • \$\begingroup\$ so i need to connect the grounds and replace the pink part with a transistor(with resistors) and i'm good to go? \$\endgroup\$ – Jumperz Ko Sep 24 '18 at 10:36
3
\$\begingroup\$

For simplicity and robustness, use a relay. That's basically a electrically-controlled mechanical switch.

You can get modules that contain relays and that are controlled directly from digital outputs. You can also make your own circuit to do that. Driving a relay from a digital signal has been discussed many times here before. Look around.

\$\endgroup\$
  • \$\begingroup\$ Whoever downvoted this, what do you think is wrong? \$\endgroup\$ – Olin Lathrop Sep 24 '18 at 15:45
1
\$\begingroup\$

Make ground common and use logic level power mosfet. If you don't want to make ground common then use relay

Option 1: Mosfet

schematic

simulate this circuit – Schematic created using CircuitLab

Option 2: Relay

schematic

simulate this circuit

\$\endgroup\$
  • \$\begingroup\$ The user is cleary a novice so this answer is not likely to help at all. I didn't downvote but if you add a schematic for both of your solutions I imagine that you may get some upvotes. There is a CircuitLab button on the editor toolbar and it will save editable schematics inline with your post. \$\endgroup\$ – Transistor Sep 24 '18 at 12:24
  • \$\begingroup\$ 100 Ω pull-down on the gate of the NMOS, really? \$\endgroup\$ – Harry Svensson Sep 25 '18 at 11:10
  • \$\begingroup\$ sorry, it should be greater than 1 mega \$\endgroup\$ – Uzair Ali Sep 25 '18 at 19:18
  • 1
    \$\begingroup\$ A IRF540 is inappropriate for the use in your first schematic. It is only specified for 10 V gate drive. It is not meant to be driven from a digital signal, not even a 5 V one. Also, R1 is barely needed at all. Since the arduino isn't a FET driver, R1 could easily be left off. 10 kOhms is way too high. \$\endgroup\$ – Olin Lathrop Sep 26 '18 at 11:00
  • \$\begingroup\$ If you would've swapped the 100 Ω pull-down with the 10 kΩ then it would've made sense. Keeping the 10 kΩ and replacing 100 Ω with 1 MΩ is really bad. The RC constant (gate capacitance and your resistors) will be unnecessarily large. - To be crystal clear, your 10 kΩ should be ~100 Ω and your 1 MΩ should be ~10 kΩ. \$\endgroup\$ – Harry Svensson Sep 28 '18 at 11:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.