Introduction: Setting Up the Circuit

Picture of Setting Up the Circuit

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

Return to Previous Lesson: Introduction

Lesson Overview:

Now we'll build our simple circuit!

Step 1: Connecting Power

Picture of Connecting Power

You should see by now that every Arduino project begins the same way!

Attach 5V and ground pins on the Arduino to the voltage rails on one side of your breadboard.

  1. Connect the 5V and ground rails on the breadboard to the 5V and ground pins on the Arduino.
  2. Continue to the next step.

Step 2: Place the Potentiometer

Picture of Place the Potentiometer

A potentiometer is a type of voltage divider. As you turn the knob, you change the ratio of the voltage between the middle pin (called the wiper) and power.

You can read this change on an analog input. You will connect the terminals of the potentiometer to 5V, ground, and analog input pin A0.

  1. Place the potentiometer across the central gap in the breadboard, as the picture shows.
  2. Connect the central pin of the potentiometer to analog pin A0 on the Arduino.
  3. Connect the right terminal of the potentiometer to the 5V rail, and the left terminal to the ground rail of the breadboard.
  4. After connecting all of the wires, you can change their color by highlighting them and using the dropdown menu.
  5. Continue to the next step.

Step 3: Attach the Servo (simulator)

Picture of Attach the Servo (simulator)

The servo has three wires coming out of it. One is power (red), one is ground (black), and the third (white or yellow) is the control line that will receive information from the Arduino.

In the simulator, you have plenty of room to attach the servo motor directly into the breadboard, using the instructions below.

  1. Plug into row E on the breadboard in columns 23, 24, and 25 (as in the picture).
  2. Next connect the red terminal to the 5V rail and the black terminal to the ground rail of the breadboard.
  3. Finally, connect the yellow pin of the servo to digital pin 9 on the Arduino Uno.
  4. Continue to the next step.
  5. Stuck? HINT: The servo will receive pulses from the Arduio, but the servo library uses a method slightly different from PWM. Therefore, you don't necessarily need to use a PWM enabled (~) digital pin for the servo.

Step 4: Attach the Servo (Arduino Kit)

Picture of Attach the Servo (Arduino Kit)

Attaching the servo motor in the Arduino kit has an additional step: extending the servo wires with "header pins."

Again, the servo has three wires coming out of it. One is power (red), one is ground (black), and the third (white) is the control line. You will need to snap off three male header pins and plug them into the female ends of the servo wires, as shown in the picture.

  1. Extend the servo motor wires using a block of 3 male header pins.
  2. Continue to set up the circuit as previously described, placing each pin into a separate breadboard column.
  3. Continue to the next step.
  4. Stuck? HINT: Your servo motor comes with "female connectors" so you'll need to add male-male header pins to connect it to the breadboard.

Step 5: Decoupling Capacitors

Picture of Decoupling Capacitors

When a servo motor starts to move, it draws more current than it does when it's in motion. This causes a dip in voltage on your board. By placing a 100 uF capacitor across power and ground pins of the servo, you can smooth these voltage changes. These are called decoupling capacitors because they separate (or decouple) changes caused by the components from the rest of the circuit.

You can also place a decoupling capacitor across the power and ground going into your potentiometer (optional).

With both capacitors, be very careful to make sure you are connecting the cathode to ground (that’s the side with the bold stripe) and the anode to power. If you put the capacitors in backwards, they can explode!

  1. Place a capacitor next to the servo motor on row E of the breadboard. Use wires to connect the negative capacitor terminal (side with the white stripe) to the ground pin of the servo and the positive capacitor terminal to the power pin.
  2. Connect a decoupling capacitor to the power and ground pins of the potentiometer, using the same method (optional).
  3. Continue to the next lesson to learn how to program the Mood Cue!

Next Lesson:Writing the Code

Comments

About This Instructable

620views

1favorite

License:

More by circuits:IntroductionArduino Project 15: Hacking ButtonsArduino Project 14: Tweak the Arduino Logo
Add instructable to: