0% found this document useful (0 votes)
95 views

Arduino Sensor Modules

This document catalogs and provides instructions for various sensor modules from an Arduino compatible 37-in-1 sensor module kit. It describes the functionality and pinouts of modules including temperature, humidity, light, motion, infrared, magnetic, and sound sensors. Code examples are provided for reading sensor values and controlling outputs like LEDs.

Uploaded by

terraveracruz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
95 views

Arduino Sensor Modules

This document catalogs and provides instructions for various sensor modules from an Arduino compatible 37-in-1 sensor module kit. It describes the functionality and pinouts of modules including temperature, humidity, light, motion, infrared, magnetic, and sound sensors. Code examples are provided for reading sensor values and controlling outputs like LEDs.

Uploaded by

terraveracruz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Arduino Sensor Modules - Description &

photos
Cataloging modules from the dx.com ARDUINO Compatible 37-in-1 Sensor Module
Kit (DX SKU 142834.) which was used in the first MHV arduino workshops.

Some other places with cataloging info are:

http://www.arduinosale.com/buy-arduino/arduino-sensors.html (individual
sensors for sale)
http://club.dx.com/forums/Forums.dx/threadid.1202308 (DealExtreme forum
thread)

Modules with red circuit boards


Including:

Microphone sound sensor module KY-038


Hall magnetic sensor module KY-003
Metal touch sensor module KY-036
Infrared emission sensor module KY-005

These boards are all a common pattern, on a red circuit board. They have two outputs,
one is a digital output that triggers Low→High based on the sensor level and the other
is an analog output that is the exact level of the sensor.

The boards have two LEDs - one for power (L1) and one connected to the digital
“trigger” output (L2.)

Turn the screw on the potentiometer (blue module) to tune in the level that the digital
output triggers on.

Pin Label Arduino Connection


1 AO Analog input
2 G Ground (GND)
3 + 5 volt power
4 DO Digital input

Sample code

Reads the analog and digital outputs and prints them to the serial port.

// Arduino pin numbers


const int DO_pin = 2;
const int AO_pin = 0;

void setup() {
pinMode(DO_pin, INPUT);
Serial.begin(115200);
}

void loop() {
Serial.print(digitalRead(DO_pin));
Serial.print("-");
Serial.println(analogRead(AO_pin));
delay(5);
}

Temperature sensor module KY-001


The sensor on this module is DS18B20. This page has a good introduction and sample
code - http://bildr.org/2011/07/ds18b20-arduino/ The only difference is that our module
is already mounted with the resistor in the circuit, and a slightly different pinout. The
module has pin 1 (-) to ground, pin 2 to 5V and pin 3 (S) to the digital sensor input on
the arduino.

Temperature and humidity sensor module KY-015


The sensor on this module is DHT-11. This page has a good introduction and sample
code http://www.hobbyist.co.nz/?q=documentations/wiring-up-dht11-temp-humidity-
sensor-to-your-arduino

Our module has a different pinout to the bare sensor - pin 1 (S) is data signal, pin 2 is
5V power, pin 3 is GND.

Some of you have have the bare sensor

This is a nice tutorial for the bare module

Photo resistor module KY-018


Temperature sensor module KY-013
These modules are the same, they're all on boards labelled “S1”. THE PINS ARE
MARKED BACKWARDS ON THESE.

Has pin 1 (marked S) (GND), pin 2 (5v power) and pin 3 (marked -) (analog signal.)
EDIT 2014/05/23 by Philips I just want to share what I have encountered as a thank you
for your providing all this information. I have these KY-013 temperature sensors too
(ordered from banggood.com). As of the date of this edit, I have discovered that my
units have the labels NOT reversed, i.e. mark S is the analog signal, and mark - is the
ground. Center pin remains as the 5V power. Hope this helps.

2-color LED module KY-011


Yin Yi 2-color LED module 3MM KY-029
These two modules are the same, just different sized LEDs (KY-011 is big, KY-029 is
small.)

You can think of the 2-color LED like 2 separate LEDs (a green one and a red one) in
one package, sharing one negative lead (this lead is the cathode so these are called
'common cathode' LEDs.)

Pins are 1 (-) ground, 2 green, 3 red. There are no current limiting resistors on the
modules, you need to add resistors.

You can follow the steps for the Arduino blink tutorial. First connect the red resistor,
pin 3 (+) & 1 (-) and then once that works try to expand the sketch to also blink green
on pin 2 (+) & 1 (-).

3-color LED module KY-016


3-color full-color LED SMD modules KY-009
You can think of these 3-color LEDs like 3 separate LEDs (a red one, a green one and a
blue one) in one package, sharing one negative lead (this lead is the cathode so these are
called 'common cathode' LEDs.)

The positive pins are numbers 1,2,3 and pin 4 Ground. There are no current limiting
resistors on the modules, you need to add resistors.

There's a good example here: http://wiring.org.co/learning/basics/rgbled.html - only


difference is they have different pins on their LED compared to the module.

Magic light cup module KY-027


These modules have two parts - an LED and a mercury tilt switch.

Pins are 1 G (ground), 2 + (5V power), 3 S signal and 4 L (LED.)

If you wire up 1 & 2 to power, pin 3 (signal) will alternate between 5V (HIGH) and 0V
(LOW) as you tilt the module.

If you connect a current limiting resistor to L2, you can use it as a blinking LED.
You might also be able to have the LED automatically blink with the sensor…

infrared sensor receiver module KY-022


See this page for more information: http://learn.adafruit.com/ir-sensor/overview

Mini magnetic reed modules KY-021


THE PINS ARE MARKED BACKWARDS ON THESE.

Has pin 1 (marked S) (GND), pin 2 (5v power) and pin 3 (marked -) (digital signal.)

The digital signal changes when you move a magnet close to it.

open mercury KY-017 optical modules


led comes on when switch is on.

tilt switch modules KY-020


Digital output. Probably just a mercury switch.

Hit sensor module KY-031


According to this page http://www.arduinosale.com/buy-arduino/arduino-sensors/keyes-
division-easy-to-hit-the-sensor-module-arduino-ky-031.html

… that's what this is. My quick tests didn't reveal how it worked, though…

5V relay module KY-019


A relay is like an electrically powered switch. Pins on this module are Pin 1 S (digital
on/off), Pin 2 + (5V) and Pin 3 - (Ground.)

On the other side of the relay are screw terminals that the relay switches between when
it changes.

There are some good tips about using relays to drive higher power devices like 12V
pumps or solenoids here: http://blog.trossenrobotics.com/2012/07/27/howto-controlling-
solenoids-pumps-and-more-from-your-arduino/

Active buzzer module KY-012


See http://arduino.cc/en/Reference/Tone

XY-axis joystick module KY-023


Pins:

Pin
Label Signal Connect To
Number
1 GND Ground
2 +5V 5V
Voltage proportional to X
3 VRx An analog input pin
position
Voltage proportional to Y
4 VRy An analog input pin
position
Shorts to ground when switch is
5 SW Joystick pushbutton
pushed

Sample Code

This code reads the switch and the position of the joystick and prints it to the Arduino
serial port.

// Arduino pin numbers


const int SW_pin = 2; // digital pin connected to switch output
const int X_pin = 0; // analog pin connected to X output
const int Y_pin = 1; // analog pin connected to Y output

void setup() {
pinMode(SW_pin, INPUT);
digitalWrite(SW_pin, HIGH);
Serial.begin(115200);
}

void loop() {
Serial.print(digitalRead(SW_pin));
Serial.print(" @ ");
Serial.print(analogRead(X_pin));
Serial.print("x");
Serial.println(analogRead(Y_pin));
delay(10);
}

KY004 Press Switch


// Arduino pin numbers
const int DO_pin = 2;

void setup() {
pinMode(DO_pin, INPUT);
digitalWrite(DO_pin,HIGH);
Serial.begin(115200);
}

void loop() {
Serial.println(digitalRead(DO_pin));
delay(5);
}
Obstacle avoidance sensor module KY-032
There seem to be two of these, one with 4 pins and one with 3 pins. They both use an
infrared beam to detect proximity of obstacles.

The potentiometers can be used to adjust sensitivity.

4 pin version

Pin 1 is Ground, pin 2 is 5V power, pin 3 is digital output (on/off depending on the
beam), 4 is enable (don't know what it does.)

3 pin version

Pin 1 is ground, pin 2 is 5V, pin 3 is digital output (on/off depending on the beam.)

Detect the heartbeat module KY-039


We couldn't make this one work. I too tried to get this to work and it does not and my
kit came with 2 units both failed..

Visitar site >> https://wiki.makehackvoid.com/workshops:arduino:dxmodulepack

You might also like