Download - Battery Operated Coin Based
-
8/8/2019 Battery Operated Coin Based
1/20
EXPLANATION OF CIRCUIT DIAGRAM
The coin based solar charger consist of a microcontroller (8951c),LCD display,solar panel and other
components. The microcontroller is configured as follows:
Port 0 as output port
Port 1 as input port
Port 3.0 to receive data signals
Port 3.1 to transmits data signals
A solar panel is used which convert suns light energy into electricity is used to charge the battery (6v,
4.5Am/h) which is used to supply power to the universal mobile connector.
Initially when the coin slot is empty the photodiode receives signal from the l.e.d, it generates a logic
high level which drives transistor Q1 into saturation. Vce(sat) is give to P1.0.This signal is taken as no
coin have been inserted by the microcontroller. When the coin is inserted, the light from the, l.e.d. is
blocked which results in a logic low level signal. This signal (i.e. Vce = Vcc) is taken as coin inserted by
the microcontroller.
When the microcontroller receives signal that the coin have been inserted, it transmits data signals to
energised relay R1 via transistor Q3 turning its contact to n.c position. This connects the battery to the
mobile connector and the cell phone starts charging. The microcontroller starts a 10-minutes timer to
count the charging and give this data as a display to l.c.d. screen so that the user know how muchcharging time is left. It will also show the amount of battery left on the phone.
The battery will deenergised relay R2 and connect it to n.o. which will turn on the l.e.d. lamp indicating
charging is in process.
After the designated time the microcontroller will make R1 & R2 to thier earlier position which will cut
off the supply and R2 give signal to the microcontroller via Rxd pin that charging have been terminated
and l.e.d. will be switched off
-
8/8/2019 Battery Operated Coin Based
2/20
Features Compatible with MCS-51 Products 4K Bytes of In-System Programmable (ISP) Flash Memory
Endurance: 1000 Write/Erase Cycles
4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz
Three-level Program Memory Lock 128 x 8-bit Internal RAM 32 Programmable I/O Lines Two 16-bit Timer/Counters Six Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer Power-off Flag Fast Programming Time Flexible ISP Programming (Byte and Page Mode)
DescriptionThe AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4Kbytes of In-System Programmable Flash memory. The device is manufactured using
Atmels high-density nonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and pinout. The on-chip Flash allows the programmemory to be reprogrammed in-system or by a conventional nonvolatile memory programmer.By combining a versatile 8-bit CPU with In-System Programmable Flash ona monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides ahighly-flexible and cost-effective solution to many embedded control applications.
The AT89S51 provides the following standard features: 4K bytes of Flash, 128 bytes ofRAM, 32 I/O lines, Watchdog timer, two data pointers, two 16-bit timer/counters, a fivevectortwo-level interrupt architecture, a full duplex serial port, on-chip oscillator, andclock circuitry. In addition, the AT89S51 is designed with static logic for operationdown to zero frequency and supports two software selectable power saving modes.The Idle Mode stops the CPU while allowing the RAM, timer/counters, serial port, andinterrupt system to continue functioning. The Power-down mode saves the RAM contentsbut freezes the oscillator, disabling all other chip functions until the next external
interrupt or hardware reset.
-
8/8/2019 Battery Operated Coin Based
3/20
Pin Diagram of 89C51:
-
8/8/2019 Battery Operated Coin Based
4/20
-
8/8/2019 Battery Operated Coin Based
5/20
Block Diagram
-
8/8/2019 Battery Operated Coin Based
6/20
Brief Description
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer with 4K bytes
of Flash programmable and erasable read only memory (PEROM). The device is manufactured using
Phillipss high-density nonvolatile memory technology and is compatible with the industry-standard
MCS-51 instruction set and pinout. The on-chip Flash allows the program memory to be reprogrammed
in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU
with Flash on a monolithic chip, the Phillips AT89C51 is a powerful microcomputer which provides a
highly-flexible and cost-effective solution to many embedded control applications.
Pin Description
y VCC
Supply voltage.
y GND
Ground.
y Port 0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sinkeight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port
0 may also be configured to be the multiplexed low order address/data bus during accesses to external
program and data memory. In this mode P0 has internal pull-ups. Port 0 also receives the code bytes
during Flash programming, and outputs the code bytes during program verification. External pull-ups are
required during program verification.
y Port 1
Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull-
ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source
-
8/8/2019 Battery Operated Coin Based
7/20
current (IIL) because of the internal pull-ups. Port 1 also receives the low-order address bytes during
Flash programming and verification.
y Port 2
Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal
pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will
source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address byte during
fetches from external program memory and during accesses to external data memory that uses 16-
bit addresses (MOVX @ DPTR). In this application, it uses strong internal pull-ups when emitting 1s.
During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the
contents of the P2 Special Function Register.
Port 2 also receives the high-order address bits and some control signals during Flash programming
and verification.
y Port 3
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can
sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal
pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled low will
source Current (IIL) because of the pull-ups. Port 3 also serves the functions of various special
features of the AT89C51 as listed below:
-
8/8/2019 Battery Operated Coin Based
8/20
Port Pin Alternate Functions
P3.0 RXD (serial input port)
P3.1 TXD (serial output port)
P3.2 INT0 (external interrupt 0)
P3.3 INT1 (external interrupt 1)
P3.4 T0 (timer 0 external input)
P3.5 T1 (timer 1 external input)
P3.6 WR (external data memory write strobe)
P3.7 RD (external data memory read strobe)
Port 3 also receives some control signals for Flash programming and verification.
y RST
Reset input. A high on this pin for two machine cycles while the oscillator is running resets
the device.
y ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address during accesses
to external memory. This pin is also the program pulse input (PROG) during Flash programming. In
normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used
for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each
access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR
-
8/8/2019 Battery Operated Coin Based
9/20
location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the
pin is weakly pulled high. Setting the ALE-disable bit has no effect if the microcontroller is in external
execution mode.
y PSEN
Program Store Enable is the read strobe to external program memory. When the AT89C51
is executing code from external program memory, PSEN is activated twice each machine cycle,
except that two PSEN activations are skipped during each access to external data memory.
y
EA/V
PPExternal Access Enable. EA must be strapped to GND in order to enable the device to fetch
code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if
lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC for
internal program executions. This pin also receives the 12-volt programming enable voltage (VPP)
during Flash programming, for parts that require 12-volt VPP.
y XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
y XTAL2
Output from the inverting oscillator amplifier.
-
8/8/2019 Battery Operated Coin Based
10/20
LCD
Liquid crystal Display (LCD) displays temperature of the measured element,
which is calculated by the microcontroller. CMOS technology makes the device
ideal for application in hand held, portable and other battery instruction with low
power consumption.
GENERAL SPECIFICATION:
y Drive method: 1/16 duty cycle
y Display size: 16 character * 2 lines
y Character structure: 5*8 dots.
y Display data RAM: 80 characters (80*8 bits)
y Character generate ROM: 192 charactersy Character generate RAM: 8 characters (64*8 bits)
y Both display data and character generator RAMs can be read from MPU.
y Internal automatic reset circuit at power ON.
y Built in oscillator circuit.
-
8/8/2019 Battery Operated Coin Based
11/20
Net Media 2x16 Serial LCD Display Module
PIN Configuration
JP1/JP14 Pins 1 8 Description JP1/JP14 Pins 9 -16 Description
Pin1 Ground Pin9 D2 (Not Used)
Pin2 VCC (+5) Pin10 D3 (Not Used)
Pin3 Contrast Pin11 D4
-
8/8/2019 Battery Operated Coin Based
12/20
Pin4 Data/Command (R/S) Pin12 D5
Pin5 Read/Write (W) Pin13 D6
Pin6 Enable (E1) Pin14 D7
Pin7 D0 (Not Used) Pin15 VCC (LEDSV+)
Pin8 D1 (Not Used) Pin16 Ground
LCD Control Codes
Description Keyboard Code ASCII or Decimal
value
Display custom character
0-7
Ctrl-@ -Through- Ctrl-
G
0 - 7
BackSpace Ctrl-H 8
Horizontal Tab Ctrl-I 9
New Line Ctrl-J 10
Vertical Tab Ctrl-K 11
Form Feed (Clear Screen) Ctrl-L 12
Carriage Return Ctrl-M 13
Reset Controller Ctrl-N 14
Set Geometry Ctrl-O 15
Set Tab Size Ctrl-P 16
-
8/8/2019 Battery Operated Coin Based
13/20
Set Cursor Position Ctrl-Q 17
*Not Used ***** **
Set Contrast Ctrl-S 19
Set Backlight Ctrl-T 20
Command Escape Ctrl-U 21
Data Escape Ctrl-V 22
Raw Data Escape Ctrl-W 23
*Not Used ***** **
Display an ASCII
Character
None 22 255
-
8/8/2019 Battery Operated Coin Based
14/20
-
8/8/2019 Battery Operated Coin Based
15/20
BATTERY OPERATED COIN BASED
SOLAR CHARGER
ROLL NO. NAME
085503 ANSARI NAZNEEN
085504 ANSARI AFFAN
085507 ANSARI SAIMA
085517 KARWAR MOHD.MUJAHID
GUIDE:- Mr. KHAN NIYAZ.A.
M.H.SABOO SIDDIK POLYTECHNIC
-
8/8/2019 Battery Operated Coin Based
16/20
INDEX
1. Introduction
2. Block diagram
3. Circuit diagram
4. Working of circuit
5. Component list
6. Datasheet
7. Bibliography
-
8/8/2019 Battery Operated Coin Based
17/20
-
8/8/2019 Battery Operated Coin Based
18/20
Component List
SR.No Description Qty.
1 Transformer 12-0-12V,750mA 1
2 Diode 1N4007 4
3 Capacitor1000uF,25V 1
4 Voltage regulator IC 7805 1
5 Capacitor 1uF 1
6 LED 1
7 Resistors 15
8 Disc capacitors 5
9 IC Base 5
10 PCB 1
11 Wires 2
12 Solder wire 1
13 Cabinet 1
14 Mains cord 1
15 Transistor BC548 5
-
8/8/2019 Battery Operated Coin Based
19/20
Bibiliography
1.Basic Electronics B.Ram
2.Digital Electronics R.P.Jain
3.www.redcircuits.com
4.www.alldatasheet.com
5.www.elctronicsforu.com
-
8/8/2019 Battery Operated Coin Based
20/20
Microcontroller
Mains
supply
Rectifier,
filter
Voltage
Regulator
Relay Mobile
charging
universal
connector
Coin optical
sensor
LCD display
Power,
clock,
reset
Solar Panel