So here is the wood I have cut; it's not too exciting, but soon I'll be putting holes in it, and then it gets much more exciting. The type of wood is called Masonite - it is commonly used in tool shops as the top of a work bench, because it is strong and its top is nice and clean. I happened to have a couple sheets, so I figured it would work nicely to support my Arduino. My Arduino will not be screwed directly onto the board, as it would be damaged where its bottom scratches against the board. I have plastic standoffs which screws go through to support the Arduino 3/4" above the platform
|Nuts and Standoffs|
My IR sensors have me puzzled as to where they should be placed, in part because I got the wrong ones, requiring me to place them eight inches away from what I want them to measure. However, I am currently of the ideology that I only need to use one sensor to make this car go, so unless necessity dictates otherwise, I'm going to forget about mounting my IR sensors.
|The infinite uses of LEGOs!|
His equation for converting the output of the sensor to a distance is as follows:
However, that equation didn't produce accurate results with my sensors. So from repeating the same experiments I did before with the sensor, I came up with the below equation:
They are similar enough, which I take as a good sign. However, I also found a more accurate equation dealing with fourth-degree polynomials:
So how I came up with these. I repeated the experiment of taking distance measurements from the sensor over a range of distance. I took twenty measurements per distance, and repeated that over two feet. I have had issues previously where my sensor would be aiming at the ground, so there would be a maximum distance on it. And also I occasionally had it pointing too much up, so that it would aim over the target. My resolution to this was to aim the sensors up, and use a sheet of paper so that the sensors couldn't shoot too high.
I took measurements for both sensors, as I discovered they didn't produce identical results. Using Excel, I graphed both of their results, found the average, and then graphed that average. Using Excel's built in regression I was able to come up with equations which produce accurate results over the range I care about, which is 8 to 32 inches (as if I did use these on my car, I don't think there's a reason to care about anything more than two feet away).
I took an interesting picture while doing this. Cameras, it turns out, can see IR light. However, they view the light as bluish, when it really should be redder. So in this picture you can see the IR source in the back of the sensor.
What's next? I need to finish mounting the Arduino, which involves drilling some holes. Then I need to continue to work on mounting the Ultrasonic sensor. My new motor driver has arrived, so I have some soldering to do, and then hopefully my car works. A final issue I need to solve is that of the track - I plan on stopping by a Home Depot and looking around their gardening supplies; maybe they'll have something. If not, Poster-board should work just fine.
So 'til next time.
Next: Journal Entry #6