Introduction: Racing Robots!

This project uses LabVIEW, a chipKIT WF32 microcontroller, and a Leap Motion Controller in order to race two robots. LabVIEW MakerHub LINX is used to communicate between LabVIEW and the microcontroller. A LabVIEW MakerHub library for the leap is used to track hand position and then peaks and valleys are measured. The faster your hand moves up and down, the higher the duty cycle for PWM. Higher duty cycles makes the motors turn faster and increase the speed of the robot. Therefore, the person waving their hand up and down the fastest will have their robot cross the finish line first. Check out the YouTube video to see a more in-depth explanation.

Step 1: Materials

1) LabVIEW

2) LabVIEW MakerHub LINX

3) LabVIEW MakerHub Leap Motion Controller Library

4) Leap Motion Controller

For Each Robot

5) chipKIT WF32

6) 2x PmodHB5

7) 2x Motors

8) 4x AA Batteries

9) If you need some parts for a platform, check out the Robotic Platforms section on the Digilent website.

Step 2: Wiring

First, connect the PmodHB5 to the motors using the built-in connector. Then connect the 3.3V and ground connections to each of the Pmods.

The first pin on the PmodHB5 determines the direction of the motor, For the left motor, connect this pin to channel 33 on the chipKIT WF32 and connect this pin to channel 32 for the right motor.

The second pin on the PmodHB5 determines the speed of the motor using PWM. Connect the second pin of the left motor to channel 5 on the WF32 and connect it to channel 3 for the right motor.

Connect the power and ground from the batteries to each of the PmodHB5 screw terminals to power the motors. Also, send the voltage to power the board by connecting the positive lead and negative leads to J14 on the WF32 *Make sure the jumper labeled VU Select is set to EXT (pictured above).

Step 3: Software

For this project, you'll need to download LabVIEW, LabVIEW MakerHub LINX, NI VISA, LabVIEW MakerHub Leap Library, and the Leap Motion Controller software and drivers from their website. There are links to the rest of the software in the introduction

Step 4: LabVIEW Code and Board Setup

Download the LabVIEW Code below and open it.

Use the LabVIEW MakerHub Firmware wizard to program your WF32 to use WiFi. For more information on how to do this, check out this Instructable.

On the front panel, input the TCP information and you're ready to run the VI. Make sure you have the Leap Motion Controller connected and feel free to run an example for the leap to make sure it is working in LabVIEW by looking through the included examples.

Hope you enjoyed my racing robot project!

Comments

About This Instructable

4,614views

81favorites

License:

Bio: Software Engineer at Digilent Inc.
More by Sudharsan Sukumar:Raspberry Pi Rainbow RulerGetting Started With the Raspberry Pi 2 (LabVIEW)LabVIEW Tutorial: Game Discounts
Add instructable to: