help with project

Thread Starter

tjstudy

Joined Mar 14, 2009
5
hi,we r doing the automatic room light controller with visitor counter using at89s52..i have enclosed the circuit for receiver,transmitter..i have also enclosed the code..but when the program is dumped in the controller and executed the display is random..also there is no decrement taking place..please point out the mistake in our code..thanks
 

Attachments

mik3

Joined Feb 4, 2008
4,843
I haven't seen the code yet but first you have to correct your circuit.

You are using a single 330 ohm resistor to limit the current for the whole display. This is wrong, you have to put one resistor for each display segment. Also, if the displays are common anode you will need a PNP transistor and not a NPN as shown.
 

Thread Starter

tjstudy

Joined Mar 14, 2009
5
sir,

we have rigged up the whole hardware part of the circuit and tested the seven segment display by providing a negative voltage to each of the segments..it worked well so we reckoned there was no problem with the hardware part of project..anyway we will test it with the changes you have suggested.could you also take a look at the code and give your comments..thank you for the help sir.
 

mik3

Joined Feb 4, 2008
4,843
If the code was in C I would be glad to help. :p

Also, a PIC does not output a negative voltage. I think it worked because you were testing each segment independently.
 

Thread Starter

tjstudy

Joined Mar 14, 2009
5
yes sir we were testing the segments independently..but may i ask you what would be the result of the above connection in case the code were to be correct..i mean should the segments not glow at all if we use an npn transistor??
 

SgtWookie

Joined Jul 17, 2007
22,230
Just to clarify what Mik3's saying, the resistors need to go between the Atmel's I/O pins (33 through 39) and the cathodes of the 7-segment displays. Only one resistor per I/O pin is necessary since you are multiplexing the displays.

R5 and R9 need to be removed; Q2 & Q3 need to be replaced with PNP transistors, emitters connected to +5v.

It won't work properly as you have it connected now. You might see something, but it would look garbled.

Also, you need a reverse-EMF diode across the coil of the relay K1; without it you will get a very large reverse polarity voltage spike that may destroy Q1.
 

Thread Starter

tjstudy

Joined Mar 14, 2009
5
well that is what is actually happening so i guess that is the problem..we will do the above said changes and try out the circuit.i thank both of you for the help sir.will get back to tell you the result.
 

Thread Starter

tjstudy

Joined Mar 14, 2009
5
sir,

we have changed the circuit as you said..adding a pnp resistor..the display has improved a bit but we still hae a problem..that is the numbers are getting incremented..but not by 1..it is showing 11,41,72 and so on..the same with decrement..could it be the fault in the code only??
 
hiiiiiiiiiiii............
my friend,

i am working with the same projecttt as you...........
can any one send me the working of transmitter & receiver section of aUTomatic room light controller with visitor counter...........
 
Top