2
\$\begingroup\$

The Question: With what kind of extra components if needed, can I use to output a signal out of one of the Arduino pins to turn the voltage on and off to a device. The goal is to output a HIGH or LOW on a certain OUTPUT PIN to turn this device on and off.

The Limitations: I can't power this device with a pin from Arduino directly(I think..). Trying to find a simple solution, I don't have access to too many intricate parts, other than a NAND gate and a bunch of resistors and capacitors.

The Solutions??: I can get my hands on some additional components such as relays or if there is some sort of a voltage control switch with a transistor I can be setting up here to turn a 5 Volt supply on an off, if the max current I can deliver from my arduino pin is 40 mA, how would I go about setting up that circuit if thats a possible solution? Help much appreciated!

extra details: https://www.walmart.ca/en/ip/laser-x-2-player-blasters/6000196696362 The device I am trying to turn on and off, if a certain OUTPUT pin on my Arduino is set to LOW.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ use a mosfet to switch DC. a low-side switch using a logic-level n-chan is the simplest. google "mosfet switch circuit" for plans \$\endgroup\$
    – dandavis
    Feb 6, 2018 at 0:50
  • \$\begingroup\$ what do you mean by turn this device on and off? \$\endgroup\$
    – jsotola
    Feb 6, 2018 at 1:35
  • \$\begingroup\$ I mean to allow current through a wire and not allow it. \$\endgroup\$
    – dodo815
    Feb 6, 2018 at 1:40
  • \$\begingroup\$ Would this be okay, I have a VCC from 3, 1.5V batteries for a nand gate, and I am feeding in the input from a Pin on arduino, if the arduino pin is HIGH I need the output to 0 Volt and if its LOW i need the output to be 5 Volts, and also to be able to draw sufficient current from the 5 Volts( technically 4.5V xD). \$\endgroup\$
    – dodo815
    Feb 6, 2018 at 1:45
  • \$\begingroup\$ if in doubt, use a relay, they are universal (hi/lo side, ac/dc, whatever) \$\endgroup\$
    – dandavis
    Feb 6, 2018 at 3:57

2 Answers 2

2
\$\begingroup\$

As @dandavis said, a MOSFET as a switch would be the easiest solution. In your case, go for the P-Channel mosfet (explained in the guide under P-channel MOSFET Switch). That way you can get output 0 Volt with arduino pin HIGH and a 5V output when pin is LOW. Since MOSFET would be voltage driven you do not need to worry. If you have further questions check this guide.

\$\endgroup\$
2
\$\begingroup\$

By using MOSFET switch only. Current rating should be considered while choosing MOSFET. Or by using MOSFET switch to energise a relay, which then turns on the external circuitry.

\$\endgroup\$

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.