You are viewing outdated content for BUG. If you have a BUG Y.T. edition or 2.0 series device, please visit our updated wiki: http://wiki.buglabs.net



Temperature Sensor

From BUG Wiki

Jump to: navigation, search

Contents

Introduction

I wanted a reliable way to measure temperature with the bug device,

so I went to the electronic shop and asked if they had i2c sensors,but they didn't have one.

So at the end I bought a 2 Euros LM35 and at the end it worked quite easily

Pictures,wiring etc..

Warning

  • Be careful at what they say in the datasheet,in page 2 at the "TO-92 Plastic Package" they said bottom view,so do not think it's top view like I did at first,if you mistakenly invert the pins it heats really a lot and the maesurement are not correct..

"Circuit"/wiring

There are different ways to wire it:

  • using short wires(easier)
  • Making a circuit
  • using long wires.

If you use long wires you will need additional resistors,and to wire them as described in the LM35 datasheet. Thanks willis in #buglabs irc channel for pointing it to me(I had wrong values because I used long wires without additional resistors).

Short wires

  • connect the +Vs to the 5v

The connection to the ADC will depend on your program but if you use VonHippelAnalogDemo you could use the following wiring:

  • connect the ground to the ADC ground
  • connect the Vout to the ADC pin like pin 0 to 4

Circuit

The circuit has the shortest wires,but because it's close to the bugbase it has the following inconvenients:

  • could capture bugbase's heat(bad)
  • tied to vonhippel
PCB View of the electronic circuit
PCB View of the electronic circuit
Top View of the electronic circuit
Top View of the electronic circuit

How to interpret the results

Just multiply the voltage by 100,that is to say:

0.2147xxxxxV is 21,47 degrees C

The datasheet,for the most simple wiring(that I used) says that it outputs 10mv for a degree,linearly

Applications

  • The EMF logger application can be reused as-is,but the voltages displayed are a bit too much precise(too much decimals)
  • The vonHippelAnalogDemo is great for testing or if you need a GUI

Interesting external links