Red Hat Co.Lab Robotic hand kit curriculum guide

Pages
Contributors: Evan_Double_U
Favorited Favorite 2

Part 2: Breadboarding and the CR Servo

Here's a walkthrough showing the steps of Part 2.

What is a circuit?

A circuit is a closed loop that electricity can travel around. At its most basic, a circuit consists of three parts:

  • A voltage source: The power for the circuit.
  • A load: The thing that is being powered, like a servo, buzzer, or light. I The circuit path: The continuous path that the current follows as it travels around the circuit.

An example of a simple circuit would be a power source (like a battery), a load (like an LED), and the circuit path (the wires that connect them).

Making the Circuit

1. The power/voltage source

This kit comes with a wall adaptor that connects to the DC barrel jack. Unlike using 9V or AA batteries, this kit requires that we draw power directly from a wall outlet. We won’t plug the adapter into the wall until the last step. In the meantime, prep the barrel jack. The way to connect the barrel jack to the breadboard is with jumper wires, which are short in length and make connecting components quick and easy.

The jumper wires that come in your kit have small metal pins on either side. The colors of the jumper wires don’t correspond to anything in your kit. However, it is convention to use red cables for positive connectors (+) and black for negative connectors (-). The black plastic on the barrel connector is marked with a (+) and (-) sign to indicate positive and negative. Slide one side of the jumper wire into the positive (+) green barrel jack connector and match it to the corresponding positive (+) spot on the right side of the breadboard. Repeat this for the negative (-) connection.

Connect the jumper wires to their corresponding barrel jack connector terminals

2. The Load

For this step, use a CR circuit attached to a servo triggered by a push button. Pause and take a look at what each of these parts actually does.

The CR servo trigger is a small robotics board that simplifies the control of servo motors. When an external switch or signal changes state, the servo trigger is able to tell an attached servo to move from position A to position B. To use the servo trigger, connect a hobby servo and a switch, then use the on-board potentiometers to adjust the start/stop positions and the transition time. In this way, you can use a hobby servo in your projects without having to do any programming. It’s important to note that the CR servo trigger has three sets of pins that are attached to it. One set of three pins will be used to connect to the actual servo motor. One set of two pins will be used for connecting jumper wires to the button. This will start and stop the operation of the servo. The last set of two pins, pointing in the opposite direction as the other sets, will be used to directly insert the servo trigger into the breadboard power rails. Make sure you note these different pin configurations before following the instructions later in this guide.

The SparkFun Continuous Rotation Servo trigger

A servomechanism can refer to many different machines that have been around for a while. Servos are found in everything from heavy machinery, to power steering in vehicles, to robotics, and a wide variety of electronics. If you open up a standard hobby servo motor, you’ll usually find three core components, a DC motor, a controller circuit, and a potentiometer or similar feedback mechanism. The DC motor is attached to a gearbox and output/drive shaft to increase the speed and torque of the motor. The DC motor drives the output shaft. The controller circuit interprets signals sent by the controller, and the potentiometer acts as the feedback for the controller circuit to monitor the position of the output shaft. Nearly all hobby servos have a standard three-pin connector to power and control the servo. With a servo, you can power and control the direction, speed, and position of the output shaft with only three wires.

How a Servo works

A switch is a component that controls the openness or closedness of an electric circuit. It allows control over current flow in a circuit (without having to actually get in there and manually cut or splice the wires). Switches are critical components in any circuit that requires user interaction or control. A switch can only exist in one of two states: open or closed. In the off state, a switch looks like an open gap in the circuit. This, in effect, looks like an open circuit, preventing current from flowing. In the on state, a switch acts like a piece of conducting wire. This closes the circuit, turning the system on and allowing current to flow unimpeded through the rest of the system.

How a switch works

3. The Circuit Path

For a circuit to work, the path of the power can’t be interrupted—all pieces have to be in contact. Luckily, you have a breadboard that’s a helpful tool you can use to quickly plug in items and keep them connected. You can also create, fix small mistakes, and practice with the components.

What is a breadboard?

Start by taking a look at the breadboard that’s included in your kit:

First, notice there are two long columns of holes running down each side of the board, one with a red line beside it, and one with a black line. These are called the power rails, and all the holes in a single power rail are connected to each other. If power is connected to one hole in the column, it's connected to all the other holes in the column.

There are two holes in the plastic molding at the end of the wires coming from the wall plug. Insert a jumper wire into each of these holes and insert the other ends into the (+) power rail and the (-) power rail.

Attach the power jumper wires to the breadboard

Second, all the holes in a numbered row are connected to each other, but this connection is broken at the small trench or indent that runs down the center of the board. Each side could be its own separate circuit. Our project will jump over the trench using jumper wires and send power back and forth.

You can view a breadboard as a series of columns (labeled A-E and F-J) and rows (labeled 1-30). Remember, the divide in the middle means A5 isn’t connected to F5. When you get to the instructions below, you’ll use this row and column system to mark where connections should be made (A6, E3, H23, etc.).

Circuit drawing to replicate with hardware

Replicate this circuit show above (the steps are below). You’ll only use a few jumper wires but be especially careful to place them into the appropriate coordinate points on your breadboard. We won’t connect to the power adapter until the last step.

Create your circuit as follows:

  1. Locate the set of two pins that point in the opposing direction as the other pin connectors. Place the CR servo trigger circuit so that these pins align with the positive (+) and negative (-) power rails on the right side of the breadboard. Gently press into place.
  2. Connect the button so that the left side is seated into D10 and D12 with the right side seated into G10 and G12.
  3. Locate the two pins on the servo trigger pointing up. Connect the socket side of a jumper wire to the pin labeled IN and the pin side of the jumper wire to C10.
  4. Connect the socket side of a second jumper wire to the pin labeled GND and the pin side to H12.
  5. Connect the black three-pin connector from the servo to the remaining three-pin connectors on the servo trigger so that the black wire is connected to the pin labeled GND.
  6. Make sure the black and red wires from the barrel jack power supply are connected as discussed in the circuit section above.

Testing

Once you complete the steps above and plug the DC power supply into the wall, you can begin tinkering with your robotic hand. To test your build, simply click the button and watch the servo move. At this point, you’ll want to tinker with the white knobs on the continuous rotation servo trigger. On the circuit board, you will find three potentiometers: "A" sets the position the servo sits in while the switch is open, "B" sets the position the servo moves to when the switch is closed, and "T" sets the time it takes to get from A to B and back.

As you click the button, you’ll find that by twisting the white knob labeled “B” on the servo trigger changes the direction of the servo.

Completed roboatic hand assembly