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.

5V dc buzzer making clicking sound

Status
Not open for further replies.

skmdmasud

Member
Hi..
i am using a 5V dc buzzer which makes a beep sound when 5V is applied to it. Its the same as you would find inside a PC casing. My buzzer some times beeps and some times it just make a click noise:confused:. it is run be a uC.


Regards:)
 
If your uC provides insufficient drive current, or drives the buzzer with too short a pulse, then you will probably only get a click.
 
this is what happens but at random time, my buzzer

beeps beeps click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click click beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep beep:confused::rolleyes:

each beep is 250ms long with a 250ms delay.
 
how much mA do buzzers like this require

**broken link removed**
V continuous tone buzzer, output frequency approx 2300Hz. Diameter 10mm, positive lead is slightly longer.

Model: BUZZ_5V
Shipping Weight: 0.01kilograms
Manufactured by: Various


I guess my mA is ok because i connected a variable resistance and i can decrease the sound and it keeps on working when IT WORKS.
 
So the uC current capability looks ok. Logically, then, something is amiss with the uC software. Could interrupts be over-riding the buzzer drive arrangement?
 
So the uC current capability looks ok. Logically, then, something is amiss with the uC software. Could interrupts be over-riding the buzzer drive arrangement?

good question i dont understand one thing,

lets say i have a function WAIT with a 3sec delay
in my code i have an interrupt timer set to fire at 1sec (inside interrupt routine 1 sec delay).

My question is will the WAIT function give a delay of 5sec to cuz there will be 2 interupts causing extra 2 sec
 
My code is somthing like this. the internal sec is a global volatile variable which gets ++ in an ISR routine @ 250ms.

Code:
if ( internal_sec%16==0 ) //blink the water change activity led
	{	PORTC |= 1<<PINC1;	}	else	{	PORTC &=~(1<<PINC1);LCDWriteIntXY(0,1,val,4);	}


ISR(TIMER1_COMPA_vect) // action to be done every 250 msec
{
    internal_sec++;
	if (internal_sec > 239) //convert it to 1000msec
	{
		internal_sec = 0;
		internal_min ++; //we get 1 min after every 60 sec
		if (internal_min ==240)  // gives 4 hr timing
		{
			internal_min = 0;
		}
	}
}

i can change the "internal_sec%16==0" to lets say 2 to make the beep 500ms long. but that does not help the clicking.
 
Sorry, I'm not a C programmer. Someone else here may be able to help.
 
Sounds more like a faulty buzzer.....I use little 5v buzzers... When it clicks i tap it with a screwdriver and it then makes the correct sound... My 5v buzzers really should be given 6V as I drive them through a NPN BJT and they don't get the full 5V they need..

I don't think the ISR is to blame either... This only counts time it doesn't set / reset any pin.
 
Sounds more like a faulty buzzer.....I use little 5v buzzers... When it clicks i tap it with a screwdriver and it then makes the correct sound... My 5v buzzers really should be given 6V as I drive them through a NPN BJT and they don't get the full 5V they need..

I don't think the ISR is to blame either... This only counts time it doesn't set / reset any pin.
I tried the screwdriver method it didnot work. I think I will just throw it and get a new one.

Thanks and regards.
 
As a simple test you can try code like this;
Code:
while(1)
{
  PORTC = 0x01;   // buzzer on pin RC0
  Delay_mS(250);
  PORTC = 0x00;   // buzzer off
  Delay_mS(750);
}

That code will sit in a loop, beeping the buzzer once every second. If you turn your interrupt OFF first then this test will be a fairly bulletproof way to test your buzzer.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top