The instructable is written with the vision of
delivering good stuff and helping the real hobbyist of arduino ,who really needs a easy and clear understanding source that any one can easily understand by just reading this module.I too is an arduino aspirant who keep on searching new updates and i learn purely from the web. The information provided in this module are simplified to the core making the readers understand the concepts quickly.I am happy to share the useful information that i know with others making the readers get benefited. I promise you that this will really be a power packed module to get into the stream of arduino,let`s get into the contents directly not wasting the time!
Step 1: Contents of Module1 (basics)
Actually this is my second instructable on the topic Learn arduino,i have already written an instructable on the same topic which covers all the basic essentials of arduino in an easy and crisp manner.
Topics covered in Module 1(basics):
1.A brief intro about arduino.
2.types of arduino.
4.your first "project".PWM-pulse width modulation.
Thus it would really better and good if you refer my previous instructable before you continue reading the current instructable. If you are new to arduino then referring my module 1 will create a bridge to learn the second module easily.LEARN ARDUINO BASICS.
Step 2: Contents(module 2)
The instructable is purely based on how to interface arduino with different sensors,relays,servo and LCD displays.
1. ultrasonics sensor.
2.PIR human detection sensor.
4. Rain water and Soil moisture Sensors.
5.Mini and micro servos. realy.
6. LCD displays.
7.Your own home automation project.(easy)
get excited to learn and explore!
Step 3: Ultrasonics Sensor-measuring Distance.
What it does?
It contains an ultrasonic transmitter and an ultrasonic receiver ,thus while the pulse signals are fed to the sensor from the arduino it transmitts ultrasonic sound the ultrasonic signals gets reflected as it hits an obstacle and returns back to the receiver the time taken for the travel is calculated in milliseconds and it provides the output data to the arduino which can be viewed through serial monitor.
Pin Details and connection:
Vcc--------->This is connected to the arduino 5v pin/any other suitable supply.
gnd--------->This is the ground pin. Trigger----->The input from arduino is connected to this pin(any digital pin).
echo--------->The output from the sensor is taken to arduino by establishing a connection between echo and any digital pin configured as input.
Coding -the easiest part !
A simple coding to start working with this sensor is provided in the images above refer it !
Replace the correct pin number on which digital pin you have connected the echo and trigger.According to the connection image provided the trigger is connected with pin- 12 and echo is connected with pin-11.
Conversion of Time to Distance:
The output of the sensor from the echo which is the time in miliseconds can be easily converted into distance by dividing the output by 58.This can be easily achieved through a single line of coding.
A simple real time application:
If you want to make a automation in your home that is used to switch the lights on or off automatically in a room by detecting the entry and exit of people. The detection of the human can be achieved by identifying a sudden drop in the output value of the sensor and the system can be programmed accordingly.
Step 4: PIR Human Detection Sensor
As the name implies,it is used to detect the presence of a human or
any animal that radiates heat.Thus it uses IR waves to sense the heat emitted from a human and give the output accordingly. Using this is very simple!
pin details and connection:
VCC----->this is the power in pin it is connected with the 5v in arduino.
Gnd------->This is the ground pin and connected with the gnd of arduino.
O/P-------->this is the output pin it is used to take the output data to the arduino,it can be connected with any of the digital pins.
In addition to the pins the sensor is equipped with two adjustable knobs used to vary the sensitivity and delay. coding-the easiest part!
Refer the images provided above for the sample code. if the output remains constant then try to vary the sensitivity knob and you may get the desired output.
Real time example!
It is very useful in home automation projects as it is very important to know weather the human is present or not and make the system work accordingly. It can be used to control the lights of the bathroom as it is not required when not in use thus saving electricity.
Step 5: Sound Sensor
The Sound sensor receives any sound waves created in its surroundings and it gives its output accordingly.It can be used as both analog and Digital.
1.While connected to DIGITAL:
The output will be in the form of 0's and1's thus the sensitivity can be varied only by using the tirmpot provided with the module.
2.While connected with ANALOG:
The output is in the form of 16 bit data thus without the use of trimpot the required action can be done by having a standard value of reference and using it in a condition(like" if").
The above two conditions apply to any sensor with a similar outlook i.e. with a trimpot on it. There is no any complications in using this you can use it easily by just powering the sensor with 5v and taking the output in the desired form either analog or digital.
It can be used in home automation for controlling the lights and fans hands free,like a double clap can be programmed for a switch ON and a single clap an be programmed for an OFF
Step 6: Rain Drop and Soil Moisture Sensors:
These are some really interesting sensors that provides really useful data and they are really cool to use!
They are very similar to your previously explained sound sensor thus they can be used both as analog and digital.And according to the sensor values they can be programmed to accomplish your task.
Live applications: The soil moisture sensor can used to automate your garden and irrigate the plants according to their needs and saving the water. Thus you can try lot more ,working with arduino is beyond your imagination!
Step 7: Mini and Micro Servos:
It's really cool to know about and work with servos as the make the system to be in motion!
I have already posted a detailed instructable on servo and it's applications you can refer it by clicking the link.
Step 8: Relay-(to Control High Voltage!)
Knowing about this is very important as it will serve as a key for home automation,as every home appliances work on AC and it can't be controlled directly and it requires a interface which is the relay.
The 5v is connected with the power supply.
The gnd is connected to ground.
The signal pin is connected with the digital pins of arduino as you can be able to control the relay with this.
The COM is connected with the power source of the high voltage,you should be very careful while working with AC as it can seriously injure you thus if you are new then it would be better to have a helper. The working of the relay is clearly illustrated in the table above refer images , i hope you don't need further explanation.
Step 9: LCD-liquid Crystal Display.
They are used to know the process happening inside like the values ofsensors,it can also be used to make the user interact with the system. The connection details are explained in the images displayed above. The trim pot is used to vary the contrast of the display.
The pins D1,D2,D3,D4 are used for data transfer.
Sample coding: The coding is given in the images shown above refer it!
The line in the code above Liquidcrystal lcd(12,11,5,4,3,2); implies that--->(Rs,E,d0,d1,d2,d3)connected to arduino pins (12,11,5,4,3,2) respectively.
Lcd.begin(16,2); - says that the display used is a 16*2 type(column,row)
Step 10: Thank YOu for Learning With Me!!!
Hope you like this module, please let me know if there is any mistakes of corrections or any enhancements that can be done and i will be happy to know! If you have any queries or doubts in the contents provided above let me know about it in the comments section and i will be happy to help in any means that i can.
Click the favorite button if you like this instructable so that you may refer it for any future clarifications. I have lot more useful stuffs to share with you so let's be connected FOLLOW me for more useful information. **********Share Knowledge!Create Ideas!***********