Motor - Power, Wiring understanding

Good day all,

First-time poster, long time lurker.

I've been playing with Arduino for some time now, and while code isnt a problem for me, understanding electronics and requirements of various components is where I'm not the best.

I'm currently trying to do a simple motor on-off circuit, using an Uno to test before moving it to a Nano for installation.

My trivial understanding of electric motors is voltages and current, and their supply/draw, and the basics of positive negative circuit flow. that's straight forward.

where I'm not sure, is a start kit diagram example, of driving a motor with a pot, however, as i read the diagram, I don't understand where the power is coming from (shouldn't it be coming from the +3.3v or +5v pins somewhere?

is the diagram correct? What about that diagram am i not understanding (it's using VIN (Voltage IN?)? isnt that backwards?

and on which pin in the linked example, would I flag the Arduino code for 'on-off as a code-based enable/disable action. eg, turn it on, turn it off.

Unfortunately, the kit does not specify the specifications of the motor, but i do have an additional 3v motor separate from the kit if that's any use.

At thened of the day, I've seen conflicting information about how to power motors directly from teh Arduino, and also referenced as best practice to power them externally, which again, i have no idea how to do.

Ultimately, im just trying to flick the motor on and off with the Arduino code and have the motor spin with a small offset weight to its output shaft as a birbration feedback example.

Thanks for taking the time to read this and any tips appreciated.

Cheers,
Dave.

davemcree:
Good day all,

First-time poster, long time lurker.

I've been playing with Arduino for some time now, and while code isnt a problem for me, understanding electronics and requirements of various components is where I'm not the best.

I'm currently trying to do a simple motor on-off circuit, using an Uno to test before moving it to a Nano for installation.

My trivial understanding of electric motors is voltages and current, and their supply/draw, and the basics of positive negative circuit flow. that's straight forward.

where I'm not sure, is a start kit diagram example, of driving a motor with a pot, however, as i read the diagram, I don't understand where the power is coming from (shouldn't it be coming from the +3.3v or +5v pins somewhere?

Duinotech-Starter-Kit-For-Arduino/4 Fan Speed Controller at master · Jaycar-Electronics/Duinotech-Starter-Kit-For-Arduino · GitHub

Ignore the circuit that page, its going to fry your Arduino completely.

is the diagram correct? What about that diagram am i not understanding (it's using VIN (Voltage IN?)? isnt that backwards?

and on which pin in the linked example, would I flag the Arduino code for 'on-off as a code-based enable/disable action. eg, turn it on, turn it off.

This page is a little better (but still wrong):

The darlington transistor used (TIP120) needs a base resistor between its base pin and the Arduino pin, 1k is a reasonable value for a darlington. The routing of the ground wiring on the breadboard is very poor too, but that's not an incorrect circuit at least. The 9V battery won't provide enough current either. But at least it shows the important parts:

  1. The motor is powered separately.
  2. Grounds are commoned.
  3. A power transistor is used to switch the motor, as an Arduino pin will fry trying to provide enough current for even a tiny motor.
  4. A free-wheel diode is across the motor since it is an inductive load - this prevents damaging high
    voltage spikes from being generated when the transistor turns off.

Unfortunately, the kit does not specify the specifications of the motor, but i do have an additional 3v motor separate from the kit if that's any use.

At thened of the day, I've seen conflicting information about how to power motors directly from teh Arduino, and also referenced as best practice to power them externally, which again, i have no idea how to do.

You do now, from that circuit...

Ultimately, im just trying to flick the motor on and off with the Arduino code and have the motor spin with a small offset weight to its output shaft as a birbration feedback example.

Thanks for taking the time to read this and any tips appreciated.

Cheers,
Dave.

BTW if you want to drive the motor in both directions, an H-bridge configuration is needed, involving 4 switching devices.