Wednesday, May 21, 2008

Servo Car [ Sun SPOT app ] (3)

Hardware setup (cont'd)


In a standard breadboard the holes of the breadboard are connected underneath. Different sets of holes are connected to each other in a variety of ways. This time I selected a breadboard having the following layout (the holes on the same red lines are interconnected each other) .

A servo has 3 connectors: Vdd, GND and I/O pin. I/O pin is used to send a pulse, so this pin has to be connected to Sun SPOT Hxx (H0 -- H3) pin. Here I choose H0 for the servo of right wheel and H1 for the one of left wheel. For this servo, White line is I/O pin, Red one is Vdd and Black one is GND (see below). Check the spec for your servo.

A battery pack has, of course, two wires + and -, so we need the following connections to make a servo work well with Sun SPOT.
  • battery + <---> servo Vdd <---> Sun SPOT VH
  • battery - <---> servo GND <---> Sun SPOT GND
  • servo I/O pin <---> Sun SPOT H0 (or H1)
How to connect

1. Place 2 headers on the breadboard

2. Connect the first servo to the first header

3. Connect the battery to the breadboard

4. Connect Sun SPOT and the first header on the breadboard (SPOT's H0 to I/O pin, SPOT's VH to Vdd and SPOT's GND to GND)

5. Connect the second servo to the second header. To supply the power to the second servo, you also have to connect two headers as the following (with 2 x orange wires).

6. Connect Sun SPOT and the second header on the breadboard (SPOT's H1 to I/O pin)

7. Finish

Next time, let's write a simple program for those servos.

No comments: