Using PROP to control AUDIO SIGNALS via CD4066 QUAD GATE?
DavidM
Posts: 630
HI,
I want to have the propeller switch/mix stereo audio line level signals.
I am using a uMP3 audio player board ( of which the PROPELLER will control via serial), But there is no audio going into the prop.
The AUDIO OUT of The uMP3 Player will be directed to 3 X STEREO OUTPUTS,
1) MAIN AUDIO OUT
2) LEFT HEADPHONE OUTPUT
3) RIGHT HEADPHONE OUTPUT
What I have is 2 lots of 3 buttons on a MEMBRANE KEYPAD for the two headphone outputs that say..
"LEFT" , "STEREO", "RIGHT" for the LEFT HEADPHONE & the same again for the RIGHT HEADPHONE ( there are no controls on the MAIN AUDIO OUT.
When the user presses the "LEFT" button ( of say the LEFT HEADPHONE OUTPUT) , the left audio signal is sent out to BOTH LEFT & RIGHT outputs ( in this case headphone output 1) and the right channel is not used.
If the user presses "STEREO" , the left is sent to the left output and the right is sent to right for normal stereo listening. & finally
If the user presses the "RIGHT" button, the LEFT CHANNEL is not used but the right channel signal is sent to both the LEFT & RIGHT outputs.
So, can I use the CD4066 QUAD GATE to do this? with the propeller controlling the "CONTROL A, B C & D lines" of the 4066 chip?
QUESTIONS..
1) Is it just a matter of setting the CONTROL PINS of the 4066 Chip to HI, to activate them ?
2) Do they need to be pulled low if not so? i.e not floating.
3) I believe I need to use such a gate as the 4066 because I am dealing with AUDIO which is AC Current?
4) If I use TWO 4066 chips that will be 8 I/O lines used, So is there a better way to set the gates with less I/O, (eg Shift register?)
I have attached a schematic to help illustrate this.
Thanks
Dave M.
I want to have the propeller switch/mix stereo audio line level signals.
I am using a uMP3 audio player board ( of which the PROPELLER will control via serial), But there is no audio going into the prop.
The AUDIO OUT of The uMP3 Player will be directed to 3 X STEREO OUTPUTS,
1) MAIN AUDIO OUT
2) LEFT HEADPHONE OUTPUT
3) RIGHT HEADPHONE OUTPUT
What I have is 2 lots of 3 buttons on a MEMBRANE KEYPAD for the two headphone outputs that say..
"LEFT" , "STEREO", "RIGHT" for the LEFT HEADPHONE & the same again for the RIGHT HEADPHONE ( there are no controls on the MAIN AUDIO OUT.
When the user presses the "LEFT" button ( of say the LEFT HEADPHONE OUTPUT) , the left audio signal is sent out to BOTH LEFT & RIGHT outputs ( in this case headphone output 1) and the right channel is not used.
If the user presses "STEREO" , the left is sent to the left output and the right is sent to right for normal stereo listening. & finally
If the user presses the "RIGHT" button, the LEFT CHANNEL is not used but the right channel signal is sent to both the LEFT & RIGHT outputs.
So, can I use the CD4066 QUAD GATE to do this? with the propeller controlling the "CONTROL A, B C & D lines" of the 4066 chip?
QUESTIONS..
1) Is it just a matter of setting the CONTROL PINS of the 4066 Chip to HI, to activate them ?
2) Do they need to be pulled low if not so? i.e not floating.
3) I believe I need to use such a gate as the 4066 because I am dealing with AUDIO which is AC Current?
4) If I use TWO 4066 chips that will be 8 I/O lines used, So is there a better way to set the gates with less I/O, (eg Shift register?)
I have attached a schematic to help illustrate this.
Thanks
Dave M.
Comments
- max 25 mA
- but adding 300 Ohms!
You could also be interested in 4051 or 4052
What do you mean by 300ohms??
Thanks
Dave M
Search for analogue switch, many manufacturers do them, Maxim especially do some very good ones.
Graham
Andy
I still don't understand what you guys are saying,
270 ohms at 5 V = 18 ma??
Please explain!
Anyhow, can I run this from a 74HC595 Shift register? I would only need 3 or 4 lines from the prop!
see attached schematic ( which is incomplete )
Thanks
Dave M
Yes, of course you can run it from shift registers but I don't think you understand the operation of the switch. There is no ABC type thing, you have either end of the switch (IN/OUT and OUT/IN) plus a control line (CONTROL n). A logic low on the control input and the switch is open (actually high-resistance), a logic high on the control input and the switch is closed (actually 270R at VDD=5V).
*Peter*
In the fist case: The CMOS switches are not ideal switches, they have a Resistance of 270 Ohm if they are switched ON. Your Headphone has 8 Ohm or perhaps max. 32 Ohms. This can not work.
In the second case: The CMOS switches works only in the range of the supply voltage (0..3.3V here), but Audio signals are AC signals that swings also in the negativ range. A 4052 can handle this.
With two 4052 you need only 4 lines of the propeller without a HC595 for such a circuit.
Andy
Typical on resistances of 0.6ohm and maxim are great with samples.
Graham
Thanks for the replies,
Did you guys look at my 2nd schematic?
I have 1.8 v p- p which I believe is higher than normal line level audio, So this may help?
Secondly, the 4066 is suitable for audio switching ( the spec sheet says do) so I don't see how I cannot use it, But I think what you both are saying is that I will get a drop, remember I plan to "REMIX" by sending the output of one switch into the INPUT of another switch, So I can mix the signals the way I need.
Now if the resulting level is not enough to drive headphones directly then I will need to amplify this, I believe some kind of OPAMP is required here?
Dave M
You will get a drop proportional to the current passing through the switch, of course if you drive a speaker the current is high and so is the drop. The input impedance of an op-amp is generally very high so very little current will be drawn and the drop will be very small. This means the op-amp really just needs to act as a buffer/driver rather than actually having to amplify anything although if you want to drive a speaker you may want to amplifiy it anyway.
Graham
I just had a quick look at the MAXIM products I found this,
MAX9729 - Stereo Headphone Amplifier with BassMax,
Volume Control, and Input Mux
I am just reading the spec sheet now, I think I need two of them, gotta see how much they are though!
Thanks
Dave M
I need samples for now, but I plan to us a bout 20 of them!
looking at Plan C now!
Dave M
Graham
yes I can place orders directly for small quantities, I just found out!
I had a look at the spec sheet , its just what I need! I can "digitally control" the volume if I wish, This is great as I am working with membrane panels!
Can the 28-Pin TQFN-EP be placed inside a PLCC socket or similar??
Thanks
dave M
I'm also using the Propeller with a uMP3 player. Are you by any chance working on a SPIN object for the player? Are you going to have a user interface with song lists, etc.?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The more I know, the more I know I don't know.· Is this what they call Wisdom?