Introduction: Jousting Robot (Wiring Tutorial)

About: Software Engineer at Digilent Inc.

This instructable goes over how to set up the wires for the jousting robot project.

The jousting robot project uses 3D printed parts, LabVIEW, servos, sensors, and the chipKIT WF32. If you're interested, Digilent sells the LabVIEW Physical Computing Kit which includes LabVIEW Home Bundle and chipKIT WF32.

Check out this Instructable that goes over setting up the 3D printed robot parts and check out this Instructable to get an in-depth explanation of the LabVIEW code I created to run the robot.

Step 1: Materials

1. WIRES

2. Breadboard

3. LabVIEW

4. LabVIEW MakerHub LINX

5. chipKIT WF32

6. PmodJSTK

7. PmodACL

8. Force Sensor (Force Sensitive Resistor 0.5")

9. Mini Servo

10. 4.7k Resistors (x2)

11. 10k Resistor

12. Continuous Servo (x2) (check out "GWS Servo Kit - Continuous Rotation" on the linked page)

13. 9V Battery (x2)

Step 2: Create a Voltage Divider for the Force Sensor

To move the force sensor to the front of the robot, we soldered some wires to each tab. For some sweet green color, we also spray painted it!

Next, a voltage divider is created using a 10k resistor and the force sensor. The voltage across the resistor is then fed to the analog 0 channel on the WF32 to monitor the force.

Connect 3.3V to the force sensor and then connect the other tab on the force sensor to the 10k resistor which then connects to ground. Connect a wire where the force sensor connects with the 10k resistor to the analog 0 pin.

Check the notes on the picture for some description on the setup.

Step 3: Setup I2C Connection to PmodACL

Next, connect the PmodACL to the chipKIT WF32 using I2C. The first pin is the SDA line and the second pin is the SCL line. Both of these lines need 4.7k pull-up resistors. Connect Vcc to 3.3V and connect ground to ground on the breadboard. Next, use the 4.7k resistors to connect each line to 3.3V individually. Connect the SDA and SCL lines to the breadboard as shown above.

Finally, connect a wire from the SDA line to analog pin 4 and connect a wire from the SCL line to analog pin 5. Make sure the jumpers on the WF32 are set to I2C to use these analog channels for I2C communication.

Step 4: Connect the PmodJSTK

PmodJSTK uses SPI to communicate. The CS channel connects to the digital channel 10 on the WF32. The MISO (master in slave out) connection should be connected on pin 12 and the SCL line should be connected to pin 13. This configuration corresponds to the SPI 0 connection (default) on the WF32. Connect the Vcc and ground lines to 3.3V and ground respectively. Since we do not care about turning on the LEDs on the PmodJSTK, there is no need to connect the MOSI (master out slave in) line.

Step 5: Connect the Three Servos

Now we connect the servos. The white wire to the servo is the channel that will be used to control the angle of the servo or set the rotation direction and speed for the continuous servos. Connect this wire to channel 26 on the WF32 for the mini servo and channel 27 and 28 for the left and right continuous servos respectively. The red wire is the 5V wire so connect this to the 5V0 supply from the board on the breadboard. The black wire is ground. Connect this to the other ground connection on the breadboard from the WF32.

Step 6: Wire 9V Power and Set Jumpers

Connect the power and ground from each battery to the breadboard so that the batteries are arranged in parallel. Do NOT connect them in series. Make sure the jumper on the WF32 is set to EXT for external power. Refer to the picture above and make sure the jumpers are connected in the correct positions.

Step 7: Connect the Power!

Now all that's left to do is to connect the 9V battery to the chipKIT WF32!