January 12, 2013

Arduino based data logging thermometer in IKEA RIBBA frame

And featured on Hack A Day, too!

I was looking for a nice enclosure to host my latest project (an Arduino baased data logging thermometer with multiple sensors) and, once again, I came to an Ikea product, a RIBBA photo frame that has enought space to host my project circuitry:

My idea was to relocate the back of the frame in line with the rear edge to use the empty space present in RIBBA:

Here's the back:

held in place with these tiny metal strips:

The inside of the frame seems to be a very convinient project box:

After removing the inner piece of paper, there's a nice cardboard frame I'm planning to keep in place:

Here's my idea: to put the LCD in the middle and all the circuitry nearby, masking the clear glass with tracing paper (to have a blurry vision of the circuit boards):

Here are all the circuits and components I have to fit in the frame, placed in the definitive places:

I've started putting some plastic spacers in the corners:

fixing them with hot glue:

Spacers are cut to size to leave enought space to fix the back of the frame.

All the circuitry is fixed to the back of the frame "sewing" the circuit boards with some thin wire that passes on top of the stripboard...

...and is fixed on the back of the frame with simple knots:

For example, here's a detail of the stripboard hosting the pushbuttons, with the "sewing" wire passing on the top of the board...

...and ending with two knots on the back:

Here's where the temperature sensors are connected to the thermometer, near the power connector (one sensor is hosted on the back of the thermometer itself):

Power is given by four AA batteries (in a battery holder provided with a switch) or by a wall adapter (connecting the wall adapter to the power connector, batteries are automatically disconnected).

Here's the blurry view of the electronics given by a sheet of tracing paper:

And here's the final view I'm going to achieve putting back the original cardboard frame:

To have a clear view of the LCD, I've cutted to size a window in the tracing paper:

Here's the back (hosting the circuitry) in place:

The SD card holder is on the outside for easy insertion/removal.

And here's the front:

Here's my thermometer in place and working to show temperatures and log data!

UPDATED: featured on Ikea Hackers!

UPDATED: featured on Hack A Day!

January 3, 2013

Thermometer with data logging and multiple sensors

After my first experiments (here and here) with Dallas One-Wire temperature sensors, I've decided to realize a thermometer that was able to log temperatures coming from multiple sensors, adding date/time information (coming from a Real Time Clock).

Here's the outcome: a thermometer based on Dallas DS18B20 sensors on a Dallas One-Wire bus, logging data on an SD card. Information are showed on a 2x16 LCD.

Thanks to three push buttons you're able to perform different tasks.

The first pushbutton is used select showing mode on LCD (alternating time/date show, single sensor temperature show or scanning sensors temperatures).

The second one is used to enable/disable logging data on SD card.

The third one is used to temporarily switch LCD backlight on.

There's a LED to show when logs are written on the SD.

When the "mode" push button is kept pressed during reset, verbouse startup is done (i.e. all sensor addresses are shown, together with other information like the number of sensors that has been found, the refresh period and the file name used for logging).

When the "end-log" push button is kept pressed during reset, temperatures logging is not done (i.e. it is possible to use this digital thermometer without an SD card inserted in its slot).

Temperatures are logged every temperature-refresh cycle.

Log file is closed each cycle (so it is safe to switch power off when the writing-status LED is off, e.g. right after an entry has been written - or you can use the "end-log" push button to end logging and safely switch off the thermometer).

When enable/disable log push button is pressed, logging on file is enabled/disabled (untill a reset, the same log file is used in append).

Temperatures logging is started on a new file each reset (to start loggin on a new file, press the reset button or switch the Thermometer off and on).

When the third "LCD backlight" push button is pressed, LCD backlight is temporarily switched on.

Date/time showing and date/time information in log files are based on a Real Time Clock module (using a Dallas DS1307 chip).

This is the schematics I've used to realize this thermometer:

It shows how the different components are connected to my Arduino 2009 board.

And (after several iterations...) here's the code I'm using:

(compiled with Arduino IDE 0022)

If you're going to give it a try, send info/link to your work in the comments.

UPDATED: since I don't like to waste my precious Arduino hosted in a project, I've realized a stand-alone version on a single stripboard hosting a minimal version of Arduino, an LCD with a basic interface, the PNP transistor to control LCD backlight, and a 3.3V and 5V supply circuitry

I've connected to the stripboard a One-Wire bus for the temperature sensors, a small stripboard hosting the three pushbuttons (in enabled internal pull-up resistor configuration), the LED, the SD Card module, the RTC module and a power jack to give power to the unit (I'm planning to use a battery pack or a wall adapter).