Learn Arduino Sensors Quick Guide: 40 Sensors details, Applications, Example Codes, Specifications

918 132 8MB

English Pages [178]

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

Learn Arduino Sensors Quick Guide: 40 Sensors details, Applications, Example Codes, Specifications

Table of contents :
KY-001 TEMPERATURE SENSOR MODULE
KY-002 VIBRATION SWITCH MODULE
KY-003 HALL MAGNETIC SENSOR MODULE
KY-004 KEY SWITCH MODULE
KY-005 INFRARED EMISSION SENSOR MODULE
KY-006 SMALL PASSIVE BUZZER MODULE
KY-008 LASER SENSOR MODULE
KY-009 3-COLOUR FULL-COLOUR LED SMD MODULES
KY- 010 OPTICAL BROKEN MODULE
KY-011 2-COLOUR LED MODULE
KY-012 ACTIVE BUZZER MODULE
KY-013 TEMPERATURE SENSOR MODULE
KY-015 TEMPERATURE AND HUMIDITY SENSOR MODULE
KY-016 3-COLOUR LED MODULE
KY-017 MERCURY OPEN OPTICAL MODULE
KY-018 PHOTO RESISTOR MODULE
KY-019 5V RELAY MODULE
KY-020 TILT SWITCH MODULE
KY-021 MINI MAGNETIC REED MODULES
KY-022 INFRARED SENSOR RECEIVER MODULE
KY-023 XY-AXIS JOYSTICK MODULE
KY-024 LINEAR MAGNETIC HALL SENSORS
KY-025 REED MODULE
KY-026 FLAME SENSOR MODULE
KY-027 MAGIC LIGHT CUP MODULE
KY-028 TEMPERATURE SENSOR MODULE
KY-029 YIN YI 2-COLOUR LED MODULE 3MM
KY-031 KNOCK SENSOR MODULE
KY-032 OBSTACLE AVOIDANCE SENSOR MODULE
KY-033 HUNT SENSOR MODULE
KY-034 7 COLOUR LED FLASH-MODULE
KY-035 BIHOR MAGNETIC SENSOR MODULE
KY-036 METAL-TOUCH SENSOR MODULE
KY-037 MICROPHONE SENSOR MODULE
KY-038 MICROPHONE SOUND SENSOR MODULE
KY-039 HEARTBEAT SENSOR MODULE
KY-040 ROTARY ENCODER

Citation preview

LEARN ARDUINO SENSORS QUICK GUIDE 40 Sensors details, Applications, Example Codes, Specifications

By Sathish Kumar

CONTENTS KY-001 TEMPERATURE SENSOR MODULE KY-002 VIBRATION SWITCH MODULE KY-003 HALL MAGNETIC SENSOR MODULE KY-004 KEY SWITCH MODULE KY-005 INFRARED EMISSION SENSOR MODULE

KY-006 SMALL PASSIVE BUZZER MODULE KY-008 LASER SENSOR MODULE KY-009 3-COLOUR FULL-COLOUR LED SMD MODULES KY- 010 OPTICAL BROKEN MODULE KY-011 2-COLOUR LED MODULE KY-012 ACTIVE BUZZER MODULE KY-013 TEMPERATURE SENSOR MODULE KY-015 TEMPERATURE AND HUMIDITY SENSOR MODULE KY-016 3-COLOUR LED MODULE KY-017 MERCURY OPEN OPTICAL MODULE KY-018 PHOTO RESISTOR MODULE KY-019 5V RELAY MODULE KY-020 TILT SWITCH MODULE KY-021 MINI MAGNETIC REED MODULES KY-022 INFRARED SENSOR RECEIVER MODULE KY-023 XY-AXIS JOYSTICK MODULE KY-024 LINEAR MAGNETIC HALL SENSORS KY-025 REED MODULE KY-026 FLAME SENSOR MODULE KY-027 MAGIC LIGHT CUP MODULE KY-028 TEMPERATURE SENSOR MODULE KY-029 YIN YI 2-COLOUR LED MODULE 3MM KY-031 KNOCK SENSOR MODULE KY-032 OBSTACLE AVOIDANCE SENSOR MODULE KY-033 HUNT SENSOR MODULE KY-034 7 COLOUR LED FLASH-MODULE KY-035 BIHOR MAGNETIC SENSOR MODULE KY-036 METAL-TOUCH SENSOR MODULE KY-037 MICROPHONE SENSOR MODULE KY-038 MICROPHONE SOUND SENSOR MODULE

KY-039 HEARTBEAT SENSOR MODULE KY-040 ROTARY ENCODER

BOOK INTRODUCTION A sensor is a guy who provides data to the system via its input. Say you set your air conditioning system to bring the room temperature to 15 degrees, considering it was previously off (and the current temperature of the room is different than 15 degrees), now the system starts pumping air to bring the room to the desired temperature, how does it know when the room temperature has been reached? Here is where the sensor comes into play: there must be a sensor in the room to tell the air-conditioning system to stop pumping when the wanted temperature is attained. That is roughly it. We need a sensor to feed data to the system and tells the controller when to take action If you are building an Arduino powered car that will avoid obstacle while cruising, you could, for example, make use of a collision crash sensor to tell the controller when an obstacle is ahead of the car, then the controller can tell the wheel to stop and move to a different direction. The following are some variety of sensors you can make use of when working with an Arduino boards. Arduino is an open-source computer hardware and software company, project, and user community that designs and manufactures single-board microcontrollers and microcontroller kits for building digital devices and interactive objects that can sense and control objects in the physical and digital world. The project's products are distributed as open-source hardware and software, which are licensed under the GNU Lesser General Public License (LGPL) or the GNU General Public License (GPL), permitting the manufacture of Arduino boards and software distribution by anyone. Arduino boards are available commercially in preassembled form, or as do-it-yourself (DIY) kits. Arduino board designs use a variety of microprocessors and controllers. The boards are equipped with sets of digital and analogueue input/output (I/O) pins that may be interfaced to various expansion boards or Breadboards (shields) and other circuits. The boards feature serial communications

interfaces, including Universal Serial Bus (USB) on some models, which are also used for loading programs from personal computers. The microcontrollers are typically programmed using a dialect of features from the programming languages C and C++. In addition to using traditional compiler toolchains, the Arduino project provides an integrated development environment (IDE) based on the Processing language project. The Arduino project started in 2003 as a program for students at the Interaction Design Institute Ivrea in Ivrea, Italy, aiming to provide a low-cost and easy way for novices and professionals to create devices that interact with their environment using sensors and actuators. Common examples of such devices intended for beginner hobbyists include simple robots, thermostats, and motion detectors.

KY-001 TEMPERATURE SENSOR MODULE

We're going to talk about the temperature sensor known as KY 001. This is a module itself So let's get started. This module has integrated input a temperature sensor called Dallas 18 B 20. With single bass technology, a resistor and a led the resistor used in this module is 4.7 kilo ohm and the main reason for using their resistor is to low mid current circulating inside the module.

In other words to prevent the current from burning our module that LED lights up to show is the module is working properly or not. Now, I will show how these components are connected together. There we have the sensor itself and of course, the LED light and there it is you Sir r1 on third itube To see how the pins of the modules are connected in this board. So, we have internet the flow of the voltage in black with the flow of ground. And in green the flow of the sign of this module it is yours to measure the temperature with a sensor like Dallas d s 18 b 20, who has a temperature range from minus 55 gates Celsius to plus 125 gauge Celsius or minus 67 grades Fahrenheit to 257.

Great fair night and a error scale of 0.5 gates searches which is not much a problem assuming that you will not go into us for a precise measurement of the temperature. Dallas d s 18 b 20 sensor has the ability to connect with a lot of other sensor modules. The essay To be 20 even using the same digital port, because of the single bus technology and the unique serial number of every dsat Mb to any sensor. The base in this modules are three. So we have the ground pain with the minus sign, the voltage pin in the middle and of course have been of the sign up with s sign. So let's talk about the signup. This module gives a digital signup. So we can connect the pains of the signer with any digital part of the different microcontrollers, like Arduino or Raspberry Pi.

APPLICATIONS: Thermostatic Controls Industrial Systems

Consumer Products Thermometers Thermally Sensitive Systems

CONNECTIONS ARDUINO: Sensor Signal

=

Sensor +V =

[Pin 5V]

Sensor -

[Pin GND]

=

[Pin 4]

INPUT: EXAMPLE SENSOR CODE: #include #include // Data wire is plugged into pin 2 on the Arduino #define ONE_WIRE_BUS 2 // Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs) OneWire oneWire(ONE_WIRE_BUS); // Pass our oneWire reference to Dallas Temperature. DallasTemperature sensors(&oneWire); void setup(void) { // start serial port Serial.begin(9600); Serial.println("Dallas Temperature IC Control Library Demo");

// Start up the library sensors.begin(); // IC Default 9 bit. If you have troubles consider upping it 12. Ups the delay giving the IC more time to process the temperature measurement } void loop(void) { // call sensors.requestTemperatures() to issue a global temperature // request to all devices on the bus Serial.print("Requesting temperatures..."); sensors.requestTemperatures(); // Send the command to get temperatures Serial.println("DONE"); Serial.print("Temperature for Device 1 is: "); Serial.print(sensors.getTempCByIndex(0)); // Why "byIndex"? You can have more than one IC on the same bus. 0 refers to the first IC on the wire

KY-002 VIBRATION SWITCH MODULE

The vibration switch sensor known KY 002. This is the module itself. So let's get started. This module has integrated in board, a vibration sensor called SW 180 10 P, and of course, a resistor, the resistor in this module it's Thank you arm and the main reason for using the resistor is to learn meet current circulating inside the module. In other words, to prevent currents from burning our module. Now I will show how these components are connected together. So, there we have the sensor itself and of course, the resistor r1 on the right you can see how these pins in this module are connected in this book. So, we have in that the flow of the voltage we have in black, the flow of the ground. And of course we have in green the flow of the sign this modular laws detection of shock and vibration and really react to shock and vibration by closing the secret the vibrations switch that they are in this module it's often there is in state and will be on when achieving a proper vibration by an external force touching it. The result of movement inside the vibration module resulting changes in electric property. After giving the information that sensor has sensed the shock the module immediately will Resetting his normal state to wait for other shocks. In other words, the Sasa will be on all the time waiting for shocks and vibration, to wake the sensor up the beans in this module Aarthi. So, we

have the ground pain with the minus sign, the voltage pin in the middle, and of course, the pain of the signal with an S sign. So let's talk about the sign of this module gives a digital signal. So we can connect the pins of the signer with any digital port or the different microcontrollers, like Arduino or Raspberry Pi.

Connections Arduino: LED +

=

[Pin 13]

LED - =

[Pin GND]

Sensor Signal

=

Sensor +V =

[Pin 5V]

Sensor -

[PinGND]

=

[Pin 10]

INPUT:

EXAMPLE SENSOR CODE: int Led = 13; // define the LED Pin int shock = 3 // define the sensor Pin int val; // define a numeric variable val void setup () { pinMode (Led, OUTPUT); // LED pin as output

pinMode (shock, INPUT); // input from KY-002 sensor } void loop () { val = digitalRead (shock); // read the value from KY-002 if (val == HIGH ) {// when sensor detects shock, LED flashes digitalWrite(Led, LOW); } else { digitalWrite (Led, HIGH);

KY-003 HALL MAGNETIC SENSOR MODULE

The whole magnetic sensor known as KY 003. This is a module itself. So let's get started. This module has integrated on board a magnetic sensor called a 3141. One is sr, and one LED. The resistor used in this module is six sounded at arm and the main reason for using the resistor is to limit current circulating inside the module. In other words to prevent the current from burning our module. The LED lights up to show if the module is working properly or not. Now I will show how these components are connected together. There we have the sensor itself and of course led as one other resistor r1 on the right you can see how the pins of the module are connected all these board. So, we have internet the flow of the voltage, we have in black of a flow of the ground. And of course, we have in green the flow of the signal, this module It is used to detect the magnetic field. If there is no magnetic field present, the output signals of the module will give it will be high. If there is a magnetic field that detected the output signal that the module will give it will be low and at the same time the LED in the module will turn on. So, the LED will turn on only when a magnetic field has been detected by the magnetic sensor. This module has three pins The piece in this module are the ground pin with a minus sign, the voltage pin in the middle and of course the pain of the signal with an S sign. So let's talk about the signal. This module gives a digital signal. So we can connect the pin of the signal with any digital port of different microcontroller boards like Arduino or Raspberry Pi. That's it guys for today. If you liked the video, hit that like

button if you want more videos like this one hit the subscribe button with the bell icon so you will be notified for every video we upload new videos every day. So the only chance to see them first is of course through subscription. Don't forget to check out social media and see you guys next time.

CONNECTIONS ARDUINO: LED +

=

[Pin 13]

LED - =

[Pin GND]

Sensor Signal

=

Sensor +V =

[Pin 5V]

Sensor -

[Pin GND]

INPUT:

=

[Pin 10]

EXAMPLE SENSOR CODE: int led = 13; //Define the LED pin int buttonpin = 3; //Define the push button pin int val; //Define a numeric variable void setup() { pinMode(led,OUTPUT); pinMode(buttonpin,INPUT); } void loop() { val = digitalRead(buttonpin); // check the state of the button if(val==HIGH) // if button is pressed, turn LED on

{ digitalWrite(led,HIGH); } else { digitalWrite(led,LOW);

KY-004 KEY SWITCH MODULE

The bottom module known as KY 004. This is a module itself. So let's get started. This module has integrated on-board a button called f set 1713 and one resistor. The resistor used in this module is thank you on and the main reason for using the resistor is to limit current circulating inside the module. In other words to prevent the current from burning our module Now I will show how these components are connected together. There we have the sensor itself and of course, there is Easter r1 alright you can see how the piece of the module are connected on this board, we have internet the flow of the voltage, we have in black, the flow of the ground.

And of course we have in green, the flow of the signal. The button Episode 70 and 13 has two states pressed or undressed which is his normal state and have the life cycle of hundred thousand clicks. When this button is in his normal state, the voltage will stay in first two legs or pins of the button and the output signal that the module will give in normal state it will be high. When we press the button the voltage will pass The other side, and by consequence, changing the output signal to low. When you release the button it will go out automatically in his normal state because of the spring inside, who force the button up. The force that is needed to press a button is hundred 80 to 230 gam. This module has three pins. The pins in this module are the ground pin with a minus sign, the voltage pin in the middle and of course the pain of the signal with an S sign. So let's talk about the signal. This module gives a digital signal so we can connect the pain of the signal with any digital port of different microcontroller boards like Arduino or Raspberry Pi

CONNECTIONS ARDUINO: LED +

=

[Pin 13]

LED - =

[Pin GND]

Sensor Signal

=

Sensor +V =

[Pin 5V]

Sensor -

[Pin GND]

=

[Pin 10]

INPUT:

EXAMPLE SENSOR CODE: int led = 13; //Define the LED pin int buttonpin = 3; //Define the push button pin int val; //Define a numeric variable void setup() { pinMode(led,OUTPUT); pinMode(buttonpin,INPUT); } void loop() { val = digitalRead(buttonpin); // check the state of the button

if(val==HIGH) // if button is pressed, turn LED on { digitalWrite(led,HIGH); } else { digitalWrite(led,LOW)

KY-005 INFRARED EMISSION SENSOR MODULE

The infrared transmitter module known as KY 005. This is a module itself. So let's get started. So guys, as you can see, this module has only the infrared transmitter and nothing else. So let's continue with our video. Now I will show how the infrared transmitter is connected on this board. There we have the infrared transmitter itself. And now I will show the flow of the ground in black. And of course, I will show in green, the flow of the signal. The infrared transmitter is similar by the look with an LED, but is this made by a different semiconductor materials. The infrared transmitter It is also known as infrared emitting diode, the diameter of the transmitter is five millimetres. The infrared transmitter will convert the electricity into infrared lights, the signal that This module will transmit will have a frequency of 38 kilohertz. This module is actually used together with KY 0 22 known as infrared receiver module.

So let's talk about the pins. The pins in this module are three, we have the ground pin with the minus sign, the voltage pin is in the middle. And of course we have the pin of the signal with an S sign. So let's talk about the signal. This module takes a digital signal, so we can connect the pin of the signal with any digital part of different microcontroller boards like Arduino or Raspberry Pi.

CONNECTIONS ARDUINO: KY-005 Signal=

[Pin 3 (Arduino Uno) | Pin 9 (Arduino Mega)]

GND+resistor GND =

=

[Pin GND*]

[Pin GND]

INPUT:

EXAMPLE SENSOR CODE: #include IRsend irsend; void setup() { Serial.begin(9600); } void loop() {

for (int i = 0; i < 50; i++) { irsend.sendSony(0xa90, 12); // Sony TV power code delay(40);

KY-006 SMALL PASSIVE BUZZER MODULE

This is a module itself. So let's get started. As you can see, this module has only the buzzer inside and nothing else. So, let's continue with our video. Now I will show how the buzzer is connected on this board. There we have the buzzer itself. On the right you can see how the piece of the module icon noted on this board. So we have in black, the flow of the ground. And of course we have in green, the flow of the signal. This module can't produce sound by itself. So we need to write a program With delays and we need to know that the buzzer will give a sound only before the delay time and not during the delay, the buzzer will give an audio signal of 1.5 to 2.5 kilohertz.

So let's talk about the pins. The pins in this module are three, we have the ground pin with the minus sign, the voltage pin is in the middle.

And of course we have the pain of the signal with an S sign. So let's talk about the signal. This module takes a digital signal so we can connect the pain of the signal with any digital part of different microcontroller boards like Arduino or Raspberry Pi.

CONNECTIONS ARDUINO: Sensor signal

=

Sensor -

[Pin GND]

INPUT:

=

[Pin 8]

EXAMPLE SENSOR CODE: int buzzer = 8; // set the buzzer control digital IO pin void setup() { pinMode(buzzer, OUTPUT); // set pin 8 as output } void loop() { for (int i = 0; i < 80; i++) { // make a sound digitalWrite(buzzer, HIGH); // send high signal to buzzer delay(1); // delay 1ms digitalWrite(buzzer, LOW); // send low signal to buzzer delay(1); }

delay(50); for (int j = 0; j < 100; j++) { //make another sound digitalWrite(buzzer, HIGH); delay(2); // delay 2ms digitalWrite(buzzer, LOW); delay(2); } delay(100);

KY-008 LASER SENSOR MODULE

The laser transmitter module known as KY 008. This is a module itself. So let's get started. This module has integrated on board a laser transmitter and two resistors resistor r1 and the resistor R to the resistor r1 used in this module. It's Thank you long and there is this there are two views in this module. It's 91 on and the main reason for using the resistor is to limit currency collating inside the module. In other words to prevent the current from burning our module. Now, I will show how these components are

connected together. There we have the laser itself and of course, the resistor r1 and the resistor are to the right again see how the pins of the module are connected on this board. So, we have internet the flow of the voltage in black, the flow of the ground and of course, we have in green the flow of the signal this module consists of 650 nanometer red laser diode head. This module has two main uses. It can be used to involve tripper wire detecting and can be used as a pointer lasers are the great way to draw distances and limits as they shot directly, often at very long distances, coupled with a photoresistor, or specialized laser detecting module can be used to detect the path of the laser. In theory, lasers can travel until they hit something or in other words, laser light will scatter in the atmosphere and while going through the lens, which causes the scatter and increase dot size. Be careful and don't direct the light of the laser in your eyes because it's dangerous. So let's talk about the pins.

The pins in this module are three. We have the ground pin with the minus sign, the voltage pin is in the middle. And of course we have a looping of the signal with an S sign. So let's talk about the signal. This module takes a digital signal. So we can connect the pin of the signal with any digital port of different microcontroller boards like Arduino or Raspberry Pi.

EXAMPLE SENSOR CODE: int laserPin = 13; void setup() { pinMode(laserPin, OUTPUT); // Define the digital output interface pin 13 } void loop() { digitalWrite(laserPin, HIGH); // Open the laser head delay(1000); // Delay one second

digitalWrite(laserPin, LOW); // Close the laser head delay(1000);

KY-009 3-COLOUR FULL-COLOUR LED SMD MODULES

The RGB LED SMD module known as KY 009. This is a module itself. So let's get started. So as you can see, this module has only the LED SMD

module and nothing else. So let's continue with our video. Now I will show how the LED SMD is connected on this board. There we have the LED SMD itself. On the right you can see how the pins of the module are connected on this board. We have in black, the flow of the ground and we have in green the flow of the three pins for the LEDs. As you can see, in this module, it is used to produce light. This module can produce light in three colours, because inside the chip, our three LEDs are blue, red, and the green one. With this module we can light up each LED Individually, or we can create a mixed colour using the combination of red, blue, and green. Let's talk about the paints. The paints in this module are four, we have a VA ground pin with a minus sign.

And of course, we have three signal pins named R, G, and B. So let's talk about the signal. This module takes three digital signals, so we can connect the pin servo signal with any digital ports of different microcontroller boards, like Arduino or Raspberry Pi.

CONNECTIONS ARDUINO: LED Red

=

[Pin 10]

LED Green =

[Pin 11]

LED Blue

[Pin 12]

=

Sensor GND =

INPUT:

[Pin GND]

EXAMPLE SENSOR CODE: int redpin = 11; //select the pin for the red LED int bluepin =10; // select the pin for the blue LED int greenpin = 9;// select the pin for the green LED int val; void setup() { pinMode(redpin, OUTPUT); pinMode(bluepin, OUTPUT); pinMode(greenpin, OUTPUT); Serial.begin(9600); } void loop() { for(val = 255; val > 0; val--)

{ analogueWrite(redpin, val); //set PWM value for red analogueWrite(bluepin, 255 - val); //set PWM value for blue analogueWrite(greenpin, 128 - val); //set PWM value for green Serial.println(val); //print current value delay(1); } for(val = 0; val < 255; val++) { analogueWrite(redpin, val); analogueWrite(bluepin, 255 - val); analogueWrite(greenpin, 128 - val); Serial.println(val); delay(1);

KY- 010 OPTICAL BROKEN MODULE

The photo interrupter module known as KY 010. This is a module itself. So let's get started. This module has integrated on board a photo interrupter, or optical broken and two resistors, resistor r1 and resistor or to the resistor r1. used in this module. It's Thank you arm and the resistor are two used in this module. It's 330 ohms. And the main reason for using the resistor is to limit currency collating inside the module. In other words to preserve Correct for burning our module. Now I will show how these components are connected together. There we have the sensor itself and of course, the resistor r1 and the resistor R two. On the right you can see how the pins of the module are connected on this board. So, we have internet the flow of the voltage in black the flow of the ground. And of course, we have in green the flow of the signal. This module has on board the photo interrupt that is a photo sensor that integrates light emitting elements and light receiving elements into a single package. This device will turn the secret optically on or off. It is made up of a plastic part that has a shape of you where the infrared diode is located. to one side and in front of it is a photo transistor by a meeting a beam of infrared light from one end to another. This detector can detect when an object passes between the sides, breaking the communication between them. An object that will pass through the space between the photo transistor and the infrared diet will interrupt the infrared light and the signal of that This module will give will change from low to high. This device is very fast and ideal for counting and sensitivity. The beans in

this module are three. So we have the ground pin with a minus sign. The voltage pin in the middle and of course, the pin of the signal With an S sign. So let's talk about the signal. This module gives a digital signal. So we can connect the pins of the signal with any digital ports of different microcontroller boards like Arduino or Raspberry Pi.

CONNECTIONS ARDUINO: LED +

=

[Pin 13]

LED - =

[Pin GND]

Sensor Signal

=

Sensor +V =

[Pin 5V]

Sensor -

[Pin GND]

INPUT:

=

[Pin 10]

EXAMPLE SENSOR CODE: int Led = 13; // define LED pin int buttonpin = 3; // define photo interrupter signal pin int val; //define a numeric variable void setup() { pinMode(Led, OUTPUT); // LED pin as output pinMode(buttonpin, INPUT); //photo interrupter pin as input

} void loop() { val=digitalRead(buttonpin); //read the value of the sensor if(val == HIGH) // turn on LED when sensor is blocked { digitalWrite(Led,HIGH); } else { digitalWrite(Led,LOW);

KY-011 2-COLOUR LED MODULE

The two colour LCD known as KY 0 11. This is the module itself so let's get started. Today's video is brought to you by all RGB s and an online store

where you can find shirts, jeans and gold accessories that fit your needs. All the products are made in Italy, they can be shipped worldwide, so don't waste your time start looking fancy today with their style. For more information, go to RGB SM shop dot net or check it out at the link on the video description. This module is integrated on board, one LED and one resistor, the resistor used in this module. It's 0 ohm. And I don't really know the reason why we use a 0 ohm resistor in this model. Now I will show how these components are connected together. There we have the LED itself, and of course, the resistor r1. On the right you can see how the piece of the module are connected on this board. We have in black, the flow of the ground, we have in green and in light green, the flow of the signals of the LED In this module can produce light in two colours in red, and in green. With this module, we can light up each colour individually. Or we can create a mix colour using the combination of the red colour and the green colour. So let's talk about the pins.

The pins in this module are three, we have the ground pin with a minus sign. And of course we have two other pins which are the pins of the signal. So

let's talk about the signal. This module takes to digital signal. So we can connect the pins of the signal with any digital port of different microcontroller boards like Arduino or Raspberry Pi.

CONNECTIONS ARDUINO: LED Green =

[Pin 10]

LED Red

[Pin 11]

=

Sensor GND =

INPUT:

[Pin GND]

EXAMPLE SENSOR CODE: int redpin = 11; // pin for red signal int greenpin = 10; // pin for green signal int val; void setup() { pinMode(redpin, OUTPUT); pinMode(greenpin, OUTPUT); } void loop() { for(val = 255; val > 0; val--) { analogueWrite(redpin, val); //dim red analogueWrite(greenpin, 255 - val); // brighten green

delay(15); } for(val = 0; val < 255; val++) { analogueWrite(redpin, val); //brighten red analogueWrite(greenpin, 255 - val); //dim green delay(15);

KY-012 ACTIVE BUZZER MODULE

KY 012 This is a module itself. So let's get started. As you can see, this module has only buzzer inside and nothing else. So let's continue with our video. Now I will show how the buzzer is connected on this board. There we have the buzzer itself. On the right you can see how the pins of the modular coordinated on this board. So we have in black the flow of the ground. And of course we have in green, the flow of the signal. This type of buzzers can produce sound by itself. All they need is a power from any source. And if we like to tweak the sound, we can do that by using any kind of microcontroller.

This module gives us sound frequency of 2.5 kilohertz with an error scale of plus minus 300 hertz So let's talk about the pins. The pins in this module are three, we have the ground pin with the minus sign, the voltage pin is in the middle. And of course we have a pin of the signal with an S sign. So let's talk about the signal. This module takes a digital signal, so we can connect the pain of the signal with any digital port of different microcontroller boards like Arduino or Raspberry Pi.

CONNECTIONS ARDUINO: Sensor Signal

=

[Pin 13]

Sensor [N.C]

=

Sensor GND =

[Pin GND]

INPUT:

EXAMPLE SENSOR CODE: int buzzerPin = 8; void setup () { pinMode (buzzerPin, OUTPUT); } void loop () { digitalWrite (buzzerPin, HIGH); delay (500); digitalWrite (buzzerPin, LOW);

delay (500);

KY-013 TEMPERATURE SENSOR MODULE

KY 013. This is the module itself. So let's get started. This module has integrated on board, a temperature sensor and our resistor. The resistor used in this module. It's Thank you arm and the main reason for using the resistor is to limit currency quality inside the module. In other words to prevent the current from burning our module. Now I will show how these components are connected together. There we have the sensor itself. And of course, there is Easter r1 on the right you can see how the pace of the module are connected on this board, we have internet the flow of the voltage, we have in

black, the flow of the ground. And of course, we have in green, the flow of the signal thermistors are the kind of elements that can feel the temperature since they are built with semiconductor materials that is seemed to exhibit major resistance changes in proportion to small temperature changes. This resistance can be measured using a small AC or DC current passing through the thermistor to measure the output of the voltage drop. The temperature sensor are actually found to be other temperature sensitive electrical resistances here's comes a name a clear condition nation of words thermal and resistance. The module is based on the work of a thermistor. Let's increase or decrease the resistance when ambient temperature changes. This kind of thermistors can measure the temperature from minus 55 gates Celsius to 125 gates Celsius or minus 67. Great very nice to 257 gates for a night with an error scale of plus minus point five gate Celsius. So let's talk about the pins. The pins in this module are three we have the ground pin with the minus sign, the voltage pin is in the middle. And of course we have the pin of the signal with an S sign.

So let's talk about the signal. This module gives an analogue signal So we can connect the pain of the signal with any analogue port of different microcontroller boards like Arduino or Raspberry Pi.

CONNECTIONS ARDUINO:

Sensor Signal

=

[Pin 13]

Sensor [N.C]

=

Sensor GND =

[Pin GND]

EXAMPLE SENSOR CODE: int ThermistorPin = A0; int Vo; float R1 = 10000; // value of R1 on board float logR2, R2, T; float c1 = 0.001129148, c2 = 0.000234125, c3 = 0.0000000876741; //steinhart-hart coeficients for thermistor void setup() { Serial.begin(9600); } void loop() { Vo = analogueRead(ThermistorPin); R2 = R1 * (1023.0 / (float)Vo - 1.0); //calculate resistance on thermistor logR2 = log(R2); T = (1.0 / (c1 + c2*logR2 + c3*logR2*logR2*logR2)); // temperature in Kelvin T = T - 273.15; //convert Kelvin to Celcius // T = (T * 9.0)/ 5.0 + 32.0; //convert Celcius to Farenheit Serial.print("Temperature: "); Serial.print(T);

Serial.println(" C"); delay(500); }

KY-015 TEMPERATURE AND HUMIDITY SENSOR MODULE

KY 015. This is the module itself. So let's get started. This module has integrated on board a temperature and humidity sensor called the HDx 11. And of course, a resistor, the resistor used in this module, it's Thank you long and the main reason for using the resistor is to limit currents circulating inside the module. In other words, to prevent the current from burning our model. Now, I will show how these components are connected together. There we have the sensor itself. And of course, there is Easter Erwin. Overnight you can see how the pace of the module are connected on this board. We have internet the flow of the voltage, we have in black the flow of the ground, and of course we have in green, the flow of the signal this module

can measure the temperature From 0 grades Celsius to 50 grade Celsius with an error scale of plus minus two grade Celsius and a humidity from 20% to 90%. With an error scale of plus minus five persons, it can be connected to any kind of microcontroller boards, but the wire must not exceed a maximum length of 20 meters. This sensor is a single wire serial interface that allows fast and easy system integration. small size, low power consumption signal transmission distances up to 20 meter make it good choice anywhere even in the tough applications.

The sensor the HDL oven consists of resistance measurement opponent and a NTC temperature measurement component DHD 11 uses an internal thermistor and a humidity sensor to determine ambient conditions. An internal chip is responsible for converting readings into a digital signal. This sensor can monitor temperature and humidity by giving a very calibrated digital signal for these values. So let's talk about the pins. The BNC in this module are three, we have the ground pin with the minus sign, the voltage pin is in the middle. And of course we have the pin of the signal with an S sign. So let's talk about the signal. This module gives a deep Don't signal so we can connect the pins of the signal with any digital ports of different microcontroller boards like Arduino or Raspberry Pi.

INPUT:

CONNECTIONS ARDUINO: GND =

[Pin GND]

+V

=

[Pin 5V]

Signal=

[Pin D2]

EXAMPLE SENSOR CODE: int DHpin = 8; // input/output pin byte dat[5]; byte read_data() { byte i = 0; byte result = 0; for (i = 0; i < 8; i++) { while (digitalRead(DHpin) == LOW); // wait 50us delayMicroseconds(30); //The duration of the high level is judged to determine whether the data is '0' or '1' if (digitalRead(DHpin) == HIGH) result |= (1