loading

Make a Simple Snap Circuits Programmable Robot

Picture of Make a Simple Snap Circuits Programmable Robot
In this Instructable you will learn how to build a simple Snap Circuits programmable robot. First you will learn how to build a simple circuit using Snap Circuits to understand how easy it is to build an electronic circuit. Next you will build the Roverbot (what I call the Snap Circuits programmable robot). You will then learn how to program the Roverbot. Finally you will learn how to download the program to the Roverbot's brain and watch the Roverbot follow the commands of the program you wrote.
 
Remove these adsRemove these ads by Signing Up

Step 1: Build a Simple Circuit as an Introduction to Snap Circuits

Picture of Build a Simple Circuit as an Introduction to Snap Circuits
batteryc6e61.jpg
2snape2e3.jpg
Snap Circuits by Elenco is an educational toy that teaches electronics with solderless snap-together electronic components. Each electronic component has the electronic schematic symbol and a label printed onto its plastic case that is color coded for easy identification. They snap together with what appear to be ordinary clothing snaps—hence the name Snap Circuits. The components also snap onto a 10 X 7 plastic base grid, which is analogous to a solderless breadboard.

There are several Snap Circuits kits that range from a few simple circuits to the largest kit that includes 750 electronic projects. All the kits include manuals printed in color with easy to follow diagrams to assemble the projects. The illustrations for each project look almost exactly like what the components will look on the base grid when finished. Because the electronic symbol is printed on each electronic component, once the project is completed, it will look almost exactly like a printed electronic schematic.

The first image is what a project in the manual page looks like. As you can see the projects in the manuals are self explanatory..  (Source: Snap Circuits Project #1 http://manuals.elenco.com/manuals/sc-100%201-101.pdf)

The photos are what the circuit, will look like: three electronic components, the battery holder, the slide switch, and a lamp are connected together with snap conductors on the plastic base grid. This simple circuit will switch a light bulb on and off.

Step 2: Build the Roverbot Circuit

Picture of Build the Roverbot Circuit
snaproverfront.jpg
snaproverback.jpg
snaprovercircuit.jpg
Build the circuit as shown in the diagram. You can also look at the pictures to get an idea of what it will look like when you are done. To build my Roverbot, I used parts from three different sets, the Snap Circuits Motion Detector, Snap Circuits Rover, and Snap Circuits Micro, but you can probably order all the parts separately (from Elenco or C & S Sales). Here are the parts I used:

10 X 10 Plastic Base Grid
Snap Circuits Rover
Snap Circuits 9 volt Battery Block B5
Snap Circuits Motor Control IC U8
Snap Circuits 8 Pin Socket U14 With PICAXE 08m Installed
4 Snap Circuits 1KOhm Resistors R2
Snap Circuits Slide Switch S1
Snap Circuits USB Programming Cable
(You may substitute the Snap Circuits USB to DB9 Converter and the Snap Circuits DB9 Programming Cable if you do not have the USB Programming Cable)
Snap Circuits Micro Software CD
3 Snap Circuits Single Snaps
9 Snap Circuits Two Snap Conductors
1 Snap Circuits Three Snap Conductor
2 Snap Circuits Four Snap Conductors
1 Snap Circuits Seven Snap Conductor
Snap Circuits Jumper Wire (Orange)
Snap Circuits Jumper Wire (Yellow)
Snap Circuits Jumper Wire (Green)
Snap Circuits Jumper Wire (Purple)
Snap Circuits Jumper Wire (Gray)
Snap Circuits Jumper Wire (White)

Step 3: Program the Roverbot

Picture of Program the Roverbot
Install the PICAXE Programming Editor software from the Snap Circuits Micro Software CD. Open the Programming Editor and select the 08M when prompted (for the PICAXE 08M microcontroller). Next select the COM port that the PICAXE programming cable is connected to on your computer. To create a new flowchart, click File and then click New Flowchart. Use my example flowchart to make your own flowchart.

I’ve divided up each function into columns to make the flowchart easier to read. In the first column under “start” are the commands to test the Roverbot’s left forward motor. This will cause the Roverbot to turn right. Under the label “Test left backward” are the commands to turn the Roverbot’s left motor backwards. This will cause the Roverbot to turn left. The next four columns are the commands to test the right motor turning forward and backward, then turn both left and right motors forward (Roverbot rolls forward), and finally turns both motors backwards (Roverbot rolls backwards).

You can also convert the flowchart into BASIC program code. BASIC is an acronym that stands for Beginners All-purpose Symbolic Instruction Code. It was created way back in the 1960s as an easy to understand programming language to introduce students to computer programming.

Click Flowchart and then click Convert Flowchart to BASIC. The following is what the code will look like in BASIC (I added the comments in the code to describe what the code does):

‘BASIC converted from flowchart:
‘C:\DOCUMENTS AND SETTINGS\DESKTOP\SNAPROVERBOT.CAD
‘Converted on 10/30/2011 at 20:53:11
main:
‘Snap Rover programmable robot

‘Test left forward
  pause 1000
  high 0
  pause 2000
  low 0
‘Test left backward
  pause 1000
  high 1
  pause 2000
  low 1
‘Test right forward
  pause 1000
  high 2
  pause 2000
  low 2
‘Test right backward
  pause 1000
  high 4
  pause 2000
  low 4
‘Test forward
  pause 1000
  high 0
  high 2
  pause 2000
  low 0
  low 2
‘Test backward
  pause 1000
  high 1
  high 4
  pause 2000
  low 1
  low 4
‘End program
  stop

The code is very simple but should demonstrate how easy it is to program the Roverbot.

Step 4: Test the Roverbot Program

Picture of Test the Roverbot Program
picaxepinout.bmp
To run the program, make sure the Snap Circuits Slide Switch S1 is switched off else the program will execute while the program is still downloading to the PICAXE and may accidentally disconnect the programming cable as the Roverbot runs through the motor tests. Next, make sure that the Snap Circuits 9 volt Battery Block B5 is switched on or the program will not download to the PICAXE. Connect the Snap Circuits USB Programming Cable to your computer.

1.  Connect the yellow snap to the S-In snap on the Snap Circuits 8 Pin Socket U14 block (the PICAXE chip carrier).

2.  Connect the red snap to the S-Out snap on the Snap Circuits 8 Pin Socket U14 block (the PICAXE chip carrier).

3.  Connect the black snap to the GND, or negative (-) snap on the 8 Pin Socket U14 block (the PICAXE chip carrier).

In the Programming Editor click PICAXE and then click Run. A status bar will display to show the progress of the download of the program to the PICAXE.

Wait a minute or so after the program finished downloading, then place the Roverbot on the floor a safe distance from any obstacles. Then switch the Snap Circuits Slide Switch S1 to on. When you are ready to watch the motor tests, switch on the Snap Circuits 9 volt Battery Block B5 and watch the Roverbot perform the motor tests.

Step 5: Happy Hacking

Congratulations! In this Instructable you learned how to build a simple Snap Circuits programmable robot. You learned how to build a simple circuit using Snap Circuits to understand how easy it is to build an electronic circuit. You built the Roverbot. You learned how to program the Roverbot. Finally, you learned how to download the program to the Roverbot's brain and watched the Roverbot perform the commands of the program you wrote. Happy hacking!

If you enjoyed this Instructable, please vote for it in the Toy Challenge 2 Contest. Go to http://www.instructables.com/contest/toy2/?show=ENTRIES and click the vote button (you may have to scroll through a few pages to find it).

I have recently become interested in hacking toys as is evidenced by the numerous Instructables I have posted about hacking the Spy Video Trakr:

http://www.instructables.com/member/KRA5H/

I have documented these hacks hoping to inspire other Trakr owners to come up with their own new hacks for their Trakrs (and hope they post an Instuctable about their hack so I can try it too).

I posted my Roverbot hoping to inspire Snap Rover owners to create robots of their own. I also hope they post their designs so I can try them too.

I am very interested in hacking the Parrot AR Drone. Unfortunately, I cannot afford to purchase the AR Drone, nor an iPad, nor an iPhone--not even an iPod to use as a remote control for the Drone. Obviously I hope to win the the grand prize for the Toy Challenge 2 Contest so I can have an opprotunity to try hacking the AR Drone.
Cool.