Author Topic: Using PIN 1 of Expansion Port for Audio *Input*  (Read 1161 times)

0 Members and 1 Guest are viewing this topic.

LambdaMikel

  • Guest
Has anybody tried using PIN 1 for Audio Input? It does not seem to be so easy to "mix in" a line level input signal. The signal is either distorted, or level is too low (or both). A diode in the signal path was suggested to me, but even with a very low forward voltage diode of 0.2 V that results in extremely distorted sound. 

What's the proper way to do that? The goal is to have both the internal audio as well as the external audio non-distorted and with resonable levels in the internal speaker.

Maybe PIN 1 is really only an audio output, as described in the Wiki, and not meant for input.


Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: au
  • Liked: 353
  • Likes Given: 18
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #1 on: 05:59, 17 March 18 »
PIN 1 is an output only. It cannot be used for input, since the outputs from the AY-3-8912 go to the tape circuit and the stereo port.

LambdaMikel

  • Guest
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #2 on: 06:05, 17 March 18 »
Thank you! That clarifies it.  :)

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.501
  • Liked: 1045
  • Likes Given: 257
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #3 on: 11:04, 17 March 18 »
The sound "output" pin is the average point of a passive averaging circuit. So nothing prevent you to add one more signal as long as you fit the equation. ie the impedance and the overall amplitude of your additional signal match the other one.
https://www.allaboutcircuits.com/textbook/semiconductors/chpt-8/averager-summer-circuits/

Within the CPC this node is feed to the audio amplifier. On a SSA1 this node is shorted to ground to mute the internal speaker.

LambdaMikel

  • Guest
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #4 on: 17:44, 17 March 18 »
The sound "output" pin is the average point of a passive averaging circuit. So nothing prevent you to add one more signal as long as you fit the equation. ie the impedance and the overall amplitude of your additional signal match the other one.
https://www.allaboutcircuits.com/textbook/semiconductors/chpt-8/averager-summer-circuits/

Within the CPC this node is feed to the audio amplifier. On a SSA1 this node is shorted to ground to mute the internal speaker.

I tried this with a line-out level signal and a variable resistor from 0 to 50 kOhms. No success, really.
Maybe I haven't found the right values yet.

It is true that when I feed in the signal without diode and without resistor, one can clearly hear it loud and distorted, so it is getting amplified.
However, then the internal AY output is very low. And with a resistor, the levels are not quite satisfactory.

Well, I keep trying. Any hint for resonable resistor values? This is the line out of the click! speech board.
« Last Edit: 17:47, 17 March 18 by LambdaMikel »

Offline gerald

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.501
  • Liked: 1045
  • Likes Given: 257
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #5 on: 19:24, 17 March 18 »
A 10k resistor, to match the AY output, ratio should be OK as long as your line out dynamic is similar to the AY one (1Vpp at max volume).
I would also add a capacitor (few uF should do, unpolarised if you have) in series if there is none yet to avoid bias issue.
Note that overall volume will decrease since we now have 1/4 instead of 1/3 (I am ignoring the jack path with the B to A and C channel mixing)

Offline GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.027
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 911
  • Likes Given: 2287
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #6 on: 00:31, 18 March 18 »
Tot0's PlayCity expansion does use the Pin. The sound from both MZ chips goes into the CPC.


However, this works for CPC's, but not for Plus/GX computers.
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2019.08.07)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2019.08.14)

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: au
  • Liked: 353
  • Likes Given: 18
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #7 on: 06:12, 18 March 18 »
playcity is using the pin so that the stereo connector is used to get sound via a headphone socket.

This is not an idea situation as the voltage/current are being "forced" back into the AY-39812 (DAC outputs) also.

Offline pelrun

  • Supporter
  • 6128 Plus
  • *
  • Posts: 661
  • Country: au
    • index.php?action=treasury
  • Liked: 349
  • Likes Given: 217
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #8 on: 09:53, 18 March 18 »
This is not an idea situation as the voltage/current are being "forced" back into the AY-39812 (DAC outputs) also.


By that reasoning the AY is "forcing current" back into it's own outputs as well. If you match impedances and drive 1v p-p like you should then in the worst case it's (1v into 20k) 0.05mA per channel.

Offline rpalmer

  • 6128 Plus
  • ******
  • Posts: 553
  • Country: au
  • Liked: 353
  • Likes Given: 18
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #9 on: 13:21, 18 March 18 »

By that reasoning the AY is "forcing current" back into it's own outputs as well. If you match impedances and drive 1v p-p like you should then in the worst case it's (1v into 20k) 0.05mA per channel.

The AY-3-8912 cannot send back current to itself if it is producing the D/A channel outputs. The outputs go to the tape socket, the stereo connector via the resistors (which are tied to GND). This is why the stereo output has to be connected to a amplifier to get any meaningful sound since the voltages are to low for a head phone to useful (yes I thought you could just use head phones when i saw the socket when i purchased my machine back in 1985 and the result was barely any sound - however I can concede that maybe today's versions may work, but i doubt it).

Also I was only saying that the playcity card was using the stereo pin in a unconventional way which is not what the design of the system was meant to use the pin for. In this case there may be concern if playcity is pushing too much back to make the headphones usable without an amplifier and may lead to AY-3-8912 issues in the future.

rpalmer

Offline pelrun

  • Supporter
  • 6128 Plus
  • *
  • Posts: 661
  • Country: au
    • index.php?action=treasury
  • Liked: 349
  • Likes Given: 217
Re: Using PIN 1 of Expansion Port for Audio *Input*
« Reply #10 on: 16:05, 18 March 18 »
It absolutely can drive current back into itself. Channel A is connected only via resistors to Channels B and C, no diodes. If they're driving different levels then the low channels *will* be sinking current from the high ones. All the channels are effectively high-impedance thanks to those resistors, and injecting an additional signal at the SOUND OUT point through a similar impedance can only increase the worst case current sunk by one channel by that 0.05mA.

You said it yourself - the signals are tiny unless they're amplified. This includes the injected audio. If the PlayCity was sending headphone-level amplified audio to that pin I'd be concerned, but it isn't.
« Last Edit: 16:10, 18 March 18 by pelrun »