Cricket Arduino Walking Robot Documentation

Cricket
Robot
Revision 1.0B Copyright 2015
Contents
CRICKET THE ROBOT ...................................................................................................... 4
Description ....................................................................................................................... 4
Cricket Kit Contents ......................................................................................................... 5
Getting Started ................................................................................................................. 5
Using the Remote Control ................................................................................................ 5
Documentation ................................................................................................................. 7
Software and Download Cable ......................................................................................... 7
Cricket Features ............................................................................................................... 7
Top View .......................................................................................................................... 8
Bottom View ..................................................................................................................... 9
Front View ...................................................................................................................... 10
HOW CRICKET WORKS.................................................................................................. 11
How Does Cricket Walk? ............................................................................................... 11
Obstacle Avoidance ....................................................................................................... 11
Random Noises ............................................................................................................. 11
Flashing LED Eyes ........................................................................................................ 11
Remote Control .............................................................................................................. 11
PLAYING WITH CRICKET ............................................................................................... 12
ABOUT CRICKET’S HARDWARE ................................................................................... 13
Chassis .......................................................................................................................... 13
Legs ............................................................................................................................... 13
Servo Motors .................................................................................................................. 13
Arduino Controller .......................................................................................................... 14
Batteries ......................................................................................................................... 15
Speaker and Sound Generation ..................................................................................... 15
Infrared Remote Receive ............................................................................................... 15
Light Emitting Diodes ..................................................................................................... 16
Feeler Wires and Switches ............................................................................................ 16
Programming Connector, Cable and Software ............................................................... 17
Uploading an Arduino Program ...................................................................................... 18
Launch the Arduino Application ..................................................................................... 19
Open the blink Example ................................................................................................. 19
Select your Board .......................................................................................................... 19
Select your serial port .................................................................................................... 20
Upload the program ....................................................................................................... 20
2 – Cricket Robot Documentation
ASSEMBLING CRICKET’S ARDUINO CONTROLLER BOARD .................................... 22
Tools Needed ................................................................................................................. 22
Parts Layout ................................................................................................................... 24
Installing the Parts ......................................................................................................... 25
Checkout and Cleanup................................................................................................... 32
ASSEMBLING CRICKET’S CHASSIS ............................................................................. 33
Tools Needed ................................................................................................................. 33
General Assembly Instructions ...................................................................................... 34
Assemble the Legs ........................................................................................................ 34
Assemble the Center Leg Beam .................................................................................... 36
Attaching the Servo Motor Mounts ................................................................................. 40
Install the PC Board Mounts .......................................................................................... 42
Assemble the Leg Control Arms .................................................................................... 46
Assemble the Sonar Bracket .......................................................................................... 47
ABS Parts of Chassis are Now Complete ...................................................................... 51
Installing the Servos into the Chassis ............................................................................ 52
Installing Cricket’s Legs ................................................................................................. 54
Installing the Leg Control Arms ...................................................................................... 58
Installing the Battery Holder ........................................................................................... 62
Installing the Speaker .................................................................................................... 64
Completing the Feelers .................................................................................................. 65
Installing the Feelers ...................................................................................................... 66
Centering the Servos ..................................................................................................... 72
Installing the Servo Horns .............................................................................................. 72
Installing the Sonar Module ............................................................................................ 78
Cleaning Up the Wiring .................................................................................................. 81
Final Checkout ............................................................................................................... 84
TROUBLESHOOTING ..................................................................................................... 88
APPENDIX A – SCHEMATICS ........................................................................................ 90
APPENDIX B - PARTS LIST ............................................................................................ 92
APPENDIX C - PC BOARD LAYOUT .............................................................................. 93
3 – Cricket Robot Documentation
Cricket the Robot
Congratulations on the purchase of your Cricket Robot Kit. Cricket is a unique walking robot. You will find that he is also a powerful programmable robot. Cricket has:
Arduino based Programmable Controller
Sturdy Laser Cut Body construction
3 Hitec Servos to control six legs
Sonar with Hitec scan servo
2 LED Eyes for visual effects
Speaker to make sound effects
2 Bump Feelers
IR Remote Control
Documentation
Cricket comes preprogrammed and ready to go. As you become more familiar with his capabilities you can easily modify his control program to add or change his behaviors. Programming Cricket requires just the standard Arduino Environment and a USB down load cable.
Description
Cricket is a six-legged walking robot. He uses three motors to make the six legs walk in a tri-gate fashion. Tri-gate means that Cricket has three legs on the ground at any one time. The three legs touching the ground form a triangle which is very stable. Cricket can walk forward, backward, and turn right and left. Cricket can also make sounds, flash his LED eyes, and detect obstacles with his sonar and feelers. The Arduino Uno compatible controller operates all of Cricket’s capabilities. The controller can be easily programmed using the standard Arduino environment. The Arduino libraries allow you to perform things like making sounds, blinking lights, and controlling motors. The Arduino based program is written on a PC and then is downloaded through the PC’s USB port.
4 – Cricket Robot Documentation
Cricket Kit Contents
Cricket robots come in three variations. They are:
Fully assembled robot
Robot kit with fully assembled Arduino controller
Robot kit with Arduino controller as a kit for user assembly
If you received an assembled robot, you may review the assembly instructions if you would like to become more familiar with how your robot is assembled. Otherwise just start enjoying playing with your Cricket Robot
Getting Started
Cricket runs on 4 standard AA batteries. You may use rechargeable batteries or alkaline batteries. Install the batteries while noting the correct orientation. Place Cricket on a level service and push the slide switch at the back end of the controller board. Cricket will make a series of chirping sounds, bring all his legs into a neutral position, pause for one second and then begin walking. While walking around, Cricket will make chirping sounds at random times, and he will blink his LED eyes. He will also make a series of sounds whenever his antennae touch an object or when the sonar detects something. When Cricket detects an obstacle, he will back up and then turn away from the obstruction and keep wandering around. Cricket will continue to walk around until his battery becomes weak. You can tell the battery is weak when the robot starts to act erratically. Replacing or charging the batteries for a few hours will restore Cricket’s health.
Using the Remote Control
In addition to Cricket’s ability to wander around on his own, he will also respond to his remote control. The remote is simply a Universal remote setup as a Sony TV/VCR Combo. You may use your own remote or the one provided with Cricket.
The remote control will override whatever Cricket is doing and execute the following actions:
Volume Up Cricket turns right.
Volume Down Cricket turns left
Channel Up Cricket moves forward at a fast walk
Channel Down Cricket backs up
Rewind Shake Left Legs
Fast Forward Shake Right Legs
Play Rock Back and Forth
Stop Cricket stops and holds his position
Pause Cricket freezes as long as button is held
Keys 0-9 Cricket makes different interesting sounds
Mute, On-Off Stop and center legs
Prev. CH, Record Dances the Cha-Cha
The sound keys 0-9 are fun to play with because Cricket can make a continuous stream of various sounds and chirps while you hold one of these keys down. Pushing the Pause button will cause Cricket to freeze for as long as you hold the button. Pushing Stop
Remote Control
5 – Cricket Robot Documentation
causes Cricket to stop and hold his last position. Mute which is in the center of the round volume and channel area causes Cricket to stop and center his legs.
IMPORTANT: If the remote fails to work, you may need to reset the remote operation code. Use the following instructions for your remote. These instructions are also on the battery door of your remote. If you have an older remote, the code may be different but the instructions are the same.
The code is 0972 for GE 4 Device Remote (24993) as shown to the right.
To Reprogram for CRICKET: Press and release the TV button. Press and hold the setup button until the LED lights. Then key in the three-digit code 0972 and the red LED will go out.
6 – Cricket Robot Documentation
Documentation
This documentation includes information on using Cricket and how to assemble a Cricket. This manual and assembly information and will be updated periodically.
Software and Download Cable
Some Cricket kits come with an optional USB/Serial programming cable. This cable can be used to program the Arduino with the original Cricket software or to program Cricket with your own custom version of the software. If you did not get a cable, you can purchase SparkFun part number DEV-9716 or any similar 6 pin Arduino programming module.
https://www.sparkfun.com/products/9716
The Cricket program can be edited in the Arduino environment and the Arduino reprogrammed. A new program will erase the current program. The original Cricket program may be downloaded to restore Cricket’s original behavior.
Cricket may also be purchased with a Nano Arduino Module which can also be connected to a USB port so that Cricket may be reprogrammed. Both the Arduino IC and the Nano Module use the same control Sketch.
Cricket Features
The following photos show the layout of Cricket’s features including top, bottom, and front views of the robot.
7 – Cricket Robot Documentation
Top View
8 – Cricket Robot Documentation
Bottom View
9 – Cricket Robot Documentation
Front View
10 – Cricket Robot Documentation
How Cricket Works
The following paragraphs explain how Cricket is able to walk, make sounds, and how his various behaviors and features work.
How Does Cricket Walk?
Cricket uses what is called a tri-gate walk. Tri-gate walking is one of the most efficient ways to implement a walking robot with a minimum number of motors. The right and left servo motors move the right and left pairs of legs forward and backward. In order for this leg movement to move the robot forward, the center legs rock the robot to one side so the legs can move forward without touching the ground. When the legs are touching the ground a backward movement pulls the robot forward one step. This stepping alternates from one side to the other causing the robot to walk forward. Walking backward is the same as forward except that the legs are off the ground when being moved backward and touching the ground when being pulled forward. Watch the robot for a while and you will begin to see how it works. Cricket executes a turn by stepping forward with one side while the other side steps backwards.
Obstacle Avoidance
Cricket’s Arduino microcontroller is constantly monitoring his sonar and his feeler switches to detect obstacles. When Cricket detects an object with his sonar or his feelers, he stops, makes a noise, backs up three steps, scans the area in front of him for the best direction, and then continues moving forward in the best direction. If either the feelers are bumped, Cricket will also do a sonar survey of what is in front of him and select the best direction to proceed. The best direction is the longest unobstructed distance he can measure.
Random Noises
You may notice that Cricket chirps from time to time but not always. Sometimes he will chirp three or four times in a row. This random chirping is part of the Arduino program. For every step the robot takes he looks up a random number. If the number is less than a preset value, Cricket stays quiet, but if the number is larger than a preset value, Cricket makes a chirp sound.
Flashing LED Eyes
Cricket has two LED eyes. After Cricket is powered up, the green LED eyes will light and randomly turn on and off. These LEDs are all under the program control and are not just blinking on their own. Cricket’s eyes will alternate turning on when he is sleeping. Try pushing the mute button.
Remote Control
The square black module on the controller board is a TV remote receiver module, which responds to the Remote Control by directing Cricket to actions other than his normal automatic behavior. During each step Cricket takes, he also checks to see if any remote control commands were received. The remote module receives the remote control signal and the Arduino turns the information into commands which Cricket can use to perform actions. Cricket is able to understand almost all of the keys on the remote.
11 – Cricket Robot Documentation
Playing with Cricket
So that is enough of the details. Here’s what you can do with Cricket!
Put Cricket in an area with some obstacles and watch how he walks around them detecting things in his way. Are there things that he doesn’t see? What would he need to see things he currently misses
Use the Cha-Cha and side leg movements to choreograph a dance routine using Cricket’s remote control. Here’s an example of the “Harlem Shake”
https://www.youtube.com/watch?v=9qCdq174cd8
And another one:
https://www.youtube.com/watch?v=L3Fsne3_BPk
Using the remote control, steer Cricket through an obstacle course.
Try the programming experiments in the manual “Cricket Programming”
After you tried the above, think about ways that you would improve your Cricket. You could change the sounds, add unique leg movements that are different than the Cha-Cha, or add crazy random behaviors to the things he does.
How would you make Cricket walk around a table without falling off?
Improve or modify Cricket and enter him in a Science Fair or County Fair. We have already seen kids do this and win first place ribbons.
Cricket is a great way to learn new programming and robotic skills. Playing with him will trigger ideas of how he could be made better. Using the Arduino environment and possibly some other sensors, will allow you to make him even smarter.
12 – Cricket Robot Documentation
About Cricket’s Hardware
The following paragraphs explain each of Cricket’s components.
Chassis
The Cricket body is made from laser cut ABS plastic. Motors, controller, switches, and the battery pack are all mounted on this chassis. This chassis is strong and easy to assemble.
Legs
Cricket’s legs are also made from laser cut ABS plastic. The legs pivot on a simple screw and a captive nut. The legs have control arms that transfer the rotary motion of the servos into linear forward and backward motion or up and down motion. Cricket’s foot pads are made from rubber bumpers which are attached to the end of the leg.
Servo Motors
Cricket uses three servo motors for walking and one for the Sonar. These motors are hobby servo motors used for model airplanes and cars. Each motor has three wires that supply 6 volts (red), ground (black), and the special controller signal (yellow). The controller signal is a special stream of pulses supplied by the Arduino controller. These pulses tell the motor what position to go to. Normally a radio control receiver in a model airplane or car would supply this special signal but for Cricket, the Arduino microcontroller generates these signals. The motor on the right side moves the right front and rear legs forwards and backwards. The motor on the left side moves the left front and rear legs forwards and backwards. The center motor pulls on the right and left center legs to make the robot lean from one side to the other. The small blue motor runs the Sonar Sensor.
13 – Cricket Robot Documentation
Arduino Controller
The Arduino microcontroller is mounted on a small circuit board along with the connectors that go to the motors, feeler switches, and batteries. A download 1/8” phono connector on the front left of the circuit board allows the Basic programs to be downloaded into the Arduino. There is a small speaker for sounds and LEDs that can be blinked. The battery pack powers the Arduino directly while a 5-volt regulator supplies power for the Arduino.
LED Eyes
Sonar Conn.
Analog Sensor Connectors
Power connector
Feeler Switches
(pin 1 is leftmost pin)
Digital & Servo Motor Connectors
Remote Sensor Programming Port
Power Switch
14 – Cricket Robot Documentation
Batteries
Cricket uses standard AA batteries. The batteries will last about 1 -2 hours of operation before needing to be replaced. Rechargeable batteries are an economical alternative to alkaline cells. Battery power enters the controller board through a terminal block at the rear of the controller. The on-off switch at the rear of the controller turns Cricket on and off.
Speaker and Sound Generation
The Arduino microcontroller has the ability to make sounds of various frequencies and duration. The Cricket program makes extensive use of this ability using a small speaker to generate many different sound effects. I would be an interesting experiment to modify some of the “Sound” commands in the Cricket program and see how it affects Cricket’s voice. The speaker is glued to the chassis face down which may seem odd but the chassis acts as a sound board much like the body of a guitar. If you follow the directions you will be surprised how loud the Cricket sounds are.
Infrared Remote Receive
The remote control uses infrared light to communicate with Cricket. The black part with a bubble on the controller board (IR1) is an IR receiver, which can detect the remote control signals. The detected signal is converted into a command which the program software uses to override Crickets autonomous behavior.
Speaker
15 – Cricket Robot Documentation
Light Emitting Diodes
Two green LEDs give Cricket the appearance of having eyes. These LEDs blink on and off under program control. They may be controlled individually.
Feeler Wires and Switches
Once Cricket starts walking around, it doesn't take long before he will run into something. Without a way to detect an obstacle he would get stuck. For this reason, Cricket has long feelers much like a real cricket has. These feelers are connected to small switches, which turn on, when the feeler is pushed. The Arduino controller checks the switches and if they are closed, the robot backs up and turns away from the obstacle. The feelers are quite flexible and sensitive.
Sonar Sensor
Cricket has a sonar sensor which rotates using a small hobby servo. Cricket takes distance measurements in 7 directions. These 7 measurements are then compared to find the most unobstructed direction for Cricket to head.
16 – Cricket Robot Documentation
Programming Connector, Cable and Software
Cricket uses an Arduino Uno compatible controller but this board does not have the USB circuitry onboard. This was done to save cost. If you want to program Cricket, you will need to use a USB/Serial programming module that plugs into the header just above the Digital I/O. This module is an Arduino standard, is inexpensive, and can be purchased from multiple sources. SparkFun at
www.sparkfun.com carries the modules as part
number DEV-09716 for $14.95.
SparkFun DEV-09716 This module plugs directly into the Serial programming header on the Cricket Controller. You’ll also need a mini USB cable.
Serial Program Port
17 – Cricket Robot Documentation
Uploading an Arduino Program
This procedure assumes that you have the Arduino software installed. If you don’t, download the Arduino environment from https://www.arduino.cc/en/Main/Software and install it using their instructions. The SparkFun USB/Serial module DEV-09716 will be recognized with the Arduino drivers.
Once you have the Arduino software installed, connect the SparkFun or similar USB/Serial cable to the Cricket Arduino Controller. Make sure to note pin 1 of the USB/Serial module and plug it into the Cricket controller with the dot lining up with pin one.
Cricket with Programming Cable Connected
18 – Cricket Robot Documentation
The following instructions are from the Arduino site https://www.arduino.cc/en/Guide/Windows#toc1
Launch the Arduino Application
Double-click the Arduino application (arduino.exe) you have previously downloaded. (Note: if the Arduino Software loads in the wrong language, you can change it in the preferences dialog. See the Arduino Software (IDE) page for details.)
Open the blink Example
Open the LED blink example sketch: File > Examples >01.Basics > Blink.
Select your Board
You'll need to select the entry in the Tools > Board menu that corresponds to your Arduino. For Cricket the board is “Arduino Uno”
19 – Cricket Robot Documentation
Selecting an Arduino Uno
Select your serial port
Select the serial device of the Arduino board from the Tools | Serial Port menu. This is likely to be COM3 or higher (COM1 and COM2 are usually reserved for hardware serial ports). To find out, you can disconnect your Arduino board and re-open the menu; the entry that disappears should be the Arduino board. Reconnect the board and select that serial port.
Upload the program
Now, simply click the "Upload" button in the environment. Wait a few seconds - you should see the RX and TX LEDs on the SparkFun USB/Serial board flashing. If the upload is successful, the message "Done uploading." will appear in the status bar.
20 – Cricket Robot Documentation
A few seconds after the upload finishes, you should see the pin 13 LED on the board start to blink (in red). If it does, congratulations! You've gotten Cricket Arduino up-and-running. If you have problems, please see the troubleshooting suggestions.
You have programmed Cricket with a Sketch that only blinks the pin 13 LED. If you would like to restore Cricket to his full operation, select the Cricket program from your CD under “Software”. Select “Cricket_Arduino_1_0.ino. Do another download the same way you did the “blink” download above. After the download, Cricket will straighten his legs and make a couple of beeps. Your Cricket is now back to its normal operation.
21 – Cricket Robot Documentation
Assembling Cricket’s Arduino Controller Board
If you received a Cricket kit with the Arduino Controller board already assembled, please skip this section.
Assembling Cricket requires that you solder the parts onto the controller board and assemble the robot chassis. I suggest that you assemble the controller first so you can center the motors after mounting them in the chassis. The Cricket Arduino Controller uses a printed circuit board (PC Board). The PC board has four surface mount components that have been soldered in place for your convenience. You will solder the remaining components. Follow the steps below to complete your controller.
Tools Needed
Soldering Iron Rosin Core Solder (for electronics) Small Diagonal Cutters Small Needle Nose Pliers Small straight blade screwdriver Tooth Brush and Rubbing Alcohol (optional) Multimeter to check voltages (optional and not shown)
22 – Cricket Robot Documentation
The PC Board and Parts
The PC Board is silkscreened with all of the part designations and outlines of the parts. Be sure to note any parts that have a polarity or keyed direction before you install them. The instructions will mention if a part has a polarity or direction. Your kit will have 4 surface mount parts already installed on the PC board as show in the photo below.
23 – Cricket Robot Documentation
Parts Layout
Use this diagram to help you to locate where the parts are installed. Follow each of the steps to complete your controller. All controller parts are listed in the parts table.
PC Board Parts Layout Parts List
24 – Cricket Robot Documentation
Qty.
Location
Description
Installing the Parts
It’s best to install the low profile parts first. Each of the parts has a picture to help you identify it. Start with the resistors followed by the capacitors. Resistors are color coded to indicate their value of resistance. The ceramic capacitor’s value is designated by the number 104 or 220 printed on the body. Look for the part that matches the picture and be sure to note any parts that have a polarity which means that they can only be installed in one direction (small “+” sign).
Install the resistors which each have a series of colored bands to indicate their value. Bend the leads of each resistor so that they form legs which drop into the holes on the board. You can install all the resistors at once or you can install and solder them one at a time. Be sure that each resistor is low to the board and not up in the air. Solder each lead from the back of the board and then clip the lead slightly above the solder joint.
5 R1,R2,R4,R5,R6 330 ohm resistor 1/8W
orange -orange-brown-gold
2 R3,R7 1K ohm resistor 1/8W
brown-black-red-gold
Install R1, R2, R4, R5, &R6. Solder the 2 leads and clip the excess lead. Install R3 & R7. Solder the 2 leads and clip the excess lead.
25 – Cricket Robot Documentation
Qty.
Location
Description
9
C1, C2, C3, C4, C5, C8, C9,
Ceramic Capacitor marked 104 0.1uf
C11, C13, C14
2
C6, C7 Ceramic Capacitor 220
0.1uf
1 SW3 Reset Push Button
1 X1 Crystal 16 MHz
Install the ten 0.1uf capacitors which all have the same marking of 104. No lead bending is needed. They just drop in and there is no polarity. Solder the leads from the back of the board and clip the excess lead length. Install the two 22 pf capacitors which both have the same marking of 220. No lead bending is needed. They just drop in. Solder the leads and clip the excess lead length.
Install the push button switch SW3 and solder the four leads. This part can fit in either of two directions. Install connector X1 crystal making sure that it is flush to the PC board. Solder the 2 leads on the back side of the board.
26 – Cricket Robot Documentation
Qty.
Location
Description
1
Socket Socket for U1 Arduino IC
28 pins
1
Insert the socket for U1 making sure that the notch on one end matches the notch on the PC Board designation (towards large 0.25” hole). Solder 2 corner pins and then make sure the socket is flush to the board. Solder the remaining 28 pins.
Install IR1 which is IR Remote Control Sensor by first bending the leads down at 90 degrees at about ¼” from the body so that the part fits in its location on the board. The bubble on IR1 faces up. Solder the 3 leads and clip the excess lead.
IR1 IR Remote Sensor
27 – Cricket Robot Documentation
Qty.
Location
Description
2 C10, C12 22uf Electrolytic Capacitor
1 Q1 Transistor
Install C10 and C12 which are 22uf capacitors. Be sure to insert them with the “-” on the part so that it lines up with the hole labeled with a “-”. There is no “+” marking on this part. Solder and then clip the excess lead length.
Install transistor Q1 making sure the rounded side matches the silkscreen on the PC board. You will have to slightly spread the leads and make sure the transistor is close to the board as shown below. Solder and then clip the excess lead length.
28 – Cricket Robot Documentation
Qty
. Location
Description
1
29
SPK 2 Pin Header
Digital/Analog/ICSP
3 Pin Headers
J1, J2, J3
1 SERIAL 6 Pin Header
1
SONAR 4 Pin Connector
Your kit was supplied with two strips of pin headers. These headers are breakable using your needle nose pliers. Break the strips into 26 three pin headers and one 2 pin header. When installing these connectors it is very important that you install them flush and vertical to the PC Board. They can be held in place with masking tape while you solder them from the back side. Do not use plastic tape which will melt.
Install SPK which is a 2 pin connector. Solder only one pin, check that the connector is straight up and down and flush with the board and then solder the other pin.
Connectors for Digital, Analog, and ICSP are three pin headers which were broken from a long strips found in your kit. Carefully install and solder each connector.
Solder one pin, check that the connector is straight and flush with the board, and then solder the other two pins. You may install these connectors in groups but be sure
they are straight and flush to the board, solder one pin, check them, and then solder the remaining pins. You may use masking tape to hold the connector in position while you solder the first pin.
Install SERIAL 6 pin connector. Solder one pin, make sure the connector is straight and flush with the board and then solder the other 5 pins.
Install the SONAR connector. Make sure the side with 2 slots matches the silkscreen and faces SW3 reset switch. Solder one pin, make sure the connector is straight and flush and then solder the other 3 pins.
29 – Cricket Robot Documentation
Loading...
+ 65 hidden pages