Monday, May 28, 2012

Week 8 Update

For this week's lab, we succeeded in getting the arduino to log data when a button is pushed.

To set up the breadboard for the LED/button setup, we followed this tutorial.

To indicate the data is logging, Kevin incorporated a mini, LED red light.

Afterwards the coding from Read Analog Voltage Tutorial was combined with the coding obtained from above to have the Arduino do the following steps:

1. Light the LED
2. Obtain analog signal from Potentiometer and display the information on to the computer in the format of "TIME, VOLTAGE.
3. When the button is pressed again, the LED turns off, and the Arduino stops. The millis () time function will also pause.

Afterwards, a magnet took the place of the button as the switch. This was done in the hopes that another magnet would be attached to the wheel of the solar car, and this way, speed could be measured via frequency.

Problems encountered: In trying to combine the "toggle_log_on_off" code with the micro SD writing delay, the button function stopped working. The LED would not light up, and the Arduino would not obtain the signal from the potentiometer.

Monday, May 21, 2012

Week 7 Update

I am not sure if the library provided from the site was supposed to be used, but it froze my computer so I did everything on paper instead.

Calculation of rotational frequency (revolutions/second)
-assumption: distance = 20 m
                    time = 10 s
                    wheel diameter = 4 cm = 0.04 m -> radius = 0.02
distance wheel has traveled in one full rotation = circumference of wheel
C = diameter(Pi)
C = (0.04) Pi = 0.126 m

distance of track = 20 m
To find how many full rotations a wheel must do to reach the distance:
-> 20/0.126 = 158.73 rev

So since rotational frequency is measured by revolutions/sec:

158.73 rev/10 s = 15.87 Hz

Hope this seems logical.
-May




Monday, May 14, 2012

Week 6 update

We have successfully coded a time stamp for the arduino system that can also transfer data on to a separate file like excel or notepad. However, getting this data to repeat on a memory card is still in the works. In completing this important step, we have realized two things: 1) it really helps to have a person who is familiar with the concepts of C++ to point out the obvious things and 2) our own knowledge in coding is still severely lacking even with a Maple background.

We still need to get the arduino to measure angular velocity and current. Hopefully next week will be just as productive.

Monday, May 7, 2012

Week 5 Update

Not much was done this week except for writing the code for the time stamp. Due to technical difficulties, the arduino could not write the volts and time together on the same file. Instead, it was made to write these two things into two separate files.

Update: After a week and half, a solution was discovered.

Kevin took out the code that displayed the data on the computer and had the arduino just soley write the info to the Micro SD. He tested it by adjusting the potentiometer to give 0 Volts before running the code and slowly adjusted the knob while the code was running until it reached 5 Volts.

In terms of following the proposed schedule, we are actually supposed to be attaching the finished arduino project to a solar sprint car. However due to setbacks in trying to get the arduino to do certain things, we are behind on schedule. The good (but also bad) news is that the other groups who are in charge of building the solar sprint cars are also behind, because no physical car has been built as of yet. 

Much of this time has been spent researching codes for the arduino to process. However, this is also proving to be a difficult task.