Arduino | 37 in 1 Sensors Kit Explained




Introduction: Arduino | 37 in 1 Sensors Kit Explained

About: Hi there visitor! First of all thank you for checking out my profile! My name is Youri. I study Technical Computer Science in the Netherlands. I especially love the electronical part of my study. Since I lov…

Hi there, Arduino enthousiasts!

In this Instructable I will be explaining the basics about all the individual sensors in the "37 In 1 Sensors Kit For Arduino".
Every Step will contain a tiny bit of information about one sensor and a basic code will be provided.
Most of the codes use a LED on pin 13.

The kit contains:

  1. JoyStick
  2. Flame Sensor
  3. RGB LED
  4. Heartbeat Sensor
  5. Light Cup
  6. Hall Magnetic Sensor
  7. Relay
  8. Linear Hall Sensor
  9. SMD RGB
  10. 7 Color Flash
  11. Tilt Switch
  12. Temperature Sensor
  13. Big Sound Sensor
  14. Touch Sensor
  15. Two-Color LED
  16. Laser Emitter
  17. Ball Switch
  18. Analog Temperature Sensor
  19. Small Sound Sensor
  20. Digital Temperature Sensor
  21. Two-Color LED (small)
  22. Button
  23. Photoresistor
  24. IR Emission
  25. Tracking Sensor
  26. Buzzer
  27. Reed Switch
  28. Shock Sensor
  29. Temperature And Humidity Sensor
  30. IR Receiver
  31. Avoidance Sensor
  32. Passive Buzzer
  33. Mini Reed
  34. Rotary Encoders
  35. Analog Hall Sensor
  36. Tap Module
  37. Light Blocking

Please note that none of the provided codes are mine. I tested them all and they work fine.

Step 1: JoyStick

The JoyStick is a analog sensor that can be used to control your arduino.
Analog JoySticks are basically potentiometers, so they return values which can be made visible using the provided code in this step.

By clicking the serial monitor you will see the values. Once you move the JoyStick the values will change. This code is also handy if you want to control your Arduino using a JoyStick.

Step 2: Flame Sensor

These sensors are used for short range fire detection. They can be used for safety or to monitor projects.

Step 3: RGB LED

This LED contains light emitting diodes. A red one, a green one and a blue one. Combining those into one LED will give you a RGB LED. You can all different kind of things with this LED.

Step 4: Heartbeat Sensor

This sensor uses a bright IR LED (infrared) and a phototransistor to detect the pulse of the finger.
A red LED flashes each pulse.

Step 5: Light Cup

The Light Cup modules contain Mercury Switches that provide a digital signal. The LED's are dimmable.

To use this module you need at least two. (Ofcourse the kit includes 2)

Step 6: Hall Magnetic Sensor

The Hall Magnetic Sensor is a magnetic switch. If no magnetic field is present, the signal line of the sensor is HIGH. If a magnetic field is presented to the sensor, the signal line goes LOW, at the same time the LED on the sensor lights up. The polarity of the magnetic field is of influence to the switching action. The front side of the sensor needs the opposite polarity as the back of the sensor to switch on.

Step 7: Relay

A relay is used to switch high voltage applications using a lower voltage. This is often used in houses as well since it's a safe option to switch on and off high voltages.

You apply a small voltage (5V) to one side of the relay and it will switch the other side on or off.

Step 8: Linear Hall Sensor

This sensor produces a voltage when placed into a magnetic field. The voltage can be used to control your Arduino.

It is a analog sensor which means it can read out the value of the magnetic field.


This LED contains light emitting diodes. A red one, a green one and a blue one. Combining those into one LED will give you a RGB LED. You can all different kind of things with this LED.

So, this LED is basically the same as the one in step 3. The only difference is the package.

Step 10: 7 Color Flash LED

This LED automatically switches between 7 colors. The LED has a integrated IC. If you disconnect the LED the colors will reset and the animation will start over.

Step 11: Mercury Tilt Switch

The Tilt Switch is a mercury tilt switch that allows you to detect the tilt of your object. It provides a digital output.

Step 12: Temperature Sensor

This temperature sensor outputs a analog signal. The sensor is accurate which makes it useful for precise appliances.


Step 13: Big Sound Sensor

This sensor can detect sound and outputs both a analog signal as well as a digital signal that can be used to for example create a clap on/clap off light switch. This sensor is very useful with the relay module.

Step 14: Touch Sensor

This sensor will provide a signal when a finger (or any other body part) touches the bent pin of the transistor.

It can be used as a switch.

Step 15: Two Color LED

This LED contains two light emitting diodes. One pin is the GND and the other two are for a red and green LED.
By powering both GND and one of the pins you can see one of the colors. You can also power GND and both pins at the same time to mix the color and get a yellow/orange color.

Step 16: Laser Emitter

This is a laser module that emits a laser light when powered. There is also a signal pin that allows you to make the laser blink for example.

Step 17: Ball Switch

This sensor contains a small metal ball which will complete a circuit depending on the position in the sensor. Because the sensor is very basic, it can only detect large changes when its tilt, and can not measure the angle of its tilt.

Step 18: Analog Temperature Sensor

The analog temperature sensor acts as a variable resistor (NTC/PTC). As temperature increases, the sensor will decrease it’s voltage output. Once we can measure the voltage output, we can calibrate the sensor and convert the output in voltage to temperature.

Step 19: Small Sound Sensor

This sensor can detect sound and outputs both a analog signal as well as a digital signal that can be used to for example create a clap on/clap off light switch. This sensor is very useful with the relay module.

This sensor is exaclty the same as his larger brother.

Step 20: Digital Temperature Sensor

This is the same temperature sensor as stated in a previous step, but this one outputs a digital signal instead of a analog signal.

Step 21: Two Color LED (small)

This LED contains two light emitting diodes. One pin is the GND and the other two are for a red and green LED.By powering both GND and one of the pins you can see one of the colors. You can also power GND and both pins at the same time to mix the color and get a yellow/orange color.

This is the same LED as stated in a previous step, but smaller.

Step 22: Button

This is, ofcourse, a push button. Nothing more, nothing less...

It outputs a digital signal.

Apart from that there isn't much to say about this module.

Step 23: Photoresistor

This is a variable resistor. The resistance value depends on the amount of light coming onto the LDR (Light Dependend Resistor).

This could be used to switch on a light when it becomes dark.

Step 24: IR Emitter

This is a LED that emits a IR (infrared) Light that can be used to for example control your TV or as a light source for a IR security camera.

No code has been provided since IR has different effects on all electronics so there is no point in writing a "universal" code.

Step 25: Tracking Sensor

This sensor can detect lines in black and white. You could for example make a robot/car follow a line.

Step 26: Buzzer

This active buzzer is easy to use and you can have a lot of fun with it. You can even program full songs into your Arduino and have the buzzer play them!

Step 27: Reed Switch

A reed switch is a switch that needs a magnet in front of it to switch on or off. This works the same for the Arduino module.

Step 28: Shock Sensor

This sensor module can detect vibrations/shocks. It's switched off in the neutral state and will switch on when it catches a vibration.

Step 29: Temperature and Humidity Sensor

This sensor can monitor the temperature and humidity. Since it's so small it's not very effective in larger area's, but it works fine in for example a reptile sanctuary.

Step 30: IR Receiver

This module can be used with the IR Emitter. You can also use this in combination with a TV remote to control your Arduino.

Step 31: Avoidance Sensor

This sensor uses a infrared emitter and receiver to check whether there are any obstacles in front of it. This can be useful for a robot.

Step 32: Passive Buzzer

This buzzer is the same as the one stated in a previous step. The only difference is that this one has a better frequency control.

It also needs a different kind of code in order to work.

Step 33: Mini Reed Switch

This reed switch works the same way as the one stated in a previous step. It's just a smaller version.

Step 34: Rotary Encoder

By rotating the rotary encoder can be counted in the positive direction and the reverse direction during rotation of the output pulse frequency, unlike rotary potentiometer counter, which Species rotation counts are not limited. With the buttons on the rotary encoder can be reset to its initial state, that starts counting from 0.

Step 35: Analog Hall Sensor

The analog hall sensor is an analog magnetic field sensor module. The strength of the field is given by an analog voltage at the signal pin of the module. The output signal is, ofcourse, a analog signal.

Step 36: Tap Module

The knock sensor, detects the knocks and the taps. It can work like a switch. The sensor sends data momentarily to the board. To keep the LED on, the button state change codes should be used. So the sensor will work as a switch.

You could also use a piezo element.

Step 37: Light Blocking Sensor

This is a light block sensor module, where there is an object in the middle of the U shape. The sensor will output a high level signal.

1 Person Made This Project!


  • For the Home Contest

    For the Home Contest
  • Make It Bridge

    Make It Bridge
  • Big and Small Contest

    Big and Small Contest



2 years ago

Here Is a list that might help you identify each board:

37 In 1 Sensor Module Board Set Starter Kit Item ID Description 27 HW Laser transmit
module 20 HW-040 Rotate encode
module 3 HW-477 Two color
common cathode RG LED module 12 HW-478 RGB colorful
LED SMD module 10 HW-479 RGB LED module 4 HW-480 Two color
common cathode GR LED module 14 HW-481 Colorful auto
flash module 28 HW-482 Relay module 8 HW-483 Push button
module 15 HW-484 Magnet-ring
reed switch sensor module 26 HW-485 Large sound
microphone voice sensor module 7 HW-486 Photo resistor
sensor module 21 HW-487 Light break
sensor module 11 HW-489 Infrared
transmit module 17 HW-490 Infrared
receive sensor module 33 HW-491 Flame sensor
module 16 HW-492 Hall sensor
switch module 37 HW-494 Touch sensor
module 18 HW-495 Analogy hall
sensor module 34 HW-496 High sensitive
microphone voice sensor module 23 HW-497 Magnetic
reed spring module 29 HW-498 Analog
temperature sensor module 19 HW-499 Magic ring cup
moduleMercury tilt + RGB led 5 HW-500 Knock sensor
module 9 HW-501 Tilt switch
module (ball) 22 HW-502 Finger pulse
sensor module 31 HW-503 Digital
temperature sensor module 36 HW-504 Joystick PS2
module 13 HW-505 Mercury Tilt
Switch (Hydrargyrum) module 30 HW-506 18b20
temperature sensor module 35 HW-507 Humidity
sensor module 2 HW-508 Passive buzzer
module 32 HW-509 Linear hall
Sensor module 25 HW-511 Tracking
sensor module 1 HW-512 Active buzzer
module 6 HW-513 Shock switch
sensor module 24 KeyesIR Obstacle
avoidance sensor module


1 year ago on Step 5

//Magic cup minor code corrections
int LedPinA = 5;
int LedPinB = 6;
int ButtonPinA = 7;
int ButtonPinB = 4;
int buttonStateA = 0;
int buttonStateB = 0;
int brightness = 0;
void setup ()
pinMode (LedPinA, OUTPUT);
pinMode (LedPinB, OUTPUT);
pinMode (ButtonPinA, INPUT);
pinMode (ButtonPinB, INPUT);
void loop ()
buttonStateA = digitalRead (ButtonPinA);
if (buttonStateA == HIGH&&brightness!= 255)
brightness ++ ;
buttonStateB = digitalRead (ButtonPinB);
if (buttonStateB == HIGH&&brightness!= 0)
brightness -- ;
analogWrite (LedPinA, brightness); // A few Guan Yuan (ii) ?
analogWrite (LedPinB, 255 - brightness);// B Yuan (ii) a few Bang ?
delay (5); // number can be changed. larger number = longer light swap.


1 year ago on Step 37

Awesome! I'm happy I found this Instructable, it just so happens that I have this kit, so when I so this I thought it was pretty cool that someone made an Instructable about it. I think this will come in handy, thanks!


2 years ago on Step 4

The heart monitor code is incomplete in this instructable, so i decided to complete/modify it.
Here it is if anyone wants it;
//Startcopy here
// Pulse Monitor Test Script
//maybe work better with different color led?

int sensorPin = 0;
int period = 150; //too low is unstable, too high may not measure high heartrate
float change = 0;
float endMillis = 0;
float startMillis = 0;
float T = 0.00;
int oldValue = 0;
int oldChange = 0;
int pulse = 0;
int n = 0;

void setup ()
Serial.begin (9600);

void loop ()
int rawValue = analogRead (sensorPin);
/*Serial.print (rawValue);
Serial.print (" , ");
Serial.print (oldValue);
Serial.print (" , "); */
change = rawValue - oldValue;
Serial.println (change);
oldValue = rawValue;
if (change >= 0 && oldChange < 0) { //looking for the change in light transmission due to pulse
Serial.print(" n = ");
Serial.println(n); //can use to check pulses are being caught
if (n >= 10) {
endMillis = millis();
T = (endMillis - startMillis) / 1000;
//Serial.print(endMillis - startMillis);
// Serial.print(" T = ");
pulse = 60 * (n / T);
Serial.print(" Pulse rate = ");
n = 0;
pulse = 0;
startMillis = millis();

oldChange = change;
delay (period);
//endcopy here


2 years ago

Helpful to say the least, even now when the manufacturer has changed, it appears that the only change has been the part numbers, that said, the photos do a nice job of letting one find the proper code for the proper sensor. When saving, I renamed the files to match the listed name so the confusing code names are gone and I can go through without trying to figure out the sensor by the code. It does work for the ones with comments intact but some are simply code with no idea what they are for if you don't rename them on download, that is if you want a complete collection in storage. I have yet to try them all, but that will be today's project.


2 years ago on Step 29

Hi. Had a problem with the reading of DHT11, in the first loop just hangs up.


Reply 2 years ago

Is this still available somewhere?


Reply 5 years ago

Thank you!! that reference sheet is exactly what is needed by all of us!


Reply 3 years ago

Thank you


Reply 4 years ago

Most appreciated sharing your knowledge and this very, very helpful link with us (TYVM!)


2 years ago

This is superior code to the Arduino mini disk I purchased. Thank you so much.


2 years ago

Hi, I did a short experiment with Photoresistor, you can use a generic code and modify it to your liking. Just be sure of the input (photoresistor) and output pins (LEDs or anything else).


3 years ago

Even 4 years later people are finding your work getting all this information together useful. THANK YOU!


3 years ago

Has anyone used any of these with Raspberry PI

Question 3 years ago on Introduction

Is there a place I can dowload all of these code pieces in a zip file rather thatn downloading ech individually?


Answer 3 years ago

single zip available ?