All posts by Brandon Leitzel

Digital Compass

This week I received a LSM303 digital compass to work with. This compass has an accelerometer implemented in it making it possible to compensate for tilt. I spent this week learning about this compass and having it give me its heading which I will use. I started coding in the equations needed to apply tilt compensation and calibration. Without tilt compensation the compass will give very inaccurate heading readings whenever it is not level which would be a huge problem. Next week I will implement tilt compensation amd calibrate the compass. My next goal then will be to use my new accurate heading readings to compare to the destination heading and have the car fix itself to drive to the destination.

GPS progress

The main goal for my car is to have it reach a predetermined destination without crashing, obviously. To do this I will need a GPS along with a digital compass. This week I took the Ultimate GPS and I coded it to determine the distance from itself to any given coordinates and the bearing towards those coordinates. Next week I will have a digital compass which will be able to use the bearing readings from the GPS and communicate to the car telling it which way to turn. This will all be put into action while there are no obstacles threatening the car.

Car Progress

I built a mount for the sensors out of a sheet of plastic. It works well because it’s durable and very light to put onto the front of the car. For mounting the sensors onto this I used cut pieces of a breadboard making it easy to replace the sensors if needed. To determine the angle the side sensors would be turned we figured out that their measuring angle was 15 degrees. Since the car would be moving at all times having a blind spot wouldn’t be a problem  so we put the side sensors at a 35 degree angle from the front sensor.

 

New car progress

Last week I got a new car to work off of and I got my arduino board and battery fitted onto it. I also made a prototype mount out of cardboard  for the three ultrasonic sensors I will use. I then tested it and configured the sensors to read at farther distances and made other minor changes in my software. This week i am focusing on perfecting my software then making a permanent mount for the sensors.

Software Progress

Last week I focused on planning out and coding how the car should react in different scenarios that are recognized by the 3 sensors I added last week. The car now preforms very well and can weave through obstacles nicely. With all of this software success it  wouldn’t be right for the hardware to just do its thing and keep up. the spring that pulls the front wheels straight whenever the car is not turning is busted and fails to pull the wheels together against the traction of the ground. This week I will look into upgrading to a better and larger vehicle. I will also try to find a replacement spring so I can continue development until I get an upgrade.

Autonomous Car Update 3/2

This week I fixed a small variable error in my forwards and backwards movement functions that was causing huge problems. After I had that problem fixed I implemented a library that will work with my sensor making it much more precise and consistent. After I had my sensor finally responding correctly and the car moving smoothly I added 2 more of the exact same sensors to the front of the car. Now with three working ultrasonic sensors on my car I will be able to allow the sensors to control the car with 0 blind spots. My plan for next week is to plan out how I can have the car respond to nearly every scenario and then program that in.

Autonomous Car Update

This week I used the new motor driver I installed last week to allow the car to do a near perfect figure 8. I have also put the different car movements into functions making my code much easier to read and write. I now have implemented a HC-SR04 ultrasonic sensor into my car and I have began experimenting with it. So far I used the sensor to make the car stop and reverse when an object comes within 25 centimeters of it. I plan to keep improving on this to the point where the car will be able to drive flawlessly avoid all obstacles.

Update 2/16

I realized that the h-bridge motor driver I was using for both my front and back motors wouldn’t work because it would go into a thermal shutdown.  To fix this problem I wired a separate motor driver that is able to handle up to 3.6 amps to my back motor.  The motor that I used for this was a DRV8871 DC Motor Driver.  It works very similar to the h-bridge using 2 different inputs to alter the direction of the motor.  A minor feature I add to the car was an on and off switch I salvaged from the original car itself. I did this so I would not have to constantly remove and replace a wire every time I had to upload new code to my arduino.

Update 2/9

I spent the majority of this week looking for and implementing a sufficient power source for the motors. Before this I was using a power supply with a very long cord that I had to use as a tether. I went with a rechargeable 9.2 volt battery which will give me 0.6 amps. Because of the battery’s size and how small my car is, it was difficult trying to find a safe place to put it. To fix this I decided to cut out the pegs that were originally used as screw holes for the outer frame. This is what my arduino  board was sitting on. The pegs were conveniently very close in height to my battery so I simply zip tied the battery down where the pegs were and I now have my arduino board sitting on the battery.

2/2 update

I spent this week learning more in depth motor control with the h-bridge and implementing that into a remote control car. I stripped the remote control car of it’s circuit board and left it with its structure and the front and back motors. I then replaced the circuit board with my arduino computer. I have taken full control of the back motor which allows me to program the car to move back and forth. I wired the front motor in but still have yet to test it. I should be able to achieve full control of the car very shortly. This experience will really help me in the development of my autonomous obstacle avoiding car.