Kit Se Sensores Arduino
Kit Se Sensores Arduino
Kit Se Sensores Arduino
First acquaintance
Lecturer Dr. Samuel Kosolapov
General Appearance: ~ 36+1 modules in one box
In this presentation only simple (even primitive) modules will be explained and demonstrated
2
Leaflet inside the box
3
Leaflet inside the box: Arrangement of modules
4
List of Modules in the box: KY-0XY
- 1 x Small passive buzzer module KY-006 - 1 x Class Bihor magnetic sensor KY-035
- 1 x 2-color LED module KY-011 - 1 x Magic light cup module KY-027
- 1 x Hit sensor module KY-031 - 1 x Rotary encoder module KY-040
- 1 x Vibration switch module KY-002 - 1 x Optical broken module KY-010
- 1 x Photo resistor module KY-018 - 1 x Detect the heartbeat module KY-039
- 1 x Key switch module KY-004 - 1 x Reed module KY-025
- 1 x Tilt switch module KY-020 - 1 x Obstacle avoidance sensor module KY-032
- 1 x 3-color full-color LED SMD modules KY-009 - 1 x Hunt sensor module KY-033
- 1 x Infrared emission sensor module KY-005 - 1 x Microphone sound sensor module KY-038
- 1 x 3-color LED module KY-016 - 1 x Laser sensor module KY-008
- 1 x Mercury open optical module KY-017 - 1 x 5V relay module KY-019
- 1 x Yin Yi 2-color LED module 3MM KY-029 - 1 x Temperature sensor module KY-001
- 1 x Active buzzer module KY-012 - 1 x Temperature sensor module KY-028
- 1 x Temperature sensor module KY-013 - 1 x Linear magnetic Hall sensors KY-024
- 1 x Automatic flashing colorful LED module KY-034 - 1 x Flame sensor module KY-026
- 1 x Mini magnetic reed modules KY-021 - 1 x Sensitive microphone sensor module KY-037
- 1 x Hall magnetic sensor module KY-003 - 1 x Temperature and humidity sensor module KY-015
- 1 x Infrared sensor receiver module KY-022 - 1 x XY-axis joystick module KY-023
- 1 x Metal touch sensor module KY-036
5
Problem: Random Arrangement inside the box:
6
What is the difference ?
(KY number is not present on the board )
Arduino KY-012 Active
Arduino KY-006 Small
buzzer module
passive buzzer module
7
Simple electronic test (demonstrate)
Connect Pin - to GND
Connect Pin S to +5V
Active buzzer module
Middle Pin: is not important
passive buzzer module will produce constant tone
will shortly click
10
Primitive Sensor: Switch
37 Sensor Kit contains a number of primitive sensors which are actually operates as a
mechanical switch. Despite primitive design , those modules sense important events.
12
Example of Mechanical Key Switch Test
Pin S of the switch connected to (say) Pin 8 of the Arduino Board
Circuit operation:
LED13 is normally OFF
When the button (key) is pressed, LED13 is ON
13
Example of Mechanical Key Switch Test
Pin 10 (and not 8) is used in this example
14
KY-021 Mini magnetic reed switch
15
KY-021 Mini magnetic reed switch
Small
magnet
16
KY-020 Tilt switch
17
KY-002 Vibration switch
19
KY-017 Mercury tilt switch
Pin - : Connect to Arduino GND
Middle pin : Connect to Arduino +5V
Pin S : Sensor Out
Additionally
there is 10 k Pull-up resistor and LED
20
KY-017 Mercury tilt switch
The code is as with
simple button/key switch
The simplest usage of these modules is to signal to human operator that something happen
22
LED as actuator.
We already know
how to operate Flashing LED
on the Pin13 of the Arduino Board
The trivial usage of the LEDs is to send to human operator simple predefined messages.
For example Power is ON; Serial communication is going on
23
LED as actuator.
24
KY-016 3-Color 5V RGB LED Module.
For some reason
known to producer only :
R == B
G == G
B == R
No demonstrations
Students will not get this module (no reason)
26
KY-011 Two color LED 5mm .
Color: Green + Red
Diameter: 5mm
Case Color: None
Package Type: Diffusion
Voltage (V) :2.0-2.5v
Using a current (MA): 10
Viewing angle: 150
Wavelength (NM): 571 +644
Luminous intensity (MCD) :20-40; 40-80
Stent type: long-legged
330 Ohm resistor is needed
DO NOT USE
No demonstrations
Students will not get this module (no reason)
27
KY-029 Two color LED mini 3mm diam.
Color: Green + Red
Diameter: 3mm
Case Color: None
Package Type: Diffusion
Voltage (V) :2.0-2.5v
Using a current (MA): 10
Viewing angle: 150
Wavelength (NM): 571 +644
Luminous intensity (MCD) :20-40; 40-80
??? Ohm resistor is needed
DO NOT USE
No demonstrations
Students will not get this module (no reason)
28
KY-034 7-color Automatically Flashing LED
The module contains a 7-color 5mm LED
with a built-in chip
that sequentially flashes each color in turn.
Color pattern is repeated in about 15 seconds.
LED model: YB-3120B4PNYG-PM
Forward voltage: 2.5V - 6V
Forward current: 40mA
29
KY-008 Laser Diode 650 nm
30
KY-006 Passive Buzzer and KY-012 Active Buzzer
Passive buzzer has black bar
31
KY-006 Passive Buzzer and KY-012 Active Buzzer
Passive buzzer has passive Active buzzer has piezo element and
piezo element inside additional oscillator inside
More expensive, but simpler for usage
32
KY-006 Passive Buzzer and KY-012 Active Buzzer
Passive Buzzer
Can be used as Primitive Speaker Active Buzzer
with limited frequency range) Can be used as very simple ALARM
Connect S to pin producing signal of different When DC (or Pin having 5V or 3.3V)
frequencies Buzzer will produce sound is connected to S signal of
constant frequency is heard
Generally square wave (up to ~ 5K)
generated by digital pin is used.
33
KY-012 Active Buzzer
Active Buzzer
Can be used as very simple ALARM together with LED13
34
KY-006 Passive Buzzer
Passive Buzzer can be used as a cheap alternative to speaker
BUT: Useful frequency range is limited
For UNO:
tone function min frequency: 31 Hz. Max frequency 65535 Hz
Syntax BUT:
tone(pin, frequency) primitive buzzer cannot play such
tone(pin, frequency, duration) a high frequencies.
Parameters
pin: the pin on which to generate the tone
frequency: the frequency of the tone in Hertz - unsigned int
optional parameter: duration: the duration of the tone in milliseconds - unsigned long
Returns
nothing
Go to above page to see the code. BUT: Use buzzer, not 8 Om speaker !!!!!!
36
Speaker instead of Passive Buzzer
If you connected the speaker directly to the Arduino digital pin
you have damaged your Arduino pin by pulling too much current from it.
You need at least a 120 ohm resistor in line with the speaker for direct connection.
Of course it will not be as loud but then you are not burning your output pin.
For best results you need to use a transistor and capacitor to connect your speaker. Google for
lots of schematics.
37
KY-019 5V Relay Module
http://tinkbox.ph/sites/tinkbox.ph/files/downloads/KEYES%205V%20Relay%20Module%20KY-019.pdf
Relay module with one normally open and one normally closed contacts.
It can be used to control home appliances up to 220V AC 10A or 30 V DC 10A.
NC : Normally closed
NO : normally open
Common : common
38
KY-019 5V Relay Module
http://tinkbox.ph/sites/tinkbox.ph/files/downloads/KEYES%205V%20Relay%20Module%20KY-019.pdf
39
KY-019 5V Relay Module. Low Voltage connection
40
KY-019 5V Relay Module. Low Voltage connection
41
Other Modules
42