Download presentation
Presentation is loading. Please wait.
1
CSE 370 - Fall 1999 - Introduction - 1 Electronics and Physical Interfaces Speaker Interface Electronics Review 8051 I/O
2
CSE 370 - Fall 1999 - Introduction - 2 Speaker Interface Add waveforms to get multiple tones (think current through speaker, not voltage) Note that lower frequency is smoother for a given sample rate
3
CSE 370 - Fall 1999 - Introduction - 3 Ideal Solution Digital to Analog Converter 8051 DAC 8 AMP (V to I) Voltage signal Speaker cares about current, not voltage What is algorithm to superimpose 1KHz tone with 500Hz tone With a sampling rate of 10KHz We can probably find a chip for this
4
CSE 370 - Fall 1999 - Introduction - 4 Synthesizer Algorithm Let sin[] be a look up table with 256 entries (1 complete cycle) Every.1ms (10KHz) P2 = sin[t1] + sin[t2] + sin[t3] … For 1KHz, t1 += 256/10 is this hard? how do we implement this? For 500Hz, t2 += 256/20 At 8-bit resolution we can vary output from 0 to 255. Hi frequencies are smoother Can Compute arbitrary waveforms (not just tone summations) This is probably quite doable with our 8051, but we will take a simpler approach (maybe some of you may take the last week to improve the acoustics) 0 Computer each sample through 255 128
5
CSE 370 - Fall 1999 - Introduction - 5 Using single bit tones Two tones generated by single bit outputs. Use current summation externally. Note: high frequencies look more sinusoidal
6
CSE 370 - Fall 1999 - Introduction - 6 Our Version Objective convert number of bits to current 8051 AMP (B to I) tone1 tone2 tone3 5V
7
CSE 370 - Fall 1999 - Introduction - 7 One Idea 8051 tone1 tone2 tone3 8ohms Does this sum? (I = Bx) What must R be to protect the processor? What is the worst case (1, 2, or 3 bits)? How much power are we putting through the speaker in the worst case? 5V R=? No quite. Vs decreases with increasing B. So each Ir decreases with increasing B Constraints 5/(8+R)<10mA 5/(8+R/3) < 26mA 3 bits is worse (Higher R constraint) (26mA)^2 * 8 = 5.4mA Vs
8
CSE 370 - Fall 1999 - Introduction - 8 Another Idea Use a current amplifier (PNP Transistor) Ice = Ib (assume =10) Assume Vbe = 0 (can be up to.7V) Assume tone1 = 0V Determine: Ib, Ice Determine Power dissipated by speaker e c b 8ohms 5V 8051 tone1 Ib Ib I b = 11*I s I s = 5/8 I s = 625mA I b = 57mA I c = 568mA Violates speaker, 8051, Transistor constraints Ps = (.625^2) * 8 = ~3W (overpowers.2W speaker)
9
CSE 370 - Fall 1999 - Introduction - 9 How do we fix this problem How much current can we safely put through a.2W speaker? Imax = (.2/8)^.5= ~158mA From data sheet for transistor, notice that Ice = 50mA if Ib = 5mA, and it gives us values for Vce and Vbe for that case. Is this a good “on” operating point for us? (Other operating points can be found on graphs, experimentation) Its perfect if we use one for each tone for a total of about 50mA If we limit Ib then we limit Ice too. What size resistor should we put between 8051 port and the BASE to “bias” the transistor properly. Heavy use of KCL and Ohm’s law. See next page
10
CSE 370 - Fall 1999 - Introduction - 10 Final Circuit Design 8051 tone1 tone2 tone3 R=? 8ohms 5V Size R to match your speaker and to Stay within the current limitations of the Processor. From DataSheet (On Sat.) Ib = 5mA Ic = 50mA Vbe =.65V (min) Vr = (5 – (50mA*8) -.65) R = Vr/5mA ~ 790ohms
11
CSE 370 - Fall 1999 - Introduction - 11 Resistor Review of basic Electronics Capacitors Inductors Bipolar Transistors MOS transistors Review of 8051 I/O configuration
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.