
An Introduction to Microcontrollers and Low-Cost Sensors
Microcontrollers
Affordable sensors and microcontrollers have revolutionized environmental monitoring. These tools are cheaper, easier to use, and more widely available than ever before.
Microcontrollers serving as the “brain” of these systemsโprocess and store data collected by sensors. This technological shift enables students, community groups, and everyday citizens to collect valuable environmental data alongside professional scientists, creating a more inclusive approach to protecting our natural world.

This is the Arduino Uno, one of the most popular microcontrollers. The Uno has many headers (black squares) with which external sensors can be connected via so-called jumper cables.

This is how a typical low-cost sensor looks like (simple and small).
This sensor can measure temperature, humidity, barometric pressure and VOC gas (Volatile Organic Compounds - gasses that humans can rarely detect - potentially causing health risks when breathed in).
Low-cost sensors
Think of low-cost sensors as the “eyes and ears” of the digital world but affordable and cheap. These tiny devices act like specialised human senses, they can detect temperature shifts, measure humidity levels, sniff out air pollutants, or test water quality. And some sensors go beyond what humans are capable of detecting – such as UV light or certain gasses.
Just as our senses help us understand our surroundings, these sensors gather crucial information about the environment around them. On that basis, informed actions can be performed, predictions can be calculated and recommendations can be given
Combined systems
When paired together, sensors and microcontrollers create a powerful team for environmental monitoring. It’s similar to how your eyes detect light and your brain processes that information to help you navigate a room.
The sensor detects environmental changes, and the microcontroller processes that data to trigger actions, record information or display data to the user. This affordable combination gives us real-time insights into our surroundings – whether it’s tracking air quality in a city, monitoring soil moisture on a farm, or alerting homeowners to water leaks. The data they collect helps us make smarter decisions about our environment, often before problems become visible to the human eye.

An Arduino Uno variant (many exist) monitors the soil moisture of a nearby planting pot and gives back the value with a display to be read by a human.
What kind of microcontrollers/microcomputers exist?
There is a very wide range of microcontrollers with different hardware specifications and therefore applications. For example, if we have a relatively simple project, a cheaper and smaller microcontroller is sufficient.
The most popular types of microcontrollers are presented below:

Arduino Uno R3:
The Arduino Uno is a popular microcontroller board based on the ATmega328P, widely used for learning electronics, prototyping, and DIY projects. It features digital and analog input/output pins, making it ideal for controlling sensors, motors, and displays. Its ease of use and strong community support make it a great choice for beginners and hobbyists.

Arduino Mega:
The Arduino Mega is a powerful microcontroller board with an ATmega2560 processor, featuring 54 digital I/O pins and 16 analog inputs. It is ideal for complex projects requiring multiple sensors, displays, or extensive data processing, such as 3D printers, automation systems, and advanced robotics. Its large memory capacity makes it suitable for handling demanding applications.

Arduino Nano:
The Arduino Nano is a compact version of the Arduino Uno, offering similar functionality in a smaller form factor. It is perfect for projects with space constraints, such as wearable technology, small robots, and embedded applications. Despite its size, it provides ample GPIO pins and USB connectivity for programming and power.

Raspberry Pi 4:
The Raspberry Pi is a small, affordable, single-board computer developed by the Raspberry Pi Foundation. It can be used for a variety of projects, including programming, home automation, media centers, robotics, and IoT applications. Due to its low power consumption and versatility, it’s popular among hobbyists, educators, and developers for learning and prototyping.

Raspberry Pi Zero 2 W:
The Raspberry Pi Zero W is a compact, low-power version of the Raspberry Pi with built-in Wi-Fi and Bluetooth, making it ideal for portable and embedded projects like IoT devices, camera modules, and lightweight computing tasks.

Raspberry Pi Pico:
The Raspberry Pi Pico is a microcontroller board based on the RP2040 chip, designed for real-time applications, low-power projects, and hardware control, such as robotics, sensors, and DIY electronics. Unlike other Raspberry Pi models, it doesn’t run a full operating system but instead executes code directly from microcontrollers like MicroPython or C/C++

ESP32 NodeMCU:
The ESP32 is a high-performance microcontroller with built-in Wi-Fi and Bluetooth, designed for IoT, smart devices, and wireless communication projects. It features dual-core processing, low-power consumption, and a wide range of interfaces, making it perfect for applications like home automation, weather stations, and real-time data logging. Due to its powerful capabilities, it is widely used in both hobby and industrial projects.

ESP8266 NodeMCU v3:
The ESP8266 is a cost-effective microcontroller with built-in Wi-Fi, ideal for IoT applications and wireless networking projects. Although less powerful than the ESP32, it is widely used for smart home devices, remote monitoring, and cloud-based automation. Its small size and low cost make it a favorite for simple internet-connected projects.

Calliope mini 3.0:
The Calliope Mini is an educational microcontroller designed to introduce children and beginners to coding and electronics. It features sensors, LEDs, buttons, and Bluetooth connectivity, making it ideal for interactive learning and creative projects. With its block-based programming support, it is widely used in schools to teach basic programming concepts in a fun and accessible way.
ARDUINO UNO R3

Arguably the most popular microcontroller. It can be programmed using the web browser or using a downloadable program. Your controller may look a little bit different from this image as there are some variants available for a lower price.
NODEMCU ESP23

The ESP32 is arguably the most popular IoT-chip in the world. Mounted on a NodeMCU devboard to be accessible by header pins makes it an incredible cheap (though slightly limited) platform for individual measurement devices.
RASPBERRY PI ZERO

This little board is more than a microcontroller – it is a little personal computer with an operating system. It is quite affordable at 15-25$. You can connect a screen via mini-hdmi as well as a mouse and keyboard via micro-usb (for example using an adapter) and program directly on the device – however, this requires a bit of in-depth understanding of the operating system and potentially other programming methods.
RASPBERRY PI 5

Very powerful computing device with advanced operating system capabilities – but much more expensive (~80-120$). Used for desktop applications with high computing requirements or resource intensive sensor calculations. Can also be very useful as an interactive programming environment on-board.
Which low-cost sensors exist and for what can they be used?
To measure environmental values, we need sensors. Low-cost sensors are a cost-effective and simple solution.
Below you will find a small overview with some example sensors:

Soil Moisture Sensor:
A soil moisture sensor measures the water content in the soil, helping to determine when plants need watering. It is commonly used in smart gardening, automated irrigation, and agricultural monitoring projects.

DHT22 Temperature sensor:
The DHT22 is a digital sensor that measures temperature and humidity with high accuracy. It is widely used in weather stations, climate control systems, and environmental monitoring applications.

DS18B20 temperature sensor:
The DS18B20 is a waterproof digital temperature sensor that provides precise readings over a wide range. It is often used in outdoor weather monitoring, liquid temperature measurement, and industrial applications.

Turbidity Sensor SEN0189
The SEN0189 turbidity sensor measures the cloudiness/turbidity of liquids, indicating water quality. It is used in environmental monitoring, wastewater treatment, and aquarium systems.

TDS Sensor:
A TDS (Total Dissolved Solids) sensor measures the concentration of dissolved solids in water, helping assess water purity. It is commonly used in water filtration systems, aquaponics, and hydroponics.

Gas sensor MQ-135:
The MQ-135 gas sensor detects air quality by measuring harmful gases like CO2, ammonia, and benzene. It is widely used in indoor air quality monitoring, pollution detection, and industrial safety applications.

Barometric sensor BME280:
The BME280 is a compact sensor that measures atmospheric pressure, temperature, and humidity. It is used in weather stations, altitude measurement, and climate monitoring.

Light & brightness sensor BH1750:
The BH1750 is a digital light sensor that measures ambient light intensity in lux. It is used in automatic lighting control, photography, and smart home applications.

Acceleration sensor ADXL335:
The ADXL335 is a 3-axis accelerometer that detects motion and tilt. It is commonly used in robotics, motion tracking, and wearable technology.

Microphone Max9814:
The MAX9814 is an amplifier module for microphones, featuring automatic gain control for clear audio capture. It is used in voice recognition, sound level monitoring, and audio recording applications.

Magnetic sensor QMC5883L:
The QMC5883L is a 3-axis digital compass sensor that measures the Earth’s magnetic field. It is used in navigation, robotics, and orientation detection.

Motion Sensor LHI778:
The LHI778 is a passive infrared (PIR) motion sensor that detects movement based on infrared radiation. It is used in security systems, automatic lighting, and motion-activated devices.
Other helpful components:
Apart from the microcontroller and the sensor, other components are often required to build a functioning system. These components are usually needed to visualize and store sensor data, to connect the individual sensors and components, or simply to supply them with power.
An overview of the most common and important components can be found below:

Power-bank / Power-supply:
A power supply or power-bank provides the necessary voltage and current to power microcontrollers and sensors. Power banks are commonly used for portable projects, while regulated power supplies ensure stable voltage for long-term setups.

LCD Display:
An LCD display is used to visually present text, numbers, or graphics in microcontroller projects. Common models like the 16×2 LCD or I2C OLED display are widely used in data logging, user interfaces, and monitoring systems.

Wires:
Jumper wires are flexible cables used to connect components on a breadboard or between modules and microcontrollers. They come in male-to-male, female-to-female, and male-to-female types, making rapid prototyping easier.

GPS GNSS Module:
A GPS/GNSS module determines precise location coordinates using satellite signals. It is widely used in navigation systems, tracking devices, and outdoor robotics projects.

GSM Module:
A GSM module allows microcontrollers to send and receive SMS, make calls, or connect to mobile data networks. It is commonly used in remote monitoring, IoT applications, and emergency alert systems.

SD-Card reader:
An SD-card module enables microcontrollers to read and write data on an SD card. It is useful for data logging, media storage, and recording sensor readings over time.

LEDs:
LEDs are small light-emitting components used as indicators, status lights, or even in visual displays. They are commonly used in debugging circuits, notifications, and decorative lighting projects.

Breadboard:
A breadboard is a reusable platform for building and testing electronic circuits without soldering. It allows easy connection of components, making it essential for prototyping and experimentation.

What else might be important or necessary for your DIY project?