Analog sensors

25. januar 2019

In this tutorial we will take a look at sensors that requires use of analog input only, electricity is of course also required. We will be using a Particle Argon along with a few analog sensors. A lot of other microcontrollers can also be used, that includes for example Particle Photon/Spark/Electron, ESP32 and Arduinos. However, we do recommend Arduino or microcontrollers from Particle if you are a beginner. We will demonstrate 3 different sensors that will run with the exact same simple code. A moisture sensor, flame sensor and a HotPot membrane potentiometer.

Hardware

1 x Particle Argon

1 x analog sensor

3 x wire

1 x breaboard

Schematics

Microcontroller(Particle Argon)

Sensor

GND (-)

GND (-)

3.3V/5V (+)

Vcc (+)

Analog pin(for example A1)

Signal pin

Connect the GND pin on controller to GND and 3.3V/5V(+) to Vcc(+). Then connect an analog pin from the controller to the signal pin on the sensor.

The picture below shows the wiring of a moisture sensor.

Connect any analog sensor in the same way. Just remember to check the layout of the pins on the sensor, it might be arranged a little different. Below is some example pictures of different sensors.