Thursday, December 12, 2013

SUMMARY OF THE HAMMERHEAD:

The Hammerhead is a small RC car measuring about 1' x 8".  It is controlled by a simple IR remote with very basic buttons.  The car can stop, go forward, left, right, and backward, and with each direction the LED on the top of the car changes to a different color.  In addition to all of this, there are three various horns that the car has, controlled by the "A", "B", and "C" buttons on the remote.  The car is currently run by 3 9V batteries, two controlling the motors and one controlling the Arduino, LED, and Piezzo Buzzer.

We are all very proud of the finished car and it was great seeing all of our hard work turn into something so cool.  In total, about 30 man hours were put into building this car, however many of those hours were spent troubleshooting problems that could have been avoided.  We learned alot about coding and the design process from this project and it was a great learning experience.

Without further ado, the HAMMERHEAD!









Thursday, December 12, 2013

Today we finished our car! We made some pretty cool additions to the car, one of which is the piezzo buzzer, seen below.

The buzzer is the circular black piece in the upper right corner of the breadboard, and it allowed us to make some horns for our car.  Right now, we programmed the General Lee's car horn from The Dukes of Hazzard to sound when "A" is pressed and The Imperial Death March from Star Wars when "B" is pressed.  Coding these was fairly difficult however.  We used the SIK Guide's Circuit 11 for the piezzo buzzer as a starting point, and then had to look up the notes for these two melodies online.  Once we had the musical notes for the two melodies, we had to guess and check the beats that they were supposed to be played at in order to get them to sound well. Our friend Josh Zubricki helped us alot with this part.  In the end, I think we nailed the two melodies and got them to sound really well.  
Putting these two horns into our original code however was very hard.  We needed to get the help from our computer programming friend, Josh Smolinski, to try to help us.  Apparently, the arduino board has two timers that allow different functions and things happen.  The IRemote library that we downloaded was using the same timer as the piezzo buzzer so the code would not compile.  We had to go into the program files and change the timers that each was using so that they were not running on the same one.  Once we did this, it was fairly easy to integrate the buzzer code into the original one.  A copy of our final code is given below. 


We also fixed our problem with the wheels not spinning at the same speeds.  We took a potentiometer and connected it to the left motor (the one that was spinning faster) so that we could control the amount of voltage going to that motor.  By doing this we were able to slow down that motor to about the same speed as the other motor.
In addition to doing this, we also got some 22 gauge wire and replaced some of the obnoxiously long jumper cables underneath with the H-bridge and a couple on the above breadboard so that it looks nicer and is less messy.

We also wrote our final paper for the project.  Altogether we worked for about 5 hours today which was a lot more than any of us were planning on working on it.

We made decide to set up another melody to play when the "C" button is pressed tomorrow morning before we show off the final car, but other than that we are completely done with the project!

Tuesday, December 10, 2013

Tuesday, December 10

Today all four of us got together and began building the final car.  We got our 3D parts today, images shown below.


The L bracket fit very tightly onto the front of the motor and we cannot take it off without it potentially breaking. The other bracket slides on nicely, however the holes on the two pins do not line up the way we wanted them to, so we might need to drill through one of the brackets to fit a bolt through it.

We were able to slide a zip tie through the screw holes so we were able to at least get the car built and running.  The following image is of the car that we built.

We used two breadboards, one for the IR remote and the RGB led on the top of the car and then a separate breadboard for the H-bridge underneath.  There are three 9V batteries connected to the car, one running the Arduino board and two for the motors.  A video of the car running is given below.


Right now, the left motor is spinning a little faster than the right one so the car does not go straight forward or backward.  We are going to bring the car to Prof. Thompson tomorrow to see if there is anything that he can do to help us get it to drive straight.  The batteries are pretty low right now so the car is not running at full power in the video.

The following images are the drawings of the two brackets and the car frame that we got cut and printed.



In total we worked for about 3 hours.

Sunday, December 8, 2013

Sunday, December 8

Last week, Angelo and myself got together to work on some Arduino problems that we were encountering.  The new motors that we got require more power than the 5V that the Arduino board supplies, so we needed to set up an H-bridge so that we would be able to power the motors using a 9V battery instead.  We needed to Google how to setup an H-bridge because we were unsure as to which pins did what, and we found a pretty good picture that tells which pins go where on the H-bridge.  This picture can be found at http://dtostillwell.com/?p=251.  After setting it up we tested it on smaller motors and it worked well. The onlyy problem that we faced was that the H-bridge requires a lot of wires and the jumpers that we use are too long.  It creates a mess on the breadboard, as you can see in the following picture.

The IR sensor on the breadboard was being blocked by these wires which made it very difficult to control everything with the remote.  Because of this we are thinking of cutting some of the wires smaller or just separating the H-bridge and the IR and RGB onto two separate breadboards.

 Luckily we do not have to change our code from the one previously written because the H-bridge still allows the motors to be run using "digitalWrite" commands.

We also received our car frame that was laser cut using 1/8 inch plastic.  It came out really well and all of our bolts can fit into the holes nicely.
We are still waiting for our motor brackets which we should be able to pick up from the lab tomorrow.  We attempted to make the car Wednesday using zip-ties instead of the brackets however every time the direction changed on the motors, they slipped and would not stay straight.  Once we have the motors, we will post a picture of the finished car and a video of it driving with the remote.

It took about an hour to get the H-bridge working for both motors and about 1.5 hours to make the car on Wednesday.