background image

 

67 

 

Lesson 26 Metal Touch Sensor 

Introduction 

A metal touch sensor is a type of switch that only operates when it's touched by a charged 

body.  It  has  a  high-frequency  transistor  which  can  conduct  electricity  when  receiving 

electromagnetic signals.  

 

Components 

1 * SunFounder Uno board 

 

- 1 * USB data cable 

- 1 * Metal touch sensor module 

- Several jumper wires 

Experimental Principle 

In this experiment, touch the base electrode of a transistor with fingers to make it conduct 

electricity, for human body itself is a kind of conductor and an antenna that can receive 

electromagnetic waves in the air. These electromagnetic wave signals collected by human 

body are amplified by the transistor and processed by the comparator on the module to 

output steady signals. 

With the LED attached to pin 13 of Uno, connect pin D0 of the sensor to D7 of the Uno board. 

When the metal touch sensor detects touch signals, the LED will be on. Otherwise, it will be 

off.  

Experimental Procedures 

Step 1: 

Build the circuit  

 

                              Metal Touch Sensor                      SunFounder Uno  

                                         AO ------------------------------------------- A0 

G  -------------------------------------------- GND 

                                          + -------------------------------------------- 5V 

                                         D0 ------------------------------------------- D7 

Step 2: 

Program (Please refer to the example code in 

LEARN -> Get Tutorial

 on our 

website

SunFounder

Содержание Sensor Kit V1.0

Страница 1: ...r com for more About Sensor Kit V1 0 This kit is suitable for SunFounder Uno SunFounder Mega 2560 SunFounder Duemilanove and SunFounder Nano All the code in this user manual is compatible with these boards Our SunFounder board is fully compatible with Arduino board You can go to our official website www sunfounder com to download related code by clicking LEARN Get Tutorials If you have any questio...

Страница 2: ...ensor 33 Lesson 11 Digital Temperature Sensor 35 Lesson 12 Buzzer 37 Lesson 13 Button Switch 40 Lesson 14 Photo interrupter 42 Lesson 15 Tilt Switch 44 Lesson 16 Mercury Switch 46 Lesson 17 Magic Cup 48 Lesson 18 DS18B20 Temperature Sensor 50 Lesson 19 Rotary Encoder 52 Lesson 20 7 Color Auto flash LED 55 Lesson 21 Photoresistor Sensor 56 Lesson 22 Humiture Sensor 58 Lesson 23 Obstacle Avoidance S...

Страница 3: ...e 71 Lesson 29 Joystick PS2 73 Lesson 30 MQ 2 Gas Sensor 75 Lesson 31 Password Lock 77 Lesson 32 Lie Detector 79 Lesson 33 Fire Alarm 81 Lesson 34 Thermostatic Water Tank System 83 Lesson 35 Intelligent Environment Monitoring 85 S u n F o u n d e r ...

Страница 4: ...1 Components List No Name Qty Component 1 Analog Hall Sensor 2 2 Switch Hall Sensor 1 3 RGB LED 2 4 Dual color Common Cathode LED 2 S u n F o u n d e r ...

Страница 5: ...2 5 Shock Switch 1 6 Knock Sensor 1 7 Infrared Transmitter 1 8 Laser Transmitter 1 9 Reed Switch 1 10 Mini Reed 1 11 Infrared Receiver 1 S u n F o u n d e r ...

Страница 6: ...3 12 Analog Temperature Sensor 1 13 Digital Temperature Sensor 1 14 Active Buzzer 1 15 Passive Buzzer 1 16 Button Switch 1 17 Photo interrupter 1 18 Tilt Switch 1 S u n F o u n d e r ...

Страница 7: ...4 19 Mercury Switch 1 20 Magic Cup 2 21 DS18B20 Temperature Sensor 1 22 Rotary Encoder 1 23 7 color Auto flash LED 1 24 Photoresistor Sensor 1 S u n F o u n d e r ...

Страница 8: ...5 25 Humiture Sensor 1 26 Obstacle Avoidance Sensor 1 27 Tracking Sensor 1 28 Microphone Sensor 1 29 High sensitive Voice Sensor 1 30 Metal Touch Sensor 1 31 Flame Sensor 1 S u n F o u n d e r ...

Страница 9: ...6 32 Relay Module 1 33 Joystick PS2 1 34 MQ 2 Gas Sensor 1 35 LCD1602 1 36 4x4 Keypad 1 37 Remote Control 1 S u n F o u n d e r ...

Страница 10: ...7 38 250k Ohm Potentiometer 1 39 470k Ohm Resistor 1 40 Breadboard 1 41 Jumper Wire M to F 40 42 Jumper Wire M to M 20 S u n F o u n d e r ...

Страница 11: ...d in this kit works with these boards So what does COMPATIBLE mean here It means you can use any of the three boards to do the same experiment with the same wiring Take turning on an LED as an example We use SunFounder Uno as the microcontroller but you can also use SunFounder Nano or SunFounder Mega 2560 to serve the same function Just select the right Board and COM when compiling S u n F o u n d...

Страница 12: ...9 S u n F o u n d e r ...

Страница 13: ...r consists of voltage regulator Hall element differential amplifier Schmitt trigger and output terminal and it outputs digital values A linear Hall sensor consists of a Hall element linear amplifier and emitter follower and it outputs analog values There are three types of hall sensor module in this kit as shown below linear Hall sensor in two forms which outputs analog signals and switch Hall sen...

Страница 14: ...to apply a Lorentz force the force exerted on a charged particle in an electromagnetic field to these charge carriers The result is what is seen as a charge separation with a buildup of either positive or negative charges on the bottom or on the top of the plate Hall Sensor A hall sensor is a kind of magnetic field sensor based on the effect Electricity carried through a conductor will produce a m...

Страница 15: ...o S A5 GND 5V Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now you can see the LED attached to pin 13 on SunFounder Uno board blinking If a magnet approaches the linear Hall sensor the blinking frequency of LED will increase or decrease S u n F o u n d e r ...

Страница 16: ... example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now place a magnet close to the switch Hall sensor Then the indicator LED on the switch Hall sensor will light up and the buzzer will beep At the same time the LED attached to pin 13 on the SunFounder Uno board will light up S u n F o u n d e r ...

Страница 17: ... 5V A to 3 3V K to GND Potentiometer connection Connect its middle pin to VO of LCD1602 and any other pin to GND Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now put a magnet close to the linear Hall sensor and the indicator LED on the linear Hall sensor will light up At the same time the analog and d...

Страница 18: ...we will also use PWM technology to control the brightness of RGB Before we talk about PWM let s take a look at the applications of PWM first PWM has been successfully applied in motor speed regulation steering angle control light intensity control and signal output For example when PWM is applied to a horn it will make sounds After we know about its special functions let s find out what PWM really...

Страница 19: ...can be encoded by PWM The output voltage value is calculated by the on and off time Vout Ton T Vmax We can see from the top oscillogram that the amplitude of DC voltage output is 5V However the actual voltage output is only 3 75V through PWM for the high level only takes up 75 of the total voltage within a period Here is the introduction to three basic parameters of PWM 1 The term duty cycle descr...

Страница 20: ...mmon anode type and common cathode type In this experiment we use common cathode RGB LED Experimental Procedures Step 1 Build the circuit RGB LED Module SunFounder Uno R D11 G D10 B D9 GND Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now you can see the RGB LED flash red green and blue first and then ...

Страница 21: ...thode LED module Several jumper wires Experimental Principle Control the LED brightness by the digital port The color of the LED changes from yellow to red as well as flashes a mixed color Experimental Procedures Step 1 Build the circuit Dual color Common Cathode LED SunFounder Uno Y D10 GND R D11 Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile S...

Страница 22: ...19 Now you can see the dual color LED flashing yellow red and mixed colors S u n F o u n d e r ...

Страница 23: ... wires Experimental Principle The shock switch works like this the conductive vibration spring and trigger pin are precisely placed in the switch and fixed by adhesive Normally the spring and the trigger pin are separated Once the sensor detects shock the spring will vibrate and contact with the trigger pin thus conducting and generating trigger signals With the LED attached to pin 13 already conn...

Страница 24: ...e example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now shake the switch module and you will see the LED attached to pin 13 on the SunFounder Uno board light up S u n F o u n d e r ...

Страница 25: ...nciple The principle is similar to that of the shock switch Connect the knock switch sensor pin S to D3 to build a simple circuit When the knock switch sensor inducts knock signals the LED attached to pin 13 will light up Experimental Procedures Step 1 Build the circuit Knock Sensor Module SunFounder Uno S D3 GND 5V Step 2 Program Please refer to the example code in LEARN Get Tutorial on our websi...

Страница 26: ...23 Now knock the sensor and the LED attached to pin 13 on the SunFounder Uno board will light up S u n F o u n d e r ...

Страница 27: ... transmitter is widely used in consumer electronics industry and communication etc In this experiment connect pin S of the infrared transmitter module to D3 to build a simple circuit When the coded value for an infrared ray is input by programming and then the infrared transmitter module emits the infrared ray the LED attached to pin 13 will light up In addition the coded value of the infrared ray...

Страница 28: ...code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now you can see the infrared transmitter emit infrared rays through a camera or your phone camera At the same time the LED attached to pin 13 on SunFounder Uno board lights up and a coded value is displayed on the LCD S u n F o u n d e r ...

Страница 29: ... optical amplification based on the stimulated emission of electromagnetic radiation Lasers differ from other sources of light because they emit light coherently Spatial coherence allows a laser to be focused to a tight spot enabling applications like laser cutting and lithography and a laser beam to stay narrow over long distances collimation enabling applications such as laser pointer Lasers can...

Страница 30: ... Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now you can see the laser transmitter module send out Morse signals Note DO NOT look directly at the laser head It can cause great harm to your eyes S u n F o u n d e r ...

Страница 31: ...h here means dry reed pipe which is a kind of contact passive electronic switch component with the advantage of simple structure small size and convenient control The shell of a reed switch is commonly a sealed glass pipe in which two iron elastic reed electroplates are equipped and inert gases are filled Normally the two reeds made of special materials in the glass tube are separated However when...

Страница 32: ...ch to D8 of the SunFounder Uno board When the reed switch inducts magnetic field signals the LED will be on Otherwise it will be off Experimental Procedures Step 1 Build the circuit Reed Switch Module SunFounder Uno AO A0 DO D8 GND 5V Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now put a magnet close...

Страница 33: ... experimental procedures are the same as those of Reed Switch Connect pin S to D2 of the SunFounder board and you will see the LED attached to pin 13 light up when a magnet approaches the mini reed S u n F o u n d e r ...

Страница 34: ...rared Receiver module 1 Remote controller Several jumper wires Experimental Principle Control a certain key for example Power key via a remote controller by programming When you press the key infrared rays will be emitted from the remote controller and received by the infrared receiver and the LED on the SunFounder Uno board will light up Experimental Procedures Step 1 Build the circuit Infrared R...

Страница 35: ...32 Now press Power on the remote control and the LED attached to pin 13 on the SunFounder Uno board will light up If you press other keys the LED will go out S u n F o u n d e r ...

Страница 36: ...ges It can detect surrounding temperature changes in real time and send the temperature data to analog I O port of the SunFounder Uno board You only need to convert the output to Celsius temperature by simple programming and display it on an LCD Experimental Procedures Step 1 Build the circuit Analog Temperature Sensor Module SunFounder Uno S A0 GND 5V LCD1602 connection connect pin RS to digital ...

Страница 37: ...e code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now touch the thermistor and you can see the current temperature displayed on the LCD in both Celcius and Fahrenheit degrees S u n F o u n d e r ...

Страница 38: ...sor module Several jumper wires Experimental Principle In this experiment we will use a Digital temperature Sensor module and an LED attached to pin 13 of SunFounder to build a simple circuit to make a temperature light With the LED attached to pin 13 connect the pin DO to D7 of SunFounder Uno When the Digital Temperature Sensor detects that the ambient temperature is higher than a certain value t...

Страница 39: ...ample code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now touch the thermistor and you will see the LED attached to pin 13 on SunFounder Uno board light up after a while S u n F o u n d e r ...

Страница 40: ...t board is a passive buzzer while the other with a black tape instead of a board is an active buzzer as shown below An active buzzer has a built in oscillating source so it will make sounds when electrified But a passive buzzer does not have such source so it will not beep if DC signals are used instead you need to use square waves whose frequency is between 2K and 5K to drive it The active buzzer...

Страница 41: ...t Passive Buzzer Module SunFounder Uno S D11 GND 5V Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now you can hear the passive buzzer beep for warning S u n F o u n d e r ...

Страница 42: ...but it can only beep with a fixed frequency Step 1 Build the circuit Active Buzzer Module SunFounder Uno S D1 GND 5V Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now you can hear the active buzzer beep S u n F o u n d e r ...

Страница 43: ...veral jumper wires Experimental Principle With the LED attached to pin 13 connect the button module to digital pin 8 When the button module inducts button pressing signals the LED will be on Otherwise it will be off Experimental Procedures Step 1 Build the circuit Button Module SunFounder Uno S Digital 8 GND 5V Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website St...

Страница 44: ...41 Now press the button and the LED attached to pin 13 on the SunFounder Uno board will light up S u n F o u n d e r ...

Страница 45: ...ly a photo interrupter consists of two parts transmitter and receiver The transmitter e g an LED or a laser emits light and then the light goes to the receiver If that light beam between the transmitter and receiver is interrupted by an obstacle the receiver will detect no incoming light even for a moment and the output level will change In this experiment we will turn an LED on or off by using th...

Страница 46: ...43 Now stick a piece of paper in the gap of the sensor and the LED attached to pin 13 on the SunFounder Uno will go out remove the paper and then the LED will light up again S u n F o u n d e r ...

Страница 47: ...onduction When it tilts towards either side as long as the tilt degree and force meet the condition the switch will be energized thus it will output low level signals In this experiment we use a tilt switch module and an LED that has been attached to pin 13 of the SunFounder board to build a simple circuit With the LED attached to pin 13 connect pin S to D2 of SunFounder Uno board When the Tilt sw...

Страница 48: ...45 Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now tilt the switch and the LED attached to pin 13 on the SunFounder Uno board will light up S u n F o u n d e r ...

Страница 49: ... tilted in the appropriate direction the mercury touches a set of contacts thus completing the electrical circuit through those contacts Tilting the switch the opposite direction causes the mercury to move away from that set of contacts thus breaking that circuit Components 1 SunFounder Uno board 1 USB data cable 1 Mercury switch module Several jumper wires Experimental Principle Since the LED has...

Страница 50: ...Founder Uno S D2 GND 5V Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now tilt the switch and the LED attached to pin 13 on the SunFounder Uno board will light up S u n F o u n d e r ...

Страница 51: ...n L of one module to digital pin 7 and pin 5 of the SunFounder Uno board pin S and pin L of the other module to D4 and pin 6 of the Uno When you tilt one mercury switch the LED attached will become dimmer gradually while the other LED will slowly brighten The effect is just like the telepathy Experimental Procedures Step 1 Connect pin S and pin L of one module to D7 and pin 5 of the SunFounder Uno...

Страница 52: ...49 Now tilt the breadboard and you will see the LED on one module gets dimmer while that on the other LED becomes brighter S u n F o u n d e r ...

Страница 53: ...ature data Components 1 SunFounder Uno board 1 USB data cable 1 DS18B20 Temperature Sensor module 1 LCD1602 1 Potentiometer Several jumper wires Experimental Principle With a unique single wire interface DS18B20 requires only one pin for a two way communication with a microprocessor It supports multi point networking to measure multi point temperatures Eight DS18B20s can be connected at most becau...

Страница 54: ...3 3V K to GND Potentiometer connection Connect the middle pin to VO of LCD1602 and any other pin to GND Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now you can see the value of the current temperature displayed on the LCD S u n F o u n d e r ...

Страница 55: ...absolute and incremental relative ones The output of absolute encoders indicates the current position of the shaft making them angle transducers The output of incremental encoders provides information about the motion of the shaft which is typically further processed elsewhere into information such as speed distance and position In this experiment we will use the latter An incremental encoder is a...

Страница 56: ...below It shows that if output 1 and output 2 is high then the switch rotates clockwise if output 1 is high and output 2 is low then the switch rotates counterclockwise As a result during SCM programming if output 1 is high then you can tell whether the rotary encoder turns left or right as long as you know the state of output 2 Experimental Procedures Step 1 Build the circuit Rotary Encoder Module...

Страница 57: ...o SunFounder Uno Now you can see the angular displacement of the rotary encoder printed on Serial Monitor When you spin the rotary encoder clockwise the angular displacement increases when you spin it counterclockwise the value decreases Press the switch on the rotary encoder and the value will return to zero S u n F o u n d e r ...

Страница 58: ...1 USB data cable 1 7 color auto flash LED module Several jumper wires Experimental Principle When being power on the 7 color auto flash LED will flash built in colors Experimental Procedures Just connect pin S to 5V of the SunFounder Uno board and pin to GND Now you can see the 7 color auto flash LED flashing seven colors S u n F o u n d e r ...

Страница 59: ... decreases with increasing incident light intensity in other words it exhibits photoconductivity A photoresistor can be applied in light sensitive detector circuits and light and dark activated switching circuits In this experiment hook up pin S to an analog port of the SunFounder board When the light intensity changes the resistance of photoresistor will change accordingly Thus it will also chang...

Страница 60: ...N Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now cover the photoresistor with a cloth or your palm to change the light intensity and you will find the value displayed on the LCD changes accordingly S u n F o u n d e r ...

Страница 61: ...s high reliability and excellent long term stability The sensor includes a resistive sense of wet component and an NTC temperature measurement device and is connected with a high performance 8 bit microcontroller Components 1 SunFounder Uno board 1 USB data cable 1 Humiture sensor module 1 LCD1602 1 Potentiometer Jumper wires Experimental Principle Only three pins are available for use VCC GND and...

Страница 62: ...ure Sensor Module SunFounder Uno S D4 GND 5V LCD1602 connection connect pin RS to digital pin 5 R W to GND E to digital pin 6 D4 D7 to digital pin 9 to 12 VSS to GND VDD to 5V A to 3 3V K to GND Potentiometer connection Connect the middle pin to VO of LCD1602 and any other pin to GND Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload t...

Страница 63: ...ter of an object if there is no obstacle emitted infrared ray will weaken with the propagation distance and finally disappear If there is an obstacle when infrared ray encounters an obstacle it will be reflected back to the infrared receiver Then the infrared receiver detects this signal and confirms an obstacle exists in front In this experiment we will use an obstacle avoidance sensor module and...

Страница 64: ...8 GND 5V Step 2 Program Please refer to the example code in LEARN Get Tutorial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now put an obstacle in front of the Obstacle Avoidance Sensor and the LED attached to pin 13 on the SunFounder Uno board will light up S u n F o u n d e r ...

Страница 65: ... will output low level If the rays encounter black lines they will be absorbed thus the receiver gets nothing and pin S will output high level In this experiment we will use an obstacle avoidance sensor module and an LED attached to pin 13 of the SunFounder Uno board to build a simple circuit to make a tracking light Since an LED has been attached to pin 13 connect the pin out to D8 of the SunFoun...

Страница 66: ... website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now draw two black thick lines on the paper If the rays emitted by the sensor encounter the black lines the LED attached to pin 13 on SunFounder Uno board will light up Otherwise it will go out S u n F o u n d e r ...

Страница 67: ...puts AO analog output to output voltage signals from microphone in a real time manner DO When sound intensity reaches a certain threshold the sensor outputs high or low level you can adjust the threshold by potentiometer Microphone Sensor High sensitive Voice Sensor Components 1 SunFounder Uno board 1 Breadboard 1 USB data cable 1 Microphone sensor module Several jumper wires Experimental Principl...

Страница 68: ...ry large The voltage for pin 3 of LM393 is close to power supply voltage 5V pin 1 outputs high and the LED is on when there is voice input the resistance of the microphone decreases pin 1 outputs low and the LED is off And connect pin 1 to IO of the SunFounder Uno board to detect sounds by programming Experimental Procedures Step 1 Build the circuit Microphone Sensor Module SunFounder Uno AO A0 G ...

Страница 69: ...66 Now speak near or blow into the microphone and you can see the LED attached to pin 13 on the SunFounder Uno board brighten S u n F o u n d e r ...

Страница 70: ...ity for human body itself is a kind of conductor and an antenna that can receive electromagnetic waves in the air These electromagnetic wave signals collected by human body are amplified by the transistor and processed by the comparator on the module to output steady signals With the LED attached to pin 13 of Uno connect pin D0 of the sensor to D7 of the Uno board When the metal touch sensor detec...

Страница 71: ...68 Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now touch the base electrode of the transistor and the LED attached to pin 13 on the SunFounder Uno board will light up S u n F o u n d e r ...

Страница 72: ...rom 700nm to 1000nm A far infrared flame probe converts the strength changes of the external infrared light into current changes And then it converts analog quantities into digital ones In this experiment connect pin D0 to D8 of the SunFounder Uno board When the flame sensor detects flame signals the LED attached to pin 13 of the Uno board will brighten Otherwise it will keep off Experimental Proc...

Страница 73: ...70 Now ignite a lighter near the flame sensor and the LED on the module and that attached to pin 13 on Uno will light up S u n F o u n d e r ...

Страница 74: ...ke the transistor output low level 0V by programming the transistor will conduct electricity because of current saturation The normally open contact of the relay will be closed while the normally closed contact of the relay will be opened when it outputs high level 5V the transistor will be cut off and the relay will restore to the initial state Experimental Procedures Step 1 Build the circuit Rel...

Страница 75: ...ed contact opened and the normally open contact closed You can attach a high voltage device to the module For example connect a bulb of 220V voltage to the output port of the relay module and then the relay will act as an automatic switch S u n F o u n d e r ...

Страница 76: ... module Several jumper wires Experimental Principle This module has two analog outputs corresponding to X Y biaxial offsets and one digital output representing whether it is pressed on Z axis The module integrates power indicator and can display operation condition In this experiment we use the SunFounder Uno board to detect the moving direction of the Joystick knob and pressing of the button Expe...

Страница 77: ...ial on our website Step 3 Compile Step 4 Upload the sketch to SunFounder Uno Now push the rocker and the coordinates of X and Y axes displayed on Serial Monitor will change accordingly press the button and the coordinate of Z 0 will also be displayed S u n F o u n d e r ...

Страница 78: ...mosphere where there may be inflammable gases the conductivity of the gas sensor raises along with the inflammable gas concentration increases MQ 2 performs a good detection to different inflammable gases such as natural gas especially sensitive to liquefied gas propane and hydrogen The higher the concentration is the greater the conductivity will be thus changing the output signal In this experim...

Страница 79: ...o Now ignite a lighter or light a candle and release a small amount of smoke or gases into a flask or other glass containers Then place the sensor over the container or invert the container and place the sensor at the mouth When the concentration reaches the threshold you can see the value displayed on Serial Monitor change S u n F o u n d e r ...

Страница 80: ... 123456 with the SunFounder Uno Then input the password by the keypad If this password is consistent with what was set the relay will be closed and the LED attached to pin 13 of the Uno will light up Otherwise the relay will keep opened and the LED will be off Experimental Procedures Step 1 Build the circuit Relay connection Connect pin S to pin 13 on the SunFounder board pin to GND to 5V LCD1602 ...

Страница 81: ...no Now the LCD will show Welcome after power on When you press the key it will prompt Input Your Code If you input 123456 and press key to confirm Input Correctly Please Come In will be displayed and the LED will light up If you input other contents the message Input Error Please Again will be shown and the LED will be off S u n F o u n d e r ...

Страница 82: ...ixed resistor as the other The lower their resistance is the more analog input 0 will be pulled towards 5V The higher the resistance gets the closer to GND it will become The buzzer despite of the noise level these things generate is actually quite low in current consumption and can be driven directly from the SunFounder Uno digital pin This experiment uses an RGB LED In this case however we are n...

Страница 83: ...potentiometer Now ask your test subject to side down First let him her touch the other end of the two jumper wires with two adjoining fingers Then spin the knob of the pot until the LED turns green You may now interrogate the subject If he she lies to your questions the LED will flash red and the buzzer beeps If the LED flashes either red or blue you should adjust the knob until it changes to gree...

Страница 84: ...erimental Principle Gas sensors can detect the concentration of smoke generated to warn of possible fires when flame sensors can do the infrared rays emitted by fire Detecting both smoke and flames we can tell whether a fire s happened At the same time the buzzer will beep to warn Experimental Procedures Step 1 Build the circuit Buzzer Connection Connect pin S to D3 of Uno MQ 2 Gas Sensor Connecti...

Страница 85: ...82 Now ignite a lighter near the sensor and you can see the LED attached to pin 13 light up and the buzzer beeps S u n F o u n d e r ...

Страница 86: ... and an LCD to sense and display both the current temperature and the set temperature A rotary encoder is used to change the set temperature When the measured temperature value is lower than the set value the relay is activated Relays are old fashioned electromagnetic components that activate a mechanical switch when a current flows through its coil of wire They can switch high currents and voltag...

Страница 87: ...urrent temperature in both Celsius and Fahrenheit degrees Press the button to setup Then spin the knob of the rotary encoder to change the temperature threshold After setting is finished for example to 30 press the rotary encoder to confirm Touch the thermistor and the value displayed on the LCD varies and finally the LED on the SunFounder Uno board will dim for the measured temperature is higher ...

Страница 88: ... display DS18B20 and the current temperature press digital 2 key and it will display DHT11 and the current humidity press digital 3 key and it will display Big Sound and the current sound level press digital 4 key and it will display Light Sensor and the current light intensity press digital 5 key and it will display Analog Hall and the current magnetic field intensity if you press digital 6 key t...

Страница 89: ... the sketch to SunFounder Uno Now press Power Key and you can see Environment Monitor Begin on the LCD Press digital 1 key and it will show DS18B20 and a temperature value Press digital 2 key DHT11 and current humidity Press digital 3 key Big Sound and current sound level Press digital 4 key Light Sensor and current light intensity Press digital 5 key Analog Hall and the current magnetic field int...

Страница 90: ...at normal ambient room temperatures Take care whilst handling to avoid mechanical or electrical damage to the printed circuit board and connectors PLEASE perform the connection or wiring based on the instructions in the manual or our website if you are not clear of the results Copyright Notice All contents including but not limited to texts images and code in this manual are owned by the SunFounde...

Отзывы: