Sunday 30 December 2012

My JY-MCU is working!

About a year ago I've put some 1-wire thermometers (DS18S20) around my house to measure the temperature outside and in several rooms.
I hooked them up to a PC with a USB to 1-wire adapter and wrote a little app to take readings and post them to Google Spreadsheet for presentation.

It was a nice little project, but running a desktop PC to do the job was too much power consumption and the machine was not running all the time and I could not get a full measurement log too see, for example, how cold was the house overnight with the heating turned off (be green and have a good night sleep at the same time).

So, on to the next project: use a low cost, low power programmable chip to do the job:
  • Be a 1-wire master to capture measures from every 1-wire thermometer connected to the bus.
  • Store the measurements for the past 24 hours (or as much as I can store on the chip).
  • Be a web server to view the results on any browser that can access it over the net.

After exploring some options like WWWpic2 and others, I found the Arduino project that provide Ethernet options with good development environment and support community. It has a web server library and there are several examples for using 1-wire with Arduino (example).

First thing first: I need an Arduino board!
I set my eye on the Arduino Nano, it is small and can easily plugged into a beading board to play with.
When searching the web for one, I found a nice alternative: JY-MCU Minimum AVR System Board (ATMEGA32) [at Deal Extreme for example]

I got it yesterday:


It is NOT an Arduino board as you can see, but it has a bootloader, built in LEDs and buttons so there is no need for a breading board to get started.
There are some challenges to work with it using the Arduino IDE:
  • It is not a recognized board option, so ports are not mapped correctly.
  • It is not one of the Arduino chips, it is an ATmega32L, so not sure everything will work properly.
  • It comes with HID bootloader, so the IDE is unable to download the sketch with avrdude. 
Nevertheless, I got it working an downloaded a simple sketch to test all LEDs (and pin assignments).

I will post what I did to overcome the above soon, stay tuned.