Active Buzzer with Arduino - Page 1
Forum section: electronics / projects

author: anishkgt
author_rank: Frequent Contributor
timestamp: November 06, 2018, 11:26:52 pm
content: Hi All,I am using an arduino to generate PWM tone. My question is is a transistor as a switch needed to drive the buzzer. Secondly would analogWrtie(Tone, Freq). I get a different tones as i adjust the Freq.Would this be possible with the attached car. Is it necessary to add a transistor and a diode.

author: hamster_nz
author_rank: Super Contributor
timestamp: November 07, 2018, 01:02:24 am
content: Without the details of your buzzer, it is highly likely that the answer is no. Most buzzers have a fixed frequency (e.g. something likehttps://www.jaycar.co.nz/mini-piezo-buzzer-3-16v/p/AB3462)You would need to use a speaker for the Arduino to be able to control frequency.

author: Mechatrommer
author_rank: Super Contributor
timestamp: November 07, 2018, 01:36:34 am
content: Buzzer is quite narrow band compared to speaker, there is one sweet frequency that will generate loudest beep, 1khz or 2khz cant remember or it depends on buzzer type, you can go 1khz, 2khz or 3khz but beep will quickly attenuated beyond sweet spot. Your circuit will work given you break connection resistor to 5v and connect it to mcu pin. It wont work as in your picture, buzzer will burn without sound. Better use transistor as in the picture, better safe than sorry.

author: t1d
author_rank: Super Contributor
timestamp: November 07, 2018, 03:56:55 am
content: You have the low side of the transistor going to "BZR." It should go to ground.

author: anishkgt
author_rank: Frequent Contributor
timestamp: November 07, 2018, 05:00:34 am
content: A buzzer like this onehttps://www.digikey.com/product-detail/en/AI-1223-TWT-5V-2-R/668-1220-NDThe tone library within the arduino works when connecting the buzzer to the ic at the high side.But would the tone work when connecting at the high side using the transistor ? Would it be affected when using a pnp transistor ?Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D, Brymen BM869sSent from my iPhone using Tapatalk

author: Mechatrommer
author_rank: Super Contributor
timestamp: November 07, 2018, 05:22:21 am
content: Quote from: anishkgt on November 07, 2018, 05:00:34 amif you referring to the blog site welder circuit. the mcu pin connected directly to buzzer, when mcu pin high, current (PWM) will flow and buzzer beeps. you can try that, but check buzzer resistance with your Brymen 235 DMM, if its more than 250 ohm (20mA current flow) you should be fine more or less without transistor. if less than that, you risk burning mcu. if you using transistor in low side, your buzzer library will still work. Salam.

author: anishkgt
author_rank: Frequent Contributor
timestamp: November 07, 2018, 05:35:59 am
content: Yes it’s for the same project. The resistance is 28MOhm and keeps decreasing 0.01 every 3 seconds.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D, Brymen BM869sSent from my iPhone using Tapatalk

author: Mechatrommer
author_rank: Super Contributor
timestamp: November 07, 2018, 06:05:41 am
content: Quote from: anishkgt on November 07, 2018, 05:35:59 amno! there got to be better than thathow do you measure it?edit: thinking about it, it maybe capacitively coupled... you need current probe! and measure current during operationedit: thinking about it again, you provided a datasheet, it says 30mA max i guess when you apply max voltage 7V. short answer, i guess its safe to drive the buzzer directly from mcu.

author: anishkgt
author_rank: Frequent Contributor
timestamp: November 07, 2018, 06:07:58 am
content: I think I would keep the trans incase I need to change the buzzer to something bigger.Thank you all for the advises.Www.Georgehobby.wordpress.comEquipments: DSO104z, Hakko FX888D, Brymen BM869sSent from my iPhone using Tapatalk

author: anishkgt
author_rank: Frequent Contributor
timestamp: November 07, 2018, 07:55:01 pm
content: Looking at the schematic once again, the MUC sends out the signal to buzzer so how does this schematic work when active low triggers the buzzer. This would be more appropriate as mentioned in Reply# 2

author: Mechatrommer
author_rank: Super Contributor
timestamp: November 08, 2018, 02:35:01 am
content: buzzer is active when mcu send HI signal, similar to your welder schematics.