Need of Microcontroller
• A microcontroller (also MCU or µC) is a functional
computer system-on-a-chip. It contains a processor core,
memory, and programmable input/output peripherals.
• Microcontrollers include an integrated CPU, memory (a
small amount of RAM, program memory, or both) and
peripherals capable of input and output.
Arduino
Arduino Uno is a microcontroller board based on the ATmega328P. It has
14 digital input/output pins (of which 6 can be used as PWM outputs), 6
analog inputs, a 16 MHz quartz crystal, a USB connection, a power jack,
an ICSP header and a reset button
It contains everything needed to support
the microcontroller; simply connect it to a
computer with a USB cable or power it
with a AC-to-DC adapter or battery to
get started.
ARDUINO pin diagram
POWER SUPPLY
ACInput
Input Bridge Voltage
Voltage
AC Bridge
(Transformer) Rectifier Rectifier Regulator
Regulator
(Transformer) Rectifier Rectifier
(LM7805)
(LM7805)
MCU
MCU
POWER SUPPLY CIRCUIT
D1
1
VDD
JP2
2 - + 4 1 2
2 V IN V O U T VDD
1 U2
7805 R4
GND
220 VAC C5 C6 C7 220 ohm
470 uF 100 uF 0 .1 u F
3
D2
3
LED
POWER SUPPLY
• The operation of power supply circuits built using filters, rectifiers, and then
voltage regulators.
• Starting with an AC voltage, a steady DC voltage is obtained by rectifying the AC
voltage
• Then filtering to a DC level, and finally, regulating to obtain a desired fixed DC
voltage.
• The regulation is usually obtained from an IC voltage regulator Unit, which takes
a DC voltage and provides a somewhat lower DC voltage, Which remains the
same even if the input DC voltage varies, or the output Load connected to the DC
voltage changes.
LIQUID CRYSTAL DISPLAY (LCD)
Most common LCDs connected to the microcontrollers are 16x2 and 20x2
displays.
This means 16 characters per line by 2 lines and 20 characters per line by 2
lines, respectively.
The standard is referred to as HD44780U, which refers to the controller chip
which receives data from an external source (and communicates directly with
the LCD.
LCD
• The LCD standard requires 3 control lines and 8 I/O lines for the data bus.
• 8 data pins D7:D0
Bi-directional data/command pins.
Alphanumeric characters are sent in ASCII format.
• RS: Register Select
RS = 0 -> Command Register is selected
RS = 1 -> Data Register is selected
• R/W: Read or Write
0 -> Write, 1 -> Read
• E: Enable (Latch data)
The 8 data lines are connected to PORT 1 of 8051 microcontroller.
The three control lines ( RS, RW and EN ) are connected to PORT 3.5,3.6
and 3.7 respectively.
LCD DIAGRAM
TEMPARATURE SENSOR(LM35)
• This is a temperature sensor circuit that uses an
LM35, an IC that converts the ambient temperature
into an equivalent output voltage. The voltage output
of an LM35 increases by approximately 10 mV for
every 1 degree Kelvin of rise in temperature. Note
that 1 degree Kelvin is equal to 1 degree Celsius.
ULTRASONIC SENSOR
• This device detects the distance to an object and shows
the result in centimeters. This device is activated by a
trigger mechanism, pressing the trigger for one time
will give us the distance to an object if there was no
error like poor aiming. The distance to an object is
displayed using a digital display with a high intensity in
order to be seen in any lighting conditions.
Soil moisture sensor
• Soil moisture sensors measure the water content in soil. A soil
moisture probe is made up of multiple soil moisture sensors.3
BUZZER
• A buzzer or beeper is an audio signaling device, which may be mechanical,
electromechanical, or piezoelectric.
• Typical uses of buzzers and beepers include alarm devices, timers and
confirmation of user input such as a mouse click or key stroke.
• Buzzer is an integrated structure of electronic transducers, DC power
supply, widely used in computers, printers, copiers, alarms, electronic toys,
automotive electronic equipment, telephones, timers and other electronic
products for sound devices.
• Active buzzer 5V Rated power can be directly connected to a continuous
sound, this section dedicated sensor expansion module and the board in
combination, can complete a simple circuit design, to "plug and play."
LED DIAGRAM
FEATURES AND APPLICATIONS
FEATURES:
• High reliability.
• High radiant intensity.
• Peak wavelength λp=940nm .
• 2.54mm Lead spacing.
APPLICATIONS:
• Visual signals where light goes more or less directly from the source to the
human eye, to convey a message or meaning.
• Illumination where light is reflected from objects to give visual response of
these objects.
SOFTWARE REQUIREMENT
• MP lab
• EMBEDDED C
• IBEACON APP