User:Christopherwilson202/Robotcar

Problem/project Goal
To take a Power Wheels electric toy car and convert it into a robot car. This will be a car that can guide itself around the hall of HCC without human assistance, control, or otherwise input. There must be controls in place for controlling acceleration, stopping, guidance, and steering. Also because of the car we are working with, an entire steering apparatus must be fabricated to control the cars otherwise human operated steering system. An input and code strategy must also be established from which the cars directional decision making will be made.

My First Task
After it was established that we were doing a power wheels I knew the steering assembly would requires some work. I got my son a power wheels when he was younger and I remember that the steering would take a bit of energy and could not be done with standard RC car style servos.

Summary of actual work over first weekend
Time was spent searching for parts for the steering system and seeing what could be done with existing parts in the engineering room. Many combinations of motors and gears were gone through. It was eventually determined that this vehicle would be steered with an electric motor turning bicycle gears with a chain.

Week1 Narrative
19/SEP/2012: I went through the engineering groom searching for prospective motors or otherwise sources of movement. Many motors were tried but none were suitable as they would not rotated both clockwise and counter clockwise. An old windshield wiper motor was found that could of done the job but it would only go back and fourth along its pre determined path and could not be controlled immediately by splicing wires and manipulated power sources. A motor that would rotate both directions was eventually found however I am not enthusiastic about how much torq it makes. Though I have not seen what it does when connected to the cars power source yet I am going to lean on the safe side and assume that this is about the most torq the motor will make. A gear reduction system will have to be established.

The search for other methods of steering is still ongoing. I am looking for anything that could get the job done. I am staying with an electric motor and gears for now because of simplicity and availability of parts. If we lived in a perfect world and I could get whatever I wanted this car would be steered by an electric motor turning a worm gear with a threaded race connected directly to the cars steering rack. This would eliminate the entire steering wheel and shaft and allow very accurate control of the steering with minimal play in a compact package under the car. But until parts for such a setup present themselves I am continuing development with what I have.

21/SEP/2012: I met up with Derek to go to the engineering room to get more work accomplished on the robot car. We went through the gears bin in the engineering room looking for solutions. It was found that trying to use a direct gear system was making more problems than it was solving. Many of the gears are not matched and would not mesh well. Also many simply will not fit right. To add to that they are made of plastic and would require a chassis to be fabricated to support the gears. We eventually became frustrated with the gears bin and began wandering around the engineering room. This was when Derek stumbled upon a bicycle. We then got the idea to use a bicycles gears and chain to connect the motor to the steering wheel using the bikes gears for gear reduction and the chain to transmit the power. This could be done with basic bolts, existing washers, and mounted onto a piece of wood. Elimination of the slack left by the chain could easily be dealt with by using another bike gear as an idler gear.

We are now searching for bikes that could be used for this or seeing if we can get permission to take apart the existing pieces in the engineering room. This would especially take permission because to take apart the bikes gear cassettes I would like to take the pieces home so I can work on them with my own tools.

My Second Task
I must now get a method of steering the vehicle concreted and begin building. I cannot go to far until I actually have the car in hand though. It would be a waste to build a whole system and then have to change everything because it does not fit into the car.

Summary of actual work over second weekend
The motor we have been working with was dropped for multiple reasons. Searching for existing components that readily adapt to our problem produced a power window motor and regulator that fits our needs perfectly. Bench testing has shown the new setup will not only work but will fit and adapt easily to the car. A system of relays and wiring was drawn up to operate the motor off of Arduino signal but was dropped in favor of using an Arduino Moto Shield as it carries the necessary power.

Week2 Narrative
24/SEP/2012: After seeing the condition, capabilities, and requirements of the motor we had been trying to use we decided it had to go. The biggest issue was it had a very high power requirement to operate correctly. Along with all the other issues ove adaptability. We worked together to find alternate solutions. Since the car will have a ready 12 volt power source we decided to start looking at car parts for solutions as they share the same 12 volt setup. We also started searching for other power wheels motors to use. As they are already set up for 12 volts, can rotate both ways, and will provide enough power.

This yielded many great finds. But many that would involve waiting for shipping and some of the solutions we found had some high prices. Finally we came across the perfect fit. We found a local craigslist ad selling a power window motor and regulator from a Honda Element. We decided on using this and made arrangements with the seller and Mark agreed to go pick up the part.

28/SEP/2012: The team met up in the engineering room in order to hammer out more of this project. Derek had attached the window motor and regulator to a piece of wood that could be propped up multiple ways in the car. Upon bench testing with a 12 volt DC power source it was found that this setup works with plenty of speed and power. The only shortcomming is that it only provides a total of 90 degrees movement. Or what would be 45 degrees in either direction when mounted to the steering wheel. Also the way the regulator is designed lends directly to how it would have to be attached to the steering wheel of the car we are getting.

From there I put together a sketch of how this could be operated using signal from the Arduino and a system of relays routing power from the cars battery to the steering motor. This turned out to be less viable than its simplicity would lead you because we would either have to buy appropriate relays or do some junk yard fishing for (most likely) fuel pump relays from cars. So instead we decided to go with the Arduino Monster Moto Shield being its power handling capabilites are directly in line with what we need.

Here is a link to the Monster Moto Shield: https://www.sparkfun.com/products/10182

As it turned out also there are masks out there that can be used for exactly what we need this cicuit to be doing. Here is a link to some Arduino code that does exactly what we are looking for: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Dev/Arduino/Shields/MonsterMoto_Shield_Example.pde

I was really surprised when I found the first sample code was for making a motor turn clockwise and counterclockwise.

I have put up pictures of our motor/regulator assembly and the Monster Moto Shield we will be using.



My Third task
We will hopefully have the car in hand and will be able to begin the process of mechanically attaching the steering apparatus to the car. Also we will begin working with and testing programming to operate the system with Arduino circuit boards and programming.

Summary of actual work over third weekend
This week we got the car finally. We have also obtained a proximity sensor. We determined the actual requirements of the cars steering and determined what needs to be done with our motor setup. Also we have began work on the software/coding process and have determined how the car will steer and whats its decision making process will be

Week3 Narrative
01/OCT/2012: We began searching the internet looking for software code already close to what we needed. I google searched "monster moto shield" for this. These are some of the things that I found:
 * 1) sparkfun.com/products/10182  (then click on "example code")
 * 2) arduino.cc/forum/index.php?topic=80273.0
 * 3) markszule.com/blog/2012/01/29/building-a-robot-dagu-magician-chassis-arduino/

The last link contained a zip file that was what the person had used to make his car work using clockwise/counterclockwise signals along with the same proximity sensor that Derek had purchased for the project.

03/OCT/2012: We how officially have the power wheels. First thing we did was begin taking measurements. It was first seen that our wood mounting system and motor/regulator would mount as easily as planned. Not only that but the motors movement and power is sufficient for the cars steering. This was a huge relief to all of us.

The cars steering was measured at 45* in either direction totaling 90* lock to lock. This was done using a drill bit, protractor, and some tape.

With the same tools we measured the steering devices movement to be about 65* in either direction, and 130* total range.

Now began the process of deciding on a way to manually limit the motor so that it could not damage the car. Here are some ideas that we came up with:


 * 1) Fill space in gears with epoxy.
 * 2) Fill space in gears with solder.
 * 3) wrap a thin peace of metal around the sector gear where we want it to stop to jam the gear.
 * 4) cut off sector gear where we want it to stop.

No decision was come to today as it was time to stop working. I have brought the steering device home to work on it at a later date.

05/OCT/2012: Today we met up in the engineering room to work on the project. When I arrived to the meeting Derek and Mark had already gotten the proxy sensor working with an Arduino and were reading a serial output that was measured in centimeters.

We determined that the max range of the sensor was 200 cm and that it could read up to 25* off center (from pointing straight forward).

Using this knowledge we did some tests on the car. We set the car 2 m (200 cm) away from the wall and turned the wheel all the way. We then pushed the car to see if it would clear the wall. It did clear the wall but barely. This means we have very little wiggle room in the function of the steering. We talked about some ways to remedy this:


 * 1) Program the car to stop before turning the wheel.
 * 2) Set the car up to drive backwards.  Cars naturally have a tighter turning radius travelling backwards then forwards.
 * 3) Mount the sensor to the left side of the car and set it up to only read/turn left (henceforth known as the NASCAR method).

In testing the car did have a tighter turning radius turning backwards by about a foot and a half. However this is kind of an outrageous idea and would take a lot of qualifying to make it pass the professors OK. So we decided to go with the NASCAR method as it would be easy to program and work better with the sensors range.



My Fourth task
The fourth task is to get a working prototype of the software/computer side and wire it to our motor. Then test can be done to hone in on exactly what time delays/time operating parameters need to be.

Summary of actual work over fourth weekend
More work was done toward getting the programming to work. We have gotten Arduino to make the steering arm move back and fourth. However this was without sensor input and was based solely off of a timing program. Also the manual stops for the steering mechanism are not complete.

Week4 Narrative
8/OCT/2012: This day was a bit of a bust because we were having problems getting COM 6 to come up on the computer. Without this we cannot program the Arduino. We did discover a solution though. You have to go into computer > control panel > hardware and sound > device manager to find the Arduino hookup in the computer. From there you have to search for software to find the updated program for the Arduino software on your computer to hook up the the COM 6 port and thereby the Arduino.

This has to be done every time because it seems the computers we work off of do not have this already installed correctly. Then any changes we make get reset with the system every midnight with the rest of the schools server. So depending on what computer we are working on we have to do this just about every day we work on the car.

10/OCT/2012: Today we finally got the Arduino setup operating the steering assembly. However we were only able to make it rotate back and fourth off of a half second time delay. We worked with the time delay playing with the timing to make the steering do a few things like left for 1 sec then right for .5 sec, and so on. The majority of my work this day was having my hands on the steering assembly while it was operating so I could unplug the power if it did something awry like go off the track or operate in a destructive manor. I also worked resetting the the sector gear when it went off the actuator gear from turning to far to one side. I also worked managing some of the wiring because when the sector gear would go off of the track to far the best way to get it back on was to pull the wires out of the Arduino and jump them directly off the power source to get the arm where we needed it.

12/OCT/2012: Today we met together in the engineering room to get more work done on the project. I had stopped by Home Depot before the meeting to get some epoxy, sandpaper, sheet metal, and a set of sheet metal shears.

While Mark and Derek worked more on the programming I got to work building the manual stops so the steering assembly cannot destroy the car. This was done by first measuring the width of the sector gear, and then the thickness. From there it was determined that a piece of sheet metal about 3 inches long and about 1 inch wide would work perfectly. From there a piece of sheet metal 6 inches long and 1 inch wide was cut. That piece was then cut in half and both were bent to perfect 90* angles using a vice and a trim hammer. The inside surfaces of the metal bends were then sanded and the mating surfaces on the sector gear were sanded. Then while Mark and Derek were working on the steering assembly I went in and attached the bends to the bottom of the sector gear and held it until the epoxy was hard enough to hold the pieces on.

When everything was done that day I took the steering assembly home with me. The epoxy takes 5 minutes to set, 20 minutes to harden, and 24 hrs to cure. We do not have that kind of time so when the epoxy had 4 hrs to dry and then gave it a small tap test with a trim hammer to check for movement or any cracking sound. After determining that the epoxy was hard enough to work on I put epoxy on the top side of the sector gear and filled in the gear area now covered by the stoppers. From there the metal was tapped down over the epoxy and the end was crimped with a set of channel locks to make a nice neat corner around the gears. This was done on both sides and then held with channel locks until the epoxy was hard enough to hold the stoppers perfectly in place. After setting for another 4 hrs I did some testing. Moving the system back and fourth against the stoppers it was found that they operate perfectly with zero noise and binding. Also when the actuating gear is against the stoppers we no longer get bind at the end of the travel. Not only that tes the system comes off of the stoppers with no noise, perfectly smoothly, and no longer requires human interaction to reset.

The smoothness of operation is due to a few things I did with the stoppers. The end by the gears crimped down to fit perfectly now allows the stoppers to travel inside of the actuator assembly with zero interruption. This maintains accuracy with where the system will stop and increases longevity by making sure the system takes the pressure on the steel and not the epoxy holding it in place. Also the placement of the stopper over the gears is very instrumental. the stoppers were place so that when the sector gear is riding along the actuator gear the next tooth of the actuator gear will be stopped at less than a 180* angle while the tooth before it will be seated in a tight position against the last sector gear tooth.

Once tests were complete Mark was called and the steering assembly was off to work with Mark who will be pushing further on the software side of this.

Team Page
Robot car/P1-501 CDMR