Our First Robot - Build Day 2
January 19, 2012
Well after some sleep we got back to work on what we thought we could accomplish without getting a headache.
I soldered up the screw shield for our Arduino. I made sure that I could mount another shield on the top but did not solder the male and female headers in the proper order. I ended up slightly melting some of the headers when I tried to solder between the green screw blocks and the female shield attach points for one set of the male pins. If you squint at it you don't see the mess. Everything seems to work and our motor shield fits on the top, so that's one point for our team!
We decided to continue with our build of the top platform while waiting for an answer on the wheel situation. That seemed to go fairly smoothly. I don't like how we have to mount the top panel with the ping sensor at the "back". I plan on running our robot backwards to "fix" the problem. I'm sure it will look goofy, but I suppose that's the point and the boys seem amused, so that good.
Some sandpaper and elbow grease opened up the on/off switch hole enough to get it to mount. I have to figure out how to wire the thing up. Do I need to wire the ground wire or the voltage wire to the switch? I'll research that to find out. I think I need some shrink tubing as well before I tackle the rest of the on/off switch assembly.
I also figured out the proper holes to mount the Arduino. It looks like there will be enough room for the Arduino and the Screw Shield but I'll have to wire up the shield before I put it on the Arduino to make sure I can get the wires in those tiny holes.
I'm happy with the progress so far even though we had a few setbacks. The boys (12 and 10) are both excited, especially the youngest. I've been trying to teach them some programming and they seem to like the Java they know so far by using GreenFoot to get some immediate feedback with their code. With the robot being built in the house, they are getting more involved in trying to figure out how the robot will move and act. We watched a few of OddBot's videos and they thought those were the best.
I think we'll make 3 different projects for the robot brains, one for each of us. Maybe I'm getting ahead of myself, but I think that's a good thing.
After reading some helpful tips from the LMR guys, RobotShop and responses from DFRobot.com, we decided to force the wheels onto the spindles. After some excessive pressure, the wheels popped on but one is a little wobbly. Hopefully that will not affect things in the long run.
Finishing Things Up
We finished things up by taping a breadboard to the top platform, mounting the Arduino stack and wiring up the servo, Ping and motors. Next we popped the Arduino onto the USB and created a quick sketch using the samples to just test that the 3 major parts are working. I didn't want to get into the encoders yet because of the whole interrupt thing, but that will be soon. We just wanted to see some action.
We got the motors to turn forward and backward. Liam, my youngest, noticed that one wheel starts moving before the other. We'll need to figure out how to address that later.
Next we hooked up the servo for the Ping mount. We got that moving 180 degrees back and forth but noticed that some of the wires get in the way.
Finally, we tried getting a distance reading from the Ping sensor. Wouldn't you know it, the wires get in the way and cause a 2 in. reading no matter what. Looks like we'll have to turn the sensor around 180 degrees and run the robot backwards anyway. If you turn the sensor all the way to one side and take readings, then it works great. We've seen readings between 1" and 101" just sitting here at the computer.
Not so bad for the second day.
Looks like I have the following things to think about and/or purchase:
- Need to turn the Ping around and create smaller wires to wire up all the motors, servos, sensors and encoders behind the sensor mount.
- Need some shrink tubing and maybe some IR emmiters and recievers for edge detection. Looks like there are plenty of good tutorials on how to put them together here on LMR.
- Need to wire up the on/off switch and get the batteries going. The thing will not run off the Arduino with the 9v plugged in. :)
- Might have to look into a new motor shield. This one covers and 'uses' so many pins that even with the screw shield, everything just seems cramped on the top. Maybe this will be done much later since it will cost some cash. Putting a different shield on the Arduino might fix the Ping/wire issue. Either way we can start using it.
- I'm wondering if the Arduino IDE is not the best programming environment for this. I see two other posibilities, Eclipse and AVR Studio. We'll just have to get things going better before switching environments.