Temperature Sensor Project Help

Discussion in 'The Projects Forum' started by jrburke99, Feb 26, 2013.

  1. jrburke99

    Thread Starter New Member

    Feb 25, 2013
    I am hoping to get some advice on a little project I want to build. I have very little electronics experience, but I learn quickly. I want to build a device that senses the ambient temperature in my son's room, and then either turn on an IR LED if the temperature is below a certain temp, leave it OFF if within an acceptable temp range, and BLINK the IR LED if above a certain temp. I want the acceptable temp range to be about 20C-22.78C.

    For a temperature sensor, I was thinking of using the TMP37, because it outputs at 20mV per degree, which would give me finer tuning over the more common TMP35 and 36, which outputs at 10MV per degree.

    I am trying to decide between creating a circuit using an XOR gate and 2 PUTs to direct the flow to either an ON circuit, or a blinking circuit based on the temperature output...OR using an Arduino to program an ATtiny and simply connect the temperature sensor and IR LED to that and program it to do the same thing.

    I need to know which of these options will be cheapest and use the least power. I already have an Arduino. I also want it to be as small as possible, so using small batteries will be necessary. I was thinking of using either a couple button batteries (2032), or maybe 2 AAs (Alk or Rechargeable). A cheap, rechargeable Lithium camera battery might also do well. I just don't want to be changing batteries every month. So I guess I am planning on supplying 3-3.3V.

    I know about sleep mode on the ATTiny, and I am hoping I can have it sleep for 5 minutes, wake up and take some temp readings and find the average, then hopefully if within the acceptable range, go back to sleep. If outside the range, it will either blink the light, or turn it on steady, and then check again in another 5 minutes. If the temp is outside, and it turns the LED ON, will it be able to go back to sleep, or will that turn the LED OFF? If it will prevent sleeping, I could throttle it down to a low power mode.

    Thank you for any suggestions you may have! I am excited to learn more!
  2. MrChips


    Oct 2, 2009
    Actually, this makes an excellent starting project for someone new to electronics.
    I don't think it matters much whether you choose TMP35/36/37 or the more common LM35.

    I think the application and solution is simple enough that you don't need a microcontroller (mcu). In any case, an Arduino is going to consume more current, much more than a very low power mcu.

    Your biggest power consumer will be the LED. To conserve energy you can make the LED flash instead of being on continuously.
  3. jrburke99

    Thread Starter New Member

    Feb 25, 2013
    I wouldn't be using a full Arduino....I would just program an ATTiny with an Arduino (for simplicity), and then transferring the chip to a final project board. So I would have battery, ATtiny, resistor, and IR LED. Would I need anything special to make the ATTiny execute in that environment? I', not real clear on what is on the Arduino board just for programming/USB interfacing, etc., and what is needed just to drive the program on the microcontroller. But would I use more power in an ATtiny in sleep mode, or in a circuit powering the temperature sensor constantly, and supplying voltages to the gates of 2 PUTs, and also to one input of an XOR gate?
  4. JMac3108

    Active Member

    Aug 16, 2010
    If you go the micro-controller route ...

    You could consider using a "digital" temperature sensor such as the LM95071. This is a part with a SPI serial interface. You read the temperature directly from the part over the SPI bus. Unlike the LM35 or similar, there is no low level analog signal to deal with, and therefore no noise issues.

    I don't use the Aurduino, but my understanding is that it has a library of ready-to-go functions. If this is the case, getting the SPI bus working to read the LM95071 would be no harder than getting the ADC working to measure the voltage from an LM35. Right?