Ramiz Mini Project (KS)
Ramiz Mini Project (KS)
Ramiz Mini Project (KS)
- Ramizul Hoda
ACKNOWLEDGEMENT
CHAPTER 1 1-1
1 Introduction 1
CHAPTER 2 2-3
2.1 Initiative 2
CHAPTER 3 4-6
CHAPTER 4 7-44
4.4 Atmega 16
4.5 Resistor 21
4.6 Capacitor 25
4.7 LCD 30
CHAPTER 5 45-63
5.2 Coding 49
CHAPTER 6 64-65
CONCLUSION 66
BIBLIOGRAPHY 67
CHAPTER 1
1.1 INTRODUCTION
Day by day, the population of the country is increasing and the requirement
of the power is also increasing. At the same time the wastage of energy is
also increasing in many ways. So, reforming this energy back to usable form
is the major solution. In thi
s footstep power generation project, we are
generating power with the help of human’s footsteps; this power is then used
to charge battery. The power is stored in a battery that can be used to charge
a mobile phone using RFID card. This system is powered
y Atmega
b 328
microcontroller, it consists of Arduino IDE, RFID sensor, USB cable and LCD.
When we power on the system, the system enters into registration mode. We
can register three users. Once all the user is entered in the system then the
system asks to
swipe the card and connect the charger. Initially all the user
is given 5 minutes of charging time as default. When we swipe the card and if
the user is authorised, the system turns on for charging and will charge the
Mobile phone. If the user is -un
authorised then the system will display as
unauthorised user, just in case if the user wants to stop the charging in
midway the user needs to swipe the card again. As soon as the card is
swiped again, the remaining time balance is displayed and the charging
stops. In order to recharge a card, we need to press recharge button which is
on the system, and then system will ask to swipe the card, once the user
swipes the card, it adds more 5 minutes to the particular card of the user.
[1]
CHAPTER 2
2.1 INITIATIVE
Our project is all about saving human energy and converting to electrical
energy. Day by day , the population of the country is incReasing and the
requirement of the power is also increasing at the same time the wastage
of energy is also increased in many ways. So reforming this energy back
to usable form is the major solution .This project is used to generate
voltage using footsteps force. The project is used public places like
theatres, railway station ,shopping mall, temples, school, college, hospital
etc. So, these systems are placed in public places where people walk and
they have to travel on this system to get through the entrance or exist
Then this system generate voltage on each and every step of a foot and
for this purpose, piezoelectric sensor is usedin order to measure the
force pressure and acceleration by change into electric signals. This
system uses voltmeter for measuring output voltage, led light. weight
measure system and a battery for better demonstration of the system
[2]
sub-flooring system consisting of independent blocks. When
people walk across this surface, the forces they impart wil cause
the blocks to slip
sightly, and a dynamo would convert the energy
in those movements into electric current. Students say that moving
from this Proof of concept device to a-scale
large Crowd Farm
would be expensive, but it certainly sounds a great option.
[3]
CHAPTER 3
3.1 BLOCK DIAGRAM & METHODOLOGY
[5]
3.3 CONNECTIONS OF THE PIEZOELECTRIC ELEMENT
[6]
CHAPTER 4
Power supply
Voltage regulator
Light emitting diodes (LED’s)
Atmega microcontroller
Resistor
Capacitor
LCD (16*2)
RFID sensor &
cards Adapter
USB cable
Weighing machine
Piezoelectric sensors
SOFTWARE SPECIFICATIONS
Arduino compiler
Programming language C
[7]
4.2 VOLTAGE REGULATOR
Features
• Output Current up to 1A.
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V.
• Thermal Overload Protection.
• Short Circuit Protection.
• Output Transistor Safe Operating Area Protection.
[8]
Description
The LM78XX/LM78XXA series of three
-terminal positive regulators
[9]
4.3 LIGHHT EMITTING DIODES (LED’s
)
A light
-emitting diode (LED) is
semiconductor
a light source. LEDs
are used as indicator lamps in many devvices, and are increasingly
used forlightinng
. When a light
-emittingdiodeis forwaard biased
(switched on),
electronsare able to
recombine
withholeswithinn
the device, releasing energy in the formm
photons
of .
This effect is called
electroluuminescence
and thecolourof the light
integrated optical components may be used to shape its radiation pattern. LEDs
present many
advantages
over incandescent light sources incluuding
lower
energy consumption
, longerrlifetime
, improved robustness,
maller
s size, faster
Electronic Symbol:
White LED’S
[10]
Light Emitting Diodes (LED) have recently become available that are both white
and bright, so bright that they seriously compete with incandescent lamps in
lighting applications. They are still pretty expensive as compared to a GOW lamp
When run within their ratings, they are more reliable than lamps as
well. Red LEDs are now being used in automotive and truck tail
lights and in red traffic signal lights. You will be able to detect them
because they look like an array of point sources and they go on and
off instantly as compared to conventional incandescent lamps.
LEDs are monochromatic (one color) devices. The color is determined by the
band gap of the semiconductor used to make them. Red, green, yellow and
blue LEDs are fairly common. White light contains all colors and cannot be
really isn't white. It is a Gallium Nitride blue LED coated with a phosphor that,
when excited by the blue LED light, emits a broad range spectrum that in
[11]
There is a claim that these white LED's have a limited life. After 1000 hours or
so of operation, they tend to yellow and dim to some extent. Running the
LEDs at more than their rated current will certainly accelerate this process.
4.5 1N4007
[12]
Fig: 1N4007 diodes
The number and voltage capacity of some of the important diodes
available in the market are as follows:
Diodes of number IN4001, IN4002, IN4003, IN4004, IN4005, IN4006
andIN4007 have maximum reverse bias voltage capacity of 50V
and maximum forward current capacity of 1 Amp.
Diode of same capacities can be used in place of one another.
[13]
PN JUNCTION OPERATION
Now that you are familiar with P- and N-type materials, how
these materials are joined together toform a diode, and the
function of the diode, let us continue our discussion with the
operation of the PNjunction. But before we can understand how
the PN junction works, we must first consider current flow inthe
materials that make up the junction and what happens initially
within the junction when these twomaterials are joined together.
potential of the battery will attract thefree electrons in the crystal. These
electrons will leave the crystal and flow into the positive terminal ofthe
terminal of the battery willenter the crystal, thus completing the current
(electrons) are repelled by the negative side of the battery and move
[14]
from the positive terminal of the P material lto the negative terminal.
Electrons from the external circuit enter the negative terminal of the
material andfill holes in the vicinity of this terminal. At the positive
terminal, electrons are removed from the covalentbonds, thus
creating new holes. This process continues as the
dy stea
stream of
holes (hole current) movestoward the negative terminal.
[15]
4.4 ATMEGA MICROCONTROLLER
Introduction:
[16]
temperature drops to a certain defined limit and again turning
it ON when temperature rises above the defined limit.
the desired task, most common of these are 8051, AVR and PIC
microcontrollers. In this we will introduce you with AVR family
of microcontrollers.
Features:
o 10,000 Write and Erase Cycles for Flash and 100,000 for EEPROM o Data
retention for 20 years at 85°C and 100 years at 25°C o Optional boot
loader with lock bits
In System Programming (ISP) by via boot
loader True Read-While-Write operation o
Programming lock available for software
security Features Include o 2 x 8-bit Timers/Counters
each with independent prescaler and compare
modes
o A single 16-bit Timer/Counter with an idependent prescaler,
compare and capture modes
o Real time counter with independent oscillator o 10 bit, 6 channel
analog to digital Converter o 6 pulse width modulation channels
o Internal temperature sensor
o Serial USART (Programmable)
o Master/Slave SPI Serial Interface - (Philips I2C compatible) o
Programmable watchdog timer with independent internal oscillator
o Internal analog comparator o Interrupt and wake up on pin
change Additional Features Features
[17]
o Internal calibrated oscillator o Power on reset and programmable
brown out detection o External and internal interrupts
o 6 sleep modes including idle, ADC noise reduction, power save, power
down, standby, and extended standby
In our days, there have been many advancement in the field of Electronics
and many cutting edge technologies are being developed every day, but
still 8 bit microcontrollers have its own role in the digital electronics
market dominated by 16-32 & 64 bit digital devices. Although powerful
microcontrollers with higher processing capabilities exist in the market,
8bit microcontrollers still hold its value because of their easy-
tounderstand-operation, very much high popularity, ability to simplify a
digital circuit, low cost compared to features offered, addition of many
new features in a single IC and interest of manufacturers and consumers.
Today’s microcontrollers are much different from what it were in the initial
stage, and the number of manufacturers are much more in count than it was a
decade or two ago. At present some of the major manufacturers are Microchip
(publication: PIC microcontrollers), Atmel (publication: AVR microcontrollers),
Hitachi, Phillips, Maxim, NXP, Intel etc. Our interest is upon ATmega32. It
belongs to Atmel’s AVR series micro controller family. Let’s see the features.
PIN count: Atmega32 has got 40 pins. Two for Power (pin no.10: +5v, pin no.
11: ground), two for oscillator (pin 12, 13), one for reset (pin 9),
three for providing necessary power and reference voltage to its
internal ADC, and 32 (4×8) I/O pins.
About I/O pins: ATmega32 is capable of handling analogue inputs. Port A can
be used as either DIGITAL I/O Lines or each individual pin can be u8sed as a
[18]
single input channel to the internal ADC of ATmega32, plus a pair
of pins AREF, AVCC & GND (refer to ATmega32 datasheet) together
can make an ADC channel.
No pins can
perform and serve for two purposes (for an example: Port A
pins cannot work as a Digital I/O pin while the Internal ADC is activated) at
the same time. It’s the programmers responsibility to resolve the conflict
in the circuitry and the program. Programmer
s are advised to have a look
to the priority tables and the internal configuration from the datasheet.
[19]
[20]
4.5 RESISTOR
A resistor is a two
-terminal electronic
component designed to oppose
an electric current by producing a voltage drop between its terminals
in proportion to the current, that is, in accordance with Ohm's law:
V=IR
Resistors are used as part of electrical networks and electronic circuits. They
The primary characteristics of resistors are their resistance and the power
flow, and above which the limit is applied voltage. Critical resistance
[21]
FIG: DIFFERENT TYPES OF RESISTOR
A resistor is a two-terminalpassiveelectronic component
which implements
electrical resistance
as a ciircuit element. When a voltage V is appplied across
resistance wire
(wire made of a high
-resistivity alloy, such as nickel
-chrome).
magnitude
. When specifyiing that resistance in an electronic design, the
[22]
manufacturing tolerance of the chosen resistor, according to its specific
power ratings are physically larger and may require heat sinking. In a high
on the technology used in manufacturing the resistor. They are not normally
according to its form factor, that is, the size of the device and position of its
Units
[23]
103 Ω), and megohm (1 MΩ = 106 Ω) are also in common usage.
[24]
The reciprocal of resistance R is calledconductanceG = 1/R and is
Variable resistors
Adjustable resistors
A resistor may have one or more fixed tapping points so that the
resistance can be changed by moving the conn
ecting wires to
different terminals. Some wirewound power resistors have a tapping
point that can slide along the resistance element, allowing a larger
or smaller part of the resistance to be used.
Where continuous adjustment of the resistance value
during
operation of equipment is required, the sliding resistance tap can be
connected to a knob accessible to an operator. Such a device is
called arheostatand has two terminals.
[25]
4.6 CAPACITOR
exists between the conductors, an electric field is present in the dielectric. This
field stores en
ergy and produces a mechanical force between the plates. The
[26]
FIG:DIFFERENT TYPES OF CAPACITOR
value,capacitance
, measured in
farads. This is the ratio of the
electric charge
condductors and
leadsintroduce an undesireed
inductance
andresistance
.
Theory of operation
Capacitance
[28]
A capacitor consists of two conductors separated by a non-conductive
with no net electric charge and no influence froom any external electric
field. The conductors thus hold equal and opposite charges on their
Energy storage
Work must be done by an external influence to "move" charge between the
separation persists in the electric field and energy is stored to be released when
the charge is allowed to return to its equilibrium position. The work done
[29]
in establishing the electric field, and hence the amount of energy
stored, is given by:
Current
-voltage relationn
The current i(t) through anyy component electric circuit is defined as the rate
accumulates on the negative plate for each one that leaves the positive plate,
anyanti derivative
, a constant of integration
is addded to represent the initial
.
Taking the derivative of thiss, and multiplying by C, yields the derivatiive form,
.
The dual of the capacitor is the
inductor
, which stores energy in
thhemagneticfieldrather than the electrric field. Its current
-voltage
relation is obtained by exchanging current and volttage in the
capacitor equations and replaacing C with the inductance L.
[30]
4.7 LCD
A 16*2 LCD display is very basic module and is very commonly
used in various devices and circuits. A 16*2 LCD means it can
display 16 character per line there are two such line. In this LCD
each character is displayed in 5*7 pixel matrix.
[31]
4.8 RFID SENSOR AND CARDS
Radio Frequency Identification, or RFID, is a rapidly-emerging identification and
logging technology. Whether or not you have come across RFID systems in your
work, you have probably encountered RFID in your daily life, perhaps without
even being aware of it. At their simplest, RFID systems use tiny chips, called
tags don't need a direct line ofsight: within limits, we can now scan
[32]
devices etc. all with individual unique identifiers - like the license plate on a car
but for every item in the world. This is a vast improvement over paper and pencil
tracking or bar code tracking that has been used since the 1970s. With bar
codes, it is only possible to identify the brand and type of package in a grocery
store, for instance. Furthermore, passive RFID tags (those without a battery) can
necessary to "show" the tag to the reader device, as with a bar code. In other
words it does not require line of sight to "see" an RFID tag, the tag can be read
inside a case, carton, box or other container, and unlike barcodes RFID tags can
be read hundreds at a time. Bar codes can only read one at a time.
Some RFID tags can be read from several meters away and
beyond the line of sight of the reader. The application of bulk
reading enables an almost-parallel reading of tags.
Most RFID tags contain at least two parts: one is an integrated circuit
battery that always broadcasts or beacons its signal) or battery assisted passive
(BAP) which has a small battery on board that is activated when in the
presence of an RFID reader. Passive tags in 2011 start at $ .05 each and
[33]
assets, or monitoring environmental conditions in data centers all start at
$50 and can go up over $100 each. BAP tags are in the $3–10 range and
The term RFID refers to the technology. The tags should properly be
called "RFID tags" not "RFIDs".
Fixed RFID and Mobile RFID: Depending on mobility, RFID readers are
classified into two different types: fixed RFID and mobile RFID. If the
engineered. This allows a very definitive reading area for when tags go in
and out of the interrogation zone. On the other hand, if the reader is
mobile when the reader reads tags, it is called mobile RFID. Mobile
readers include hand helds, carts and vehicle mounted RFID readers from
There are a variety of groups defining standards and regulating the use of
below.)There are also several specific industries that have set guidelines
standard for tracking IT Assets with RFID, the Computer Technology Industry
[34]
Association CompTIA has set a standard for certifying RFID
engineers and the International Airlines Transport Association IATA
set tagging guidelines for luggage in airports.
Oxley Act (SOX) compliance. Also with recent advances in social media RFID
is being used to tie the physical world with the virtual world. RFID in Social
[35]
How does RFID work?
communicates with the tags. The reader also has a receiver that captures a
reply signal from the tags, and decodes that signal. The reply signal from the
tags reflects, both literally figuratively, the tag's data content. The reply
As the RFID marketplace evolves, more and more uses for the technology
are being developed. First among them are applications that replicate the
uses already in place for barcodes. The cost savings in scanning a grocery
cart without the need to unpack each item is compelling. More sophisticated
applications use the capability of RFID to receive and store data as well as
simply to identify itself. This means that an RFID tag can carry along with it
a sensor, making the tag now aware of its environment, after a fashion. The
RFID has many applications in the security field, as can be imagined. The
be supplanted by RFID tagged cards that can offer a greater degree of security
pass an RFID reader and have a toll deducted, often without slowing down.
RFID tags will replace printed bar codes where a business case can be
made. An RFID tag that can write information to itself may be used tocreate an
audit trail or tracking record, particularly for high-value goods. The cost of RFID
[36]
tagswill need to fall substantially before RFID willbe
-effective
a cost means
and benefit, but also on acceptance and "mood," for lack of a better word.
enhance anti
-terrorism security systems, or-Mart's
Wal recent requ
irement
that its top 100 suppliers ship cartons and pallets with RFID tags by January
2005. Wal-Mart's initial goal is to use RFID tags for tracking shipments and
problem of running fiber optic cabling the "last mile" from the
[37]
4.9 PIEZOELECTRIC SENSORS
Piezoelectricity is the electric charge that accumulates in certain
solid materials in response to applied mechanical stress. The word
piezoelectricity means electricity resulting from pressure.
A piezoelectric sensor is a device that uses the piezoelectr
ic effect to measure
pressure, acceleration, strain or force by converting them to an electrical
signal. Piezoelectric materials exhibit the unique property known as the
piezoelectric effect. When these materials are subjected to a compressive or
tensile s
tress, an electric field is generated across the material, creating a
voltage gradient and a subsequent current flow. This effect stems from the
asymmetric nature of their unit cell when a stress is applied. As seen in Figure
1, the unit cell contains aall
smpositively charges particle in the center. When
a stress is applied this particle becomes shifted in one direction which creates
a charge distribution, and subsequent electric field. These materials come in
several different forms. The most common
rystals,
is c but they are also found
as plastics and ceramics.
[38]
[39]
[40]
4.10 ARDUINO COMPILER
[41]
needs. The software, too, is open-source, and it is growing
through the contributions of users worldwide.
Why Arduino?
[42]
the Arduino module can be assembled by hand, and even the
preassembled Arduino modules cost less than $50
Cross-platform - The Arduino Software (IDE) runs on
Windows, Macintosh OSX, and Linux operating systems.
Most microcontroller systems are limited to Windows.
Simple, clear programming environment - The Arduino
Software (IDE) is easy-to-use for beginners, yet flexible enough
for advanced users to take advantage of as well. For teachers,
it's conveniently based on the Processing programming
environment, so students learning to program in that
environment will be familiar with how the Arduino IDE works.
Open source and extensible software - The Arduino software is
published as open source tools, available for extension by
experienced programmers. The language can be expanded through
C++ libraries, and people wanting to understand the technical
details can make the leap from Arduino to the AVR C programming
language on which it's based. Similarly, you can add AVR-C code
directly into your Arduino programs if you want to.
Open source and extensible hardware - The plans of the Arduino
boards are published under a Creative Commons license, so
experienced circuit designers can make their own version of the
module, extending it and improving it. Even relatively
inexperienced users can build the breadboard version of the
module in order to understand how it works and save money.
Arduino Uno
[43]
actually is a specially designed circuit board for
programming and prototyping with Atmel microcontrollers.
The nice thing about the Arduino board is that it is relatively cheap,
plugs straight into a computer's USB port, and it is dead-simple to
setup and use (compared to other development boards).
[44]
modes. Check out the official datasheet for more details.
[45]
CHAPTER 5
5.1 CIRCUIT DIAGRAM AND WORKING
[46]
Layout
[47]
Working
[48]
10) Now the effects of the charges (their dipole moments)
no longer cancel one another out and net positive and
negative charges appear on opposite crystal faces. By
squeezing the crystal, you've produced a voltage
across its opposite faces and that's piezoelectricity!
11) In our project we have used the same
phenomenon of producing piezoelectricity from
piezoelectric crystal in the form of coin shaped disc.
12) When one steps on the weighing machine the
piezoelectric disc gets compressed. After the leg
is lifted the crystal is decompressed.
13) Thus a full vibration is sensed by the crystal disc
and a voltage across it is produced.
14) This voltage is sensed by the voltmeter and
displayed on its display.
15) Also, at the same time this voltage is used to
charge the 12VDC Battery.
16) LED’s have been mounted under the weighing
machine that is switched on by relay through 555
timer IC whenever a voltage is generated.
17) This event is notified by a glowing LED on the PCB.
(Also one can hear the switching sound of the relay)
18) Thus, whenever a person walks though the weighing
machine the battery gets charged due to the voltage
which is also displayed on the voltmeter. This event
is notified by glowing LED’s beneath the weighing
machine.
[49]
5.2 CODING
#include <SoftwareSerial.h>
#include <LiquidCrystal.h>
/////////////////////////////////////////////////////////////////////footstep
variables/////////////////////////////////////////////////////////////////
constint led = 3;
long x = 0, y = 0;
constint led1 = 2;
float r1 = 100000.0;
float r2 = 10000.0;
int a = 0;
//////////////////////////////////////////////////////////////////////RFID
variables/////////////////////////////////////////////////////////////////////
intr_led = 13;
intg_led = 12;
int buzzer = 4;
int sec = 0;
intmins = 0;
[50]
long current_time;
long sec_cal;
intlcd_clm;
char c;
String id = "";
int user = 0;
booleanregistring = false;
int valid = 0;
intpark_left = 3;
intnew_user;
intuser_in;
SoftwareSerialrfid(5, A3);
//////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////
void setup()
rfid.begin(9600);
Serial.begin(9600);
lcd.begin(20, 4);
lcd.clear();
pinMode(led, OUTPUT);
pinMode(led1, OUTPUT);
pinMode(recharge, INPUT);
pinMode(charging, OUTPUT);
pinMode(r_led, OUTPUT);
[51]
pinMode(g_led, OUTPUT);
pinMode(buzzer, OUTPUT);
lcd.clear();
lcd.print("Advanced footstep");
lcd.setCursor(0, 1);
lcd.print("with ");
lcd.setCursor(0, 2);
lcd.setCursor(0, 3);
lcd.print("Charging ");
delay(2000);
digitalWrite(r_led, HIGH);
digitalWrite(g_led, HIGH);
digitalWrite(charging, HIGH);
lcd.clear();
lcd.print("register mode");
delay(2000);
digitalWrite(led1, HIGH);
digitalWrite(led, HIGH);
lcd.clear();
lcd.clear();
lcd.setCursor(0, 1);
lcd.print(user + 1);
[52]
new_user = 1;
if (rfid.available() > 0)
RFID();
if (id == user_id[i])
new_user = 0;
digitalWrite(r_led, LOW);
lcd.clear();
lcd.print("user already");
lcd.setCursor(0, 1);
lcd.print("exist");
delay(2000);
digitalWrite(r_led, HIGH);
break;
if (new_user == 1)
user_id[user] = id;
digitalWrite(g_led, LOW);
lcd.clear();
lcd.print("user resistered");
lcd.setCursor(0, 1);
[53]
lcd.print("balance is ");
lcd.print(user_min[user]);
lcd.print(" mins.");
user++;
delay(2000);
digitalWrite(g_led, HIGH);
if (user >= 3)
registring = true;
delay(200);
void loop()
footstep:
intanalog_value = analogRead(sensor);
if (input_voltage< 0.1)
input_voltage = 0.0;
[54]
if ((last_input<input_voltage ) && (input_voltage> 5 ))
y = millis();
digitalWrite(led1, LOW);
digitalWrite(led, LOW);
if (last_input == 0)
a = a + 1;
last_input = input_voltage;
Serial.print("v= ");
Serial.println(input_voltage);
lcd.setCursor(0, 2);
lcd.print("Voltage: ");
lcd.print(input_voltage);
lcd.print(" V ");
lcd.setCursor(0, 3);
lcd.print(a);
delay(100);
last_input = 0;
digitalWrite(led, HIGH);
digitalWrite(led1, HIGH);
[55]
}
lcd.setCursor(0, 0);
lcd.setCursor(0, 1);
digitalWrite(r_led, HIGH);
digitalWrite(g_led, HIGH);
digitalWrite(charging, HIGH);
if (rfid.available() > 0)
RFID();
if (id == user_id[i])
user_in = i;
valid = 1;
break;
valid = 0;
digitalWrite(r_led, HIGH);
digitalWrite(g_led, LOW);
[56]
digitalWrite(charging, LOW);
lcd.clear();
lcd.print("USER ");
lcd.print(user_in + 1);
delay(1500);
lcd.clear();
lcd.print("Charging.");
lcd.setCursor(0, 1);
lcd.print("Time ");
current_time = millis();
sec_cal = millis();
lcd_clm = 8;
mins = user_min[user_in];
intlast_sec = user_sec[user_in];
sec = user_sec[user_in];
while (1)
if (rfid.available() > 0)
RFID();
if (id == user_id[user_in])
break;
else
[57]
lcd.clear();
lcd.print("invalid card");
digitalWrite(r_led, LOW);
delay(2000);
digitalWrite(r_led, HIGH);
lcd.clear();
lcd.print("Charging.");
lcd.setCursor(0, 1);
lcd.print("Time ");
lcd.setCursor(lcd_clm, 0);
lcd.print(".");
lcd.setCursor(5, 1);
lcd.print(mins);
lcd.print(".");
if (sec > 9)
lcd.print(sec);
else
lcd.print("0");
lcd.print(sec);
lcd.print("mins ");
[58]
lcd_clm++;
if (sec == 0 &&mins == 0)
break;
if (sec == 0)
sec_cal = millis();
last_sec = 59;
mins = mins - 1;
if (lcd_clm> 11)
lcd_clm = 8;
lcd.setCursor(lcd_clm, 0);
lcd.print("");
delay(500);
user_min[user_in] = mins;
user_sec[user_in] = sec;
digitalWrite(r_led, LOW);
digitalWrite(g_led, HIGH);
digitalWrite(charging, HIGH);
lcd.clear();
[59]
lcd.print("USER ");
lcd.print(user_in + 1);
lcd.print(" balance");
lcd.setCursor(0, 1);
lcd.print("left ");
lcd.print(user_min[user_in]);
lcd.print(".");
lcd.print(user_sec[user_in]);
else
lcd.print("0");
lcd.print(user_sec[user_in]);
lcd.print(" mins.");
delay(2000);
digitalWrite(r_led, HIGH);
else if (user_min[user_in] == 0)
digitalWrite(r_led, LOW);
lcd.clear();
lcd.print("balance is low");
delay(2000);
[60]
digitalWrite(r_led, HIGH);
else
lcd.clear();
lcd.print("invalid card");
digitalWrite(r_led, LOW);
delay(2000);
digitalWrite(r_led, HIGH);
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("to recharge..");
rfid.flush();
valid = 0;
RFID();
if (id == user_id[i])
user_in = i;
[61]
valid = 1;
break;
if (valid == 1)
digitalWrite(g_led, LOW);
lcd.clear();
lcd.print("RECHARGE done");
lcd.setCursor(0, 1);
lcd.print("USER ");
lcd.print(user_in + 1);
delay(2000);
user_min[user_in] = user_min[user_in] + 5;
lcd.clear();
lcd.print("balance is ");
lcd.print(user_min[user_in]);
lcd.print(".");
lcd.print(user_sec[user_in]);
else
lcd.print("0");
lcd.print(user_sec[user_in]);
[62]
}
lcd.setCursor(0, 1);
lcd.print("mins.");
delay(2000);
digitalWrite(g_led, HIGH);
else
lcd.clear();
lcd.print("invalid card");
//footstep();
digitalWrite(r_led, LOW);
delay(2000);
digitalWrite(r_led, HIGH);
delay(100);
void RFID()
c = 0;
id = "";
[63]
c = rfid.read();
id += c;
delay(100);
Serial.print("id=");
Serial.println(id);
lcd.setCursor(0, 1);
[64]
CHAPTER 6
6.1 EXPECTED RESULT AND DISCUSSION OUTPUT POWER
7V = 12µA
1V = 12/7µA
Thus we have
Power =Voltage*Current
-6
Power = 40*68.57*10 W
-3
Power = 2.73*10 W
[65]
SELECT CITY WALK MALL
SAKET,NEW DELHI
INDIA
[66]
CONCLUSION
can utilise this strategy for power generation with a specific end goal to
[67]
BIBLIOGRAPHY
TEXT BOOK REFERED
1. ATMEGA 328 Data Sheets.
2. Advanced piezoelectric materials by Kenji Uchino.
WEBSITE
1. www.atmel.com
2. www.beyondlogic.org
3. www.wikipedia.org
4. www.howstuffworks.com
5. www.alldatasheets.com
6. www.electrical4u.com
7. www.rjptonline.org
[68]