A fun and simple temperature indicator that you can build and experiment with...
We say 'temperature indicator' because this device is not a true thermometer (but 'Temperature Indicator' looks odd in a headline). It won't read in degrees Celsius, Fahrenheit, or Kelvin. One LED does not equal a certain number of degrees in any of those scales. However, it will still show hotter and colder within range safe enough to play with, and teach about thermistors and an LED driver at the same time.
The circuit is based around the LM3914, a bar or dot graph LED driver Integrated Circuit (IC). This IC compares a voltage at a signal input to an internally (or externally) set scale, and drives one of ten LEDs on its outputs to show where the voltage at the signal input is against the scale. The IC, by way of a resistor that we choose, sets the current through the LEDs so we don't need individual resistors on each one. The IC can be used for much more than sensing temperature, but that's an easy project to run with it.
In addition, we'll learn about voltage dividers and thermistors, also called Negative Temperature Coefficient (NTC) Resistors. All resistors have a change in value when temperature changes, but most are made to do this as little as possible. NTCs are made to do it at a much greater scale and in a predictable way. That makes them a handy temperature sensor.
We are going to build our temperature indicator on a piece of cardboard or foam core board, with the circuit glued onto the back. The sensor will be on a wire, which you can make longer if you want to. This allows you to dip it in liquids and the like, or just have it sitting in air.
SOME HELPFUL HINTS
We encourage you to read all the way to the end of the article before you build. Not only will you then have a better feel for the overall picture as you build, but we sometimes discuss options or alternatives that you will need to have decided on. You will need some basic hand tools for most builds. Small long-nosed pliers and flush-cut side cutters meant for electronics are the main ones.
Materials like tape or glue are mentioned in the steps, too. We always produce a tools materials list if you have to go shopping, but anything that is lying around in most homes is just stated in the steps.
As always with Kids' Basics, we avoid soldering to make the build more accessible to more people, but having an adult around can still be helpful. You won't need any particular skills besides being able to identify components at a basic level, and even then, we help as you go along. If, for example, you don't already know what a resistor is, you'll probably be able to work it out from the photos and description in each step.
We do provide a schematic or circuit diagram but this is just helpful if you already know how to read one. Don’t stress if you have never learned, but take the chance to compare the digital drawing of the breadboard layout (which we call a 'Fritzing' after the company that makes the software) to the schematic and see if you can work some things out.
You can make this project from the Fritzing and photos alone. You might also like to check out our Breadboarding Basics from Issue 15.
|1 x Solderless Breadboard||-||PB8820||P1002||DF-FIT0096|
|1 x Packet Breadboard Wire Links||-||PB8850||P1014A||SS110990044|
|13 x Plug-to-Socket Jumper Wires*||-||WC6028||P1021||ADA1954|
|1 x 330Ω Resistor *||R5||RR0560||R7546||DF-FIT0119|
|1 x 510Ω Resistor *||R3||RR0565||R7551||DF-FIT0119|
|1 x 910Ω Resistor *||R4||RR0571||R7557||-|
|1 x 1kΩ Resistor*||R1||RR0572||R7558||DF-FIT0119|
|1 x 3kΩ Resistor*||R6||RR0583||R7569||DF-FIT0119|
|1 x 1kΩ NTC Thermistor||R2||RN3436||-||-|
|1 x LM3914 LED Graph Driver IC||IC1||ZL3914||Z2670||-|
|10 x LEDs of Choice||LED1 to LED10||%||Z0003||DF-FIT0372|
|1 x 4xAA Battery Holder||-||PH9204||S5028 + P0455||ADA3859|
|4 x AA Batteries||-||SB2423||S4970B||PAKR-A0113|
* Quantity used, item may only be available in packs. % No Suitable Multipack, choose individual 5mm LEDs in different colours according to preference.
Assembly is straightforward, but you will need a hot melt glue gun, lots of care, and an adult if you are a younger builder. You will also need to poke holes in cardboard, which definitely needs an adult's help. An older helper like a teenage brother or sister would probably be ok too, but ask your adults what they think. Poking the holes usually involves scissors or a skewer, knitting needle, or pencil.
The LED colour is up to you. We used what we had on hand. It might also depend on what you plan to use the circuit for. For example, you could use red LEDs for hot, purple for in the middle, and blue for cold. We happened to have blue, yellow, and red on hand. You could also use red and green for a safe/not safe indicator, like for bath water
Mark a line on a piece of cardboard or foam core big enough to mount ten LEDs and hide both the breadboard and battery pack. Make the line at least 9cm long. Mark points every 1cm so the line has ten equally-spaced dots.
Use a pencil, scissors, knitting needle, or skewer to punch holes through the card at each dot. Push from the front, not the back. You might need to use a combination of these tools, like starting the hole with a skewer and then enlarging it with scissors. Be careful not to overdo it: The LEDs need to fit snugly in these holes.
From behind, mount the LEDs from the bottom to the top. The colours are up to you as explained earlier in this article, but ours were blue at the bottom for cold, and then yellow then red. Tack these in place with a small amount of hot melt glue. Make sure all LEDs are inserted with their long legs to the same side.
Bend all of the long legs forward so that they overlap each other. Starting at the end where the last one points, use small pliers to gently twist them together to join them electrically. For all of the short legs, bend them sideways and trim them in half.
Attach a plug-to-socket jumper wire to each exposed LED leg: All ten short legs, and one for the end long leg. Now cover all the connections with hot melt glue, so all the exposed metal is covered and the sockets are held firmly. Leave this to set solid.
Note: These jumper wires are not always good contacts, depending on the brand. You might need to remove the plastic housing and use just the metal clips, squeezing them with pliers.
Place the breadboard in front of you with the outer red (+) rail facing away from you and the outer blue (-) rail closest to you. Add the wire links which join the upper and lower red (+) rails together, and the upper and lower blue (-) rails.
Insert the LM3914 IC with its pin 1 dot or notch facing the left. Also add four wire links: One between pin 2 and the lower blue (-) rail; one between pin 8 and the lower blue (-) rail; one between pin 3 and the lower red (+) rail; and one between pin 6 and a spot off to the left.
Install three resistors. A 330Ω (ORANGE ORANGE BLACK BLACK SPACE BROWN) resistor goes between the lower blue (-) rail and pin 4; a 910Ω (WHITE BROWN BLACK BLACK SPACE BROWN) resistor goes between pin 4 and the wire link out to the left; and a 510Ω (GREEN BROWN BLACK BLACK SPACE BROWN) resistor goes between the wire link and the lower red (+) rail.
Add a 1kΩ (BROWN BLACK BLACK BROWN SPACE BROWN) resistor between the lower red (+) rail and pin 5 of the IC. Also, place a 3kΩ (ORANGE BLACK BLACK BROWN SPACE BROWN) resistor between pin 7 and the lower blue (-) rail.
Insert the legs of a 1kΩ NTC Thermistor into the sockets of two plug-to-socket jumper wires. The numbering system on NTC thermistors is a bit unusual: This one should be labelled 210. That's two zeros and ten, making one thousand. That's the other way to capacitors, where one thousand would be 102, for ten with two zeros after it.
Hot melt glue the legs and sockets so that there is no exposed metal, or places for water to enter the sockets, even at the back. Plug the pin ends into the breadboard. One goes to pin 5 of the IC, the other into the lower blue (-) rail. Also, plug the red and black wires into their places in the red and blue rails of the breadboard.
Attach the battery pack and breadboard to the card with either blue tac or hot melt glue. Now, starting with the lowest/coldest LED, plug its jumper into pin 10 of the IC. The LEDs go up in reverse order, with the second-lowest/coldest LED plugging into pin 11 of the IC, all the way to LED 9 at pin 18. The last LED, the hottest, goes over to pin 1 of the IC on the other side.
Add batteries to the battery pack and look at the front panel. One of the LEDs should be lit straight away. If not, take out a battery and check connections, starting with the power wires, and then the resistors. If you do get an LED light up, try pinching and holding the thermistor: after a moment when it has had time to absorb the warmth of your skin, a different LED should light. Again, if this is not the case, check connections, especially around the resistors.
HOW IT WORKS
There are two parts to this explanation: The LM3914 LED driver IC, and voltage dividers, of which we have two. It's best to start with voltage dividers. If you want a really deep explanation of these, including such basics as what fractions are and how to multiply them with M&Ms, see Classroom from Issue 51.
The basic idea of a voltage divider is that when you connect resistors in series (one after the other), the voltage across the total is shared between the resistors. It is shared according to the value (amount of resistance in ohms Ω) of each one. It is proportional, meaning that if there are two resistors and one is twice the size of the other, then the bigger one drops twice the voltage across it compared to the smaller one. It is easiest to think of these in fractions or decimals, but younger Makers will not have learned those yet. You won't have finished learning all there is to know about those until the end of year 6.
In the diagram, the left-hand divider has two equal resistors, so the 6V is shared equally across each. Six divided by two is three, so each resistor drops three volts across it. In the middle divider, one resistor is twice the size of the other. Even though there is more resistance in total than the first divider, the voltage still divides according to the amount that each resistor makes up from the total.
So, in this case, that's two thirds across the first resistor, and one third across the second, for a value of 4V and 2V in order. For the right-hand divider, we have three resistors of different values. The maths won't fit here, so check out Classroom 51 for more. However, you can see that the values of the resistors and the voltages dropped across them relate. You can also see in each case that the voltages dropped across each resistor in a divider always add up to the supply voltage.
Thermistors also work in voltage dividers, but because their resistance changes, the voltage across them in a divider changes. In our circuit, we have a 1kΩ thermistor, R2, connected with a 1kΩ fixed resistor, R1. However, the value of an NTC thermistor is generally its value at 25°C. At higher temperatures, the resistance falls. At lower temperatures, it increases.
The datasheet for each shows a graph with the temperature curve on it. Ours shows that for 0°C, the resistance will be around 1200Ω, while at 55°C, the resistance will be around 300Ω. We chose 55°C because this is the upper limit that hot water systems are limited to in many states of Australia, to avoid scald burns.
Credit: Uppermost Electronic Industries
Now, for the LM3914. We also have a Classroom on this for a deeper dive, in Issue 26. Pins 10 to 18 of the IC, and pin 1, are all LED outputs. They are active-low outputs, which means they go to ground when active and isolate when not active. This is why the LEDs are connected with their anodes (positive, long leg) to the supply voltage and their cathodes (negative, short leg) to the IC outputs.
There are no resistors because the current is limited by the IC, set by the resistor at pin 8, the 3kΩ R6. The current at the LEDs will be ten times whatever current is flowing through this resistor. How to calculate it is a big explanation, so stick with 20mA or check out the Classroom on the subject.
There is an internal reference for the voltage divider, but it is set up to go from supply to zero volts. Our thermistor divider does not. The signal from the thermistor divider is taken from the junction between the thermistor and 1kΩ resistor. This voltage varies with the thermistor value due to temperature, and is fed to pin 5, the signal input. This is the input that the LM3914 compares against the internal divider made up of ten 1kΩ resistors. However, even at 55°C, our voltage divider is not at 0V. So, we need to give it a lower limit.
Luckily, the LM3914 has two more pins to use, pin 4 RLOW and pin 6 RHIGH. Pin 4 is the lower end of the internal voltage divider, and pin 6 is the upper end. By connecting our own voltages to these pins, we can set the upper and lower limits of what the IC compares our signal to. We do this with another voltage divider, but a fixed one this time. It is made up of a 510Ω resistor R3, 910Ω resistor R4, and 330Ω resistor R5. The R3/R4 junction connects to Pin 6 RHIGH, while the R4/R5 junction connects to Pin 4 RLOW.
R in these labels means 'Reference', not resistance.
The idea here is that the 330Ω resistor gives around the same lower value as the value of the thermistor when at 55°C, while the value at the R3/R4 junction should be around the supply voltage minus 1.5V (a requirement of the LM3914). The 910Ω is roughly the amount of change on the thermistor, and the 510Ω value for the first resistor is chosen based on that to maintain proportions.
You might notice that the LEDs seem to be backwards here, LED 1 on pin 1 being the hottest. That's because our voltage divider's output rises as the temperature falls. The colder the thermistor, the more it makes up of the total voltage divider and the smaller the voltage at the junction.
WHERE TO NEXT
From here, you can fiddle with the values of the resistors in the voltage dividers to change the upper and lower limits. You might like to narrow the operation of the circuit by choosing values that use only a smaller part of the thermistor's range, such as air temperature. Having said that, the current set-up is not far off Australia's weather range anyway!
A room that is always air-conditioned, however, might benefit from a narrower range. You can also explore using two separate potentiometers as RLOW and RHIGH inputs. To do this, connect the outer terminals of the potentiometers to the supply rails (V+ and GND) and the wiper of one to pin 4 and one to pin 6. You can use these to explore the effects of different upper and lower limits.
It would also be interesting to use a potentiometer in place of R1 in the voltage divider. To do this it needs to be connected as a variable resistor. One terminal is connected to the supply rail, one to the thermistor, and the wiper is connected to the thermistor as well. Finally, you can explore swapping the position of R1 and R2.
The description here of the operation of the LM3914 is not very complete. It does the job for this circuit but the IC can do so much more. That's why we wrote Issue 26 Classroom on it! Kids' Basics readers come from all sorts of skill levels, so if you feel up to it, check out that article and see what else the LM3914 can do.
Of course, there are things you can do to dress up the temperature indicator. You could use oil pastels, as we have, to blend hot and cold colours like red and blue, to make a gradient down the face of the display. You could use a paper cut-out around the LEDs so that you don’t have to colour between them. We used a small strip of paper and a hole punch to get the effect. You could draw a thermometer, or find an image online and print it out, too. Whatever your imagination leads you to!