Space Science Blog

Bringing You The Future Of Science and Technology


In this article, I will show you how to build your own Arduino-based environmental scanner that will display analog and digital sensor data onto a webpage which can be accessed by any device connected to your local network.

Artificial Intelligence | DIY Electronics Projects | Game Design Workshop | Random Generators | Planetary Science | Rocket Science


Art and Web Design

Contact me for information about rates and availability.

Latest Articles

 Environmental Scanner - Arduino-based Sensor Array

Environmental Scanner
The Environmental Scanner project began as a simple Arduino-based, environmental monitoring and alert system. Featuring and array of Adafruit and SparkFun electronic sensors, Arduino Uno and an ethernet shield, the Environmental Scanner will host a webpage containing sensor readings and alerts. This webpage will display the current sensor readings, which will refresh every few seconds and will send an alert when sensor levels exceed certain, predefined thresholds.

**This project requires access to a router or switch on your local area network, with one open port.

In a future project, two additional microcontrollers will be added (another Arduino Uno combined with a motor shield and a Raspberry Pi with a Rasperry Pi camera module) will be added to the Environmental Scanner to create the ultimate environmentally aware robot using a variety of off-the-shelf sensors and MakeBlock hardware for the chassis and motor servos to control the camera.

 Components and Sensors

Arduino with breadboard

Electronic sensors are ideal for sensing the world in ways that humans are incapable of, due to the limited range of our sensory organs, specifically our eyes and ears. The more sensors you add to your Arduinio-based environmental scanner, the better it will be able to sense and interact with its environment.

This environmental scanner is designed to detect the temperature and humidity (KY015), light (KY-018), water (Water Level sensor), smoke (MQ2), gas (MQ3) and electro-magnetic fields (KY-003).

I used an Arduino Uno and an Ethernet sheild instead of a Raspberry Pi with built-in wireless capabilities, because many of the sensors used in this project are analog (Raspberry Pi GPIO pins are digital only). It is possible to install analog sensors on the Rasberry Pi, but this may require the use of one or more analog to digital signal converters.

 Putting It All Together

Begin by mounting the breadboard and Arduino Uno to the acrylic mounting plate using the male-female standoffs and matching screws. Half-sized solderless breadboards usually include a sticky foam strip on the bottom which can be used to mount the breadboard to the acrylic mounting plate.

Breadboard Arduino Uno

Next, press the ethernet shield onto the Arduino, careful not to bend any of the pins, and then add the electronic sensors to the breadboard. Connect the sensors to the Arduino/Ethernet-Shield using the connector wires. Connect the ethernet shield to your switch or router using a Cat5 ethernet cable.

Arduiono and Ethernet Shield

  • Smoke Sensor = A0
  • Light Sensor = A1
  • Alcohol Sensor = A2
  • Hall Sensor = A3
  • Water Sensor = A4
  • Temp/Humidity Sensor = D2
  • Active Buzzer = D3

Connect the electronic sensors to the pins listed above (A = Analog pin; D = Digital pin). Connect to the Arduino uno using a USB 2.0 A male to B male cable. The square end of the USB cable will connect to your Arduino and the flat end connects to a USB port on your computer. If you have not done so already, install the lastest Arduino integrated development environment (IED). The Arduino IDE will run on Windows, Linux (to include Raspberry Pi) and Mac OS X systems.

**If you have not installed the latest Arduino IDE do so now.

Open the Arduino IDE and ensure that you are properly connected to the Arduino by clicking on Tools >> Board>> Arduino. If you are using a different board than the Uno, choose the appropriate board from this list. Next, click on Tools >> Port: and choose the COM port associated with your device. If you have multiple Arduinos connected, make sure to choose the correct device. You will also need the following libraries installed: SPI (serialperipheral interface) library, Ethernet library, Adafruit Sensor library, and DHT sensor library.

Arduino IDE - Board Arduino IDE - Port

You can access the Arduino code (witten in C++) for this project from my GitHub repository here:

Johnathan Nicolosi - 23 Sept 2017