loading

The following information is a single lesson in a larger project. Find more great projects here.

Project Overview:

In this project, you will spin a colorful pinwheel using a motor! The motor requires high current, so using one in an Arduino project is more complex than lighting up LEDs. You will be using a new component called a transistor to control the motor.

Step 1: Project Description

In this project, you will turn on a motor with a button. It sounds simple, but controlling motors with an Arduino is more complicated than just controlling LEDs for a couple of reasons.

Motors require more current than the Arduino’s output pins can supply.

Motors can generate their own current through a process called induction, which can damage your circuit if you don’t plan for it.

However, motors make it possible to move physical things, making your projects much more exciting. In this project, we will show you how to use transistors and diodes to run and protect your motor circuit. Take a look at the circuit diagram to get familiar with the symbols for the motor, diode, and transistor.

The button hookup should look familiar. We'll just use it as a digital input on pin 2.

  1. Continue to the next step.

Step 2: Bill of Materials

You will need the following electrical components for this project:

1 N-MOSFET transistor

1 diode

1 9V battery

1 pushbutton

1 10 k-ohm resistor ...and of course your Arduino Uno and a breadboard!

If you are using the physical Arduino kit, you will also use the 9V battery adapter, the colorful paper pinwheel that came with your kit, and a compact disc (CD) for the body of the pinwheel.

  1. Can you match each component on the list to its location on the breadboard?

  2. Continue to the next step.

Step 3: Transistors

Creating motion takes a lot of energy. Motors typically require more current than the Arduino can provide (40 mA), especially if it has a heavy load attached.

Transistors are components that let you control high current and high voltage signals using the low current output of the Arduino. You can think of transistors as digital switches. When you provide voltage to one of the pins, called the gate, it closes the circuit between the other two pins, called the source and drain.

  1. Continue to the next step.
  2. Stuck? HINT: Some motors also require higher voltage than what the Arduino can provide (> 5 volts). There are many different kinds of transistors, but they work on the same principle. In this project, we use one called an N-type MOSFET, or metal oxide field effect transistor.

Step 4: Using a Transistor

Take a look at the circuit diagram for this project, below.

We highlighted the part of the circuit that controls the motor. Arduino pin 9 controls the gate of the MOSFET, labeled G. When pin 9 is HIGH, the gate is activated and current is allowed to flow from the source (S) to the drain (D).

  1. When current is flowing through the transistor, it's like turning a switch on -- the motor is now being powered by the 9 V battery!

  2. Continue to the next step

Step 5: Motors

Motors work on a principal called induction. Induction is a process in which a changing electrical current in a wire can generate a changing magnetic field around the wire. When a motor is provided with current, a tightly wound copper coil inside creates a magnetic field. This field causes the shaft (the part that sticks out of the housing) to spin around.

  1. The reverse is also true: a motor can generate electricity when the shaft is spun around.

  2. Stuck? HINT: Continue to the next step.

Step 6: Protection Diode

When you stop supplying energy to a motor it will continue to spin because it has inertia. During this time, it will generate a voltage in the opposite direction than the voltage you gave it. This reverse voltage, sometimes called "back voltage," can damage your transistor.

For this reason, you should put a diode in parallel with the motor. The diode will only allow electricity to flow in one direction (the direction of its triangle symbol), protecting the rest of the circuit.

  1. If you look at the circuit diagram above, the diode helps to confine current produced by that back voltage to the highlighted loop. In this situation, the diode is mainly protecting the MOSFET from having current flow through it the wrong way.

  2. Continue to the next step.

Step 7: Let's Get Started!

That is a lot of information to take in about transistors, motors and diodes! Setting up the circuit will reinforce these new concepts. Let's get started in the next lesson!

  1. Continue to the next lesson to learn how to set up the circuit.

Next Lesson:Setting Up the Circuit

About This Instructable

441views

3favorites

License:

More by circuits:Move Circuit Assembly Glow Circuit Assembly Introduction 
Add instructable to: