1
\$\begingroup\$

I am a complete newb in electronic, so excuse me if I'm asking something completely basic, but here's the problem - I have an Arduino UNO board, a battery and a motor. The arduino itself can't power the motor, not enough current, so I need to power the motor from the battery.

Obviously, if I just connect the motor and the battery together, then the motor will be on all the time. The solution is simple - put an on/off switch on the anode so that you can turn it on and off when needed. But is there some kind of an.. electrical switch? That can be turned on/off by applying a 5v voltage to it, instead of mechanically clicking? I think transistors do something like this, but they seem to serve a huge amount of general purposes and I can't find any concrete information on how to use them for that purpose.

\$\endgroup\$
5
  • 1
    \$\begingroup\$ The simplest solution for a hobbyist is to use a relay. Wikipedia describes a relay as an electrically operated switch. There are lots of different relay boards available for the Arduino, and lots of articles on the internet how to use them. You can also, as you suggest, use a transistor. \$\endgroup\$
    – Steve G
    Commented Aug 28, 2019 at 14:14
  • \$\begingroup\$ I'd rather use a transistor or create a scheme by myself than use a pre-built one. Can you, please, give me a bit more information on what type of transistor to use or where to find information about this use case? \$\endgroup\$
    – almarc
    Commented Aug 28, 2019 at 14:16
  • \$\begingroup\$ What is the voltage of the battery and the current draw of the motor? \$\endgroup\$
    – Steve G
    Commented Aug 28, 2019 at 14:19
  • \$\begingroup\$ 1.5v (AA battery), current draw is around 90mA. \$\endgroup\$
    – almarc
    Commented Aug 28, 2019 at 14:26
  • \$\begingroup\$ Relays is by far better for beginners, since you will get galvanic isolation from the motor. You'll need one with appropriate coil voltage (5V?). Put a diode across the relay, with anode against coil ground and cathode against coil supply. \$\endgroup\$
    – Lundin
    Commented Aug 28, 2019 at 15:03

1 Answer 1

1
\$\begingroup\$

There are several options, among:

  • Use a transistor; this is the cheapest probably, but involves checking what transistor you need.
  • Use a relay, you can build your own circuit 'around' it.
  • There are also a complete relay module (they cost 50 cents from AliExpress, but for a motor I would buy something decent), and you can find easily an example how to connect it.

Note that you need an external power supply (unless the motor is really small).

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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