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 port amplify

Status
Not open for further replies.

gatoulisss

New Member
hello guys!!
i have a question.
im using pic 16f88 connected to some sensors and a buzzer its like an alarm, my question is can i amplify the output of the pin witch is connected to the buzzer so i can have much louder sound? (the sound driver is the pic so the buzzer is not making any sound if i just connect it to a battey) for example the port output is +5v can i make it +9 and how?

thank you very much!
 
Welcome to ETO, gatoulisse!

Use the PIC output to drive a simple transistor amp:
Simple NPN Amp.JPG

Alter volume by altering 510Ω resistor. Best not to reduce it below 100Ω.

Might want to add a diode across the buzzer to reduce inductive "kick-back":
upload_2015-2-5_9-23-26.png
 
Last edited:
What do you mean by a 'buzzer'?

Assuming it's just a piezo sounder? (just a disc, no electronics) you can make it a LOT louder by simply 'bridging' it using two PIC pins. By driving one pin LOW and the other HIGH, then swapping them over you effectively double the supply voltage (giving four times the power) with no extra components and just a couple of lines of extra code.

BTW - I've moved this to the correct forum for you.
 
If your "buzzer" is a piezo sounding disk then your 500Hz frequency is too low for it. They are the loudest at the resonant frequency which might be 5kHz. The frequency should be tuned to find its strongest resonant frequency.
A Piezo beeper (with a transistor oscillator inside) is in a resonant housing and it automatically oscillates at its strongest resonant frequency so maybe you should use it. It needs DC to make it work.
 
the buzzer is connected to a dip switch and from there i choose between diferent sounds so using a bc547 i have got more loudness but not as many as i want. the code if i use two ports would be very confusing.. i have got one like the foto below witch is as loud as i want and the diferense is because of the transporter... so how i can do this?
 

Attachments

  • Photo 1-2-15 - 9 11 22 μ.μ..jpg
    Photo 1-2-15 - 9 11 22 μ.μ..jpg
    923 KB · Views: 239
the buzzer is connected to a dip switch and from there i choose between diferent sounds so using a bc547 i have got more loudness but not as many as i want. the code if i use two ports would be very confusing.. i have got one like the foto below witch is as loud as i want and the diferense is because of the transporter... so how i can do this?
Do you have a transformer?
 
Your piezo sounder disc is driven at 500Hz. It is small and has no enclosure so frequencies below about 3kHz go from the rear around to the front and cancel lower frequencies exactly like a loudspeaker that has no enclosure. The tiny transformer also cuts low frequencies.

Do you understand about its resonance? It is the frequency where it rings like a bell. Here is a graph showing the output of a piezo sounder disc like yours. Its peak resonance is 5.5kHz but it also has smaller resonant peaks at 2500Hz and 950Hz. Its output below 900Hz is almost nothing. Your piezo sounder disc resonates at different frequencies than this one.
 

Attachments

  • piezo speaker.PNG
    piezo speaker.PNG
    52.6 KB · Views: 240
From the picture this is a 40mm piezo, it can give output of down to 400Hz. Get one with a plastic resonant box. Get any audio transformer (preferably recycled one from an old audio device) about the same size as the one in the picture. connect the high resistance coil to the buzzer and the low resistance coil via series cap of 0.1 uF to the output of the pic.
 
Last edited:
From the picture this is a 40mm piezo, it can give output of down to 400Hz. Get one with a plastic resonant box.
Oh yeah?
I use real speakers that are wideband and have very low distortion. These little piezo sounders (noise makers) are very stiff so they do not produce low frequencies and the disc and plastic box are very resonant.

Murata does not make the 30mm diameter piezo sounder anymore, their largest one is now 22mm. Its frequency response with sine waves is horrrrrible but when fed a square wave it makes plenty of noises.
If you tune the frequency so a harmonic is at its peak resonance then it will be loud.
Here is its output 10cm (about 4") from your ear driven with 3Vp-p square and 1V RMS sine:
 

Attachments

  • piezo sounder Murata.png
    piezo sounder Murata.png
    34.2 KB · Views: 221
Oh yeah?
I use real speakers that are wideband and have very low distortion. These little piezo sounders (noise makers) are very stiff so they do not produce low frequencies and the disc and plastic box are very resonant.

I'm quite sure Gatoulisss wants to use a pic to make music like the one out of greeting cards. Nigel G has already told him about the easiest way.
 
His oscilloscope shows it driven from a 500Hz square wave, not from music. Music from a PIC? Maybe if it is PWM.
 
i have that speaker that already has an transformer this is the problem i dont know witch transformer i sould buy to have the same result
It is a common practice to use a transformer, in my burglar alarm a transformer drives the piezo. You need audio transformer with impedance of 1K to 20K , I suggest you get anything similar, it isn't critical.
Like this one, connect the high resistance winding to the piezo.
**broken link removed**

His oscilloscope shows it driven from a 500Hz square wave, not from music. Music from a PIC? Maybe if it is PWM.
Hello Audioguru, Beethoven used a pic and a piezo to compose his music and like me and Gatoulisss he had a problem hearing it.
 
It is a common practice to use a transformer, in my burglar alarm a transformer drives the piezo. You need audio transformer with impedance of 1K to 20K , I suggest you get anything similar, it isn't critical.
Like this one, connect the high resistance winding to the piezo.
**broken link removed**


Hello Audioguru, Beethoven used a pic and a piezo to compose his music and like me and Gatoulisss he had a problem hearing it.
so one transformer like this will make my buzzer be loud as a syren? and how i can connect it to the circuit?
 
so one transformer like this will make my buzzer be loud as a syren? and how i can connect it to the circuit?

The circuit on the right will give a gain of 5 and the one with a transistor will give a gain of 10 or more. The 1K winding has a resistance of about 10 ohm.
piezo.GIF
 
Last edited:
The circuit on the right will give a gain of 5 and the one with a transistor will give a gain of 10 or more. The 1K winding has a resistance of about 10 ohm.
View attachment 90612
thank you very very much!! can i ask something last? because this one **broken link removed** might not ship to greece can i use this **broken link removed** ?? and what would be the difference? also the ressistor before the transistor is 47k or 4,7k? thanks a lot again!
 
The transformer you found looks OK for the job. If you find a cheaper one with resistances +/_ 50% that will be good too.
A resistor of 47K makes the current into the base of the transistor about 100 uA, with hfe of about 100 the collector current is about 10 mA, this will give about the right current for the amplifier.
Look again at the replies of audioguru, there you can see how to use the piezo in a way that will give more noise. Resonant frequency is an important factor. Piezo is a very efficient device but not simple to use. If you put 2 piezo in parallel you will get more noise.
 
Status
Not open for further replies.
Back
Top