Robot Kit

Hardware components:
Wooden robot frame
× 1
Continuous rotation servos
× 2
Ball caster
× 1
USB Xbox 360 controller
× 1
Digital switch
× 1
6″ male-to-female jumper wires
× 1
6″ male-to-female wires
× 1
Screws, nuts, bolts, standoffs
× 1
R8326274 01
Raspberry Pi 2 Model B
With accessories: power supply, SD card, network ethernet cable
× 1
Software apps and online services:
10
Microsoft Windows 10 IoT Core

robot kit

STORY

You are about to embark on a journey, and we are excited to be part of it! Get ready to make and program your robot using Windows 10 IoT Core!

By the time you are done with this project you will gain the following experience:

  1. Understand how Windows 10 Universal Windows Applications (UWA) work
  2. See how the same application can come alive and change behavior by running on the robot via Windows 10 IoT Core on a Raspberry Pi 2 and on your Windows 10 Desktop PC
  3. Control digital GPIO from your Raspberry Pi 2
  4. Process keyboard, mouse clicks and touch events

We are excited to embark on this journey with you – Thank you from the Microsoft IoT Team!

Usage

Download the project, load it into Visual Studio compile and deploy the application. Follow this link.

The application can be run in 2 ways:

  1. Windows 10 desktop UWA – here you can use the mouse or touch to drive the robot. You can also plug in the Xbox 360 controller and use that to drive the robot over the network
  2. Windows 10 IoT Core UWA for the Raspberry pi 2 – here you can drive the robot directly with the Xbox 360 controller, or via network commands from the Windows 10 UWA

Directional movement

The robot can move in 8 directions:

  1. Forward
  2. Reverse
  3. Hard left turn
  4. Hard right turn
  5. Soft forward left turn
  6. Soft forward right turn
  7. Soft backward left turn
  8. Soft backward right turn

A hard turn rotates the wheels in opposite directions. A soft turn rotates only one wheel in the specified direction.

Joystick Input

The robot can be controlled via the left analog stick or digital direction pad. They joystick can be plugged into the robot directly via the USB port on the Raspberry Pi 2 or the Windows 10 Desktop PC via USB.

Keyboard Input

From the Windows 10 Desktop PC  UWA app, the keyboard controls are:

  • Forward – Up arrow / W
  • Backward – Down arrow / X
  • Left – Left arrow / A
  • Right – Right arrow / D
  • Back Left – Z
  • Back Right – C
  • Forward Left – Q
  • Forward Right – E
  • Stop – Enter / Space

Mouse/Touch

When run on the Windows 10 Desktop PC, there is an input screen with the 8 directional movements of the robot. Click or touch any of these to move the robot.

Bill of Materials

To build the robot, you will need the following:

  1. Wooden Robot Frame in 7 pieces – Get the cutting plans from the Sumo Robot Jr. GitHub repoand submit them to http://ponoko.com. We cut them 4 to a sheet of P3 5.2 mm Veneer Core Birch
  2. 2x continuous rotation servos, like these
  3. A ball caster, like this
  4. A USB Xbox 360 Controller
  5. a Digital switch, like this
  6. 6x 6″ Male-to-Female Wires (2 red, 2 white and 2 black) like these
  7. 2x 6″ Female-to-Female Wires (1 red and 1 black) like these
  8. Screws, Nuts, Bolts and standoffs like this
  9. Raspberry Pi 2, a 2 Amp power supply, SD card, network ethernet cable
  10. Micro screwdrivers

Hardware assembly

Pin Assignments

Pin Assignments

Assembly Notes

  • Tolerances – The robot frame is designed to snap together. We have noticed some slight tolerance differences in the laser cuts of the wood frame. You may want to leave the protective tape on the non-visible side of the parts as a shim when assembling the robot. if you plan to glue the robot frame together or if the pieces fit very tightly, you can choose to remove the protective tape.
  • Screw hole alignment – The screw holes were designed for the Raspberry pi 2, but the standoffs may not perfectly align due to tolerance differences in the laser cut frame. This is perfectly ok if the standoffs taper a bit.
  • Don’t overtighten! – Do not overtighten the screws that go into the standoffs. Overtightening can cause the substrate of the Raspberry pi 2 to crack. It’s ok for these to just be a snug fit, or even a bit loose.

Software

The robot kit software is a UWA project with 6 major files:

  1. MainPage.xaml.cs – The main application code and entry point
  2. XboxHidController.cs – The initialization and handling logic for the Xbox controller
  3. MotorControl.cs – The main logic for controlling the continuous rotation servos
  4. Controller.cs – The logic for converting joystick, key press, mouse, and touch events to robot movements
  5. NetworkCommands.cs – the logic to setup client and server networking threads and create/process network messages
  6. package.appxmanifest – the manifest file that defines properties of this UAP application

Read More: Robot Kit

About The Author

Scroll to Top
Read previous post:
An isolated analog input for Arduino
An isolated analog input for Arduino

This blog is dedicated to electronic projects and software due to the author’s enthusiasm for these activities. The main aim...

Close