Showing posts with label sensor. Show all posts
Showing posts with label sensor. Show all posts

Friday, August 12, 2016

Arduino Based Earthquake Alarm with KY-002

Hello! Here I am again.

This time I made a Basic earthquake alarm with the KY-002 Shock sensor. Its can be used for multiple purposes, Like most sensors. In this case we use it as a earthquake sensor.





Step 1: What You Need?

1 x Arduino UNO
1 x USB Type-B Cable 

1 x RGB LED or 3 Color LED Module KY-016 

1 x Shock Sensor KY-002 or Arduino Adjustable Vibration Motion Sensor Module 3-pin
1 x Buzzer or Buzzer Module KY-012
Female-to-Male Jumper Wires
1 x Computer with Arduino IDE installed

All Sensor Module ( include KY-016, KY-002, KY-012) can be found in 37 Types Sensor in 1 Starter Learning Sensor Kit



Optional
1 x Mini Breadboard
Male-to-Male Jumper Wires
USB To Power Jack Cable


Don't have components? Don't worry. Just click the component's name. 


Step 2: Build Your Circuit.

Connect wire like the schematic above.




Step 3: Upload The Code.


Arduino UNO R3 buzzer easy KY-002 KY-012 KY-036 project RGB LED sensor Touch Sensor

Monday, July 25, 2016

How to detect concentration of gas by using MQ2 sensor

Understanding MQ-2 Gas Sensor

MQ-2 Gas sensor is used to detect the gas level around the area. This sensor able to use as home or factory gas leak monitoring, suitable for gas, butane, propane, methane, alcohol, hydrogen, smoke and other monitoring devices.


Specification:

  • Size: 35mm x 22mm x 23mm (length x width x height)
  • Main chip: LM393, ZYMQ-2 gas sensors
  • Working voltage: DC 5 V
  • Characteristics:
  • With a signal output instruction.
  • Dual signal output (analog output, and high/low digital output)
  • 0 ~ 4.2V analog output voltage, the higher the concentration the higher the voltage.
  • Better sensitivity for gas, natural gas, city gas.
  • With a long service life and reliable stability.
  • Rapid response and recovery characteristics. 







Step 1: What You Need?

1 x Arduino UNO R3
1 x M-2 Gas Sensor


Don't have components? Don't worry. Just click the component's name. 


Step 2: Build Your Circuit.





LCD pins

-Pins D7 , D6 , D5 , D4 connect to Arduino digital pins 2,3,4,5 respectively.

-Pins A and K connect to 5V and GROUND respectively

-Pins VSS and VDD connect to Ground and 5V respectively.



LED

-Use as a LED indicator for the calibration process of the MQ2 gas sensor.

-Connect to digital pin 13 of Arduino Uno



MQ2 Gas Sensor

-Analog output connect to the A0 of Arduino

Potentiometer

-Center pin connect to the V0 of LCD display

-Other two pins just connect to 5V and GROUND respectively


(Note: All of pins above is configured regarding the circuit figure above. You can configure the connection yourself regarding your favourite.)

Step 3: Upload The Code.





As you can see in the graph above , it shows several gases.

The values are plotted on a semilog paper, as you can see the values indicate 100......1000.....10000 ppm.

These values when plotted on a normal graph would represent a curve like an exponential one.



Formula In the Coding


pow(10,( ((log(rs_ro_ratio)-pcurve[1])/pcurve[2]) + pcurve[0]))



Based on the graph MQ2, the derivation of ppm formula will be:

Y - y1 = m( X - x1)

X= (y-y1)/m + x1

X= (Rs/Ro-y1)/m + x1

log X =(log (Rs/Ro) - y1)/m +x1

X =10^( (log (Rs/Ro) - y1)/m +x1)

*Note: X = ppm on the graph


Y= Rs/Ro

***The derivation formula are same and can be used for other types of MQ gas sensor.


Arduino UNO R3 easy gas sensor LCD LED m-2 M-2 Gas Sensor project sensor

Wednesday, July 20, 2016

Arduino - TTP223 CAPACITIVE TOUCH SENSOR SWITCH


Hello world! Today i made a code for the ttp223 capacitive touch sensor. The code is really easy and can be used with normal buttons to. 

See how it work!


Step 1: What You Need?



1 x Arduino Board (I'm using DCCduino UNO R3)
1 x Computer with Arduino IDE installed


Optional
Arduino Uno R3 Acrylic Transparent Casing
Cable Cover
Lamp Socket + Power Cable & Light Bulb


You can buy Arduino Compatible UNO Ultimate Starter Kit / Learning Kit at here.

Don't have components? Don't worry. Just click the component's name. 


Step 2: Build Your Circuit.




Step 3: Upload Code To Board.



Download:
Arduino software




Sources:http://www.instructables.com/id/Arduino-TTP223B-CAPACITIVE-TOUCH-SENSOR-SWITCH/
1 way channel relay Arduino UNO R3 Capacitive Touch Sensor Relay sensor TTP223

Saturday, July 16, 2016

Arduino Weather Station (AWS)


In this project, we will be making a weather station that measures air pressure, temperature, rain drop, soil humidity and air humidity using Arduino which save the data for data acquisition!

Step 1: What You Need?





You can buy Arduino Compatible UNO Ultimate Starter Kit / Learning Kit at here.

Don't have components? Don't worry. Just click the component's name. 


Step 2: Build Your Circuit.


In general, the connections are very simple. Follow the instructions and images above, and you should have no problems.

Connecting Rain Drop Module

  • the VCC pin on Arduino’s 5V output
  • the GND pin to Arduino’s GND and
  • the Analog Data to Arduino's analog pin 0

Connecting Soil Humidity Module
  • the VCC pin on Arduino’s 5V output
  • the GND pin to Arduino’s GND and
  • the Analog Data to Arduino's analog pin 1

Connecting BMP180
  • the VCC pin on Arduino’s 3.3V output
  • the GND pin to Arduino’s GND
  • the SDA (Serial Data Line) pin to Arduino’s analog pin 4 and
  • the SCL (Serial Clock Line) pin to Arduino’s analog pin 5

Connecting DHT11
  • the VCC pin on Arduino’s 5V output
  • the GND pin to Arduino’s GND and
  • the DATA pin to Arduino’s digital pin 4


Step 3: Upload Code To Board.

Below is the Arduino Weather Station code. Include the library from AWS_library.rar, upload the code to your Arduino (Mine Arduino UNO R3), and you should have no problems.



Step 4: Test With Your Circuit. 


Power through batteries or a plug and you’re good to go.

After making sure that everything works smoothly, you can take this project into bigger project. Check it out >> Integrated Weather Station(IWS) !



Arduino Arduino UNO R3 Barometric Pressure Sensor BMP180 DHT11 Moisture sensor project rain drop sensor sensor soil moisture sensor Temperature and Humidity Sensor

Thursday, July 14, 2016

3D Room Visualizer


This project was made for fun. I came across an idea for just a 2D radar. I wanted to expand upon this. So I created a program that enables you to scan an entire room without needing to use a laser. It works by scanning 100 degrees along the x plane, then going up by 1 degree at a time along the y plane. It then send data via serial to a processing computer.

With only an Arduino board, two servos, and an HC-SR04, you can create a room scanner that is capable of showing depth!


Step 1: What You Need?

1 x Arduino Nano R3
2 x Servo Motor (generic)
1 x HC-SR04 Ultrasonic Distance Sensor
Female-to-Male Jumper Wires 
Female-to-Female Jumper Wires 

Optional
Mini Breadboard
Male-to-Male Jumper Wires
3D Printer (generic) 
HC-SR04 Ultrasonic Distance Sensor Holder 

Don't have components? Don't worry. Just click the component's name. 


Step 2: Build Your Circuit.

Attach as seen: Servo ground wires to GND, power cables to 5V, and data wires to D9 & D10.

Arduino Arduino UNO R3 easy project sensor servo motor SR04 Ultrasonic Range Finder Ultrasonic Sensor Holder

Monday, July 11, 2016

Arduino PIR Motion Sensor Alarm (Simple)


In this project, we'll build a motion-sensing arduino alarm using a PIR (passive infrared) sensor and an Arduino UNO. This is a great way to learn the basics of using digital input (from the sensor) and output (in this case, to a noisy buzzer) on Arduino board. 

This Arduino alarm is handy for booby traps and practical jokes, and it's just what you'll need to detect a zombie invasion! Plus, it's all built on a breadboard, so no soldering required!

1 x Computer with Arduino IDE software


Don't have components? Don't worry. Just click the component's name.

Step 2: Wire Arduino Board To Breadboard.

- Connect digital input/output (I/O) pin 2 on the Arduino UNO to row 1 on the breadboard. (Green color wire)
- Connect the 5V pin on the Arduino UNO to row 2 on the breadboard (Red color wire), and connect a nearby ground (GND) pin to row 3 (Orange color wire).


Step 3: Connect Your Motion Sensor. 

- Find the Gnd (-), Vcc (+), Output pins on the PIR sensor. 


- Plug the PIR sensor into the breadboard so that its (-) pin connects to the Gnd row, its (+) pin connects to 5V, and its Output pin connects to digital pin 2. 


(NOTE: If you have a different sensor that the one shown here, you may need to extend the sensor's pins with a stacking female header, wires, interconnect cables, etc. to fit.)


Step 4: Plug In the LED. 

- Plug the LED's anode (longer leg) into digital pin 13 on the Arduino. 
- Plug the LED's cathode (shorter leg, and/or the leg on the flattened side of the LED base) into the adjacent ground (Gnd) pin on the Arduino. 




Step 5: Connect The Piezo Buzzer. 

- Connect the Vcc on the Buzzer (Red color wire in image) to the Arduino's digital pin 10. 
- Connect the Gnd on the Buzzer (Black color wire in image) to the Arduino's Gnd pin.

(NOTE: These two wires can be reversed, as the polarity of the buzzer doesn't matter.)



Step 6: Program the Arduino. 

- Plug the USB cable into your computer and Arduino UNO. 
- Set the board and port settings for your Arduino Board.
      Board: Arduino UNO
- Open the sketch and upload to board. 


Step 7:Test Your Alarm. 

- When you power up your alarm, the PIR sensor will glow an ominous red. Stand very still or leave the room while the alarm calibrates the infrared level reading for the room. 
- Now test it by moving: the buzzer will buzz and the LED will light up. 
- Be amazed! Your PIR Sensor Arduino Alarm can sense movement up to 20 feet away. 
(NOTE: Might not be reliable for detecting the undead.)


Download: 

Arduino software


Sources:[http://makezine.com/projects/pir-sensor-arduino-alarm/]
Arduino Arduino UNO R3 buzzer easy LED Motion sensor PIR sensor project sensor

Thursday, July 07, 2016

Arduino Based Obstacle Avoiding Robot


The concept of this project is same as the Detecting Ostacles and HC-SR04 Ultrasonic Sensor.


If the robot detects an object in front of it, with the help of a small servo motor, it scans the area left and right in order to find the best way to turn. It has a notification LED, an buzzer to play a tone when an object is detected and an button for changing the function of the robot (stopped / moving forward). 





Step 1: What You Need?

1 x Micro Servo Motor
1 x Button
1 x Red LED
1 x 220 Ohm Resistor
1 x 9V Battery Holder
1 x Buzzer
8 x Nuts 
8 x Screws 
1 x Smart Robot Car Stainless Steel Metal Robot Chassis Kit 
8 x Spacers (Male-Female)
1 x USB Arduino Cable
1 x 9V Battery 
1 x Computer with Arduino Software installed 
Super Glue
Screw Drive

Optional 
HC-SR04 Ultrasonic Sensor Holder
Hot Gun Glue

Don't have components? Don't worry. Just click the component's name. 

Step 2:Put Hardware Parts On Robot Car


Use the spacers, screws and nuts to attach the Arduino UNO board and the L298 module on robot car. The mini breadboard can be easily attached on the robot car with the adhesive tape that already have at the bottom of it. 

Step 3: The 'Eyes' Of Your Robot


Use super glue to attach the servo motor in the front side of your robot. Watch the first image to understand how to put the ultrasonic sensor in the servo motor by using a small gear piece. The second image shows the completed part that will be the 'eyes' of your robot. 













Step 4: Connect The Circuit


The connections are pretty easy, watch the image above with the breadboard circuit schematic. 

(Tips: Use the breadboard only for the LED, button and buzzer, this will keep it simple and you can use the remain area to add more stuff on the future.)


Step 6: Upload Code To Robot


Plug an battery on it and press the function button once, your robot will start moving forward after upload the code to robot. To stop it, just press the button for one more time. 


You can press the 'Edit' button and start making your modification in the sketch. 
For example, try to change the '10'cm value that is the distance that will make the robot to stop and 'look' for a clear path. 

[Note: If your robot doesn't move forward, try to change the pins of the motors (motorA1 and motorA2 or motorB1 and motorB2)].

Download: 




Sources:[http://www.instructables.com/id/Arduino-Obstacle-Avoiding-Robot-2/?ALLSTEPS]
Arduino Arduino UNO R3 Basic button buzzer easy HC LED project Robot Car sensor servo motor simple SR04 Ultrasonic Range Finder Ultrasonic Sensor Holder

Monday, July 04, 2016

Arduino Thermometer Using LM35 Temperature Sensor


In this project, we will be displaying temperature in degree Centigrade and Fahrenheit as well. The ambient temperature is sensed using LM35 Temperature Sensor which is a linear sensor. LM35 Temperature Sensor gives linear output of 10mV/°C, this output of the sensor is then given to Analog input of Arduino UNO. Which then measures the temperature and displays it on 16x2 Alphanumeric Display in real time. 



Step 1: What You Need?

1 x Computer with Arduino software installed

Don't have components? Don't worry. Just click the component's name. 

Step 2: Built Your Circuit. 

LM35 Temperature Sensor is an integrated analog temperature sensor whose electrical output is proportional to Degree Centigrade. Arduino measures output of the sensor and then displays the reading on LCD. As the LM35 Temperature sensor gives output in Degree Centigrade, the Arduino then calculates the temperature in Fahrenheit as well and displays both reading on the LCD.

This calculation is quite simple:
°F =°C x 9/5 + 32
So 30 °C to °F will be 30°C x 9 / 5 +32 = 86.0 °F




Step 3: Upload Code To Board.



Download: 



Sources:[http://www.instructables.com/id/Arduino-Thermometer-Using-LM35-Temperature-Sensor/]
Arduino Arduino UNO R3 Basic easy LCD LM35 project sensor Temperature Sensor

Friday, July 01, 2016

Detecting Obstacles and Warning with Arduino and HC-SR04 Ultrasonic Sensor


This is tutorial to help you understand ultrasonic and buzzer and go deeper into learning Arduino, follow these steps and give me feedback please. It is an easy to make fun project that you can build in 30 minutes or so. Lets get started !!


Step 1: What You Need

1 x Arduino UNO R3
1 x HC-SR04 Ultrasonic Distance Sensor
1 x Buzzer
1 x Breadboard
1 x Arduino USB Cable
1 x Computer with Arduino 
Few Wires

Don't have components? Don't worry. Just click the component's name. 

Step 2: Connect Your Circuit 

Connect the Buzzer POSITIVE terminal to the Arduino pin 2 and the NEGATIVE terminal to the Gnd. Connect the VCC pin of ultrasonic to +5V pin of Arduino board and the Gnd to the ground. Connect trig pin to pin 10 and echo pin to pin 19. The schematic circuit diagram may help you.


Schematic Ciruit Diagram 


Step 3: Upload The Code To Your Arduino 


Download: 




Sources:[https://www.hackster.io/ammaratef45/detecting-obstacles-and-warning-arduino-and-ultrasonic-13e5ea?ref=platform&ref_id=424_trending___&offset=59]
Arduino Arduino UNO R3 Basic beginner buzzer HC sensor simple SR04 Ultrasonic Range Finder

 

  • Copyright © Arduino Tutorial ™ is a registered trademark.
    Designed by Templateism. Hosted on Blogger Templates.