Emre's Bench

a place for the electronic hobbyist

Arduino Sensors and Input

Flames, Motion and More

There are tons of sensors out there for your Arduino. They range from user input devices like rotary encoders and joysticks to environmental sensors for detecting flames, rain, motion, sound, light, and more.

I've collected more than a few of these sensors and tried them out. Below are some the tutorials and articles that I've written for these sensors, typically including pinouts, connection diagrams, and example sketches.


KY-040 Rotary Encoder Module

KY-040 Rotary Encoder Arduino Manual and Tutorial

Rotary Encoders are a great means of establishing precise control. They not only provide a means of determining how much the knob has been turned, but in which direction. This Keyes KY-040 Rotary Encoder module is a great way to get started.

Read Article
Arduino Rain Detector Module

Arduino Rain Sensor Module

This device measures moisture. It provides both an analog and digital output. The digital output is set by a threshold potentiometer. The analog output varies depending on how much water is on the sensor board. Useful for controlling sprinklers or automated covers.

Read Article (Link TBD)
Flame Sensor Module

Arduino Flame Detector Module

A flame detector creates possibilities from turning power off if there is a flame or turning something on if there is no flame. I purchased and tested one of these and even discovered you could possibly use it for spark detection. It only required three connections to your Arduino.

Read Article (Link TBD)
IR Obstacle Detection Module

Arduino IR Obstacle Detection Avoidance Module

The module uses an infrared emitter and receiver to detect nearby obstacles. When an obstacle is detected, the output is sent low, allowing you to control output devices like motors and servos. This little brick only requires three Arduino connections.

Read Article
KY-002 Vibration Sensor Module

Arduino KY-002 Shock/Vibration Sensor Module

The Keyes KY-002 module is a popular way of detecting shock or impact. One application might be in a scale where you must have a steady reading before zeroing the device or getting an accurate weight.

Read Article (Link TBD)
KY-031 Knock Sensor Module

Arduino KY-031 Knock Sensor Module

This is a lot like the KY-002 vibration sensor. About the only thing that I noted was that it takes a stronger jolt to register. These little devices will run you about a buck.

Read Article (Link TBD)
Sound Detection Sensor Module

Arduino Sound Detector Module

The device detects sound that exceeds a set point (adjustable via potentiometer) and sends its digital output low. It also provides an analog output representing sound level. It offers a wide range of possibilities for creative minds.

Read Article
Robotale Slide Potentiometer Module

Robotale Arduino Slide Potentiometer Tutorial

This device has two outputs and is basically two 5K potentiometers controlled by a single slider. This article shows how to put it to use in your next Arduino project. Includes schematics and a sample sketch.

Read Article (Link TBD)
BH1750 Light Sensor Module

ICSG020A BH1750 Arduino Light Intensity Meter Tutorial

This device measures light intensity in Lux and uses an I2C Interface. It can be used to control lighting, solar devices, and backlights on displays. This tutorial will show you how to put this interesting sensor to immediate use with your Arduino.

Read Article (Link TBD)
TTP223B Capacitive Touch Sensor Module

Catalex TTP223B Arduino Capacitive Touch Sensor Tutorial

This is a robust and very capable input device. You put your finger on the sensor pad and it toggles the output from low to high (or momentary, depending on configuration). It is a solid alternative to mechanical push button switches.

Read Article (Link TBD)
KY-017 Mercury Tilt Switch Module

Keyes KY-017 Arduino Mercury Tilt Switch Tutorial

A neat little device if you need an inexpensive way of detecting whether or not your project has been tilted. It only requires three connections to your Arduino. Article includes schematics and an explanation of the operational states.

Read Article (Link TBD)
OH137 Hall Effect Magnetic Switch

OH137 Hall Magnetic Switch Arduino Tutorial

This magnetic switch detects the presence of a magnetic field (south pole) and provides a low output. It is commonly used in speed and proximity applications. They are incredibly cheap and easy to use.

Read Article
PS2 Joystick Module

PS2 Joystick Arduino Tutorial

This is a very versatile input device, similar to those used in game controllers. With solid programming, you can create a wide variety of operator input options. The key is understanding how direction (analog X/Y axes) and the button press (digital) are detected. Includes schematics, drawings and a sample sketch.

Read Article
GY-273 HMC5883L Magnetometer Module

GY-273 Magnetometer/Compass (HMC5883L)

This device reacts to the direction of the earth's magnetic field along three axes. As a result, it can measure heading (like a compass) and potentially detect tilt relative to the magnetic field. This quick start guide offers a means to put the module to an immediate test with your Arduino.

Read Article
IR Remote Control Kit

Xinda Keyes IR Remote Control Module Kit

Easy to use and real cheap. A simple way to add the ability to remotely control your Arduino just like you do your TV. This tutorial includes pin outs, descriptions, key value table, and two sample sketches.

Read Article (Link TBD)
Tiny RTC Module

Tiny RTC Real Time Clock Tutorial (DS1307)

Making decisions about measurements or control based on date and time is powerful. This device includes a battery holder and will keep the date and time even when power is removed from your Arduino. It communicates via I2C.

Read Article (Link TBD)
HC-SR501 PIR Motion Sensor

HC-SR501 PIR Motion Sensor Arduino Tutorial

This is a passive infrared (PIR) motion sensor module with adjustments for sensitivity and delay time. The device can detect motion from 3 to 7 meters. Triggering and time delay modes allow you to modify its behavior. This article shows you how to connect it.

Read Article