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.

Circuit works automatically when any light made on/off

Status
Not open for further replies.

udayp

Junior Member level 3
Joined
Mar 30, 2011
Messages
30
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,508
Sir,
I have done a project on Home Automation. I used 89s52 chip.
It is working satisfactorily but when any light of our house made ON or Off the circuit starts working automatically, I can't find out where is the problem.
some said its power supply problem I used 104 capacitor across Vcc and Gnd of each chip(4 chips are in circuit) still no use.

Can any one please help me to solve this problem.
 

I think we will need more information before we can diagnose the problem.

What do you mean by "starts working automatically"? Surely you want it to work automatically - so you must mean that there is some unexpected output activity - what are the precise symtoms? Can you see the time interval between these unwanted actions? Is it exactly consistent and repeatable or is it erratic - even slightly?

Power supply: if you have built this, please post the circuit diagram with component values. If you have used a commercial power supply, can you monitored its voltages with an oscilloscope when the controller is switching?

Controller: if you have programmed this yourself, you may have to post your program on here before anyone can find a fault.
Can you debug the program? If not, can you make temporary changes to dispaly the state of some of the key variables which will help in locating the error?
 

what do you mean by working "automatically".
it will be better to sort out the problem if you can post your schematic and code!
 

Sir,
I made power supply using a transformer 12-0-12 a rectifier by 1N4007 , capacitor 1000mf/25v a 7805 regulator. The O/P of regulator is connected to MCU directly and 104 is used across each of the MUC's Vcc and Gnd (4 MCU's are in project). I used laser torch works on this 5 volts with a resistor 800 ohm.
I don't have CRO. so by DMM only i have to solve it. and my code simple
This code is for main door it opens by typing the keys as follows.

mov a,#10001000b
here:

l1: jb p0.0,l1
l2: jb p0.1,l2 ;key pad
l3: jb p0.2,l3

mov r0,#20d

loop:
rr a
mov p1,a ; main door opens
acall time:
djnz r0 loop

acall longtime: ;wait for few sec

mov r1,#20d
loop1:
rl a
mov p1,a ; main door closes
acall time:
djnz r1 loop1

When any light of room is made on the door opens and closes itself. actually it should not happen.
And when buzzer relay on then also some other door opens, the code is same as posted for others.
can you please help me further.

---------- Post added at 22:30 ---------- Previous post was at 22:29 ----------

Sir,
I made power supply using a transformer 12-0-12 a rectifier by 1N4007 , capacitor 1000mf/25v a 7805 regulator. The O/P of regulator is connected to MCU directly and 104 is used across each of the MUC's Vcc and Gnd (4 MCU's are in project). I used laser torch works on this 5 volts with a resistor 800 ohm.
I don't have CRO. so by DMM only i have to solve it. and my code simple
This code is for main door it opens by typing the keys as follows.

mov a,#10001000b
here:

l1: jb p0.0,l1
l2: jb p0.1,l2 ;key pad
l3: jb p0.2,l3

mov r0,#20d

loop:
rr a
mov p1,a ; main door opens
acall time:
djnz r0 loop

acall longtime: ;wait for few sec

mov r1,#20d
loop1:
rl a
mov p1,a ; main door closes
acall time:
djnz r1 loop1

When any light of room is made on the door opens and closes itself. actually it should not happen.
And when buzzer relay on then also some other door opens, the code is same as posted for others.
can you please help me further.
 

Attachments

  • Image.jpg
    Image.jpg
    661.5 KB · Views: 126
  • Image 2.jpg
    Image 2.jpg
    1.2 MB · Views: 114
Last edited:

Uday what is d point of using 4 MCUs,if 1 can do all stuffs.
2-post circuit's schematic.
3-have u placed a cap. right after 7805.
 
  • Like
Reactions: udayp

    udayp

    Points: 2
    Helpful Answer Positive Rating
There seems to be RFI switching pulses entry into the PSU developed for the controller .
You will need to have an differential and common mode rejection PIE filter provided at the input mains of your power supply .

Further , you need to have a grounding of the secondary +/- thru 0.1 ufd/400V AC ceracaps .
Thought of using antistatic Y-caps at the transient suppression?
You may even need to go for transorbs (bipolar) to suppress the fast transient pulse entry to your digital stages
 

    V

    Points: 2
    Helpful Answer Positive Rating
First thanks you for reply.

As am a beginner in MCU so don't know how to do that and i used capacitor i.e, 104 at vcc and gnd point of each MUC's.

I have attached my project photo. each door is controlled by stepper motor some 12 and some 24 volt. i used 8 stepper motor int his project. 1 gate,Car parking,3 main door ,4 study room,5 dyning,6 bed room and 7,8 are for roof which moves during demonstration.

and am unable to understand some words of you e.g RFI switching pulses,common mode rejection PIE filte,antistatic Y-caps,transorbs (bipolar)
 

Attachments

  • 1.JPG
    1.JPG
    104.3 KB · Views: 137

first, your project seems very nice.
second, i think you wanted to say that your project's lights go ON/OFF!
If it is the case and you have connected steppers to the same power source which is already connected
to MCU's supply also, then you should use separate power sources for motors and MCU's.
make sure to common all the grounds!
 
  • Like
Reactions: udayp

    udayp

    Points: 2
    Helpful Answer Positive Rating
Thank you sir,
I got the solution i did a mistake i.e. to make sound when window is broken.
i used a laser torch and a siren to sound generator using 555 and relay speaker. what i did is i connected laser torch to the supply of MUC. when i press the reset switch of the MCU the laser torch get dim and relay fluctuate when relay starts fluctuating all the door motor and gate motor run them self then i made the torch connection to another power supply now everything working fine. but still i am unable to solve when room lights made on/off the motor starts them selves.

I used totally two separate power supply one for motors and another for MCU board and made both ground common.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top