Saturday, June 8, 2013

Arduino Speed Control with Micro Chargers Racers

So here is a fun project. Monitor the speed of a toy race car set, and set the "cops" after speeders. Very imaginative use of an Arduino!

Friday, June 7, 2013

AC Voltmeter and Temperature Monitor

I was asked to build a test jig for testing Honeywell Aquastats, and the two parameters that needed monitoring were voltage (12-16 vac), and temperature. I usually work with DC monitoring and DS18B20 digital temperature sensors, but this project called for monitoring AC, and I was given a TMP36 analog temperature sensor.

Before connecting the output of the voltage divider to the Arduino, I plugged my DMM into the output of the voltage divider, connected the AC source, and adjusted the two pots till I got exactly 5v. The 5.1v Zener prevents you from doing something foolish with the pots.

I then connected my DMM to the AC source, took the AC reading, and put it into my map command in the code as the value for 1023 on the ADC. After all the wiring was finished and the code uploaded to the Arduino, I connected the input of my AC transformer to a variac so I could run the transformer primary from 0-125vac. With my DMM on the secondary of my 29vac transformer, the Arduino LCD display mirrored the DMM almost perfectly throughout the complete range.

Without further delay, here's the schematic and code:

#include "LiquidCrystal.h"
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); //Arduino Digital Ports for RS, EN, D4, D5, D6 & D7

int voltPin = 0;     // voltage divider (middle terminal) connected to analog pin 0
                       // outside leads to 0-29vac
int tempPin = 2;     // TMP36 data pin
int val = 0;           // variable to store the value read
int volt = 0;           // variable to store the voltage calculated

void setup()
  Serial.begin(9600);          //  setup serial
  lcd.begin(20, 4);            // setup LCD

void loop()
  val = analogRead(voltPin);    // read the input pin
  Serial.println(val);             // debug value
  volt = map(val, 0, 1023, 0, 29); // map 29v range
  Serial.println(volt);             // voltage
  lcd.setCursor(0, 1);
  lcd.print(" VAC  ");

  int reading = analogRead(tempPin);    // read the input pin
  float voltage = reading * 5.0;
  voltage /= 1024.0;

  Serial.println(" volts");
  float temperatureC = (voltage - 0.5) * 100;
  Serial.println(" degrees C");
  float temperatureF = (temperatureC * 9.0 / 5.0) + 32.0;
  Serial.println(" degrees F");
  lcd.setCursor(0, 3);
  lcd.print(" degrees F  ");

Thursday, June 6, 2013

Arduino Yogurt?

I'm a big fan of homemade yogurt. I love it mixed with fresh berries, or granola (you have not lived until you make your own granola!). I also love traveling the hallowed digital halls of, and recently ran across a great ible for making yogurt. Imagine my surprise when I read that one of the commenters built a Arduino Yogurt Cooker! For about $25 or so, he has a temperature controlled gallon sized yougurt maker. Here's a guy after my own heart! Read it, I think you will enjoy it as much as I did!
Related Posts Plugin for WordPress, Blogger...