Help bring more traffic! Stumble This!

HTML hit counter - Quick-counter.net

Wednesday, May 18, 2011

I'm Back Again!

Well hello everyone!

It's really been a long time since I've last updated.
For the past few weeks I've been busy working, while on the weekends helping build the Solar team's new car Celeritas.

Finishing the car was a real time crunch. The race was in Houston, Texas on April 14-16 and believe me when I say it was close. We literally finished coding major components of the car on the trip down there. Luckily the 22 hour trip gave us a lot of time to focus.

We managed to get the code to a working condition once we got to the paddock area, but there was still plenty to do. We had a few major body adjustments to the car, and some minor brake spacing issues to work out. but in the end it all came together. We finished the race with 1st in our class. We also managed to get 2,200 MPG equivalent!

You might have noticed I said equivalent. Well in reality, our solar car runs off of electricity using an electric hub motor. So we have to manually monitor the amount of energy flowing from our batteries to our motor to calculate the energy consumption versus a gasoline powered car.
Thankfully, in the past year, due to the increase in electric vehicles on the market, the SAE determined that there are officially 33.7 kilowatt hours (kWh) worth of energy in one gallon of gasoline. You can run some numbers backwards and see that we consumed about 65 kWh of energy, and in the total run, we calculated our motor to be about 80% efficient. That's impressive, considering internal combustion engines run at less than 50% efficiency.

You can read more at our website at purduesolar.org
and you can also read plenty of great articles by googling Purdue Solar Racing.


Well it was a blast, but what am I doing now?

Its currently the summer for me, and I'm not taking a break anytime soon. I have classes through August, then its back to work again. Luckily though, I have a bit more free time in the near future, and I plan on bringing back some old projects and knocking a few off my list.

Earlier today I dusted off the Arduino board and started working on my solar tracker again.
I uploaded the code to the board and started debugging. First thing I noticed is a slight mistake in the code. because of the slight variations in the components, the two voltage readings from photoresistors will almost never be equal for an extended amount of time. I had to add a tolerance value into the selection statement in order to get the servo to sit still long enough to be useful. I can always show you the code. Let me know if you want to see it!

Next step is to package it all together. I started a rough CAD model of how I'm going to fit everything onto the servo. I decided I want to have the Arduino board spin with the solar cells. This will (I think) minimize the amount of wiring required to connect everything. Because most of the components will then be spinning, that also lessens the number of wires getting wrapped around the servo spindle.
That last statement might be irrelevant though. Either way I'm going to have wires getting wrapped up, and one wire could be as bad as 10.


Soon I'll upload a video of the project so far. I may also make a video showing how to calibrate a continuous servo.


And on a side note, when I moved into my apartment in Lafayette, I was a bit cramped on space and I wasn't able to pack the Bucket. The linux adventures are going to have to be put off until I make a second trip to get my stuff. I guess that leaves more time for the Arduino!

How 'bout you guys? Do you have any projects you've started recently? Any ideas? Or have you been doing anything interesting the past few months?

Wednesday, January 19, 2011

Spoke Too Soon

Well all is not as it seems.
Though the Arduino software installed easier than I thought, it turns out a few more extra steps are needed to get to work.

At first I couldn't select any of the serial ports. After giving up for a while, I came across this webpage on the arch wiki. I'm pretty sure I looked before and couldn't find it, oh well.
Turns out it was a permission issue, but giving the user the correct permissions didn't seem to help either.

So what I did was create a launcher that runs the command sudo arduino from the terminal. I have it set to keep the terminal open while the program runs so I can see what TX and RX versions are uploaded. It sometimes comes in handy.

Now there's just one issue I can't seem to get across.
When I upload the program to the board, it blinks as usual, but it doesn't loop for some weird reason.

Well even though I couldn't correctly upload the program, I did finish the program needed for the solar tracker. It's surprisingly easier than I had anticipated.

And here it is.
Note it is copyrighted.


/*
Solar Tracker
This program controls a servo to allow solar cells to always face the source of light
Created 1/18/11
Ian Bohannon
Copyright 2011
*/

#include <*servo.h>

int ServoOut = 9;
int photoPinLeft = 0;
int photoPinRight = 1;
int LeftReading;
int RightReading;
int pos;

Servo myservo;

void setup()
{
myservo.attach(ServoOut);
Serial.begin(9600);
}

void loop()
{
LeftReading = analogRead(photoPinLeft);
RightReading = analogRead(photoPinRight);

Serial.print("Left Reading = ");
Serial.println(LeftReading);
Serial.print("Right Reading = ");
Serial.println(RightReading);

if(LeftReading > RightReading)
{
pos = 65;
}
else if(LeftReading < RightReading)
{
pos = 45;
}
else
{
pos = 55;
}

myservo.write(pos);
delay(120);
}"


What it does is compare the light shining on each sensor, then through the If statement, adjusts the servo speed and direction accordingly. Through experimenting I know the servo sits still at position 55, spins one direction when higher than 55, and the other when lower than 55.

Because I can't upload it from this computer yet, I haven't gotten around to testing it and debugging it. The values may need to change a tad bit.

Saturday, January 15, 2011

Arduino on Arch? I think so!

Thank you Yaourt, for giving me the ability to download anything in a heartbeat. Well... when you work.

This time it did. I downloaded the Arduino-0022 front end in a flash. Started it up, copied over my files with a flash drive, worked like a charm.
Before I upload any files to the board, I'm going to get some fresh air. Maybe go to the store and pick up some sharpies and food.

Monday, January 10, 2011

News Update

Well guys, I'm sitting here on my couch taking a break from work and watching some football.
I got the second Arch setup running. Essentially what I did was call the second HDD in the grub boot file, which after the fact seemed really simple. I guess that happens a lot when working in linux.

The Arduino is also coming along nicely. I got 5 photoresistors, 1 force resistor, and a continuous servo in the mail last week. I ordered from SparkFun.com and I must say, I'm not impressed.
I ordered with regular ground shipping, which costs a surprising $8.98. On top of that, it took another 9 days before it finally showed up. I wouldn't be surprised if it came from say; Japan or Australia. But no, it came from Denver, Colorado. I'll be sure not to order from them again.
I haven't forgotten about the solar tracker. I'll work on that when I have some more time.

For anyone interested, I'll be sure to go to this years Indiana LinuxFest. It looks like it's going to be March 25-27 at Wyndam Indianapolis West Hotel. It looks like it's free, but rumor has it there is also a supporters package for around $60 that includes a t-shirt. I'm a little cheap, so I don't think I need a t-shirt for $60. Sorry guys.

Saturday, January 1, 2011

Arch Update

After spending a few hours trying to fix this linux issue, I've finally figured out what the issue is.
Appropriately, GRUB doesn't work the way I thought it did, when I installed the second Arch on the new drive, I also installed GRUB again on that same drive with the idea that I would go into the computer BIOS and change the HDD every time I wanted to switch OS's.
Well when I boot into the second Arch install, it's using the same boot options from the first install.
Confusing right?!?

Well even after all this time figuring out what the problem is, I still haven't figured out how to fix the problem, and it's quickly approaching my bed time.

Instead of trying to get this to work, I'm considering partitioning this new 1TB drive into two 500MB pieces with the new Windows 7 I got from school on one, and an Arch install on the other. I can then use the 160GB drive as extra space on either.
I even have an external drive case around here somewhere.

What do you guys think? What should I do?

Thursday, December 30, 2010

Christmas Gifts Galore!

Hello all!
I've finished my finals for the semester and now I should have more time for the bucket list!

I have been working on my computer some. I received a new cd/dvd burner which I just installed with no issues. I also got a 1TB Western Digital HDD. Right now I'm working on getting another Arch setup on it.
I had space issues with my first Arch partition. I didn't have much space for anything, including root. It frustrated me to no end, but seeing as how cheap HDD's have been getting, I figured that would work nicely for me!

I just tried to install Arch on my new HDD, but I'm having issues with the new .iso file from the website. The CORE install has the 2.6.33 kernel in it, but for some reason daemons is asking for the 2.6.35 kernel. People are saying that creating a local repository is easy and will do the trick, but I think I'll try a Netinstall tomorrow morning. That seems to be easier.

On a slightly less computer-y note, I also received the wonderful Arduino Duemilanove and I've already started chugging away at it. Luckily, all my previous C knowledge has paid off and I'm not struggling at all with the programming! Just last night a made a solar controlled servo!

I found a few servos in my parents basement. My dad was once into model airplanes, which are filled with servos. As a sensor I used a small solar cell designed for breadboards and protoboards.

I have a few photoresistors and a continuous servo coming in the mail, should be here tomorrow.
I'm going to make a solar cell tracker similar to this,
Though I figure it's possible to do the same with only 2 photoresistors using similar logic.
Once I do that I think I can scratch learning arduino off the list.

My girlfriend has been bugging me to do some haul videos of my gifts, so expect some videos in the future! I'll have to get used to the whole video thing.
I'm using http://www.youtube.com/user/thisweekinlinux as a good reference! You should all check out his blog and channel.


Monday, December 6, 2010

Adding One to the List

Hey guys, sorry for the lack of updates, schools been really busy and I haven't had much time to scratch a few off my list.

But one thing I have done is found a new project I want to work on. It's called Arduino, and it's an open source microchip controller-esc programming package and controller. The board itself can be bought already assembled and the programming language is in C, which I know fairly well.

Once I teach myself how to use use the Arduino, I'll be able to add some more complex projects to the list, and I'll be one step closer to that elusive peristaltic pump!

On a side note, the next PSR solar car is coming along rather nicely. We just got our webcam back up, and you can watch our progress live HERE! We finalized the chassis two weeks ago and we took the carbon fiber panels to WJI Waterjet in Indianapolis. Mike Trapp showed us the ropes and volunteered his time to help us get the car completed.
Next step is to finish the bottom body of the car so we can fit it with the chassis. In the meantime, we'll have to build the front and rear suspension, which we have designed as of last week. Then we'll have a moving car!

Edit: It seems like the webcam is down again. I'll have to look at it again.