Alm Samhan Reg No: 2020/RP/ICT/E/M/2214 Class: 1A ICT Subject Area: 257 IOT sensors 1
Content Following 10 sensors working methods of operation in aurdino project with Needed tools Aurdino code Aurdino circuit Output Using places Sensors can be used for learning teaching process 1. Ldr sensor 2. Temperature sensor 3. Vibration sensor 4. Ultrasonic sensor 5. Tilt sensor 6. Flex sensor 7. Force sensor 8. Gas sensor 9. IR sensor 10.PIR sensor 2
1) LDR Sensor Needed tools Arduino uno board breadboard Jumper wires LDR sensor Resistor Code int LDRPin=A0; int LDRPin1=A1; int LDRRead=0; void setup(){ pinMode(LDRPin,INPUT); Serial.begin(9600); } void loop() { LDRRead=analogRead(LDRPin); Serial.println(LDRRead); delay(1000); } Circuit 3
Output The changing value on the light falling on the LDR sensor is printed and displayed lined by line on the serial monitor with a delay 1000 milliseconds Using other places Burglar Alarm Circuits Alarm Clock Light Intensity Meters Street lights LDR sensor can be used for teaching learning process These devices are used where there is a need to sense the presence and absence of light is necessary. 4
2) Temperature sensor Needed tools Arduino uno board Jumper wires Temperature sensor Resistor Code int TempSensor=A0; int val=0; void setup(){ Serial.begin(9600); pinMode(TempSensor,INPUT); } void loop(){ float mv=(val/1024.0)*5000; float cel =mv/10; float farh=(cel*9)/5+32; val=analogRead(TempSensor); Serial.print(\"TEMPRATURE =\"); Serial.print(\"celcious :\"); Serial.print(cel); Serial.print(\"*C \"); Serial.print(\"Faranhite :\"); Serial.print(farh); Serial.print(\"*F \"); Serial.println(); delay(1000);} 5
Circuit Output Based on the temperature received by the TMP sensor , the values of celcious and faranhite will be printed and displayed on the serial monitor 6
Using other places Medical, Motorsport, HVAC, agriculture, Industrial, Aerospace and automotive. Temperature sensor can be used for teaching learning process A temperature sensor is a key component of any process heating application as it provides temperature feedback about the process, which can be used to monitor or control the process. 7
3) Vibration sensor Needed tools Arduino uno board Jumper wires Vibration motor NPN transistor Code int vibrationSensor=A0;//digital pin as senseor pin int VibrationValue=0; void setup() { Serial.begin(9600); pinMode(vibrationSensor,INPUT); } void loop() { VibrationValue=analogRead(vibrationSensor); Serial.println(VibrationValue); delay(100); } Circuit 8
Output After simulating we can see change serial monitor value Using other places Monitor motors Critical pumps, fans gearboxes compressors in the oil gas industry Vibration sensor can be used for teaching learning process A vibration sensor is a device that measures the amount and frequency of vibration in a given system, machine, or piece of equipment. Those measurements can be used to detect imbalances or other issues in the asset and predict future breakdowns. 9
4) Ultrasonic distance sensor Needed tools Arduino uno board Jumper wires Ultrasonic sensor Code int sensorpin = 0; int val = 0; void setup() { Serial.begin(9600); } void loop() { val = analogRead(sensorpin); Serial.println(val); delay(400); } Circuit 10
Output Output displayed lined by line on the serial monitor Using other places Vehicle detection for car wash and automotive assembly Irregular parts detection for hoppers and feeder bowls Presence detection Box sorting using multi-transducer ultrasonic monitoring system Ultrasonic sensor can be used for teaching learning process Ultrasonic sensors are used primarily as proximity sensors. They can be found in automobile self-parking technology and anti-collision safety systems. Ultrasonic sensors are also used in robotic obstacle detection systems, as well as manufacturing technology. 11
5) Tilt sensor Needed tools Arduino uno board Breadboard Jumper wires Tilt sensor Led bulb Resistors Code // the number of the input pin // the number of the output pin int tilt = 2; int led = 13; void setup() { pinMode(tilt, INPUT); pinMode(led, OUTPUT); } void loop() { int reading; reading = digitalRead(tilt); if(reading) digitalWrite(led, LOW); else digitalWrite(led, HIGH); } 12
Circuit Output When we changing tilt sensor valuve after that we can see led blinking 13
Using other places To detect the position of hand-held game systems and in game controllers. Tilt sensor can be used for teaching learning process A tilt sensor, or tilt switch, is a device used for measuring the tilt of an object in multiple axes with reference to an absolute level plane 14
6) Flex sensor Needed tools Arduino UNO Flex Sensor 10KΩ Resistor LED 1KΩ Resistor Mini Breadboard Connecting wires Code //Constants: const int ledPin = 3; //pin 3 has PWM funtion const int flexPin = A0; //pin A0 to read analog input //Variables: int value; //save analog value void setup(){ pinMode(ledPin, OUTPUT); //Set pin 3 as 'output' Serial.begin(9600); //Begin serial communication } void loop(){ value = analogRead(flexPin); //Read and save analog value from potentiometer Serial.println(value); //Print value value = map(value, 700, 900, 0, 255);//Map value 0-1023 to 0-255 (PWM) analogWrite(ledPin, value); //Send PWM value to led delay(100); //Small delay } 15
Circuit Output 1. Add breakpoints by clicking on the line numbers. 2. Hover over the variables while paused to see their value. 3. Use the buttons above to resume simulation or step one line at a time. 16
Using other places Computer interfaces, Rehabilitation, security systems Music interfaces. Flex sensor can be used for teaching learning process A flex sensor changes its electrical resistance as it is bent. It can detect how far an object is bent or moved. For example, look for projects that use flex sensors to control a robotic hand. The sensor is made from a five-layered “sandwich” of thin materials. This Instructable is for students and science teachers who need simple and inexpensive flex sensors for experiments. It is easy to connect to an Arduino 17
7) Force sensor Needed tools Arduino uno board Jumper wires Resistor 2 Led 5 Force sensor Code #define fsrpin A0 #define led1 2 #define led2 3 #define led3 4 #define led4 5 #define led5 6 #define led6 7 int fsrreading; void setup() { Serial.begin(9600); pinMode(led1, OUTPUT); pinMode(led2, OUTPUT); pinMode(led3, OUTPUT); pinMode(led4, OUTPUT); pinMode(led5, OUTPUT); 18
pinMode(led6, OUTPUT); } void loop() { fsrreading = analogRead(fsrpin); Serial.println(fsrreading); if (fsrreading > 200) { digitalWrite(led1, HIGH); } else digitalWrite(led1, LOW); if (fsrreading > 450) { digitalWrite(led2, HIGH); } else digitalWrite(led2, LOW); if (fsrreading > 550) { digitalWrite(led3, HIGH); } else digitalWrite(led3, LOW); if (fsrreading > 650) { digitalWrite(led4, HIGH); } else digitalWrite(led4, LOW); if (fsrreading > 800) { digitalWrite(led5, HIGH); 19
} else digitalWrite(led5, LOW); if (fsrreading > 900) { digitalWrite(led6, HIGH); } else digitalWrite(led6, LOW); } Circuit 20
Output Add breakpoints by clicking on the line numbers. Hover over the variables while paused to see their value. Use the buttons above to resume simulation or step one line at a time. Using other places Fluid monitoring applications Dialysis machines Endoscopic surgery Physical therapy equipment, Orthopaedics MRI devices. Force sensor can be used for teaching learning process A force sensor is another term used for a load cell or weight sensor. They are used to measure compression, force, strain and load. Many have internal strain gauges bonded to the metal structure which react to even the smallest compression causing a change in resistance and giving feedback on these results. 21
8) Gas sensor Needed tools Arduino uno board Breadboard Jumper wires Gas sensor Resistor Led 1 Code int LED = A1; const int gas = 0; int MQ2pin = A0; void setup() { Serial.begin(9600); } void loop() { float sensorValue,MQ2pin; sensorValue = analogRead(MQ2pin); // read analog input pin 0 if(sensorValue >= 470){ digitalWrite(LED,LOW); Serial.print(sensorValue); Serial.println(\" |SMOKE DETECTED\"); } else{ digitalWrite(LED,HIGH); Serial.println(\"Sensor Value: \"); Serial.println(sensorValue); 22
} delay(1000); } float getsensorValue(int pin){ return (analogRead(pin)); } Circuit 23
Output After simulation we can see changing valuve on the serial monitor and toch the gas blink the led Using other places Factories and manufacturing facilities Gas sensor can be used for teaching learning process Gas sensors are devices that can detect the presence and concentration of various hazardous gases and vapors, such as toxic or explosive gases, volatile organic compounds (VOCs), humidity. 24
9) IR sensor Needed tools Arduino uno board Breadboard Jumper wires IR sensor IR remote Code #include <IRremote.h> int input_pin=8;// mention IR reciever connected pin IRrecv irrecv(input_pin); decode_results signals; void setup() { Serial.begin(9600); irrecv.enableIRIn(); irrecv.blink13(true); } void loop() { if (irrecv.decode(&signals)){//print decode signal Serial.println(signals.value,HEX);//first lin hex Serial.println(signals.value,BIN);//line binary irrecv.resume(); } } 25
Circuit Output When you press the button on the IR remote, the corresponding HEXA value will be printed first and BINARY value will be printed at the second on the serial monitor. Using other places Climatology, Meteorology. Photobiomodulation, Gas detectors. Water analysis, Anesthesiology testing. Petroleum exploration, Rail safety. IRsensor can be used for teaching learning process IR sensors are now widely used in motion detectors, which are used in building services to switch on lamps or in alarm systems to detect unwelcome guests. 26
10) PIR sensor Needed tools Arduino uno board Breadboard Jumper wires PIR sensor Led bulb Resistor Code int sensorState = 0; void setup() { pinMode(2, INPUT); pinMode(LED_BUILTIN, OUTPUT); Serial.begin(9600); } void loop() { sensorState = digitalRead(2); // check if sensor pin is HIGH. if it is, set the // LED on. if (sensorState == HIGH) { digitalWrite(LED_BUILTIN, HIGH); Serial.println(\"Sensor activated!\"); } else { digitalWrite(LED_BUILTIN, LOW); } delay(10); // Delay a little bit to improve simulation performance } 27
Circuit Output After simulating we can see input voltage high after that led blinking and print in serial monitor “sensor activated” 28
Using other places Security Alarms Motion Detection Alarms Automatic Lighting Applications PIR sensor can be used for teaching learning process PIR sensors are used in thermal sensing applications, such as security and motion detection. 29
Note: Dear Sir I Did This Assignment,Got Ideas From Searching In Google,Watching Vedio Tutorial In Youtube. 30
31
Search
Read the Text Version
- 1 - 31
Pages: