Pages

Showing posts with label competition. Show all posts
Showing posts with label competition. Show all posts

Saturday, October 1, 2011

Arduino Based Computer Temp Sensing

The Problem

I bought a new graphics card for my computer recently, just to realize I didn’t have a power supply large enough to properly power the new card - causing it to overheat (temporarily, I opened the side of my computer and used a desk fan to cool it). After buying the correct power supply, I decided I needed some type of temperature indicator on my computer...Hello Arduino! (I actually used my Uno32 for this project, to view my review on it click HERE)

Now, this hack is very simple, versatile, and easy to implement. All you need is a general purpose temperature sensor, an RGB LED (or more if you want your computer to look really flashy), and some appropriate resistors so you don't blow up your LED. The Arduino fades an RGB LED from blue to red depending on the temp of your component. When it is over 50°C, the LED will be red. (50C is close to what most NVIDIA GFX cards can handle). I also have a processing sketch in progress to read the value of the temp sensor and store it into a .txt file, and a C++ program (in progress) to alert you when the .txt file says that your computer is too hot.


The Set-Up

Below is the schematic. I know that it isn’t standard, but it’s much easier to read for electronics beginners. I recommend giving yourself a pretty good length in wire so that you can attach the LED(s) wherever you need to. Also, HEAT SHRINK ANY VISIBLE METAL so that you don’t end up messing up your computer. Often, your computer will use the casing as a ground, so any visible wires would be really bad. 

Once you’re all soldered up and ready to go, you’ll want to attach the temp sensor wherever you think has a chance of overheating. To attach it I recommend using electrical tape, and just taping it down (If you have better ideas then let me know). Then put your LED anywhere you think will be easily visible. I recommend taping the wires down with electrical tape as well, or zip-tying it down. You then want to zip-tie all loose wires and attach them to the Arduino somewhere that you have free space. I recommend putting electrical tape on the bottom of the Arduino AND Velcro-ing it down, that way your Arduino doesn’t short, and it won’t move.
I was lucky enough to have a working USB port INSIDE my computer, so that I could leave my Arduino plugged in. The unlucky one’s out there will need to upload the code before they put it in and power it off of a battery, or find some way to get a programming cable inside of their case. After the Arduino code (below) is uploaded, everything should work fine. I set the default room temperature as 17C because that’s how it is in my boiling dorm- but that could easily be changed.
int bluepin = 5; int redpin = 6; int tempPin = A0; int blueout = 0; int redout = 0; float conv = 0.55555; //Wouldnt let me do 5/9 float tempC; int limitinC = 50; void setup() { Serial.begin(9600); pinMode(bluepin, OUTPUT); pinMode(redpin, OUTPUT); } void loop() { float tempVolts = (analogRead(tempPin) * .004882814); //Reads temp sensor and converts it to a voltage level float tempF = (tempVolts - .5) * 100; //Converts the voltage level into a temp(F) float tempC = (conv * (tempF - 32)); //Converts the temp into Celcius //Serial.print("tempC ="); //Commented out for testing //Serial.println(tempC); //Serial.print("tempF ="); //Serial.println(tempF);
float CelConstraint = (tempC - 15); //The average temp of my room in C (limiting the colors to be blue at 15 and red at 50) float CelCtoVal = (CelConstraint*29.68);//converts the value //Serial.print("CelCtoVal = "); //Commented out for testing //Serial.println(CelCtoVal); 
redout = CelCtoVal; blueout = ((512 - CelCtoVal) + 512) //Inverts the colors so 1024 = 0 and 0 = 1024 //redout = ((redout+CelCtoVal)/2); //Use these lines instead of the above if the sensor sometimes is flickering (averages the values) //blueout = ((((512 - CelCtoVal) + 512)+blueout)/2); //Serial.print("blueout ="); //Commented out for testing //Serial.println(blueout); //Serial.print("redout ="); //Serial.println(redout); analogWrite(bluepin, blueout); analogWrite(redpin, redout); if (tempC > limitinC){ Serial.print(1, BYTE); //Send 1 to Processing sketch if too hot delay(100); } else{ Serial.print(0, BYTE); //Send 0 to Processing sketch if cold delay(100); } }

Work In Progress

Below, I have a processing sketch that will read whether or not your Arduino is overheating and write a ‘1’ into a .txt file if it is. I also have a C++ program that will read that file. This is a work in progress. I just started to learn processing and only know very basic C. I hope eventually to make a program that will print the temp in C, F, and to pop-up when the temp is greater than a certain temperature.


Download Everything


Let me know how this works for you guys! If you have any comments/questions be sure to post below or tweet me!

Wednesday, February 9, 2011

My Vex Programming Guide - Still In Noob Version

Are you a novice or beginner programmer? Or are you even a pro? Either way, I have the PDF for you! I have been writing this for some time now (about half a day), and it is about 40% done so far - It’s a C programming guide! It focuses in teaching beginner programmers (preferably high school), how to program their Vex Robot efficiently, as well as understanding what is actually going on. We all know how to work computers, but knowing how they work and why they work that way opens countless doors (yeah, it just got deep).

This PDF isn’t very clear considering I’m the one who wrote it, and it’s not very in-depth (yet) because I JUST started it; but I’m hoping the more people who read it and utilize it, the better feedback I’ll get. Meaning the more accurate and efficient guide for the aspiring Roboticians. If you have any interest on helping with this project you can check it out HERE (or below). If you have any questions comments or concerns, tweet me or shoot me an E-Mail. Both which can be found on your favorite technology blog.

/** Reminder: This PDF focuses on programming Vex robots, so some information may be not completely accurate with the C language, and much information I purposely left out. **/


Saturday, October 30, 2010

Mech-Warfare: My New Hobby

The RoboGames (formerly known as the Robo-Olympics) is held once a year in California. The nerd metropolis holds over 50 events, each with a special robotic niche. From climbing stairs, to kung-fu, the RoboGames has it all. But by far, the best competition at the RoboGames is Mech-Warfare. Ever watch one of those crazy cartoons as a kid, where a human would sit in a massive robot, and fight other robots around a city? Ever wish you could be that guy controlling the giant robot that’s destroying the city? Now you can. Mech-Warfare is a competition where the robot's controller can only view the competition field on a camera that is mounted on his robot. The robots fight in a miniature sized city, shooting airsoft based weaponry at each other; and in the upper classes, even miniature missiles. Now before you go buy your ticket to California (which I should be doing ASAP), you should know that the robots are limited to a few inches high, and the fighting isn’t quite as fast-paced as anticipated (yet). But regardless, I would recommend checking it out; definitely has potential for a future hobby...or profession.

Wednesday, September 22, 2010

Vex Robotics


Vex Robotics is a cost-efficient way for any school to experience the excitement of a large robotics competition. Each competition requires teams to use prefabricated “Vex Official” parts, which levels the field for schools with all budgets. Each competition allows an unlimited number of teams; with a pre-made format, making each competition the same and understandable to new-comers. Above all, Vex is easy to learn, but doesn’t have any limitations. It will challenge an experienced student, and allows less experienced students to develop essential problem solving skills. Vex offers a variety of different parts, they especially allow a lot of freedom with equipment like sensors; ranging from digital push sensors, to analog accelerometers. The metals provided are steel and aluminum allowing for many types of design styles, combining strength and flexibility. The programming can be both block based, and written in C-Script, and gives multiple tutorials on how they can be written. Teams can be formed through Robot Events and all competition rules are posted on the Vex Robotics website.