Posts

Showing posts from May, 2021

RFID SERVO and LED

Image
Interfacing RFID with Servo and LED  click here for codes

Interfacing MFRC522 RFID Reader with Arduino

Image
                         MFRC522 RFID RFID means radio-frequency identification. RFID uses electromagnetic fields to transfer data over short distances, RFID is useful to identify people, to make transactions  you can use the RFID system to open a door. for example, only the person with the right information on his card or tag is allowed to enter. An RFID system uses : tags attached to the object to be identified, we have an electromagnetic card. each tag has its own identification (UID) the  reader, that sends a signal to the tag and read its response Specifications : 1. input voltage is 3.3v 2. Frequency 13.56Mhz Library : RFID Library Here PIN LAYOUT : RES   - D9 SDA   - D10 MOSI - D11 MISO - D12 SCK   - D13 3.3V   - 3.3V GND  - GND CODE :   LED AND SERVO #include "SPI.h" #include "MFRC522.h" // LibrARY #define SS_PIN 10 #define RST_PIN 9 #define SP_PIN 8 MFRC522 rfid(SS_PIN, RST_PIN); MFRC522::MIFARE_Key key; void setup() { Serial.begin(9600); SPI.

Interfacing LCD 16*2 with Arduino

Image
                          16x2 LCD Display The LCD (Liquid Crystal Display) a  16x2 means it can display 16 characters per line and there are 2 such lines, in his LCD each character is displayed in a 5x7 pixel matrix. A  register select (RS) pin that controls were in the LCDs memory you're writing data to A  Read/Write (R/W) pin that selects reading mode or writing mode  An Enable pin that enables writing to the registers  8 data pins (D0-D7) .  The states of these pins (high or low)are the bits that you're writing to a register when you write or the values you're reading when you read  there is also a display contrast pin (v0), power supply pins (+5v and Gnd ), and LED backlight (+a,-k) pins that you can use to power the LCD, control the display contrast and turn on and off the LED backlight, respectively the Liquid Crystal Library  <LiquidCrystal.h>  Interfacing 16x2 LCD with Arduino code   #include <LiquidCrystal.h> // includes the LiquidCrystal Library  Liq

Interfacing Ultrasonic Sensor with Arduino

Image
                          Ultrasonic Sensor The Ultrasonic sensor is an electric device that measures the distance of a target object by emitting ultrasonic sound waves and converts the reflected sound into an electrical signal. Ultrasonic waves travel faster than the speed of audible sound. Ultrasonic sensors have two main components ; 1.the transmitter (which emits the sound using piezoelectric crystals ) 2. the receiver (which encounters the sound after it has traveled from the target in order to calculate the distance between the sensor and the object, the sensor measures the time taken between the emission of sound by the transmitter to its contact with the receiver  Formula :-  D=1/2 T * C D = distance , T = time , C = speed of sound wave (~343 m/s) it has a total of four pins  VCC > 5V GND>GND TRIG>(transmitter pin)  ECHO>(receiver pin) Interfacing Ultrasonic Sensor with Arduino Circuit :  VCC > 5V GND>GND TRIG>11  ECHO>12 CODE : /* * Ultrasonic Sensor

Interfacing Servo Motor with Arduino

Image
                        SERVO MOTOR A Servo motor is an electrical device that can push or rotate an object with great precision. if you want to rotate an object at some specific angles or distance, then we use a servo motor .it is just made of a simple motor that runs through a servo mechanism  Signal pin (yellow or orange ) receives the PWM signal from an Arduino's pin the servo motor has 3 wires : Red                      - 5v Brown                  - GND orange or yellow  - Signal pin or PWM pin   Interfacing Servo Motor with Arduino Circuit : RED          - 5V BROWN    - GND ORANGE  -  9 Go to flie > Example > Servo > Knob  include <servo.h> after #include in below program #include Servo myservo; // create servo object to control a servo int potpin = 0; // analog pin used to connect the potentiometer int val; // variable to read the value from the analog pin void setup() { myservo.attach(9); // attaches the servo on pin 9 to the servo object } v

Interfacing LDR with Arduino

Image
Photo Resistor (LDR)  A Light Dependent Resistor (LDR) is also called a Photoresistor or a cadmium sulfide cell .it is also called a photoconductor. An LDR is a component that has a variable resistance that changes with the light intensity that falls upon it. this allows them to be used in light sensing circuits    There are many applications for Light Dependent Resistors. these include  Lighting switch   the most obvious application for an LDR is to automatically turn on light at a certain light level. An example of this could be an automatic street light or a garden light system Camera shutter control   LDRs can be used to control the shutter speed on a camera. the LDR would be used to measure the light intensity which then adjusts the camera shutter speed to the appropriate level  the zig-zag structure on the LDR is cadmium sulfide track and two dots are metal film contacts How To Use LDR with Arduino : Circuit Diagram : Arduino Program for Above Circuit : int ldr=A0;//Set A0(Anal

Interfacing DHT11 Sensor with Arduino

Image
DHT11 The DHT11 is a low-cost temperature and humidity sensor. it consists of an element that is useful for sensing the humidity and temperature of surroundings. its capacitor consists of two electrodes with a moisture-holding substrate as a dielectric between them .change in capacitance will lead to a change in humidity levels. it is simple to use and setup but requires some time to get the data accurate DHT11 sensors have 3 pins  1.VCC  > 5v 2.GND  > GND 3.Data Pin > Analog pins (A0-A5) Applications This sensor is used in various applications like measuring humidity and temperature of surroundings, air moisture, ventilation, etc . this sensor also used as a preventive measure in a home where people are affected by humidity. How to use DHT11 Sensor with Arduino :   Circuit Diagram : DHT11 Library :   https://drive.google.com/file/d/1PAsxEfmz-hxHynA5JeAtP5dudUBonaj4/view?usp=sharing   Arduino Program for Above Circuit : #include "dht.h" #define dht_ap

The Arduino Family

Image
  The Arduino Family Arduino makes several different boards, each with different capabilities. In addition, part of being open-source hardware means that others can modify and produce derivatives of Arduino boards that provide even more form factors and functionality. If you’re not sure which one is right for your project Arduino Uno The Uno is a great choice for your first Arduino. It's got everything you need to get started, and nothing you don't. It has 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a USB connection, a power jack, a reset button and more. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. Arduino Mega (R3) The Arduino Mega is like the UNO's big brother. It has lots ( 54! ) of digital input/output pins (14 can be used as PWM outputs), 16 analog inputs, a USB connection, a power jack, and a rese

Arduino series

Image
What is an Arduino? Introduction : Arduino is an open-source platform used for building electronics projects. Arduino consists of both a physical programmable circuit board (often referred to as a microcontroller) and a piece of software, or IDE (Integrated Development Environment) that runs on your computer, used to write and upload computer code to the physical board.  The Arduino platform has become quite popular with people just starting out with electronics, and for good reason. Unlike most previous programmable circuit boards, the Arduino does not need a separate piece of hardware (called a programmer) in order to load new code onto the board   you can simply use a USB cable. Additionally, the Arduino IDE uses a simplified version of C++, making it easier to learn to program. Finally, Arduino provides a standard form factor that breaks out the functions of the micro-controller into a more accessible package.