The Digital Thermometer

1. Contextual Challenge (the problem that needs solving)

Monitoring the household temperature is important to ensure you are using the least amount of energy need to maintain a comfortable room temperature and save money on energy costs. Most households only measure the temperature in the hallway with the thermostat. This does not usually match the temperature in each room. If you were able to monitor the temperature in an individual room, you may be able to lower temperature setting in the hallway and still keep the other rooms at a comfortable temperature, which will save on energy and save money.

2. Specification (the list of criteria than needs to be completed to solve the problem)

Must

Should

Could

Clearly display 3 different temperature ranges. Use minimal battery power so it is able to run for significant lengths of time. Be be housed in your own bespoke housing design.
Clearly point to a specific temperature range. Clearly display the temperature from a distance of at least 2 metres. The housing design could be personalised to match the theme of the room it is placed in.

Detect temperature accurately.

Soldered together using the appropriate PCB. Have more than 3 temperature points to monitor and display.

Have a method of testing the system is working correctly.

Include warning lighting to display the temperature extremes.   

Be housed in a stable body to prevent the product from falling over.

   

 

How do we measure temperature electronically?

Learn It

  • A thermistor is a thermal resistor - a resistor that changes its resistance with temperature. Technically, all resistors are thermistors - their resistance changes slightly with temperature - but the change is usually very very small and difficult to measure. Thermistors are made so that the resistance changes drastically with temperature so that it can be 100 ohms or more of change per degree!

Learn It

  • Digital signals are binary in nature.
  • There are many ways to describe the signal - On/Off, High/Low, 1/0.
  • Analogue signals vary over a range of values.

Try It

  • Let's build a simple circuit to try and get a GENIE chip to detect an analogue signal.
  • Use CircuitWizard to build the circuit shown below
  • When opening circuit wizard, you need to choose the 'Circuit with GENIE Flowchart' option.
  • You will find the Thermistor under 'sensors' in the drop down menu (temperature sensors a bit lower down in the menu).
  • You will find the Genie 08 under 'microcontrollers' in the drop down menu.

analogueCirc1.png

  • This circuit has an thermistor connected to the analogue input of the GENIE chip.
  • A thermal resistor (thermistor) is a resistor that responds to changes in temperature.
    • When the temperature is high, the resistance is low.
    • When the temperature low, the resistance is high.
  • This is known as a NTC (negative temperature coefficient) thermistor, which is indicated with the -t in the symbol.
  • A PTC (positive temperature coefficient) thermistor will increase resistance with temperature and visa-versa.
  • In theory we should be able to use the GENIE chip to detect temperature levels.
  • So that we can simulate the circuit, we need to give the GENIE chip a program.
  • Use this loop.

analogueCirc2.png

  • Micro-controllers can't detect resistances, they only read voltages. Let's have a look at the voltage drop between the input pin and ground for our circuit.
  • Recreate this circuit in Circuit Wizard and have a look at the voltage differences that are generated when the temperature levels reaching the thermistor are altered.
  • You will be able to view the analogue value changing when you change the light level by clicking on the 'View several monitor panes at once', this is on the right, highlighted in blue.
  • The voltmeter (V) can be found under 'Test Instruments' right at the bottom of the gallery.

  • As you can see, altering the temperature levels at the thermistor has a minimal to no effect on the voltage at the pin. While we could use a setup like this, we'd have a very insensitive detector.

Learn It

  • There's a way to provide a larger voltage differential at the pin, by adding a single resistor to the circuit.
  • We're going to create something called a potential divider.
  • Hint: You have learned about potential dividers before in the 555 Fan project in year 8. Click on this link to revisit it.
  • The visualisation below shows a standard set up for a potential divider. You can use the slider to alter the resistance of the thermistor, and type in values for the resistor beneath it. Look at what happens to the voltage readings for Vout_.
 

Badge It - Silver

  • Now you know how to set up an analogue sensor on the GENIE chip, use Circuit Wizard to create a temperature monitoring circuit.
  • We'll also need a switch connected to a digital input. You've done this before when you made the digital die. Have a look at this resource if you need reminding about digital inputs.
  • Once you've completed the inputs for the circuit, take a screenshot.

2 Setting up visual outputs

Try It

  • We're going to need a couple of LEDs (one red and one green) attached to the digital outputs of the GENIE chip.
  • Don't forget that LEDs are sensitive to large currents and can 'pop' if the current is too high. A couple of 330 Ω resistors should be sufficient to protect them

Badge It - Gold

  • Create a flowchart program that causes the LEDs to alternately flash on and off when the temperature levels reaching the thermistor are high.
  • Hint: You have learned how to program analogue inputs before in the PIC license in year 8. This used an LDR instead of a thermistor, but the coding is still the same. Click on this link to revisit the topic.

Badge It - Platinum

  • Create a flowchart program that saves the current temperature level reaching the thermistor in a variable, when the button is pushed.
  • The program should wait for a few seconds and then the LEDs should flash on and off if the temperature level goes above the recorded level.
  • Hint: You have learned how to record the value of the analogue inputs before in the Drawer alarm project. This used an LDR instead of a thermistor, but the coding is still the same. Click on this link to revisit the topic.