Monday, 23 September 2019

How to power a 6-14v piezo from an Arduino?



I have a Arduino Nano and I'm trying to run this Piezo Siren off the circuit. The Arduino is currently powered by a USB plug. The siren expects 6-14v and the digital output pins on the nano are giving me about 4.6v. If I run the siren directly from VCC to ground (around 4.70v) then it works, but if I go from a digital output to ground then I get no sound (I do get sound from a smaller speaker on the same pins). If I use the exact same setup with my Arduino Duemilanove then it works as well.


What is the easiest way to get this siren to work based on a trigger from the Arduino? (A bonus would be if I can get the required parts in store from RadioShack so I don't have to wait on shipping anything...)


The Siren: http://www.radioshack.com/product/index.jsp?productId=2062405



Answer



The siren is rated for 150 mA at 12 Volts - which gives us an idea of what current it would need to operate, even if it did operate at 4.7 Volts.


The ATmega328 microcontroller used in the Arduino Nano and Duemilanove (or ATmega168 on older ones) has an absolute maximum rating of 40 mA per GPIO pin. While it may deliver higher current with a low enough load impedance, that would severely stress the microcontroller, driving it beyond any guarantee of sustained use or survival. I prefer to not load any GPIO pin beyond about 25 mA, but your risk appetite may differ.


By wiring the siren directly to the Arduino output pins, you are provoking the imminent destruction of its microcontroller, i.e. magic blue smoke, Arduino kaput. That it may have "worked" on some Arduino board is irrelevant to this point.


Here are two options for getting that siren to work with an Arduino. The first option uses the 5 Volt output from the Arduino, so whether it works is all up to chance. The second schematic uses an external voltage source (6xAA alkaline cells = 7.5 Volts) and will work consistently even after the batteries deplete a fair amount.


schematic


simulate this circuit – Schematic created using CircuitLab



An inexpensive 2n7000 MOSFET (if you need through-hole) or IRLML2502 (if SMD is acceptable) will serve fine as the switching component.


No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...