An easy and immensely practical first Arduino project – making the lowly thermometer fun!
This is a terrific foray into working with your new Arduino. Not only is it a simple build but it will actually be incredibly practical and great to have around the house.
This project only has one input – temperature sensor, and one output – 7-segment display, so the wiring is not all that difficult. Click HERE and you’ll be redirected to an app, where the components for the project are already selected for you.
Here are the various components in a bit more detail:
- The temperature sensor has 3 pins – VCC, GND which provide power to the sensor, and DQ which is the data pin. Every component you use has a datasheet – this is where you can read about the component and learn what features it has and how it works.
- The 7 segment serial display can show 4 digits at a time. Each digit can be controlled separately. It can display numbers, letters and some special characters. The 7-segment display is a bit more complex to wire. As you can see it has 10 pin-outs. You won’t necessarily need to use them all and you can read more in the datasheet. You may have noticed that unlike the temperature sensor, the 7 segment display has holes and not pins. Therefore, you’ll need to solder male header-pins. Soldering may sound scary but it’s actually not that intimidating. There are great online tutorials you can use, here’s a good one by Sparkfun.
Next up is the breadboard. Breadboards are a basic prototyping tool that allows you to test different wirings without needing to solder the parts together.
In the wiring diagram on circuito.io you can see that this project is utilizing a breadboard. This saves up a lot of time and material. Once you have the final design, you can create a PCB or use a perforated prototyping board, like the one you see in the picture above.
This may seem like a lot, and it really is! But, don’t give up if you don’t understand everything quite yet. That’s part of the fun – learning while you make things!
Upon completion of the wiring, it’s time to look at the code. The code is basically a set of rules and instructions that tell your sensors and actuators what to do. If you want to understand a bit more about it, check out this info on Arduino code. To help with your understanding, you can also watch this 3 video series about programming for Arduino by ILTMS.
With this project, the data read from the DS18B20 temperature sensor is presented on the serial 7-segment display using the sevenSegment.write and the ds18b20.readTempC() functions. The specific code for this project is found on the Hackster project hub in the code section at the bottom.
You need to download this code and paste it into the firmware tab of your original code, as explained in the tutorial on Hackster.
Pulling all the parts of this project together, is a project called Sugru – a colorful and super-strong epoxy that you can mold to the shape you want and let dry. Once dry, this material is super-strong yet flexible.
Now you should have an accurate little temp taking device. Great job!