User Tools

Site Tools


adding_a_buzzer

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
adding_a_buzzer [2016/10/09 01:18]
lostmyquad [Building your own using]
adding_a_buzzer [2017/04/21 22:15] (current)
jonnyphenomenon [Building your own using]
Line 13: Line 13:
 </code> </code>
  
-There are 3 other defines related to the buzzer functionality +There are 3 other defines related to the buzzer functionality found in ''hardware.h''
 <code> <code>
 //#define BUZZER_PIN       GPIO_PIN_13 // SWDAT //#define BUZZER_PIN       GPIO_PIN_13 // SWDAT
Line 27: Line 26:
  
 **Note:** the value you choose for the ''BUZZER_PIN'' will define how you'll connect your buzzer to the quad. The current options allow you to choose between either the ''SWCLK'' or the ''SWDAT'' port for the signal connection. (this will become more clear once you're becoming familiar with the hardware and wiring explained below). **Note:** the value you choose for the ''BUZZER_PIN'' will define how you'll connect your buzzer to the quad. The current options allow you to choose between either the ''SWCLK'' or the ''SWDAT'' port for the signal connection. (this will become more clear once you're becoming familiar with the hardware and wiring explained below).
 +
 +
 ===== Hardware ===== ===== Hardware =====
  
Line 40: Line 41:
  
 ^ID^Component^ebay search^price US$^comments| ^ID^Component^ebay search^price US$^comments|
-|**PCB_1** |4 * 3 hole prototype board| \\ 10PCS Prototype PCB \\   \\ [[http://www.ebay.com.au/sch/i.html?Prototype+PCB.TRS0=&_nkw=10PCS+Prototype+PCB&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?Prototype+PCB.TRS0=&_nkw=10PCS+Prototype+PCB&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?Prototype+PCB.TRS0=&_nkw=10PCS+Prototype+PCB&_sop=15|US]]  |$1.00|You'll need to cut a small piece from one| +|**PCB_1** |4 * 3 hole prototype board|10PCS Prototype PCB \\   \\ [[http://www.ebay.com.au/sch/i.html?Prototype+PCB.TRS0=&_nkw=10PCS+Prototype+PCB&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?Prototype+PCB.TRS0=&_nkw=10PCS+Prototype+PCB&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?Prototype+PCB.TRS0=&_nkw=10PCS+Prototype+PCB&_sop=15|US]]  |$1.00|You'll need to cut a small piece from one| 
-|**BUZ_1** |buzzer|  \\ 10pcs 5V piezo Buzzer continous \\  \\ [[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=10pcs+5V+piezo+Buzzer+continous&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=10pcs+5V+piezo+Buzzer+continous&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=10pcs+5V+piezo+Buzzer+continous&_sop=15|US]] \\ |$1.20|taken from TX or sourced elsewhere| +|**BUZ_1** |buzzer|10pcs 5V piezo Buzzer continous \\   \\ [[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=10pcs+5V+piezo+Buzzer+continous&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=10pcs+5V+piezo+Buzzer+continous&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=10pcs+5V+piezo+Buzzer+continous&_sop=15|US]]  |$1.20|taken from TX or sourced elsewhere| 
-|**T_1** |9012 or BC848C transistor \\ 50pcs smd 9012 \\  \\ [[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=50pcs+smd+9012&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=50pcs+smd+9012&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=50pcs+smd+9012&_sop=15|US]] \\ |$1.00|taken from TX or sourced elsewhere| +|**T_1** |Transistor NPN BJT (eg BC848C)|100PCS BC848C SMD \\   \\ [[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=100PCS+BC848C+SMD&LH_PrefLoc=2&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=100PCS+BC848C+SMD&LH_PrefLoc=2&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=100PCS+BC848C+SMD&LH_PrefLoc=2&_sop=15|US]]  |$1.75|taken from TX or sourced elsewhere. \\ SOT-23 package used in this example
-|**R_1** |1 kΩ resistor|  \\ 100pcs smd 1k 1206 \\  \\ [[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=100pcs+smd+1k+1206&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=100pcs+smd+1k+1206&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=100pcs+smd+1k+1206&_sop=15|US]] \\ |$1.50|taken from TX or sourced elsewhere| +|**R_1** |1 kΩ resistor|100pcs smd 1k 1206 \\   \\ [[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=100pcs+smd+1k+1206&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=100pcs+smd+1k+1206&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=100pcs+smd+1k+1206&_sop=15|US]]  |$1.50|taken from TX or sourced elsewhere| 
-|**CON_1** |4 pin strip connector|  \\ 10pcs 40 Pin Strip color \\  \\ [[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=10pcs+40+Pin+Strip+color&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=10pcs+40+Pin+Strip+color&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=10pcs+40+Pin+Strip+color&_sop=15|US]] \\ |$1.30|just snap the required portion off one|+|**CON_1** |4 pin strip connector|10pcs 40 Pin Strip color \\   \\ [[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=10pcs+40+Pin+Strip+color&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=10pcs+40+Pin+Strip+color&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=10pcs+40+Pin+Strip+color&_sop=15|US]]  |$1.30|just snap the required portion off one|
  
 //Note: for about $6 you'll have enough to build 10 buzzers + a lot of spare "stock" components. I intentionally gave advice to purchase larger quantity than needed as the cost between 1 item and 10-100 is often a few cents. It doesn't make sense to order a single component from ebay. Remember to sort results by "Price + Postage: lowest first"!!// //Note: for about $6 you'll have enough to build 10 buzzers + a lot of spare "stock" components. I intentionally gave advice to purchase larger quantity than needed as the cost between 1 item and 10-100 is often a few cents. It doesn't make sense to order a single component from ebay. Remember to sort results by "Price + Postage: lowest first"!!//
Line 51: Line 52:
 I'm using a spare Floureon H101 TX to salvage parts so your actual items could differ. I'm using a spare Floureon H101 TX to salvage parts so your actual items could differ.
  
-(incomplete)+The diagram below shows the location of the three components you need to salvage. This example shows the location inside a Flourean H101 TX. Click on the image for a larger version to see detail. 
 + 
 +{{:h101-tx-salvage-parts-locations.jpg?direct&400x300|h101-tx-salvage-parts-locations.jpg}}
  
 === Assembly === === Assembly ===
Line 59: Line 62:
 The finished item we're describing here will look something like: The finished item we're describing here will look something like:
  
-{{:salvaged_parts_buzzer.jpg?direct&400x400}}+{{:salvaged_parts_buzzer.jpg?direct&400x400|salvaged_parts_buzzer.jpg}} 
 + 
 +== Overview == 
 + 
 +  * Assumed input voltage: 3.2 - 5v 
 +  * Buzzer + (positive) goes to Battery + (positive) 
 +  * Buzzer - (negative) goes to collector on T1 
 +  * Signal (SWCLK or SWDAT) goes to base on T1 via R1 
 +  * Battery - (negative) goes to emitter on T1 
 + 
 +== Circuit diagram == 
 + 
 +{{:buzzer1.jpg?direct&|When the signal from BUZZER_PIN is sent to the Base pin of the transistor, power from BAT+ is allowed to flow through the speaker(+ to -) into the transistors Collector pin and out of the Emitter to GND.}} 
 + 
 +{{:buzzer2.jpg?direct&|The signal line for BUZZER_PIN is defined in config.h and can be either SWCLK or SWDAT depending on your setup.  Note that H8 Blue boards have their CLK and DAT pins reversed.}}
  
 \\ \\
Line 68: Line 85:
 There are a number of premade options available. There are a number of premade options available.
  
-A premade item that matches Markus Gritsch's solution can be found on ebay (or similar) with a search for: ''9012 Transistor Active Buzzer'' , these will cost about US$1.00 each. //Remember to sort results by “Price + Postage: lowest first”!!.//+A premade item that matches Markus Gritsch's solution can be found on ebay (or similar) with a search for: ''9012 Transistor Active Buzzer'' ([[http://www.ebay.com.au/sch/i.html?_sacat=0&_nkw=9012+Transistor+Active+Buzzer&_sop=15|AU]] [[http://www.ebay.de/sch/i.html?_sacat=0&_nkw=9012+Transistor+Active+Buzzer&_sop=15|DE]] [[http://www.ebay.com/sch/i.html?_sacat=0&_nkw=9012+Transistor+Active+Buzzer&_sop=15|US]]), these will cost about US$1.00 each. //Remember to sort results by “Price + Postage: lowest first”!!.//
  
 Typically they will look like: Typically they will look like:
  
 {{:premade-buzzer.jpg?nolink&400x400}} {{:premade-buzzer.jpg?nolink&400x400}}
 +
  
 ===== Design notes ===== ===== Design notes =====
adding_a_buzzer.1475968731.txt.gz · Last modified: 2016/10/09 01:18 by lostmyquad