April 17, 2011

Senior Project: Journal Entry #2

Soldering Iron
This week, my accomplishments were done mainly from my friendly soldering iron. I soldered some additional wires to the wires already present on the motors; it doesn't seem like much, but by doing so, I am almost ready to put the motors back where they belong, after which I will be able to screw the car back together. I did a little more than just soldering, though; I tested one of my IR sensors to slightly unsatisfactory results.


But first, the soldering. Using my soldering iron, I attached what are called solid wires to my motors' wires, which are stranded wires.Basically, stranded wire is a bunch of very thin copper wires. Solid wire consists of those stranded wires all dipped in a pot of tin, so that they merge together into a single wire. The advantage of this is easily demonstrated. Stranded wire, because it consists of a mess of different wires, isn't easily placed into a breadboard (which is just a bunch of holes, some of which are connected to each other). Solid wire can be easily placed into a breadboard providing a solid connection.

Stranded WireSolid Wire
Wire in breadboardBetter wire in breadboard

In addition to extending my motors, I added pins onto my Ultrasonic sensor for the same reason - with these pins, I can plug the sensor directly into a breadboard, or (with some wires I ordered) I can plug the pins into wires which themselves will plug into a breadboard. There are seven pins for this sensor, but I will only need to use three of them. I soldered the full seven pins on, however, in the event that I need to change which pins I need to use. I don't need to resolder anything on the sensor, I just need to change which wires are plugged in.


I have ordered what I hope is my last shipment of components. This includes a "shield" for the Arduino, which is just a board that goes above the main board. This shield will allow me to place my breadboard just above the microcontroller, allowing me to save space. I also ordered a motor driver, even though I had hoped I wouldn't need one. The reason behind the motor driver is because a motor's speed and direction is influenced by the amount of current passed into it. With the motor driver, I can use input from the Arduino to influence that speed and direction of two motors, allowing me to turn the wheels left and right and to slow the car down before it hits a wall. The input to the motor driver is what is called Pulse-Width Modulation (PWM), which works by alternating HIGH (5v) and LOW (0v) signals at a certain frequency. This is nice, because I just need to call one command from the Arduino [analogWrite(value)], and it will send that signal until I tell it to stop (I will go more in depth on my programming and code at a later point), so from a coding standpoint it is extremely easy to control my motors. Hopefully, by the end of next week, my car will be able to drive itself!

And now comes the part where I talk about my trials and tribulations encountered this past week. Firstly, soldering always comes with its own risks, and I burned my fingers a couple times while doing my work. I got a new soldering iron, so hopefully next time I go to solder it won't be as bad. And then there is my attempt to start using my IR sensors. As I said a few weeks back, these sensors work by returning a voltage relating to the free distance in front of the sensor. The plot of this voltage isn't very nice - it isn't quite exponential decay, it isn't quite a logarithmic graph, and it isn't quite a polynomial function. I set up an experiment using the engineer's must trustworthy tool - LEGOs - in an attempt to gather data to reproduce the above graph. In order to use this sensor, I will need some way to convert the voltage received from the sensor to a distance value. There are two ways to do this: I can have a table of voltages, so when I receive, say, 2V from the sensor, I can look it up in the table to discover that the object is 30cm in front of the sensor. This way requires no knowledge of mathematics, but it takes up precious memory. The other way is to come up with some fancy function to convert Volts to Centimeters. I'm going with the later method, but in order to come up with that function, I will need to perform more tests, including making sure both of my sensors give the same readings.

I end this week heading off to the RoboGames. This is a convention held in San Mateo, CA and it is all about robots. There is one event in particular which I am interested in: the Robomagellan. This event is about autonomous robots navigating an obstacle course, which is quite similar to what I hope to accomplish. Other events include a Humanoid robot basketball tournament and autonomous robot fights. I will be taking video and pictures and if I get a chance talking to some of the robot creators in an attempt to learn any thing that might be interesting or help me in this project.

'Til next time!

Next: RoboGames 2011