EEVblog Electronics Community Forum

Electronics => Microcontrollers => Topic started by: jaRON on September 27, 2011, 05:51:22 am

Title: Microcontroller and buzzer
Post by: jaRON on September 27, 2011, 05:51:22 am
ok hi I working on a Microcontroller fans controller. It has 14 fans on it and I use 6 Transistors. and 4 Temperature Sensors.  I going to use a BUZZER. so if the temperature get to high it gos off. what i need to know is. can i run the buzzer off the Microcontroller or do I need to put a transistor in it. I use the buzzer obo-1201g-b1


http://www.americor-usa.com/piezo_electric/piezo_print_files/PE%20Page%20041..pdf (http://www.americor-usa.com/piezo_electric/piezo_print_files/PE%20Page%20041..pdf)
Title: Re: Microcontroller and buzzer
Post by: Psi on September 27, 2011, 06:14:13 am
I'm not sure if that device generates a tone by itself.
The two terminals may go straight to a pizeo disc. In which case you would need to give it a signal to make sound rather than dc voltage.

If it does produce a sound from DC then that one (obo-1201g-b1) is max 3V 15mA. The micro could supply it directly but if it's a 5V micro you will need a resistor to burn off 2volts.
Something like 2v/0.015A = ~139 ohms
Title: Re: Microcontroller and buzzer
Post by: Zero999 on September 27, 2011, 04:19:33 pm
I'm not sure if that device generates a tone by itself.
The two terminals may go straight to a pizeo disc. In which case you would need to give it a signal to make sound rather than dc voltage.
Those are magnetic sounders not piezo.

The rated current is 30mA which is higher than a typical MCU output can supply so a transistor is required. It needs a squarewave to emit a sound but that's easy to with an MCU or failing that, a couple of transistors. According to the datasheet, the resonant frequency (when it's at its loudest) is 2kHz.
Title: Re: Microcontroller and buzzer
Post by: Mechatrommer on September 28, 2011, 06:38:50 am
the safest way is using a driver (transistor). later if you find out the buzzer isnt loud enough, you can simply change it with higher power. and i dont think burdening the mcu to draw much current is a good idea, mcu meant for control, not driver, imho, ymmv.
Title: Re: Microcontroller and buzzer
Post by: Psi on September 28, 2011, 07:36:10 am
The rated current is 30mA which is higher than a typical MCU output can supply

The one he's talking about (OBO - 1201G-B1) has a max current of 15mA.

15mA is ok for most micros as they're designed to be able to run a 20mA led.
but yeah, a transistor is more future proof and keeps the load off the mcu port.
Title: Re: Microcontroller and buzzer
Post by: Mat on September 28, 2011, 11:20:41 am
Isn't it 15mA at the rated voltage of 1.5V?
If it is linear, it would be 30mA at 3V.
Title: Re: Microcontroller and buzzer
Post by: Zero999 on September 29, 2011, 04:24:45 pm
The one he's talking about (OBO - 1201G-B1) has a max current of 15mA.
The DC is 42R so it's a good idea to use a transistor in case the output goes high for too long causing 71mA to flow and damage to the MCU.
Title: Re: Microcontroller and buzzer
Post by: Psi on October 04, 2011, 05:27:14 am
hm.. you're right, that datasheet is a bit odd.

the max current isn't actually its max current.