You are on page 1of 48

Chapter-1

INTRODUCTION
1.1 Introduction:
The growth of mobile phone market is phenomenal in recent years and the need for
charging the mobile battery is required anytime and anywhere. In many developing
countries the grid power is not available for few hours to several hours on daily basis
especially in semi urban and rural areas where the mobile phones are the essential
communication device. While the urban population use more sophisticated mobiles with
good power batteries lasting for few days, the rural population buy the pre-owned mobile
phones that require charging frequently even two or three times a day. A coin
based universal mobile battery charger is designed and developed in this paper. This
device is like a vending machine for mobile battery charging at kiosks and the user has to
plug the phone into one of the adapters and insert a coin for charging at a constant current
for a definite duration. The solar power application to battery charging has been studied
in the past. In this paper, the design and development of a coin based universal mobile
battery charger based on main power and solar power is discussed and this is primarily
for rural areas where the mobiles are basic needs for communication and the main power
is not available all the time.
The design of coin based universal mobile battery charger is based on the following
assumptions
The charging current is upto 4.5AH @ 6vDC and this takes care of the mobiles
manufactured by Nokia, Sony-ericson, Blackberry, HTC and others of first and second
generation mobiles.
Provision to charge maximum different types of mobiles is provided.
Insertion of a fixed coin size for charging.

1.2 Objective
To provide easy accessibility of mobile charger based on coin insertion where electricity
is not readily available especially in rural and public areas.

1.3 Chapter Organization


The report is divided into seven chapters.
Chapter 1 gives a brief introduction of objectives, methodology and thesis organization
of the entire report.
Chapter 2 covers the list of the block diagram used in the project.
Chapter 3 covers about the hardware used in the project and how to use it.
Chapter 4 covers the implementation and working of the project.
Chapter 5 shows the outputs and final result of the project.
Chapter 6 gives the advantages, limitations and applications of the project.
Finally, Chapter 7 deals with the result, conclusion and the future scope of the project,
like how we can make use of this project for the betterment of the mankind.

1.4 Conclusion:
In this chapter we discussed about the introduction of the project.

Chapter -2
BLOCK DIAGRAM
2.1 Introduction:
In this chapter the discussion would be about block diagram and its description
2.2 Block diagram

2.3 Block diagram description

Input Stage

The mobile battery charger starts charging a mobile connected to it when a coin is
inserted at the coin insertion slot at the input stage. The type of coin and the size will be
displayed at the LCD display for the user so as to ensure correct coin insertion. Any other
coin, if inserted in the slot will be returned to refund box. A sensor attached to the coin
insertion slot accepts the coin into the battery charging unit and start charging the mobile
battery for a specific period controlled by the software of the microcontroller.

Controller

This section acts according to the input signal from the sensor circuit. Coin accepted or
rejected is based on the diameter of the coin. This invokes microcontroller along with
LCD interface displays the selection of mobile option if particular mobile is selected
for charging the corresponding routine is activated and charge the mobile for a particular
duration of time .When the routine completes, it indicates charge complete message
through LCD display. Similarly the same procedure is followed for charging more than
four different mobiles simultaneously .

Output and Display

The LCD displays all the information to the customer as and when required. When the
mobile battery is connected, it
displays Insert Coin. While charging it displays Charging and at the end of charging
cycle it displays Charge completed. For charging continuously the coin has to be
inserted when the display shows Charge Completed The output has 10 terminals for
connecting different types of mobile batteries and 7 of them are internally connected for
charging mobile batteries.

Power

The salient feature of the universal mobile battery charger is that it draws power from the
battery. Only if additional power is required, then the grid power is used.
2.4 Conclusion:
Block diagram and its description are discussed in this chapter.

Chapter-3
HARDWARE DESCRIPTION
3.1 Introduction:
In this chapter discussion would be about the hardware components used in the
miniproject.
3.2 Arduino (AT mega 328P)
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) . 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
microcontroller into a more accesible package.

Fig 3.1 Arudino board

Power (USB / Barrel Jack)

Every Arduino board needs a way to be connected to a power source. The Arduino UNO
can be powered from a USB cable coming from your computer or a wall power supply
(like this) that is terminated in a barrel jack. In the picture above the USB connection is
labeled (1) and the barrel jack is labeled (2).
The USB connection is also how you will load code onto your Arduino board. More on
how to program with Arduino can be found in our Installing and Programming
Arduino tutorial.
NOTE: Do NOT use a power supply greater than 20 Volts as you will overpower (and
thereby destroy) your Arduino. The recommended voltage for most Arduino models is
between 6 and 12 Volts.

Pins (5V, 3.3V, GND, Analog, Digital, PWM, AREF)

The pins on your Arduino are the places where you connect wires to construct a circuit
(probably in conjunction with breadboard and some wire. They usually have black plastic
headers that allow you to just plug a wire right into the board. The Arduino has several

different kinds of pins, each of which is labeled on the board and used for different
functions.

GND (3): Short for Ground. There are several GND pins on the Arduino, any of
which can be used to ground your circuit.

5V (4) & 3.3V (5): As you might guess, the 5V pin supplies 5 volts of power, and
the 3.3V pin supplies 3.3 volts of power. Most of the simple components used
with the Arduino run happily off of 5 or 3.3 volts.

Analog (6): The area of pins under the Analog In label (A0 through A5 on the
UNO) is Analog In pins. These pins can read the signal from an analog sensor
(like a temperature sensor) and convert it into a digital value that we can read.

Digital (7): Across from the analog pins are the digital pins (0 through 13 on the
UNO). These pins can be used for both digital input (like telling if a button is
pushed) and digital output (like powering an LED).

PWM (8): You may have noticed the tilde (~) next to some of the digital pins (3,
5, 6, 9, 10, and 11 on the UNO). These pins act as normal digital pins, but can also
be used for something called Pulse-Width Modulation (PWM). We have a tutorial
on PWM, but for now, think of these pins as being able to simulate analog output
(like fading an LED in and out).

AREF (9): Stands for Analog Reference. Most of the time you can leave this pin
alone. It is sometimes used to set an external reference voltage (between 0 and 5
Volts) as the upper limit for the analog input pins.

Reset Button
Just like the original Nintendo, the Arduino has a reset button (10). Pushing it will

temporarily connect the reset pin to ground and restart any code that is loaded on the
Arduino. This can be very useful if your code doesnt repeat, but you want to test it

multiple times. Unlike the original Nintendo however, blowing on the Arduino doesnt
usually fix any problems.

Power LED Indicator


Just beneath and to the right of the word UNO on your circuit board, theres a

tiny LED next to the word ON (11). This LED should light up whenever you plug your
Arduino into a power source. If this light doesnt turn on, theres a good chance
something is wrong. Time to re-check your circuit!

TX RX LEDs
TX is short for transmit, RX is short for receive. These markings appear quite a

bit in electronics to indicate the pins responsible for serial communication. In our case,
there are two places on the Arduino UNO where TX and RX appear once by digital pins
0 and 1, and a second time next to the TX and RX indicator LEDs (12). These LEDs will
give us some nice visual indications whenever our Arduino is receiving or transmitting
data (like when were loading a new program onto the board).

Main IC
The black thing with all the metal legs is an IC, or Integrated Circuit (13). Think

of it as the brains of our Arduino. The main IC on the Arduino is slightly different from
board type to board type, but is usually from the ATmega line of ICs from the ATMEL
company. This can be important, as you may need to know the IC type (along with your
board type) before loading up a new program from the Arduino software. This
information can usually be found in writing on the top side of the IC. If you want to know
more about the difference between various ICs, reading the datasheets is often a good
idea.

Voltage Regulator

The voltage regulator (14) is not actually something you can (or should) interact with on
the Arduino. But it is potentially useful to know that it is there and what its for. The
voltage regulator does exactly what it says it controls the amount of voltage that is let
into the Arduino board. Think of it as a kind of gatekeeper; it will turn away an extra
voltage that might harm the circuit. Of course, it has its limits, so dont hook up your
Arduino to anything greater than 20 volts.

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 youre not sure
which one is right for your project, check this guide for some helpful hints. Here are a
few options that are well-suited to someone new to the world of Arduino:

Arduino Uno (R3)

The Uno is a great choice for your first Arduino. Its got everything you need to get
started, and nothing you dont. 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 a AC-to-DC adapter or battery to get started.

3.3 Arduino with ATmega328


The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has
14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a
16 MHz ceramic resonator, 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.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial
driver chip. Instead, it features the Atmega16U2 (Atmega8U2 up to versionR2)
programmed as a USB-to-serial converter.
Pin out: Added SDA and SCL pins that are near to the AREF pin and two other
new pins placed near to the RESET pin, the IOREF that allow the shields to adapt
to the voltage provided from the board. In future, shields will be compatible with
both the board that uses the AVR, which operates with 5V and with the Arduino.
Due that operates with 3.3V. The second one is a not connected pin that is
reserved for future purposes.
Stronger RESET circuit.
Atmega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of
Arduino 1.0. The Uno and version 1.0 will be the reference versions of Arduino, moving
forward. The Uno is the latest in a series of USB Arduino boards, and the reference
model for the Arduino platform; for a comparison with previous versions, see the index
of Arduino boards.

10

Arduino Characteristics

Power
The Arduino Uno can be powered via the USB connection or with an external power
supply. The power source is selected automatically. External (non-USB) power can come
either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by
plugging a 2.1mm center-positive plug into the board's power jack. Leads from a battery
can be inserted in the Gnd and Vin pin headers of the POWER connector. The board can
operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the
5V pin may supply less than five volts and the board may be unstable. If using more than
12V, the voltage regulator may overheat and damage the board. The recommended range
is 7 to 12 volts.
The power pins are as follows:
VIN: The input voltage to the Arduino board when it's using an external power
source (as opposed to 5 volts from the USB connection or other regulated power
source). You can supply voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin.
5V: This pin outputs a regulated 5V from the regulator on the board. The board
can be supplied with power either from the DC power jack (7 - 12V), the USB
connector (5V), or the VIN pin of the board (7-12V). Supplying voltage via the
5V or 3.3V pins bypasses the regulator, and can damage your board. We don't
advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current
draw is 50 mA.
GND. Ground pins.
IOREF. This pin on the Arduino board provides the voltage reference with which
the microcontroller operates. A properly configured shield can read the IOREF pin

11

voltage and select the appropriate power source or enable voltage translators on
the outputs for working with the 5V or 3.3V.

Table 3.1 Features of Arduino at a Glance.


Microcontroller

ATmega328

Operating Voltage

5V

Input

Voltage 7-12V

(recommended)
Input Voltage (limits)

6-20V

Digital I/O Pins

14 (of which 6 provide PWM output)

Analog Input Pins

DC Current per I/O Pin

40 mA

DC Current for 3.3V Pin

50 mA

Flash Memory

32 KB (ATmega328) of which 0.5 KB used by


bootloader

SRAM

2 KB (ATmega328)

EEPROM

1 KB (ATmega328)

Clock Speed

16 MHz

Memory:
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2

KB of SRAM and 1 KB of EEPROM (which can be read and written with the EEPROM
library).

Serial Communication:

12

The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2
on the board channels this serial communication over USB and appears as a virtual com
port to software on the computer. The '16U2 firmware uses the standard USB COM
drivers, and no external driver is needed. However, on Windows, a .inf file is required.
The Arduino software includes a serial monitor which allows simple textual data to be
sent to and from the Arduino board. The RX and TX LEDs on the board will flash when
data is being transmitted via the USB-to-serial chip and USB connection to the computer
(but not for serial communication on pins 0 and 1).
A Software Serial library allows for serial communication on any of the Uno's
digital pins. The ATmega328 also supports I2C (TWI) and SPI communication. The
Arduino software includes a Wire library to simplify use of the I2C bus. For SPI
communication, use the SPI library.

Fig 3.2 Arduino labelling

13

3.4 AVR ATmega328


The ATmega328 is a single chip micro-controller created by Atmel and belongs to the
mega AVR series. The high-performance Atmel 8-bit AVR RISC-based microcontroller
combines 32 KB ISP flash memory with read-while-write capabilities, 1 KB EEPROM, 2
KB SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three
flexible timer/counters with compare modes, internal and external interrupts, serial
programmable usart, a byte-oriented 2-wire serial interface, spi serial-port, a 6-channel 10
bit Analog to Digital converter (8-channels)in tqfp and qfn/mlf packages),programmable
watchdog timer with internal oscillator and five software selectable power saving modes.
The device operates between 1.8-5.5 volts. By executing powerful instructions in a single
clock cycle, the device achieves throughputs approaching 1 MIPS per MHz, balancing
power consumption and processing speed.

14

Fig 3.3 Atmega 328 IC & pin diagram

3.5 COIN RECOGNISATION MODULE


Load Cell Amplifier

- HX711

Description:

Load Cell Amplifier is a small breakout board for the HX711 IC that allows you to easily
read load cells to measure weight. By connecting the amplifier to your microcontroller
you will be able to read the changes in the resistance of the load cell, and with some
calibration youll be able to get very accurate weight measurements. This can be handy
for creating your own industrial scale, process control or simple presence detection.
This version of the Load Cell Amplifier features a few changes that you specifically
asked for! We have separated the analog and digital supply, as well as added a 3.3uH
inductor and a 0.1uF filter capacitor for digital supply.
The HX711 uses a two-wire interface (Clock and Data) for communication. Any
microcontrollers GPIO pins should work, and numerous libraries have been written,

15

making it easy to read data from the HX711. Check the hookup guide below for more
information.
Load cells use a four-wire Wheatstone bridge configuration to connect to the HX711.
These are commonly colored RED, BLK, WHT, GRN and YLW. Each color corresponds
to the conventional color coding of load cells:

Red (Excitation+ or VCC)

Black (Excitation- or GND)

White (Amplifier+, Signal+ or Output+)

Green (A-, S- or O-)

Yellow (Shield)

The YLW pin acts as an optional input that is not hooked up to the strain gauge but is
utilized to ground and shield against outside EMI (electromagnetic interference). Please
keep in mind that some load cells might have slight variations in color coding.

Features:

Operation Voltage: 2.7V5V

Operation Current: < 1.5mA

Selectable 10SPS or 80SPS output data rate

Simultaneous 50 and 60Hz supp ly rejection.

16

Arduino Hx711 Digital Scale

Fig: 3.4 Load cell amplifier


After finding a broken scale in the trash at work, I decided to remove the load cell and
build a digital scale with an Arduino. The output of the load cell is too minute for an
Arduino to read on it's own, so I picked up a <$5 amplifier module online to convert the
reading into a signal the Arduino can read. The Hx711 module is a 24 bit ADC, which
offers high resolution and amplification. It's also designed for scale / load cell
applications, so talking to it requires a minimum of code.
Connections are fairly simple. You will need a 4 wire load cell, and those typically have
Green, White, Red, and Black wires.
Connect as follows:
Red: E +
White: A +
Green: A Black: E B- & B+ could be used for another load cell, but we are not using these.
If you get negative readings (-12g), reverse the A+ and A- wires.
On the other side of the module:

17

GND: Arduino GND


DT: Arduino A2 (can change this in code)
SCK: Arduino A3 (can change this in code)
VCC: Arduino +5

3.6 Load cell wiring


In general each load cell has four strain gauges that are hooked in a wheatstone bridge
formation as shown below
The four wires coming out from the wheatstone bridge on the load cell are usually

Fig: 3.5 Load cell wiring


Excitation+(E+) or vcc is red
Excitaion-( E-) or ground is black
Output +(O+) ,signal+(s+)or Amplifier(A+) is white

3.7 Load Sensor - 1kg, Straight Bar (TAL220)


Description:
This straight bar load cell (sometimes called a strain gauge) can translate up to 10kg of
pressure (force) into an electrical signal. Each load cell is able to measure the electrical
resistance that changes in response to, and proportional of, the strain (e.g. pressure or
force) applied to the bar. With this gauge you will be able to tell just how heavy an object
is, if an objects weight changes over time, or if you simply need to sense the presence of
an object by measuring strain or load applied to a surface.

18

Each straight bar load cell is made from an aluminum-alloy and is capable of reading a
capacity of 10kg. These load cells have four strain gauges that are hooked up in
a wheatstone bridge formation. The color code on the wiring is as follows: red = E+,
green = O+, black = E-, and white = O-. Additionally, these load cells offer an IP66
protection rating and feature two M4 and two M5 sized thru holes for mounting purposes.
Dimensions: 80mm x 12.7mm x 12.7mm, 250mm Wire

Fig 3.6: Load sensor


Applicable to electronic scale, price computering scale, electronic platform scale, digital
scale; parcel post scale, electronic balance and all varieties of commercial scales by
single load cell.

Specification

capacity 500g
Output sensitivity mv/v 0.50.1
Nonlinearty %.F.S 0.05
Hysteresis %F.S 0.05
Repeatability %F.S 0.05
Creep(30min) %.F.S 0.05
Temperature effect on sensitivity %F.S/10 0.05
Temperature effect on zero %F.S/10 0.05
Zero Balance %F.S 0.5
Input resistance (ohms) 112010
Output resistance (ohms) 100010
19

Insulation resistance M(ohms) 2000


Recommended excitation voltage 5v
Method of Connecting wire red Exc + black Exc
green Sig + whiteSig -

3.8 LCD DISPLAY

LCD Background:

One of the most common devices attached to a micro controller is an LCD display. Some
of the most common LCDs connected to the many microcontrollers are 16x2 and 20x2
displays. This means 16 characters per line by 2 lines and 20 characters per line by 2
lines, respectively

20

Fig 3.7 : LCD pin diagram


Table 3.2 Pin description:
Pin No.

Name

Description

Pin no. 1

VSS

Power supply (GND)

Pin no. 2

VCC

Power supply (+5V)

Pin no. 3

VEE

Contrast adjust

Pin no. 4

RS

Pin no. 5

R/W

Pin no. 6

EN

Enable signal

Pin no. 7

D0

Data bus line 0 (LSB)

Pin no. 8

D1

Data bus line 1

Pin no. 9

D2

Data bus line 2

Instruction

input

1 = Data input
0 = Write to LCD module
1 = Read from LCD module

21

Pin no. 10

D3

Data bus line 3

Pin no. 11

D4

Data bus line 4

Pin no. 12

D5

Data bus line 5

Pin no. 13

D6

Data bus line 6

Pin no. 14

D7

Data bus line 7 (MSB)

The LCD requires 3 control lines as well as either 4 or 8 I/O lines for the data bus. The
user may select whether the LCD is to operate with a 4-bit data bus or an 8-bit data bus.
If a 4-bit data bus is used the LCD will require a total of 7 data lines (3 control lines plus
the 4 lines for the data bus). If an 8-bit data bus is used the LCD will require a total of 11
data lines (3 control lines plus the 8 lines for the data bus).
The three control lines are referred to as EN, RS, and RW.
The EN line is called "Enable." This control line is used to tell the LCD that we are
sending it data. To send data to the LCD, our program should make sure this line is low
(0) and then set the other two control lines and/or put data on the data bus. When the
other lines are completely ready, bring EN high (1) and wait for the minimum amount of
time required by the LCD datasheet (this varies from LCD to LCD), and end by bringing
it low (0) again.
The RS line is the "Register Select" line. When RS is low (0), the data is to be treated
as a command or special instruction (such as clear screen, position cursor, etc.). When RS
is high (1), the data being sent is text data which should be displayed on the screen. For
example, to display the letter "T" on the screen we would set RS high.
The RW line is the "Read/Write" control line. When RW is low (0), the information on
the data bus is being written to the LCD. When RW is high (1), the program is effectively
querying (or reading) the LCD. Only one instruction ("Get LCD status") is a read
command. All others are write commands--so RW will almost always be low.

22

Finally, the data bus consists of 4 or 8 lines (depending on the mode of operation
selected by the user). In the case of an 8-bit data bus, the lines are referred to as DB0,
DB1, DB2, DB3, DB4, DB5, DB6, and DB7.
3.8.3 Schematic:

Figure 3.8: Circuit diagram

Circuit Description:

Above is the quite simple schematic. The LCD panel's Enable and Register Select is
connected to the Control Port. The Control Port is an open collector / open drain output.
While most Parallel Ports have internal pull-up resistors, there is a few which don't.
Therefore by incorporating the two 10K external pull up resistors, the circuit is more
portable for a wider range of computers, some of which may have no internal pull up
resistors.
We make no effort to place the Data bus into reverse direction. Therefore we hard wire
the R/W line of the LCD panel, into write mode. This will cause no bus conflicts on the
data lines. As a result we cannot read back the LCD's internal Busy Flag which tells us if
the LCD has accepted and finished processing the last instruction. This problem is
overcome by inserting known delays into our program.

23

The 10k Potentiometer controls the contrast of the LCD panel. Nothing fancy here. As
with all the examples, I've left the power supply out. We can use a bench power supply
set to 5v or use an onboard +5 regulator. Remember a few de-coupling capacitors,
especially if we have trouble with the circuit working properly.

SETB RW

Handling the EN control line:


As we mentioned above, the EN line is used to tell the LCD that we are ready for it to
execute an instruction that we've prepared on the data bus and on the other control lines.
Note that the EN line must be raised/ lowered before/after each instruction sent to the
LCD regardless of whether that instruction is read or write text or instruction. In short,
we must always manipulate EN when communicating with the LCD. EN is the LCD's
way of knowing that we are talking to it. If we don't raise/lower EN, the LCD doesn't
know we're talking to it on the other lines.
Thus, before we interact in any way with the LCD we will always bring the EN line low
with the following instruction:

CLR EN

And once we've finished setting up our instruction with the other control lines and data
bus lines, we'll always bring this line high:

SETB EN

The line must be left high for the amount of time required by the LCD as specified in its
datasheet. This is normally on the order of about 250 nanoseconds, but checks the
datasheet. In the case of a typical microcontroller running at 12 MHz, an instruction

24

requires 1.08 microseconds to execute so the EN line can be brought low the very next
instruction. However, faster microcontrollers (such as the DS89C420 which executes an
instruction in 90 nanoseconds given an 11.0592 MHz crystal) will require a number of
NOPs to create a delay while EN is held high. The number of NOPs that must be inserted
depends on the microcontroller we are using and the crystal we have selected.
The instruction is executed by the LCD at the moment the EN line is brought low with a
final CLR EN instruction.
Checking the busy status of the LCD:
As previously mentioned, it takes a certain amount of time for each instruction to be
executed by the LCD. The delay varies depending on the frequency of the crystal
attached to the oscillator input of the LCD as well as the instruction which is being
executed.
While it is possible to write code that waits for a specific amount of time to allow the
LCD to execute instructions, this method of "waiting" is not very flexible. If the crystal
frequency is changed, the software will need to be modified. A more robust method of
programming is to use the "Get LCD Status" command to determine whether the LCD is
still busy executing the last instruction received.
The "Get LCD Status" command will return to us two tidbits of information; the
information that is useful to us right now is found in DB7. In summary, when we issue
the "Get LCD Status" command the LCD will immediately raise DB7 if it's still busy
executing a command or lower DB7 to indicate that the LCD is no longer occupied. Thus
our program can query the LCD until DB7 goes low, indicating the LCD is no longer
busy. At that point we are free to continue and send the next command.

3.9 Regulated power supply:


3.9.1 Introduction:
25

Power supply is a supply of electrical power. A device or system that supplies electrical
or other types of energy to an output load or group of loads is called a power supply
unit or PSU. The term is most commonly applied to electrical energy supplies, less often
to mechanical ones, and rarely to others. A power supply may include a power
distribution system as well as primary or secondary sources of energy such as

Conversion of one form of electrical power to another desired form and voltage,
typically involving converting AC line voltage to a well-regulated lowervoltage DC for electronic devices.

Low voltage, low power DC power supply units are commonly integrated with
the devices they supply, such as computers and household electronics.

Batteries.

Chemical fuel cells and other forms of energy storage systems.

Solar power.

Generators or alternators.

3.9.2 Block Diagram:

Figure 3.9: Regulated Power Supply


The basic circuit diagram of a regulated power supply (DC O/P) with led connected as
load is shown in fig: 3.6

26

Figure 3.10: Circuit diagram of Regulated Power Supply with Led connection
The components mainly used in above figure are

230v AC mains

Transformer

Bridge rectifier(diodes)

Capacitor

Voltage regulator(IC 7805)

Resistor

LED(light emitting diode)

3.9.3 Transformation:
The process of transforming energy from one device to another is called
transformation. For transforming energy we use transformers.

27

Transformers:
A transformer is a device that transfers electrical energy from one circuit to another
through inductively

coupled conductors

without

changing

its

frequency.

varying current in the first or primary winding creates a varying magnetic flux in the
transformer's core, and thus a varying magnetic field through the secondary winding. This
varying magnetic field induces a varying electromotive force (EMF) or "voltage" in the
secondary winding. This effect is called mutual induction.
If a load is connected to the secondary, an electric current will flow in the secondary
winding and electrical energy will be transferred from the primary circuit through the
transformer to the load. This field is made up from lines of force and has the same shape
as a bar magnet.
If another coil is placed adjacent to the first coil then, as the field moves out or in, the
moving lines of force will "cut" the turns of the second coil. As it does this, a voltage is
induced in the second coil. With the 50 Hz AC mains supply, this will happen 50 times a
second. This is called MUTUAL INDUCTION and forms the basis of the transformer.
The input coil is called the PRIMARY WINDING; the output coil is the SECONDARY
WINDING.

Figure 3.11: Step-Down Transformer

28

The voltage induced in the secondary is determined by the TURNS RATIO.

For example, if the secondary has half the primary turns; the secondary will have half the
primary voltage.
Another example is if the primary has 5000 turns and the secondary has 500 turns, then
the turns ratio is 10:1.
If the primary voltage is 240 volts then the secondary voltage will be x 10 smaller = 24
volts. Assuming a perfect transformer, the power provided by the primary must equal the
power taken by a load on the secondary. If a 24-watt lamp is connected across a 24 volt
secondary, then the primary must supply 24 watts.
To aid magnetic coupling between primary and secondary, the coils are wound on a metal
CORE. Since the primary would induce power, called EDDY CURRENTS, into this core,
the core is LAMINATED. This means that it is made up from metal sheets insulated from
each other. Transformers to work at higher frequencies have an iron dust core or no core
at all.
Note that the transformer only works on AC, which has a constantly changing current and
moving field. DC has a steady current and therefore a steady field and there would be no
induction.
Some transformers have an electrostatic screen between primary and secondary.
This is to prevent some types of interference being fed from the equipment down into the
mains supply, or in the other direction. Transformers are sometimes used for
IMPEDANCE MATCHING.

29

Step Up transformer:

In case of step up transformer, primary windings are every less compared to secondary
winding. Because of having more turns secondary winding accepts more energy, and it
releases more voltage at the output side.

Step down transformer:

In case of step down transformer, Primary winding induces more flux than the secondary
winding, and secondary winding is having less number of turns because of that it accepts
less number of flux, and releases less amount of voltage.
3.4.4 Battery power supply:
A battery is a type of linear power supply that offers benefits that traditional line-operated
power supplies lack: mobility, portability and reliability. A battery consists of multiple
electrochemical cells connected to provide the voltage desired. Fig: 3.8 shows Hi-Watt
9V battery

Figure 3.12: Hi-Watt 9V Battery


The most commonly used dry-cell battery is the carbon-zinc dry cell battery. Dry-cell
batteries are made by stacking a carbon plate, a layer of electrolyte paste, and a zinc plate

30

alternately until the desired total voltage is achieved. The most common dry-cell batteries
have one of the following voltages: 1.5, 3, 6, 9, 22.5, 45, and 90. During the discharge of
a carbon-zinc battery, the zinc metal is converted to a zinc salt in the electrolyte, and
magnesium dioxide is reduced at the carbon electrode. These actions establish a voltage
of approximately 1.5 V.
The lead-acid storage battery may be used. This battery is rechargeable; it consists of lead
and lead/dioxide electrodes which are immersed in sulfuric acid. When fully charged, this
type of battery has a 2.06-2.14 V potential (A 12 volt car battery uses 6 cells in series).
During discharge, the lead is converted to lead sulfate and the sulfuric acid is converted
to water. When the battery is charging, the lead sulfate is converted back to lead and lead
dioxide A nickel-cadmium battery has become more popular in recent years. This battery
cell is completely sealed and rechargeable. The electrolyte is not involved in the electrode
reaction, making the voltage constant over the span of the batteries long service life.
During the charging process, nickel oxide is oxidized to its higher oxidation state and
cadmium oxide is reduced. The nickel-cadmium batteries have many benefits. They can
be stored both charged and uncharged. They have a long service life, high current
availabilities, constant voltage, and the ability to be recharged. Fig: 3.9 shows pencil
battery of 1.5V.

Figure 3.13: Pencil Battery of 1.5V


3.9.5 Rectification:

31

The process of converting an alternating current to a pulsating direct current is called as


rectification. For rectification purpose we use rectifiers.

Rectifiers:

A rectifier is an electrical device that converts alternating current (AC) to direct current
(DC), a process known as rectification. Rectifiers have many uses including as
components of power supplies and as detectors of radio signals. Rectifiers may be made
of solid-state diodes, vacuum tube diodes, mercury arc valves, and other components.
When only one diode is used to rectify AC (by blocking the negative or positive portion
of the waveform), the difference between the term diode and the term rectifier is merely
one of usage, i.e., the term rectifier describes a diode that is being used to convert AC to
DC. Almost all rectifiers comprise a number of diodes in a specific arrangement for more
efficiently converting AC to DC than is possible with only one diode. Before the
development of silicon semiconductor rectifiers, vacuum tube diodes and copper (I) oxide
or selenium rectifier stacks were used.

Bridge full wave rectifier:

The Bridge rectifier circuit is shown in fig: 3.10, which converts an ac voltage to dc
voltage using both half cycles of the input ac voltage. The Bridge rectifier circuit is
shown in the figure. The circuit has four diodes connected to form a bridge. The ac input
voltage is applied to the diagonally opposite ends of the bridge. The load resistance is
connected between the other two ends of the bridge.
For the positive half cycle of the input ac voltage, diodes D1 and D3 conduct, whereas
diodes D2 and D4 remain in the OFF state. The conducting diodes will be in series with
the load resistance RL and hence the load current flows through RL.
For the negative half cycle of the input ac voltage, diodes D2 and D4 conduct whereas,
D1 and D3 remain OFF. The conducting diodes D2 and D4 will be in series with the load

32

resistance RL and hence the current flows through R L in the same direction as in the
previous half cycle. Thus a bi-directional wave is converted into a unidirectional wave.

Input

Output

Figure 3.14: Bridge rectifier: a full-wave rectifier using 4 diodes

3.9.6 Filtration:
The process of converting a pulsating direct current to a pure direct current using filters is
called as filtration.

Filters:

Electronic filters are electronic circuits, which perform signal-processing functions,


specifically to remove unwanted frequency components from the signal, to enhance
wanted ones.

33

Regulation:

The process of converting a varying voltage to a constant regulated voltage is called as


regulation. For the process of regulation we use voltage regulators.
3.9.7 Voltage Regulator:
A voltage regulator (also called a regulator) with only three terminals appears to be a
simple device, but it is in fact a very complex integrated circuit. It converts a varying
input voltage into a constant regulated output voltage. Voltage Regulators are available
in a variety of outputs like 5V, 6V, 9V, 12V and 15V. The LM78XX series of voltage
regulators are designed for positive input. For applications requiring negative input, the
LM79XX series is used. Using a pair of voltage-divider resistors can increase the output
voltage of a regulator circuit.

Figure 3.15: Voltage Regulator


It is not possible to obtain a voltage lower than the stated rating. You cannot use a 12V
regulator to make a 5V power supply. Voltage regulators are very robust. These can
withstand over-current draw due to short circuits and also over-heating. In both cases, the
regulator will cut off before any damage occurs. The only way to destroy a regulator is to
apply reverse voltage to its input. Reverse polarity destroys the regulator almost instantly.
Fig: 3.11 shows voltage regulator.
3.10 Conclusion:

34

Hardware components used in mini project are discussed in this chapter.

SOFTWARE DESCRIPTION
4.1 Introduction
This chapter descibes about the software used in the project.

4.2 Software
ARDUINO IDE 1.6.4

Inexpensive.
Simple & Clear Programming Environment.
Open Source & Extensible Software.
Open Source & Extensible Hardware.
Software to burn the program on the board is not required.
Step-by-step instructions for setting up the Arduino Software (IDE) on your
computer and connecting it to an Arduino Uno, Mega2560, Duemilanove, Mega,
or Diecimila.

Can be used in

Windows
Mac OS X
35

Linux

4.3 About software:


The board can be programmed from the Arduino software, which is available for
different platforms such as Windows, Mac OSX and Linux. It is open source
software, which is designed using a Java environment and is also based on
processing and avrgcc.

36

Fig 4.1: Arduino software

1. Open Arduino IDE

Fig 4.2: Editor space


2. Write the program in the editor space

37

Fig 4.3: Complilation window


3. Compile the program to know whether there are any errors in the program.

38

Fig 4.4: uploading file

4. Upload the program on to the arduino board to run the application.

39

The software allows users to write their code in C and upload to the board.
The boot loader allows the uploading without the need of external
hardware programmer. Thus the software is very easy to use and efficient.

4.4 Tools

Auto Format

This formats your code nicely: i.e. indents it so that opening and closing curly braces
line up, and that the statements inside curly braces are indented more.
Archive Sketch
Archives a copy of the current sketch in .zip format. The archive is placed in the same
directory as the sketch.
4.5 Fix Encoding & Reload

Fixes possible discrepancies between the editor char map encoding and other
operating systems char maps.

4.6 Serial Monitor

Opens the serial monitor window and initiates the exchange of data with any
connected board on the currently selected Port. This usually resets the board, if
the board supports Reset over serial port opening.

4.7 Board

Select the board that you're using. See below for descriptions of the various
boards.

40

4.8 Port

This menu contains all the serial devices (real or virtual) on your machine. It
should automatically refresh every time you open the top-level tools menu.

4.9 Programmer

For selecting a hardware programmer when programming a board or chip and not
using the on-board USB-serial connection. Normally you won't need this, but if
you're burning a bootloader to a new microcontroller, you will use this.

Burn Bootloader

The items in this menu allow you to burn a bootloader onto the microcontroller on
an Arduino board. This is not required for normal use of an Arduino or Genuine
board but is useful if you purchase a new AT mega microcontroller (which
normally come without a bootloader). Ensure that you've selected the correct
board from the Boards menu before burning the bootloader on the target board.
This command also set the right fuses.

Verify
Checks your code for errors compiling it.
Upload
Compiles

your

code

and

uploads

it

to

the

configured

board.

See uploading below for details.


Note: If you are using an external programmer with your board, you can hold
down the "shift" key on your computer when using this icon. The text will
change to "Upload using Programmer"

41

New
Creates a new sketch.
Open
Presents a menu of all the sketches in your sketchbook. Clicking one will open
it within the current window overwriting its content.
Note: due to a bug in Java, this menu doesn't scroll; if you need to open a
sketch late in the list, use the File | Sketchbook menu instead.
Save
Saves your sketch.
Serialmonitor
Opens the serial monitor.

4.10 Conclusion
The software used for coding and why it was chosen is explained in this chapter.

42

Chapter-5
Working of the project

Charging Requirements of Mobile Batteries


Table 1
Type of mobile
Samsung
Sony Ericson
Nokia
LG
Pansonic
HTC
Blackberry

Maximum charging Voltage


5.7
4.89
4.8
5.5
3.7
5.5
3.7

Specifications of a Mobile Battery Charger


Table 2
S. No
Parameter
1

Input
a. Coin

Charging Current(mAh)
3400
900
1500
2100
1200
1800
1300

Description
If the size of the coin doesnt match, the coin
will be rejected
110-240v AC

43

2
3
4
5
6
7
8
9

b. Voltage
Max. Output Voltage
Max. Output current
Dimension
Ambient Temperature
Coin Insertion
Operating Environment
Net weight
Humidity

6V
4.5Ah
Small Size
(0-50)c
Rs2 coin of Indian currency
Indoor/Outdoor
700 to 900 gms
<80%

44

Chapter-5
45

ADVANTAGES, LIMITATIONS & APPLICATIONS


5.1 Introduction: In this chapter we are going to discuss about the
advantages,applications &limitations of coin based mobile charger

5.2 Advantages
Low cost to design the circuit
Easy to implement the circuit
Low power consumption.
High reliability
Good performance.
Low weight (700-900)grams
Suitable at different climatic conditions(0-50)deg

5.3 Applications
Providing a unique service to the rural public where grid power is not available
for partial/full daytime and a source of revenue for site providers.
Charging the mobile battery is required anytime and anywhere.

Easily installed outside any business premises.

Can be used to charge different types of mobile.


5.4 Limitations:
Need to replace the battery regularly after a fixed amount of time.
Cannot be used for a wide range of coins.
46

5.5 Conclusion:
In this chapter we discussed about applications of coin based mobile charger.

Chapter-7
CONCLUSION AND FUTURE SCOPE
7.1 Introduction:
In this chapter we are going to discuss about the conclusion and future scope of
coin based mobile charger.
7.2Conclusion:
A circuit for charging mobiles using coin detection mechanism is designed and
developed. coin sensing and detecting circuit is designed separately to perform the
desired function. A load sensor is used for sensing coin based on weight of the
coin. Finally electric charge is received by mobile.
7.3 Future scope:
Providing a unique service to the rural public where grid power is not available for
partial/full daytime and a source of revenue for site providers.Charging the mobile
battery is required anytime and anywhere. Easily installed outside any business
premises.Can be used to charge different types of mobile.
It can be extended over wide range of electronic devices by using a suitable cable. In
some cases we can also equip a solar panel which can make use of the solar energy
for charging the mobile.

7.4 Conclusion:
In this chapter we discussed about future scope of coin based mobile charger

47

BIBLIOGRAPHY

1. Mill Man J and Hawkies C.C. INTEGRATED ELECTRONICS McGraw


Hill, 1972.
2. Roy Choudhury , Shail Jain, LINEAR INTRGRATED CIRCUIT, New Age
International Publishers, New Delhi, 2000.
3. M D Singh and K B Khanchandani, POWER ELECTRONICS Tata
McGraw Hill, 2003.
4. P.Ramesh Babu, DIGITAL SIGNAL PROCESSING, Scitech
Publications(India)pvt.ltd.
5. ELECTRO FOCUS- Magazine Up Dated Every Minute.
6. Raj Kamal, EMBEDDED SYSTEMS, Tata McGraw Hill, 2009.
1.
2.
3.
4.
5.

URL
http://www.atmel.com/
http://www.microchip.com/
http://www.beyond logic.org
http://ctv.es/pckits/home.html
http://aimglobal.org/

48

You might also like