Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sequential lighting design problem

Status
Not open for further replies.

jusman

Newbie level 2
Joined
Jun 25, 2003
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
Indonesia
Activity points
51
I am building a prayer candle lamps box for a catholic church. The box has 3 slots to insert coin or paper money. After power up, when some one want to pray he/she insert coin(s) into a slot and the first of 10 of candle lamp lights up for 5 minutes. When this period has not been elapsed you can add one more coin, and the second lamp lights up, and so on. So each lamp light will distinguish 5 minutes after it is triggered by coin insertion. After the 10th lamp, coin insert will trigger back the first lamp.
I intend to use PIC micro 16f84, use one of port A as trigger input, use the rest of port A and port B as outputs to be fed to driver like ULN 2003 to drive relays which in turn activate the lamps. If anyone has any ideas how to program the timer in the 16f84 for this application I will be very grateful. Thank you very much for your help !
Jusman Sulaiman
 

Right now I only have time for a little advive: take a piece of paper, a pen and draw a state machine. Everything will become much more clear after you do this.
 

Try out this

Hi,


This is classic pic based light seqeuncer with programming and design based on pic 16f84a all included in attach file source file for pic and construction documents
read the artical carefuly and modify the code as per your requirements
regards
Fragrance
 

no need to go for so much complexity finite state machine is the solution. u can do it even with simple IC's like FF and timers, but in ant way have to design FSM
 

personaly i would use the pic design + adding a ds calanender chip
this will give delay factors and also remember when indeed its sunday
 

Bogdan,
Thanks, I realize that simple things like this will sometimes help a lot. However, I feel that the state waveforms is as simple as single shot multivibrator, but the real challenge is how to update 8 different variable out of a single timer base on intterupt. Your next advices are welcome !

Fragrance,
Thanks for your attachment which I have downloaded to my computer. I am studying the article, hopefully it will be helpful to my design.

gauvier,
Yes I have made the sequential lamps' sequencer easily using CD4017. But, the timers, inevitably using NE555 monostables are very inaccurate. It is very difficult to exactly adjust its pulse to 5 minutes, and the worst you may end up with this situation : for example the 3rd output is still on while outputs 4,5,6,7 and even 8 are already off. This can happen owing to leakage and bad tolerance of the electrolytic capacitors. I then design one crystal controlled oscillator whose pulses will be fed into 26 stage counter (3 ICs, 2 transistor and a few RC) when triggered. This end the design up with a very complicated PCBs (due to 8 times 26-stage counters) and a lot of components and cables. So I think the 16F84 PIC micro is the best alternative, although I have very little experience with employing its timer. I have to tell you that actually the original goal for the design is for 50 lamps, not 8. But before searching solution in this forum I decide to make the problem simpler due to ports limitation of the 16F84. When I have programmed it successfully with 8 lamps, I can easily make the port not as a sequencer, but as a binary counter whose outputs can be fed to decoders like 74HC154s and get the same result for 50 lamps.

!!!Monkey!!!,
I agree with you that adding an RTC chip to make the machine wakes up automaticaly on Sunday will be nice, after I successively program the original design.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top