| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Class Sensors

Page history last edited by Zonker Harris 1 year, 11 months ago

Analog sensors can usually only measure one thing at a time. (Some analog "hot plate"-type Gas Sensors are an exception to this rule.) 

 

I2C sensors will often have more than one sensor on the package. They also usually have a small embedded controller on the sensor, which is taking the measurements, and communicating with the I2C bus. PLUS, you can daisy-chain many sensors to have multiple sensor types, sharing the same two Clock and Data lines.

  Most Arduino boards have six analog ports, as well as the I2C pins. This gives you a lot of flexibility! Let's look at the types of things that we can measure, and which sensors can do it.

 

Sensor type:  Analog   I2C

  • Temperature:  TMP36   DS18B20   MPL115A2   Si7021
  • Humidity:   DHT11   Si7021
  • Barometric Pressure:  MPL115A2
  • Infrared (IR) Light:   Si1145
  • Visible Light:  ALSPT19   Si1145
  • Ultraviolet (UV) Light:  VEML6070   Si1145
  • Color Detection:  TCS34725
  • Air Quality (CO2, VOC, Ethanol, H2, NH3): MiCS5524  CCS811 
  • Real-Time Clock (RTC):  PCF8523

 

   You can build a project that monitors the temperature and humidity in your bedroom as you sleep. You could also track the amount of Carbon Dioxide as well (which may be interesting, if you sleep with your door shut). The Real-Time Clock can add detailed time information regarding when each measurement set is made. It can use the amount of visible light to tell when you turned off the light, and when you turn it on again in the morning.

 

   You can build a project that uses the barometric sensor to detect when your room door is opened or closed! That puff of air just when the door is finally closing. And there's a small vacuum when the door is opened, until the door is opened enough for the air to get into the room easily. Those small changes are enough to be detectable! You could turn on an LED to indicate whether you detected an OPEN or a CLOSE event. If you add the Real-Time clock, you can also add time information using the Serial Monitor, as well as the open or close events. 

 

You get what you pay for (or "Precision is Pricey")

 

 Most of our sensors are great for monitoring ranges where people are comfortable. Most are pretty accurate from, for example freezing (0 C, 32 F) up to 30+C, 100 F. But, these are "commercial grade". If you want to measure down to -40 (where C and F meet!), or well above 100 F, you'll need to spend more money for sensors which are more rugged (often referred to as "military grade"), in order to get the extended ranges.

 

 The other thing to understand with the less expensive sensors is that they also have some lack of precision. They are pretty close to accurate. But, if you set up a sensor, and you record 999 readings in fairly short time, and then compare all the readings, you will likely find that the readings vary a small amount. And it's probably not too big a deal. And, if you connect many of the same type of sensor, and compare them at the same time, side by side, you will find there is a small range of readings. (To that point, we put six TMP36 analog temperature sensors on our Adalogger, and read all six sensors right after each other (as close to "the same time" as we could), and there was a range between them of 1.5 degrees C, as a min-to-max span. And, during the range of recorded readings, the variance of each of the sensors was ~1.2 degrees C.) But, for about $1.50(US) each, that's probably "close enough" for many of our projects. But be aware that batter precision will cost you a bit more money, and think about how much precision you might need for your project measurements.

 

 There are other I2C devices that you can use, but we didn't get them for our class.

Consider what you might be able to do with any of these devices;

 

 

Comments (0)

You don't have permission to comment on this page.