Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC Controlling Buzzer

Status
Not open for further replies.

cne

New Member
Hello,

I have designed a circuit in which a PIC controls a large 120v buzzer using a relay. When the buzzer is activated, it makes the PIC go weird, and sometimes it resets itself. When I unplug the buzzer, the relay works normally. It seems like the buzzer is causing interference through the AC line. What can I do to prevent this?

NOTE: The Resistor (R5) in the schematic is supposed to be 1K2, I made a mistake.

Thanks in advance,

Cameron
 

Attachments

  • buzzer schematic.jpg
    buzzer schematic.jpg
    313.2 KB · Views: 295
We are only seeing 1/2 the story. Is the PIC on a different supply ?

Do you have .1uf bypass cap(s) right next to the PIC between the VSS VDD pins ?

Maybe with a separate supply and an opto isolator.
 
Last edited:
i need some help and advice..about pic 16f877a..sorie..i dont know how to post a new forum.this year i have a f.y.p(final year project),but now i have problem with my ic circuit.i think my program has true.because i has test it at training kit.my problem is..led is always on..without press the swicth button.??i dont know where the input coming.
 
i need some help and advice..about pic 16f877a..sorie..i dont know how to post a new forum.this year i have a f.y.p(final year project),but now i have problem with my ic circuit.i think my program has true.because i has test it at training kit.my problem is..led is always on..without press the swicth button.??i dont know where the input coming.

You want to start a new thread, not a new forum. Go to the appropriate forum (I'd suggest the "homework" one since you obviously want help with your homework), and click the button at upper left that says "Create New Thread".
 
Last edited:
I have a 0.1uf bypass cap on the PIC. Would it help to put a bypass cap across the buzzer? The PIC is powered by the 15v switching PSU through a 7805 regulator.
 
Last edited:
Are you using BOTH decoupling caps for the 7805 and a heatsink?

15v to 5v is no joke, and you will be dissipating quite a bit in the 7805.

Showing the WHOLE picture will help pinpoint your error.
 
Given a choice rather than just a cap across the relay contacts I would use a RC snubber like a Quencharch along these lines. I also would have gone with an SSR rather than mechanical relay. Depending on the buzzer used I would also snubber the buzzer.

Ron
 
Yes, there is a heat sink bolted to the 7805. Here is the rest of the circuit.
 

Attachments

  • main schematic.jpg
    main schematic.jpg
    432.8 KB · Views: 222
Are you sure that MCLR is configured so that no external capacitor is required? Since you are not using RE3, hang a bypass cap to ground there.

Is the line-side GND on the input of the 15V PSU common to the GND on its output side?. If those are tied, temporarily break that path and see if that cures the problem.
 
Looking at your schematics, my guess is that you are only providing a very light loading on the switching psu which may cause it to have problems regulating and also might present some switching noise to the supply rails. To further compound the problem, you have nothing in the way of a reservoir capacitor on the regulator, 0.33u is way shy and will struggle. Try placing >100uF before and after your regulator, say 470u before, 220uF after. If the mains buzzer is putting out a lot of noise you may also have to place a sensibly rated 100nF capacitor and 1/2W 100R resistor in series across it and an inline filter in your 5V rail to clean up any noise on the supply rails. Any negative going instantaneous spikes on the supply rails might well cause the PIC to either latch up or reset.
If the buzzer is really noisy electrically, you might also need to place a TVS across your 5V rail to cut the peaks off the spikes first and then allow your filter to clean up the rest.

rgds
 
Looking at your schematics, my guess is that you are only providing a very light loading on the switching psu which may cause it to have problems regulating and also might present some switching noise to the supply rails. To further compound the problem, you have nothing in the way of a reservoir capacitor on the regulator, 0.33u is way shy and will struggle. Try placing >100uF before and after your regulator, say 470u before, 220uF after. If the mains buzzer is putting out a lot of noise you may also have to place a sensibly rated 100nF capacitor and 1/2W 100R resistor in series across it and an inline filter in your 5V rail to clean up any noise on the supply rails. Any negative going instantaneous spikes on the supply rails might well cause the PIC to either latch up or reset.
If the buzzer is really noisy electrically, you might also need to place a TVS across your 5V rail to cut the peaks off the spikes first and then allow your filter to clean up the rest.

rgds

I will try some of these things, thank you.
 
If the mains buzzer is putting out a lot of noise you may also have to place a sensibly rated 100nF capacitor and 1/2W 100R resistor in series across it

Do you mean in parallel with the terminals or in series with the hot terminal? I have never heard of a capacitor in parallel for decoupling.
 
Do you mean in parallel with the terminals or in series with the hot terminal? I have never heard of a capacitor in parallel for decoupling.

In a network like that the capacitor is not used for decoupling. It is part of a snubber circuit, I mentioned earlier. R and C are in series and placed across the relay contacts. If you go back to the link I posted there are examples.

Ron
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top