Author Topic: Microcontroller and buzzer  (Read 4569 times)

0 Members and 1 Guest are viewing this topic.

Offline jaRON

  • Contributor
  • Posts: 34
Microcontroller and buzzer
« 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
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 8200
  • Country: nz
Re: Microcontroller and buzzer
« Reply #1 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
« Last Edit: September 27, 2011, 06:22:36 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 16261
  • Country: gb
  • 0999
Re: Microcontroller and buzzer
« Reply #2 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.
« Last Edit: September 27, 2011, 04:21:32 pm by Hero999 »
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 10321
  • Country: my
  • reassessing directives...
Re: Microcontroller and buzzer
« Reply #3 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.
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 8200
  • Country: nz
Re: Microcontroller and buzzer
« Reply #4 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.
« Last Edit: September 28, 2011, 07:40:28 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Mat

  • Contributor
  • Posts: 39
  • Country: ch
Re: Microcontroller and buzzer
« Reply #5 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.
 

Online Zero999

  • Super Contributor
  • ***
  • Posts: 16261
  • Country: gb
  • 0999
Re: Microcontroller and buzzer
« Reply #6 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.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 8200
  • Country: nz
Re: Microcontroller and buzzer
« Reply #7 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.
Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf