Archive for the ‘ Arduino ’ Category

Arduino LCD HD44780 + LM335 Temperature Sensor

This was the next logical step in my home monitoring project.  I’ve simply added an LM335A temperature sensor to the breadboard and have the output being posted to the LCD every second.

 

First the drawing:

The next step was to write the code that reads the temperature on Analog Pin 0, then writes it the LCD.  This could not have been easier.

 

Code:

#include <LM335A.h>
#include <LiquidCrystal.h>
float raw;
 
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(7, 8, 9, 10, 11, 12);
 
LM335A InsideTemp(0); //pass the analog input pin number
void setup() {
  lcd.begin(16, 2);
}
 
void loop() {
  lcd.clear();
  //user must call ReadTemp before any valid temp data is available
  raw = analogRead(0);
  InsideTemp.ReadTemp();
  lcd.print(InsideTemp.Fahrenheit());
  lcd.print((char)223);
  lcd.print("F");
  lcd.setCursor(0, 1); // bottom left
  delay(1000);
}

Working project:

 

 

Things are coming along on the home monitor.  I’ll soon be using some multiplexers and 8bit shift registers to help reduce the number of pins used on the arduino.  Keep checking back for more updates!

Arduino LCD HD44780 Simple Tutorial

Connecting any LCD using the HD44780 standard to an arduino is extremely simple.  I’ve created a quick schematic showing how to connect the 16×2  HD44780 to an arduino.  I’ll be using this setup in my future projects, so this is simply for future reference.

 

Arduino to be sold at radio shack!

Big news broke today for home electronic enthusiasts.  Radio Shack is going to start caring Arduino products.  Surely we will be paying a premium for the convenience, but this is a good sign for those of us who enjoy tinkering at home.  There is a new wave of DIYers that are learning how easy it can be to automate simple tasks around the house and office.  Increasing the accessibility of Arduino should also increase the options of sensors and IC’s we see at our local stores as well.  This is great news, I can’t wait to see where this takes us.  Click Here to read the full blog post.

Arduino LM335 Temperature Sensor Tutorial

Getting started with the LM335 Temperature sensor can be a bit tricky.  I ran into some problems when I started getting incorrect data.  I googled around for the problem, and all of the schematics and drawings at the top of google were incorrect.  They either had a static resistor on the data pin, or they show the data pin on the arduino directly connected to the LM335 Temperature sensor’s data pin.

The trick to correctly calibrating the temperature sensor is to connect a 10k potentiometer to the data pin.  Once the potentiometer is wired in place, you can calibrate the LM335 to read the correct temperature.  The correct wiring of the LM335 can be seen below:

 

 

 

 

 

Once everything is wired up, I simply used the lm335a.h library written by greenrobotics.net.  This is a nice library, a quick test sketch can be seen below here:

// Example using the LM335A library for reading temperatures
// Created by Jonathan Merrill, February 20, 2010.
// http://www.greenrobotics.net
//  Released into the public domain.
 
#include 
 
LM335A InsideTemp(0); //pass the analog input pin number
void setup() {
Serial.begin(57600);
Serial.println("starting");
 
}
 
void loop() {
  delay(3000);
  //user must call ReadTemp before any valid temp data is available
  InsideTemp.ReadTemp();
  Serial.print("Fahrenheit: ");
  //functions to get the temperature in various unitsfs
  Serial.println(InsideTemp.Fahrenheit());
  Serial.print("Celsius: ");
  Serial.println(InsideTemp.Celsius());
  Serial.print("Kelvin: ");
  Serial.println(InsideTemp.Kelvin());
 
}

Once I get motived, I’ll be sending this temperature data from my home to my blog, here.  I’ll be sure to post more updates as they come.

Update/New Guide: Lava Lamp Housing

I finished up my hardware arduino monitoring project with a brand new Lava Lamp Housing. I’ve also update the script to check my gmail account and notify me when a new email hits my inbox.

Click Here for the full guide

Arduino Server/Service Monitor

I’ve successfully written a bash script that runs once every minute. The script detects whether or not my server is online by issuing a simple ping request. Based on results of the ping request(s), the arduino will display a green LED when the server is online or a red LED if the server is offline. I’ve also setup a cron job to execute the script once a minute, giving me up to the minute status of my server. This specific project is not terribly amazing, but the foundation for many more projects to come has laid.

Click Here for the full project page