You are on page 1of 3


• 1 cycle
1. 30min charging @2 amp
2. Discharging through external load i.e. 1 watt LED lamp
3. 15 min charging @2 amp
Now ower supply got o!! instead o! power "utton is on # a!ter turn o!! the power supply and
turn on the power supply with time di!!erence o! 10 sec so that present state may got sa$ed in
the %lash.
Now turn on the power supply next cycle got started.
• 2 cycle
&ame as 1 cycle.
• 3 cycle
&ame as 1 'ycle.
• ( cycle
&ame as 1 cycle
• 5 cycle
1. 30 min charging @2 amp
2. Discharging through external load i.e. 1 watt LED lamp
3. 12 )our charging @.3 amp i.e. prolong charging
urpose o! this pro*ect was to se+uencing o! charging and Discharging the "attery without
human inter$ention means ,ndi$idual has not to sit o$er there charging the "attery and temp
the connection !or discharging #-ur !irst pro"lem was that we cannot completely automate the
power supply there will "e human inter$ention when change o! cycle has to "e there# &ince
controller has to store which cycle status o! respecti$e cycle #,! we don.t do li/e this then there is
no point o! cycle consideration. ,t would go li/e this charging and discharging
0y role was to automate the power supply into se+uencer so , wrote the code !or se+uencing.
%or this , ha$e to see the 1D' !or channel 10 and 13 !or $oltage and current# then a$erage the
1D' count generated 2.3.4 to num"er o! sample which can "e de!ined. 4hen con$ert these
1D' counts into re+uire $oltage and current.
4hese generated $oltage and current is use to generate 20 re!erences which are stored in
41''31 and 41''32.
Now we start writing the !unction !or automatic charging !or 5 respecti$e cycle# "e!ore that we
ha$e see the what i! external power cut or cycle completes # here we will store the in!ormation
regarding which cycle and respecti$e 30#15 minute counts and 12 hr counts and discharging
!lag and also the chec/sum !or all the $alue !or security pro"lem. &et the loc/ "it o! the !lash
memory turn o!! the relay.
Now , write the 30min charging !unction in which !irstly , chec/ !or the !ull scale $alue i.e. 30min
then , compare !iltered current 5scaled 6 with .1m1mp#i! it is grater increment the 30min counter
and store the charge $oltage and programma"le current with the 7$. and 7,. re!erence $alue and
see the relay status.
,! 30min count is greater than 2 and scaled current is less than .1m1mp and tempering is not
done then set the charge $oltage and programma"le current to 8ero and turn o!! the relay as
well as lamp relay.
,! the tempering is still 8ero then we maintain the charging current and programming $oltage to
the re!erence and ma/e the relay -N "ut turn o!! the relay !or the lamp and increment the 30
min counter
2e again chec/ whether tempering !or 1 or 3 sec turn o!! the lamp relay and maintain the
programma"le current and charge $oltage to its re!erence $alue. ,! e$erything is o/ turn the
tempering !lag to 8ero .1s 30 min o$er lamp will turn -N automatically and "attery $oltage start
decreasing it would ta/e 39( )ours to discharge up to : ;9:.2;# !or this we turn o!! the relay and
turn -N the lamp relay and ma/e the charging $oltage and programma"le current to <ero. ,!
$oltage decreased to 5 ; then machine stop o$er there and ma/e Discharge counter to 8ero# i!
a"o$e situation is not happened then with delay o! 1 or 2 second 15 min charging phenomenon
start !or 15 min @ 2 amp# a!ter completion o! 15 min charging machine will get automatically o!!
"y switch o!! the programma"le current and charging $oltage and turn o!! all the relays.
Next cycle will start with the switch o!! and switch on the &= se+uencer with the time
di!!erence o! 10 second# !rom there next i.e. &econd cycle get started same phenomenon o! !irst
30 min charging and discharging through lamp and when discharging goes up to : $olt Lamp
goes o!! and again charging !or 15 minute. 4his cycle goes up to ( cycle# ,n last cycle i.e. 5 th
cycle where there is prolong charging concept is there# in which !irst 30 min charging then
discharging through lamp a!ter discharging reaches to :;9:.2; it stop discharging lamp will
automatically o!! and again charging "ut this time is !or 12 hr not !or 15 min with current o! 0.3
Now machine goes o!! now we turn -N with time di!!erence o! 10 sec machine goes "ac/ to 1
>ou might ha$e "een thin/ing why e$ery time we ha$e to turn -N?-%% the &= switch with
delay #"ecause in controller we ha$e to store the current status o! cycle in controller !lash# i! we
do not

same cycle will continue num"er o! time i.e. don.t /now . 4o /now to the controller which cycle is
going on we store the status li/e current $oltage# current cycle# counts# and chec/sum etc. when
ac !ail comes it will store the current status $alue in %lash memory.
Problem faced
2hile 4esting we see that i! some tempered "y remo$ing connection or mis"eha$ing with
system during discharging cycle don.t start !rom that point o! discharging #"ut we ha$e sol$ed
this pro"lem "y setting the discharging !lag "e!ore 15 min charging.
&econd pro"lem was how to store the 12 hr count in 1: @A o! !lash memory. 4o store the 12 hr
count we re$erse techni+ue we set 12 hr count is not e+ual to !ull scale 12 hr counts# store all
the re!erences li/e charging current and programming $oltage and 20 # relay -N and again
we chec/ 12 hr count whether completed so we put i! 512 hr count is not e+ual to !ull scale 12
hr count # i! >E& increment the 12 hr counterB1 # i! N-4 then increment the 12 hr count B2.
Else store the charging current and charging $oltage to 8ero# /eep coming the 20 and turn o!!
the relay o! lamp and set the discharging !lag.