Multi-sensor real-time temperature monitoring and logging system using Arduino

In March 2018 I designed and built a multi-sensor, real-time temperature monitoring and logging system using Arduino.

Having built a liquid cooled RF amplifier for 23cm earlier in the year (find the article here), I wanted to build a solution that will enable me to view real-time temperatures and analyse the efficiency of the cooling system using logged data.

KEY REQUIREMENTS

  • Read temperatures from multiple temperature sensors at a pre-defined frequency
  • Apply a software corrective calibration value to each temperature sensor (if required)
  • Display ambient temperature and temperature from each sensor on an LCD display
  • Sound an alarm if one or more temperatures is equal to or greater than a pre-defined temperature value
  • Log ambient temperature, temperature from each sensor and date & time to an SD card at a pre-defined frequency

MY PARTS LIST

Below is  list of parts required for this project:

  • Ardunino UNO board
  • DS3231 Real Time Clock (RTC)
  • Micro SD card module
  • Buzzer
  • Push to make Switch
  • 5 x DS18B20 temperature sensors
  • 4.7K resistor
  • 20 x 4 LCD – I2C version that works using only 4 wires – VCC GND SDA and SCL
  • Female housing connector pins
  • Telephone extension cable wire
  • Nylon M3 spacers and screws
  • 2 x PCB – one to piggy back on the Arduino UNO and the other to mount the components in the box
  • Plywood
  • Breadboard
  • Double sided foam tape
  • Project box
  • Arduino PCB pins
  • Bezel – I obtained the laser cut Bezel from a supplier in the US. It comes complete with clear facia, nuts and bolts. Find the link to this supplier here
  • Heat shrink
  • 2 x pan head screws
  • 2 x raw plugs

CIRCUIT DESIGN USING FRITZING

Fritzing is a fantastic free open source application that I used for designing my Arduino temperature logging application. More information here

My Fritzing file coming soon.

DESIGN LAYOUT USING BREADBOARD

After designing the circuit in Fritzing I built it using a breadboard. At this stage I made a few modifications so it was much easier to do this using the breadboard.

ARDUINO LIBRARIES

Prior to starting development I looked at functionality of the built-in libraries in the Arduino IDE. I found that both Wire.h and SD.h met requirements and could be used as standard with no modification.

This meant I still needed something to communicate to the LCD, OneWire devices, DS18B20 temperature ICs and the RTC. I searched the Internet for libraries that any of the Arduino developer community had developed and shared. I wasn’t long before I found four additional libraries that met the requirements of what I wanted to do so I downloaded and installed these in the Arduino IDE. Thank you to those that developed and shared the code.

WIRE LIBRARY

Standard wire library installed as part of Arduino IDE. Allows you to communicate with I2C / TWI devices.

SD CARD LIBRARY

Standard wire library installed as part of Arduino IDE. For reading and writing SD cards.

LIQUID CRYSTAL LIBRARY

Find the library here. Derivative of the original LiquidCrystal Library. Faster and supports I2C.

ONEWIRE LIBRARY

Find the library here. Lets you access 1-wire devices made by Maxim (previously Dallas).

DALLAS TEMPERATURE LIBRARY

Find the library here. For Maxim (previously Dallas) DS18B20  temperature ICs.

REAL TIME CLOCK LIBRARY

Find the library here. To easily interface and use the DS3231 RTC.

CODE VERSIONS

Coming soon.

PCB DESIGN

After finalising the circuit design, I designed a PCB to piggy back onto the Arduino UNO board using Adobe Photoshop.

PCB DOWNLOAD

Below is link to a PDF of my PCB design:

m0nwk_temp_PCB_v1.0_20180620.pdf

ETCHING THE PCB

I etched the PCB using a press-n-peel film technique. In March 2017 I made a YouTube video that shows how this technique works.

The picture below shows my etched PCB. I used a metal file to clean up the edges.

WIRING THE CIRCUIT

I started out using 28 AWG rainbow ribbon wire but the wire diameter was too small and I found it broke easily after being soldered. I had a length of telephone extension cable with six wires of small gauge in my workshop so used this instead. This proved to be perfect because it was flexible, can be twist easily and is strong.

Once all of the soldering was finished I lacquered the PCB.

FINALISED DESIGN LAYOUT

With all of the wires soldered to the PCB I crimped on female housing connector pins, inserted them to the housing and connected everything up. I retained the reset switch, buzzer and temperature sensors on the breadboard because they will be installed later. Using double sided foam tape I fastened each of the components to a piece of plywood.

Below is a photo of  the Micro SD card module.

And one of the RTC (Real Time Clock).

This is a close up photo of the PCB piggy backed onto the Arduino with wires soldered in place.

And finally one of the reset switch, buzzer and temperature sensors on the breadboard.

PREPARING THE CASING

The first thing I needed to do was to make a cut out for the LCD display. I measured the size of the LCD and marked the box using a vernier caliper. I then placed the box in my vice, ensuring the alloy was protected with thin cardboard. Using a 10mm drill I made a number of holes in the alloy.

I used a hacksaw to remove the majority of the alloy before using a file to file the edges.

The photo below shows the completed cut-out.

I centralised the bezel and marked the four corner holes. Using an M3 drill bit I drilled the holes and then fastened the LCD, clear plastic screen and outer bezel in place.

This photo shows how the LCD is mounted on the inside.

My project box has inner slots for inserting PCB. I measured the internal dimensions using a vernier caliper before cutting a piece of single sided PCB to size.

I then etched the PCB to remove all copper.

Using double sided foam tape I attached all of the components to the PCB.

When I cut the PCB I made sure it was exact, finishing off with a metal file to ensure a tight fit.

I then cut out a hole for the Arduino USB connector using a drill and jewellers files.

This photo shows the PCB containing all of the components inserted into the box and both ends attached.

With all of the components in place I decided on a location for the buzzer and marked two holes for the pins using a marker pen.

Using a pin vice and small drill bit I drilled the two holes and using double sided foam tape attached it to the PCB.

I then soldered on the alarm wires from the PCB before heat shrinking the connections.

I added a push to make switch for the reset. Pushing it will temporarily connect the reset pin to ground and restart code loaded on the Arduino.

The project box has a sliding cover which I decided to use as the back. After measuring the head and shank of the screw I was using to mount the box to the wall, I drilled holes slightly larger than the head and then filed slots to slide the shank into.

Using my Vernier caliper and spirit level I measured the position of the holes ensuring they were level. I then drilled the holes, inserted a raw plug and inserted the pan head screws.

More to come soon!

 

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.