Skip to main content

Posts

Showing posts from April, 2016

Arduino Beginner Experiments:Interfacing Arduino and Motion sensor

HELLO THERE!!!!           How are you guys doing lately? I hope everyone is fine always. This week, I have been tinkering around with my motion sensor and I am going to share a simple experiment about it with you guys. The objective of this experiment is to use the motion sensor to turn on and off an LED. When, there is a motion detected, the LED turns on and vice versa. Let's start with the items needed: HARDWARE: 1. ARDUINO UNO 2.A LED  3.PIR Motion Sensor SOFTWARE: 1.Arduino IDE Ok, Now that the items are obtained, let's see on how to assemble the circuit. The assembly of the circuit is fairly simple. The connection from motion sensor to Arduino is shown in the image below: Connection from motion sensor to Arduino The full complete assembly of the circuit is shown below: The assembly of the circuit   Simple right? Now, let's go to the coding part of this experiment. The code basically digital read the motion sensor values and tur

Arduino Experiments: LM35 and Graph plotting

HELLO THERE!!!       How are you guys? I hope everyone is fine always. This week, I am going to share to you guys about an experiment with LM35 (temperature sensor). Our main objectives are: 1. Obtain temperature value using LM35 2. Plot graphs from the value using Arduino Serial plotter and Processing Ok, before we begin we need to know what hardware and software are used in this experiment. Hardware: 1.Arduino UNO or Leonardo( I am using Leonardo) 2.LM35 temperature sensor Software: 1. Arduino IDE ( Version 1.6.8) 2.Processing IDE After obtaining the hardware and the software, we will assemble the circuit. The circuit assembly is pretty simple (use LM35 image above as reference): The schematics of the circuit Now for the Arduino code to read the temperature sensor: int Temp = A0;//sensor output pin at A0 int val; void setup() {  Serial.begin(9600);//serial communication at 9600bps } void loop() {  val = (5.0* an

Arduino Beginner experiment: Messing Around with Potentiometers and Piezo Speaker

HELLO THERE!!!         How are you, guys? As usual this week, I would like to share with you guys an experiment involving piezo speaker and potentiometer. the objective of this experiment is to control the piezo speaker by using two potentiometers. As usual let's see the hardware and software used in this experiment. HARDWARE: 1.Arduno UNO 2. Potentiometers(2 Units) 3.Piezo speaker SOFTWARE: 1, Arduino IDE     After obtaining the hardware and the software, let's see on how to assemble the circuit. The circuit is fairly simple. The potentiometer has 3 legs, at one end is the vcc( or ground), the middle leg is the ouput pin, and the other end is the ground(or vcc).The red wire from the piezo is connected to the output pin and the black wire to the ground. For more clarification, refer to the circuit sketch below.    Pretty simple, right? Now let's see the Arduino code for this experiment. At the beginning of the code, we have declarations o

Interfacing Arduino and DFrobot LCD part2: Scrolling Left and Right

HELLO THERE!!!      As usual, how are you guys? I hope you guys are fine always. This week I wanted to share with you guys about scrolling left and right in the DFrobot LCD. Last week, I was able to show you guys on how to set up the buttons to show text output. This week, I will show you guys on scrolling left and right when pressing the respective buttons.     Ok, Lets see what do we need for this experiment this week. HARDWARE: 1.Arduino UNO 2.DFrobot LCD Keypad Shield SOFTWARE: 1. Arduino IDE    Now that the items are sorted out, let's see how to assembly the circuit. The circuit assembly is no different than the last week's assembly: After assembling the the circuit, connect the Arduino to the computer and upload the following code to the Arduino: #include<LiquidCrystal.h> // the liquid crystal lib LiquidCrystal lcd (8, 9, 4, 5, 6, 7); int lk = 0; // lcd key int aki = 0; // analog key input #define R 0 // butt