Go Down

Topic: Standalone Atmega328 Temp/pH/Humidity Sensor WIP (Read 2634 times) previous topic - next topic


Aug 16, 2009, 04:14 am Last Edit: Aug 16, 2009, 08:38 am by SpikedCola Reason: 1
Nothing amazing, but I picked up another atmega328 chip and a resonator and built a little board. Right now it doesnt have anything hooked up but eventually it will be connected to an LCD, pH sensor, humidity sensor, temperature sensor, and some SSR's.

It has a blue LED connected to the [arduino] pin 13, an ICSP header for burning the bootloader (or incase I want the extra 2kb of space), a header for power, and a header for Tx, Rx, and RST (to program with the Arduino IDE).


Added RJ45 connector to attach sensors, and built a DS18S20 sensor board (just one for now, more to come later):


Aug 16, 2009, 06:41 am Last Edit: Aug 16, 2009, 06:46 am by SpikedCola Reason: 1
I apologize if the multiple posts makes anyone unhappy; I just like having a new post for every update, as it makes it easier for me to track progress and time/dates.

Finished the code (for now) include a Max/Min/Current temp display, using custom characters (the up and down arrows) to identify which is max and which is min, without cluttering the (tiny) display. I ran out of AWG30 wire, so when I pick more up Ill add the LCD to the atmega board and wire it up.

Code: [Select]
#include <DallasTemperature.h>
#include <LiquidCrystal.h>

// RS EN D4 D5 D6 D7
LiquidCrystal lcd(0, 1, 2, 3, 4, 5);
DallasTemperature tempSensor;
double maxtemp = 0;
double mintemp = 255;
byte up[8] = { 0x04, 0x0E, 0x15, 0x04, 0x04, 0x04, 0x04, 0x00 };
byte down[8] = { 0x04, 0x04, 0x04, 0x04, 0x15, 0x0E, 0x04, 0x00 };

void setup()
 lcd.begin(16, 2);
 lcd.createChar(0, up);
 lcd.createChar(1, down);

void loop()
 double temp = tempSensor.getTemperature();
 if (temp > maxtemp)
   maxtemp = temp;
 if (temp < mintemp)
   mintemp = temp;

Hugo RSF

Very cool!!!

Do u store the max, min value on the computer or in any other "thing"?

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131