This week, I continued to work on the lab that was to measure the speed of light. We recorded four different measurements at a furthest distance of 140 meters. At this point, there was a lot of noise in the background and it was hard to read on the oscilloscope. After this, it was the last day for experimenting. We went the full distance of the hallway, 100 meters. This made the total distance 200 meters because the laser was bounced off of the mirror. We were able to line up the laser back to the recording device, however, the light from the laser was too weak at this point to be picked up by the recording device. At this point the Speed of light lab was complete.
Also, the segway has made some serious progress. It can now balance itself without any human help. The next step is to make it move forward without tipping.
This week, Austin has been working on rewiring the car, therefore there was not much for me to do in terms of the GPS Car this week. At the beginning of the week, a new GPS arrived and it functions with the old code. After this was discovered, Jed, Gerrick and I began work on measuring the speed of light. In order to do so, we use a power source that sends a signal to a laser and an oscilloscope. Th e laser is aimed at a mirror, and that mirror is pointed back at the device used to record the beam of light omitted from the laser. This device then also sends a signal to the oscilloscope. The time difference can be measured from the two signals. So far, the largest amount of time has been less than half a microsecond. We then determine the velocity of light using distance (which is measured with a tape measure) divided by time. Our results have been fairly consistent, averaging about 2.9×10^8 m/s. As the distance gets further, it is more challenging to line the laser beam up with the device that records the signal. Next week, we hope to measure at a distance of over 200 meters.
Due to a halt in the progress of the GPS car, this week I worked on a self balancing segway. It uses an accelerometer and a step motor in order to keep it balanced. The step motor turns a gear that control which way of motion the wheels will go in order to keep it balanced. It also speeds up the rotation the further the segway is from balanced. It also has a feature that calibrated the center point whenever the arduino reset button is pressed. Soon, next week, the segways construction will be complete and hopefully it shall work.
It turned out that the combined code did not work. The car just drove in circles and did not work. After trying to update the code, but to no avail, Austin and I have decided to rework the car code. On friday, we have rewritten the code and will test it next week. Right now, the batteries are down and could not be tested. Hopefully, the new code will work next week.
The GPS Code and the car code were combined this week. Austin and I must now work together on this project. We printed out our codes and discussed how we would run them together. We currently have the GPS steer the car only when there are no immediate obstacles in the way. When we went out for a test trial, the turning motor was destroyed. It has now been repaired and soon, the car shall be tested again.
The gps code has been updated and optimized. There are eleven functions that are used in the main loop. A test subject was used with no prior knowledge of how the gps worked, and he was guided to the exact location that was set. A copy of this code can be viewed by clicking on this link: http://codeviewer.org/view/code:4f77
The gps software has been updated to completion. It now averages the the longitude and latitude using a rolling average. This makes the calculations much more accurate. It correctly steers a person to the target with a good amount of accuracy. Two leds were added in order to tell if the target is locked or not. The next step is to add this to the car.
This week, the GPS code was simplified to make it run much faster. Many of the unnecessary code has been eliminated. Now, I am trying to add a button to the GPS that can lock in a target location. Once this is added, the GPS will have the ability to added to the Car.
The H-Bridges have begun to be assembled. Four groups of two were formed, each with the task of creating the H-Bridge design that Gerrick Ruffner and I created. Currently there are five out of the eight working. Soon, the rest should be completed. The purpose of these H-Bridges is to make a motor go from reverse to forward or from left to right. These will be used on the GPS Car and possibly on the self-playing drum. The era of the H-Bridge Relays has begun.
During the beginning of this week, I worked on the code for the gps that will be used for the gps car. At first, it was very inaccurate. I added some code that averaged the distance and heading. The distance from a set target is now fairly accurate, however the heading is not. A magnetometer is being purchased in order to have a more accurate heading reading. This is important because this will steer the car to its target.
Our class is going to produce eight relay H-Bridges. These are used to make a motor go in forward and then in reverse. I designed and soldered the prototype. Next week, they will be produced in an assembly line style.