Vol. 19: My Robot, Makey
Build this simple autonomous robot thats programmed to follow objects around.
Digital Edition
SUBSCRIBERS:Read this article now in your digital edition!
Get Make:
Subscribe to MAKE and get the best rate!
+ Downloads & Extras:
Makey project schematic, templates, and code
Step 1a. PDF templates
Step 3c. Tutorial: ProtoShield Assembly and Use
Schematic Diagram (PDF)
Step 5g.Test programs (PDE)
- Run left and right motor forward and backward: 01_Test_Motor_Rotation.pde
- Run left and right motor from slow to fast: 02_Test_Motor_Speed.pde
- Move servomotor to center position: 03_Test_Servo_Center.pde
- Move servomotor back and forth: 04_Test_Servo_Sweep.pde
- Show distances from Ping ultrasonic rangefinder: 05_Test_Sensor_Distance.pde
Advanced programs (PDE)
- Robot roams and avoids objects using Ping: 06_Object_Avoidance.pde
- Robot follows objects using Ping rangefinder: 07_Object_Following.pde
Videos of Makey in Action
Video 1 (6MB .mp4 file)
Video 2 (2.3MB .mp4 file)
Video 3 (750KB .mp4 file)
Video 4 (3.3MB .mp4 file)
» MAKE: AMENDS Errata for This Article
Correction for page 79
The 0.1µF capacitor is Jameco part #151116, not #15229. Thanks to reader Joseph E. Mayer for catching the error!
» MAKE: NOISE — Discuss this article
You must be logged in to post a talkback.[ Display main threads only] [ Newest First]
Showing messages 1 through 28 of 28.
- Lego Tires
You must be logged in to reply.
Anyone have a lead on where to purchase the lego tires?Posted by Keith Nasman on August 16, 2009 at 21:02:54 Pacific Time
- Lego Tires
You must be logged in to reply.
Try BrickLink www.bricklink.com, or Peeron, www.peeron.com
The LEGO part number for the tire is 6594.
On the Brick Link site, click Buy LEGO, then Parts, then enter 6594, scroll down the list, and hopefully there will be some for sale.
Also try Peeron.com. Entering 6594 will bring up a description of the tire, picture, what LEGO sets contained it, etc, and on the right side it has a grid showing which BrickShops stock the tire. If you click on a shop, it takes you to BrickLink, I believe.
Posted by kmagri on August 26, 2009 at 14:15:55 Pacific Time
- Lego Tires
You must be logged in to reply.
When checking out the hubs from Solarbotics, I found that they also had wheels which attached to the gear motors the same as the hubs. These wheels may be slightly bigger than the Lego ones, but they reduce the need to order a hub, create a wheel and find LEGO tires.Posted by svsparks on September 01, 2009 at 20:13:50 Pacific Time
- ProtoShield Kit
You must be logged in to reply.
I ordered and received the ProtoShield Kit #MKAD6 from maker shed but it seems to be different than the posted assembly instructions reference. My board is slightly different, and it did not come with 2 330 ohm res. or 1 10Kohm res. It did come with 2 1kohm resistors. Is this going to be a problem? I found assembly instructions for this kit at http://www.ladyada.net/make/pshield/. Do I still need to cut something off?Posted by looking up on August 25, 2009 at 06:09:04 Pacific Time
- ProtoShield Kit
You must be logged in to reply.
Yes, the board is slightly different. The difference in resistors will not be a problem. Go ahead and assemble using the resistors it came with. You do not have to cut anything off. Also, on Step 7b, your board is not labeled RAW, I think it is labelled Vin instead.Posted by kmagri on August 26, 2009 at 14:31:37 Pacific Time
- It's Not Working!!!!!!!!!!
You must be logged in to reply.
Please help me. I have built all the boards and checked connections and wiring but no matter what I do, the motors will not turn. I know the motors work because when connected directly to the Arduino micro controller, they turn, but when connected to the motor driver board, it doesn't work. Please help me!!!!Posted by kayrus on October 10, 2009 at 08:28:03 Pacific Time
- It's Not Working!!!!!!!!!!
You must be logged in to reply.
OK, no problem, we'll get you going. First things first, don't plug the motors directly into the Arduino any more. The Arduino can only supply so much current, and it's far less than what's required by the motors. My bad for not mentioning this in the article -- it is actually possible to burn out your I/O pins by connecting motors to them, at least with other microcontrollers I have used.
A) Make sure you are running test program 01_Test_Motor_Rotation or 02_Test_Motor_Speed.
B) Check ground connections on motor driver board
The motor driver board has three pins that are connected to ground. But who's ground? Good question. In addition to being connected to the negative lead on the 9V motor battery, the motor driver ground and the Arduino ground _also_ need to be connected together. This isn't clear from the schematic. So, make sure that at least one of the ground connections on the motor driver board is connected to the ground connection on the Arduino Proto Shield. This place is labeled "GND" on the Proto Shield, and you have doubtless ran that up to your breadboard somewhere.
C) Send a photo
Email a digital photo to: kris@makezine.com, and I will try to see if I can spot any problems in your wiring.
D) Check pins 4,5,6,7
Now we'll check whether pins 4,5,6,7 are functioning OK by replacing the motor driver with an LED and seeing whether the LED lights up. You will need a resistor and an LED for this.
Remove the wire connecting Ardiuno pin D4 to the motor controller pin BIn2.
Put a resistor into Arduino pin D4. It can be anywhere from 330 up to about 1000 ohm. (If you don't happen to have any resistors in this range... email me what you have and maybe we can come up with some equivalent.)
Find an unused spot on your breadboard (not so easy)
Connect the resistor to the positive side of an LED by plugging both into breadboard appropriately. (Positive is long lead, or no flat spot on plastic housing)
Connected negative side of LED to ground (GND).
Run program 01_Test_Motor_Rotation.
The LED should turn on briefly, then turn off. (about 1/4 of a second).
Repeat with pins D5, D6, and D7.
E) Check power connection to motor driver chip
Make sure you have wired 5V to the VCC pin on the motor driver chip. If you have a multimeter, put it on volts and make sure it reads 5V when you proble the VCC pin and the GND pin on the motor driver. Check it with all three of the GND pins and each should meter 5V.
F) That's all I can think of right now, feel free to email me directly.Posted by kmagri on October 13, 2009 at 14:54:58 Pacific Time
- Servo avoidance
You must be logged in to reply.
This was exactly what I was looking for. I was wondering, do you maybe have a sketch written up that uses the servo for object avoidance? A lot of the robots out there use a servo to 'look around' with the ping sensor to determine the best route to go. Would it be possible for you to make something like that? I don't know enough about the processing language (yet!) to be able to make something like that.Posted by Jair2k4 on October 27, 2009 at 07:55:16 Pacific Time
- Servo avoidance
You must be logged in to reply.
Am extremely green at programming, but a quick modification to the Object Following program will do it: swap definitions for SERVORIGHT and SERVOLEFT. This causes Makey to move away from anything that is a certain distance away, rather than moving towards it, while also retreating from anything that is too close. Makey can get stuck in corners still, so this is not yet perfect.Posted by moldyclint on December 29, 2009 at 10:35:04 Pacific Time
- Servos
You must be logged in to reply.
I'm currently in the process of getting the parts for Makey, but my local Hobbytown is out of stock on Hitec HS 55 servos. Are there other models with comparable performance and size which could be substituted for the HS 55?Posted by Robert Levitt on January 27, 2010 at 09:55:09 Pacific Time
- Servos
You must be logged in to reply.
Hello,
I believe that any servo of the same size would be fine. The key is to fit physically in the dimensions and not to protrude any farther inside the robot because there isn't any extra room inside. Also have two mounting holes, not 4. You may have to slightly enlarge the square hole. For the prototype I used a different, no-brand model that I got at the hobby shop. The performance specs on the torque aren't critical as I feel Makey's eyes are not heavy and won't tax the servo. I used the HS-55 because it was the size I wanted and it was widely available and not too expenseive and easy to tell people what to buy. But I think you could use any one that's the same size.
Below are some servos I found which seem comparable.
HS-55 -- The original, dimensions for reference.
http://www.servocity.com/html/hs-55_sub-micro.html
22.8 x 11.6 x 24
HS-50
http://www.servocity.com/html/hs-50_ultra-micro__feather_.html
22 x 11.4 x 20.9
Futaba S3107
http://www.servocity.com/html/s3107_micro_mg.html
22 x 11 x 20
SG-90
http://www.hobbypartz.com/topromisesg9.html
22.6 x 11.4 x 20.9
MG-90
http://www.hobbypartz.com/servo-mg90s.html
22.8 x 12.2 x 28.5
HXT-900
http://www.hobbycity.com/hobbycity/store/uh_viewItem.asp?idProduct=662
21 x 12 x 22
Cheers,
Kris
Posted by kmagri on January 27, 2010 at 14:24:36 Pacific Time
- Modifying the servo extension wire for the rangefinder
You must be logged in to reply.
Looking at the servo extension wire, I notice that it has an open end for three pins and an end with a hood and three pins already in it. What has to be done to modify the cable to make it accommodate the right-angle male header and the header from the rangefinder?Posted by Robert Levitt on March 27, 2010 at 19:05:50 Pacific Time
- Modifying the servo extension wire for the rangefinder
You must be logged in to reply.
Oh no, that is the wrong wire. The wire I used has an open end for three pins on both ends! I sure thought I used Hobbytown's EXRA115 and it was that way, but maybe I made a mistake.
SO... given that you have the hood... I really don't know how to use that wire, if the hood wasn't there, you would just plug the included 3 pins into the breadboard, and forget about using the right-angle male header. Maybe bend the pins with a needle-nose plier first, to 90 degrees. BUT, since you have the hood in the way, you can't get to the pins. Unless you Dremel the hood off, or something.
The easiest way would be to find a servo extension cord that had the open end for 3 pins on both ends, or find one that is like what you have, but minus the hood, so you can plug the pins into the breadboard.
Or buy something that plugs into what you have, and ends in a female end... sigh... but then your wire is way too long.
I guess if you are handy with a soldering iron you could cut the wire and solder on the 90 degree male header to the wires but that's kind of tricky (I always melt the plastic part of the header, myself!)
Long story short, wrong type extension cord. Very sorry about that maybe we can add some errata here that points out that you need a female-female wire.
Did you specifically buy part number EXRA115? Because I'm worried that it's incorrect.
Kris Magri
Posted by kmagri on March 28, 2010 at 13:52:39 Pacific Time
- Speed not working
You must be logged in to reply.
Hi Kris,
First of all thanks for sharing, nice project.
Avoidance works well, but is not following, and I've realized the speed on the right hand side motor doesn't work when I test the motor speed test.pde.
it doesn't speed up, it starts full speed. any ideas?
Thanks a lot.
Antonio
Posted by toni.bird on May 31, 2010 at 05:27:02 Pacific Time
- motor on B out not responding
You must be logged in to reply.
I have built the circuit and ran the led test and uploaded both the motor drive tests successfully. The problem is that the drive connected to the B out 1 and 2 is not responding to the code when it is loaded to the arduino. Both of the motor drives work on the A out side but not on B side. I have removed the TB6612FFNG to check my solder welds for any shorts, cracks or errors. Is there something I am over looking.
Thanks, WoodiePosted by POOB1 on June 15, 2010 at 18:08:21 Pacific Time
- motor on B out not responding
You must be logged in to reply.
Never mind, woodiePosted by POOB1 on June 15, 2010 at 18:23:43 Pacific Time
- makey misbehaving on battery power, ok on USB
You must be logged in to reply.
Just got around to finishing my makey build. All test programs work fine when on USB connection to laptop, but if I unplug USB cable and attempt to run the uploaded code on battery power, the servo motor jut makes odd tick sounds and the wheel motors seem to rotate backwards and with odd pattern. I've checked all connections - looks like the schematic. Batteries both brand new, running slightly over 9v. very repeatable behavior.
The object_avoidance and object_following scripts and test_servo_sweep are the ones that aren't working right on battery. The motor scripts work fine.Posted by freder on August 01, 2010 at 16:36:32 Pacific Time
- Code
You must be logged in to reply.
Hello,
I noticed that in the video the servo pans back and forth while allowing the robot to better avoid objects. In the avoidance code there is no section to allow this action. I made a very similar project and with a few changes your code worked perfectly. I also have the ping attached to the servo and would like to add the servo panning feature. any help?Posted by arduino912 on March 25, 2011 at 19:14:46 Pacific Time
- Code
You must be logged in to reply.
Ah, yes, I see. You are correct. The Avoidance program does not move the servo motor.
There are two programs, 1) Avoidance and 2) Following. The video is showing Following. That has the code that pans the servo back and forth. You can get the "Avoidance" code on this page above and see where it pans the motor:
* Robot follows objects using Ping rangefinder: 07_Object_Following.pde
I guess in my thinking, it made sense to pan Makey's "eyes" back and forth for following because the algorithm requires a Left and a Right distance to decide which way to turn.
For avoidance, I'm not sure what you would do with both Left and Right readings... seems simpler to just take one reading to the front.
To give credit where credit is due, both programs are loosely ported from "Robotics with the Boe-Bot" by Parallax, Inc. They use the same algorithm. I guess I'm giving myself some credit because I worked on both those programs when I was an employee at Parallax... but I certainly didn't write the orginals or the algorithm, especially the Following Program. I think that was Andy, the author.
Hope this helps,
Kris Magri
Posted by kmagri on March 26, 2011 at 21:50:30 Pacific Time
- Protoshield
You must be logged in to reply.
Can someone post a photograph of the completed protoshield. I am not sure if I am reading the schematic properly.Posted by brelwart on April 26, 2011 at 19:05:48 Pacific Time
- Protoshield
You must be logged in to reply.
There's a photo of the protoshield in Makey's Make Projects page: http://makeprojects.com/Project/My-Robot-Makey/51/3Posted by Eric Chu on May 03, 2011 at 19:14:15 Pacific Time
- Schematic
You must be logged in to reply.
Can someone help with the schematic? Am I assuming correctly that all the 5V can be connected to the header labeled 5 on the protoshield after it is jumped to the breadboard? The big question I have is were do I connect the PWMA & PWMB to? I don't know where to get the 5V with the 10k from.Posted by Mike Komo on April 28, 2011 at 05:30:33 Pacific Time
- Motors are not working when running the Motor test
You must be logged in to reply.
Hi there,
We are using duemilanove microcontroller with proto shield kit maker shed MKAD6 and mini breadboard.
Arduino board test worked well, however, when wiring the breadboard and connect them for a test of the motors, it does not work.
And we are not sure about the way of connecting resistors onto the breadboard (we don't know how to connect the PWMA/B to 5V line which includes line D11/D3 and the resistors
We are completely lost and cannot move on. It would be great if any expert could help with it.
Thanks a lot!Posted by krakra on June 07, 2011 at 09:51:49 Pacific Time
- Motors are not working when running the Motor test
You must be logged in to reply.
Just to add to last post.
We would like to send some images of how we connected all the wires but can't find the suitable email address.
Thanks a lot
Posted by krakra on June 07, 2011 at 09:55:31 Pacific Time
- Change in Motor Driver Schematic
You must be logged in to reply.
Posting in June 2011. FYI the schematic for the motor driver board has changed a bit. I foolishly blindly followed the schematic in the article and Pins 1-8 have totally changed in the current version of the board from Sparkfun. SO BEWARE! I rewired it correctly. Left motor works fine but looks like I fried the circuits for Right Motor as it will only go forward full speed. $9 and a week lost!Posted by tklenke on June 11, 2011 at 17:31:37 Pacific Time
- Makey the robot
You must be logged in to reply.
can Makey the robot work with also arduino UNO?Posted by David Truong on February 12, 2012 at 16:51:49 Pacific Time
- motor driver
You must be logged in to reply.
I am confused with the motor driver you have plugged into the top of the breadboard. I am curious to if you made that or purchased it. If you could help me out that would be great. Also if you could send a little more clear of a picture of the wiring into your breadboard that would be amazing. Thank you.Posted by koutso on September 27, 2012 at 07:38:55 Pacific Time
- motor driver
You must be logged in to reply.
Motor driver was purchased, TB6612FNG 1A dual motor driver. Vendor was Sparkfun. SparkFun part number was #ROB-08905.
However I think it's no longer available or the part has changed a lot, see post below regarding pinout changes.
Posted by kmagri on September 27, 2012 at 09:07:11 Pacific Time
|
Showing messages 1 through 28 of 28. |
Join the conversation -- every MAKE article has an online page that includes a place for discussion. We've made these RSS and Atom feeds to help you watch the discussions: subscribe.










