Some audio schematics, will they work?
Kye
Posts: 2,200
Hey guys,
I was working on a design for a few audio circuits for a board I plan to produce and I just wanted to ask if the schematics below make sense.
I'm thinking the audio out circuit using the transistor may be pushing it but I'm not sure. I would as other applications do, pass a 40Mhz signal through the DAC line adjusting its duty cycle.
Also, could I use a 10K ohm resistor in place of the 100k ohm resistor for the sigma delta ADC? Maybe I should adjust the caps as well?
Thanks for your input.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
I was working on a design for a few audio circuits for a board I plan to produce and I just wanted to ask if the schematics below make sense.
I'm thinking the audio out circuit using the transistor may be pushing it but I'm not sure. I would as other applications do, pass a 40Mhz signal through the DAC line adjusting its duty cycle.
Also, could I use a 10K ohm resistor in place of the 100k ohm resistor for the sigma delta ADC? Maybe I should adjust the caps as well?
Thanks for your input.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Circuits I have seen do not require transistors for headphones so you may not require this.
Anyway, you could make a common circuit for both input and output, which would be useful for stereo in or stereo out, just by chaning loading different components.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Links to other interesting threads:
· Home of the MultiBladeProps: TriBlade,·RamBlade, RetroBlade,·TwinBlade,·SixBlade, website
· Single Board Computer:·3 Propeller ICs·and a·TriBladeProp board (ZiCog Z80 Emulator)
· Prop Tools under Development or Completed (Index)
· Emulators: CPUs Z80 etc; Micros Altair etc;· Terminals·VT100 etc; (Index) ZiCog (Z80) , MoCog (6809)
· Search the Propeller forums·(uses advanced Google search)
My cruising website is: ·www.bluemagic.biz·· MultiBladeProp is: www.bluemagic.biz/cluso.htm
-Phil
Audio input requires some limiting impedance for the charge balancing circuit to work but it does not require pullup resistors. The 10K feedback resistor tries to balance the charge on the capacitor but if the input impedance is too low it doesn't have a chance of balancing it. Also any resistors on the audio input side has only ever been for electret microphones which need power in which case it is also advisable to add an extra RC filter to this feed *if* it is required. At least make this resistor value more like 10K rather than 2K2..
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Thanks for the advice guys. (I know the transistor is not needed, however, I have a surplus of one used in my circuit and I was thinking that buffering the audio output would be the best use.)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
The series input resistor needs to go between the input caps and the charge balancing caps and this value is adjusted to suit the input signal level. Without this resistor the audio may work if the input is high impedance but that is not normally the case for line impedances.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
·
Sorry, for bmp. Thought I made a png.
So, this circuit uses the transistor as a buffer, and gets the full benifit of it. However, the charge path has a different time constant than the discharge path for the cap on the dac side. I'm not sure if this will matter or not. Any ideas?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Post Edited (Kye) : 10/18/2009 5:06:14 AM GMT
The 2N3904 has a switching time between 35 & 50ns at a base current of 1mA. You are driving the base with 10K and therefore are going to get Ibase of about .27mA. This will slow the transistor down significantly and see all sorts of cool non-linearities.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?
With a minimal investment in time and materials you should be able to breadboard and try your audio output circuit. Have you done this? If so, what did you observe?
The input circuit is harder to breadboard due to the necessary proximity of the delta-sigma circuitry to the Prop. However, the Demo Board schematic provides all you need for a mic input. It works well, so why not just copy it? (Hint: your 10uF input caps are way too big.)
-Phil
The 2.2K resistors feeding power to the electret microphone inputs really do need to be bypassed and filtered otherwise you are directly injecting noise from the digital supply line into a sensitive part of the circuit.
P.S. I have attached a sample circuit that should guide you although the actual component values could be optimized.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Post Edited (Peter Jakacki) : 10/18/2009 9:25:26 AM GMT
For all this stuff I'm actually trying to cut cost and use the most minimal implementation. I could use a filter on the 2.2k supply line, but then that would also be the case for the other I/O lines too. Mmm, decisions...
I will have time to try this stuff out next week hopefully.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
The Demo board doesn't use a serial resistor from the mic to the ADC either. I think the 10K resistance of the pullup on that board, along with the 0.1uF series caps, determines the input impedance. Along with the 100K feedback, this prooduces a 10x or so gain stage in addition to the ADC function.
-Phil
I'm still not convinced that the NPN transistor is biased properly for what you are after. What are the DAC output characteristics, and what are the desired characteristics for the audio out? The way it is, if the DAC is a 5V DAC that swings from one rail to the other, there will be a small voltage level translation to the audio out that will cause it to go +/-3V... If you are driving a Prop ADC with that output, I think that you might really want +/-1.5V (or approx 1.65V) instead.
The transistor should be placed in it's linear mode, and especially for single transistor amplifier applications, you should have an input cap as well as an output cap to prevent any DC bias.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
What would be the cheapest way to do this while still offloading the current sourcing from the prop?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
Maybe I'm missreading your intentions. What characteristics are you looking for on the input and output of the transistor circuit? If you want an amplifier, there are better ways to bias the transistor.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Regarding the audio input maybe I am misreading you as I think that you want to handle standard line levels as well as electret microphones, am I correct? The series resistors can be adjusted to suit if you have a low impedance input vs the high impedance of the microphone.
You don't need to bypass the other signals, only the DC power to the microphone as this would otherwise be the electrical equivalent of feeding any digital noise imposed upon the 3.3V rail directly into the sensitive input of the ADC. i don't know what the problem is with having an extra resistor and a capacitor for this at least. As I said before it is easy on a finished board to change values or leave them out but it is much harder to add components afterwards. Don't skimp here.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
Minus the 1uF and 10uF caps on your original transistor circuit, the attached image is voltage (green) and current (yellow) across the 240 Ohm resistor.
Notice some clipping across the bottom of the sinewave in the 'upper image'.
By slightly biasing the transistor with a 47K resistor across the B-C junction, the clipping goes away. (lower image)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I haven't looked into it a great deal but maybe this is the time to "nut out" the Prop RC DAC properly. There's a lot of talent and experience on this forum and I am sure we can come up with some reference circuits.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
The only thing really acting like a filter cap is the 1uF ... I don't know that I would put it there... the 10uF's just create a DC block allowing the signal to ride above and below 0V. Even in this configuration the 1uF with the 10uF's act more like a voltage divider than a filter. Still don't know that I would use it, since when paralleled with the 240 Ohm resistor it can have adverse effects.
Your right though, any type of filtering needs to happen at the input rather than the output, and the input should be DC biased/blocked with a cap.
Just some basics:
www.st-andrews.ac.uk/~jcgl/Scots_Guide/audio/part1/page2.html
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
I'm still not sure what type of audio input Kye is using though, because if it is electret mikes then the 2K2 "bias" resistors need to be in place and preferably with the RC filter shown from the supply. samplIf it's a line input then he will need those series resistors that I have in my example circuit.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
The point of the transistor circuit... well, is bad. So lets leave it at that. I believe the best and most constructive thing out of this topic is what Petter has proposed that I should use a filter on the audio input.
Thanks again,
(Its just really difficult trying to figure out the best implementation of stuff because I have to justify the extra cost when saying is it worth it? My board is made for education so the quality does not need to be steller... that said, only doing the necessary stuff for reliable operation is what I want).
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
-Phil
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
*Peter*
I wonder if you could do everyone a favor and repost your second set of schematics. As it stands, it's a 2.0MB (!) BMP file, and page 1 loads very slowly as a result. Your first schematic set is a PNG and is much smaller at 26KB.
Thanks,
-Phil
I was going with Kye's ... http://forums.parallax.com/attachment.php?attachmentid=64468
In the attached schematic, version #1 is similar to your version with a 4.7K resistor creating a bias to prevent clipping. The output drive of version #1 is only about 4.4mA ... Version #2 is derived from Kye's schematic using a 47K to bias the transistor from clipping and is essentially the same as version #1, but it delivers about 13.55mA of drive current.
Note: In each case, the input resistor and CAP form your lowpass filter (Version #1 uses a 1K as the input R, and version #2 uses a 10K as the input R)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/19/2009 4:05:07 AM GMT
In your first schematic (assuming Vdd = 3.3V, since the DUTY-mode output comes from a Prop), you won't be able to get more than 2.7V / ohm of output current or < 2.7mA into a 1K resistor. But the emitter resistor current is not the available output current anyway, is it? It seems to me that up to 2.7V * β/ (4.7K || 1K) could be delivered in total if the load required it.
Is that right, or am I missing something?
-Phil
I had VDD set at 5V in the simulation hence 4.4mA .... this circuit works just fine at 3.3V also.
The output Voltage should track at whatever the input voltage is, so even if VDD is 5V if the input doesn't go over 3.3V neither will the output. The current however with VDD at 5V will be slightly higher at the output than if VDD were at 3.3V
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
But I guess what I was really trying to distinguish was the actual emitter current (which is determined by VE and the emitter resistor) versus the total available current, which is given by:
····(Vbase - 0.6V) * β/ (Rpullup || Rbase)
In this case, the circuit on the left is capable of more current drive than the circuit on the right.
-Phil
Post Edited (Phil Pilgrim (PhiPi)) : 10/19/2009 5:46:18 AM GMT