View Full Version : W00T It Works!!!!
Oneslowz28
06-11-2010, 07:55 PM
Just felt like shouting to the world that my Arduino temp sensor works!!!!
http://thebestcasescenario.com/oneslowz28/personal/workingtempsensors.jpg
OvRiDe
06-11-2010, 07:57 PM
Nice!! Finally!
BuzzKillington
06-11-2010, 09:16 PM
Are there books on these things? I would love to learn how to do this crap but it's all unknown territory for me.
EDIT: I should rephrase that. Books on these things anyone could recommend?*
Oneslowz28
06-11-2010, 09:48 PM
Make.com published a book titled Getting Started With Arduino. Its the perfect beginners book and for like $70 you can get the starter kit which includes: an arduino, the book and some components to do the projects in the book.
knowledgegranted
06-11-2010, 10:07 PM
Mind posting the source? I like seeing how other people achieve the same result.
Oneslowz28
06-11-2010, 10:27 PM
No problem
//Arduino Controlled 2 sensor Temp Display. Uses 2 10k thermistors and a 10k pull up resistor.
//Code By Charles Gantt http://themakersworkbench.com
//Code based on Thermistor2 Elaborate code found here http://www.arduino.cc/playground/ComponentLib/Thermistor2
//This code was developed as a side project to my Call of Duty Modern Warfare 2 Case mod found at http://www.thebestcasescenario.com/forum/showthread.php?t=21320
#include <LiquidCrystal.h>
#include <math.h>
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
double Thermistor(int RawADC) {
long Resistance;
double Temp;
Resistance=((10240000/RawADC) - 10000);
Temp = log(Resistance);
Temp = 1 / (0.001129148 + (0.000234125 * Temp) + (0.0000000876741 * Temp * Temp * Temp));
Temp = Temp - 273.15;
return Temp;
}
void printDouble(double val, byte precision) {
lcd.print (int(val));
if( precision > 0) {
lcd.print(".");
unsigned long frac, mult = 1;
byte padding = precision -1;
while(precision--) mult *=10;
if(val >= 0) frac = (val - int(val)) * mult;
else frac = (int(val) - val) * mult;
unsigned long frac1 = frac;
while(frac1 /= 10) padding--;
while(padding--) Serial.print("0");
lcd.print(frac,DEC) ;
}
}
void setup() {
Serial.begin(115200);
lcd.begin(16, 2);
}
#define ThermistorPIN 0
#define Thermistor2PIN 1
double temp;
void loop() {
lcd.setCursor(0, 0);
temp=Thermistor(analogRead(ThermistorPIN));
lcd.print("Sensor 1 ");
printDouble(temp,2);
lcd.print((char)223);
lcd.print("C ");
lcd.setCursor(0, 1);
temp=Thermistor(analogRead(Thermistor2PIN));
lcd.print("Sensor 2 ");
printDouble(temp,2);
lcd.print((char)223);
lcd.print("C ");
delay(100);
}
Zephik
06-11-2010, 11:07 PM
It's alive! IT'S ALIVE!
dr.walrus
06-11-2010, 11:10 PM
Just felt like shouting to the world that my Arduino temp sensor works!!!!
http://thebestcasescenario.com/oneslowz28/personal/workingtempsensors.jpg
That is pretty frickin sweet for something non-proprietary. Props!
Oneslowz28
06-11-2010, 11:32 PM
That's the beauty of Arduino. Its totally open source and 99% of the code you find posted on line is licensed under the GPL. So its openly modifiable, royalty free and no credit required (although we do give credit where credit is due)
I updated the code above to reflect a few changes I made that cleaned things up a little.
dr.walrus
06-11-2010, 11:34 PM
That's the beauty of Arduino. Its totally open source and 99% of the code you find posted on line is licensed under the GPL. So its openly modifiable, royalty free and no credit required (although we do give credit where credit is due)
I updated the code above to reflect a few changes I made that cleaned things up a little.
Where is the data pulled from? The OS?
Oneslowz28
06-12-2010, 12:28 AM
The temp data is pulled from the 2 temp sensors. You can see one of them in the photo above. Its the round thing with knurled edges and a black wire that is bundled up with a twist tie. Its actually a bitspower Temp Sensor Stop fitting. In the photo the USB cable is just there to power the Arduino and upload the new code as I make changes. The seeeduino I use can be powered from both a 12v source or a USB cable or even a 9v battery. So you can stick this in your pc with 2 common 10k thermistors and use a 12v line from your PSU to power it.
I have posted a full tutorial here (http://www.thebestcasescenario.com/forum/showthread.php?goto=newpost&t=23490) and here http://themakersworkbench.com/?q=node/341 (http://themakersworkbench.com/?q=node/341).
dr.walrus
06-12-2010, 12:33 AM
The temp data is pulled from the 2 temp sensors. You can see one of them in the photo above.
That's brilliant! A number of the solutions I'm looking at are OS based solutions and they're really not what I want. This might be it.
Oneslowz28
06-12-2010, 12:42 AM
This will scale up to 5 sensors too and with the use of a multiplexer you could add any number of sensors. Crenn and Myself will be deving some stuff with the Arduino and Multiplexers very soon. I am just waiting on the chips and supporting passive components to come in.
Drum Thumper
06-12-2010, 01:57 AM
hmm. The LCD screen for the temp sensor and HDD activity in my M40 just died the other day. Hmm...
Oneslowz28
06-12-2010, 02:08 AM
Ohhh HDD Activity would be easy to do! Now you have me thinking....
SXRguyinMA
06-12-2010, 07:55 AM
nice work! I need to get around to writing up a tutorial on my Arduino project :D
Oneslowz28
06-12-2010, 10:28 AM
I can not wait until TLAPD so I can run around saying ARRRRRRRDUINO
SXRguyinMA
06-12-2010, 03:20 PM
lmao nice :D
Powered by vBulletin® Version 4.2.1 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.