SXAM: A Spark.io Indoor Ambient Quality Monitor

XAM is a Spark.io indoor ambient quality monitor.
SXAM A Sparkio Indoor Ambient Quality Monitor

SXAM (Spark to Xively AMbient quality monitor), is an ambient quality monitor that logs 4 environmental parameters to the xively.com and display the ambient status by using for RGB leds.

SXAM logs:

  • Humidity
  • Temperature
  • Ambient noise
  • Brightness

Note: Spark.io is now Particle.io.
This project it is built upon the spark xivelylib you can found here:Β https://github.com/davidegironi/spark-xivelylib
A web page can be used to set the xively feed and API token.

The WiFi network connection can be configured through the Spark.io app.
ForΒ humidityΒ andΒ temperatureΒ aΒ DHT22Β sensor it is used.

To measureΒ ambient noiseΒ an analogic noise sensor built with aΒ electret microphoneΒ and a opamp it is used.

BrightnessΒ it is measured by aΒ BH1750Β sensor board.

I would like to thank my friend Matteo for cutting me the beautifull vinyl sticks for this project.
RGB leds are WS2812B, that types of leds are easy to drive.
For each of those sensor appropriate library are used.

Ambient noise and brightness are sampled 10 times per second, in order to give the led feedback almost instantly. Humidity and temperature have slower samplerate.
Ambient levels average it is computed and then posted to xively.com every minute.
Each parameter can be changed at compile time.To run this project you have to create a new app in the Spark Build environment. Then you should add that libraries:
  • NeoPixel
  • AdaFruit_DHT
  • XivelyLIB
  • BH1750LIB
  • AudioGetAverageLIB
Add a config.h file to your project.
Copy and past the source of this project (see below for the project code), to your newly created file.
Edit the config.h according to your needs.
Now you should be able to compile this code and run it on your device.
It will be be easy to add new sensors.
For more detail: SXAM: A Spark.io Indoor Ambient Quality Monitor

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.