Update on AY-3-8910 schematic

The original schematics I provided for the Arduino + AY-3-8910 was a bit crude for the audio output, it works, but it’s easy to get the audio saturate. I will propose you an update on this, taken from an actual schematic, the one used on the Oric 1/Atmos

The Oric also use an AY-3-8910 as its sound chip, and I never heard the audio saturate in all conditions.

So first we should have a look at how the Oric mix the 3 channels from the PSG chip:

oric_audio
This schematic is of course much more complexe than what we need, as we don’t drive a keyboard, and we don’t need an amplifier like the Oric who used a standard HP. For normal headphone and externally amplified HP, something near a line-out is sufficient, and if you look at the schematic it’s exactly what the “SOUND_OUT” output port have, so we will need only a few passive component to give the output a better shape.

So we only need 3 resistors and 2 capacitors to give the output a better shape:oric_audio_detail

What is interesting in this schematic is that it is made from a low pass filter and a high pass filter.

I’ve made a breadboard schematics for those of you who want one:AY-3-8910_Arduino_bbI used chemical capacitor on the drawing, but you may not find chemical of that capacity, on the original schematic, C1(C5) is a ceramic capacitor, and C2(C4) is a tantalum one. But the most important information is the capacitance in farad, not the capacitor type, at least for this application.

I will try to update quite soon the repository of this project with this new schematic and a few bug fix on the software.

Enjoy playing music with you PSG chips 🙂

 

Edit 08/05/2015: I’ve update the Fritzing Schematics with the latest corrections 🙂

15 thoughts on “Update on AY-3-8910 schematic”

  1. bon, c’est mieux au niveau de la saturation, mais pour le son final il est quasi-inaudible : auparavant je pouvais brancher directement des écouteurs et ça allait, maintenant aux écouteurs on n’entend presque rien. Si je branche un enregistreur en sortie ligne, ça permet d’augmenter le son, mais s’il ressemble un peu plus à la vraie musique (plus de saturation), en revanche le son est très froid et déséquilibré au niveau de l’équaliseur, comme si ça passait à la radio.

    J’ai fait un petit comparatif avant, après et avec émulateur, c’est ici :
    http://garvalf.online.fr/index.php?page=temp-ay

    Sinon au niveau de ton schéma, je me demande s’il n’y a pas des inversions, par rapport au plan plus haut je pense que le condensateur près de la sortie fait 2,2 nF et non pas 10, et celui d’avant fait 10 nF et non pas 2,2 uF (nano, pas micro) non ?

    1. Un truc qui serait cool aussi, c’est de pouvoir lire le fichier mym depuis une carte sd sur l’arduino, ce qui lui permettrait d’être autonome. Tu saurais comment faire ?

    2. Je vais regarder c’est vite fait de faire une erreur de saisie.
      Pour la carte SD c’était prévu, au moment de la parution de l’avant dernier article sur ce sujet, mais des soucis de type ordicafé on forcé a mettre le projet en pause.

      (par contre ce blog est plutôt en anglais :p)

          1. That’s very interesting, especially if you can use this propeller chip as a complete replacement of the AY.

            It seems it’s possible to use the avray on a zx spectrum, but since it’s not the same form factor I don’t know how they can do this. About the emulator, I’ve made a little video of it in action: https://www.youtube.com/watch?v=zdgwH8YQm4k

            The propeller chip (P8X32A) with its DIP 40 is of course the same size of an AY-3-8910. I’ve already heard of propeller but i’ve never ordered any yet. The P8X32A is 8 times the price of an atmega8, but it’s also much more powerful and I like the fact they open sourced their chip.

            The SidCog sounds cool too.

            I’ll probably order a couple of P8X32A and an usb programmer.

          2. Yes the propeller is an interesting chip, and yes unfortunately it is way more expensive than most of the ATMEGA chip, it is not sold at the same volume 🙁

            The Propeller have it’s own advantages and disadvantages, but it’s a really nice chip to work with. My Oric Mouse project use one for all the PS/2 and communication with the Oric.

            The “big” issue with the Propeller is it’s somewhat 5V tolerant, but it is not a 5V chip, so it’s can’t be used as a drop-in remplacement for an AY, you will need to add buffers on the IO for the 5V communication.

            I think someone on the Parallax forum have made a software around AYcog that allow to use a Propeller as an AY chip.

  2. Are the caps on your breadboard diagram swapped? The schematic shows the 10nf going to ground and the 2.2nf going to the line out.

    I’m a software guy who can’t count above, below, or between true and false, so I’m not sure.

  3. One other thing. I had to properly reset the sound chip before I got any sound. I added code to the sketch to use another pin for /RESET and hold it low for 500ms before doing anything with the sound chip.

  4. Thanks a lot for the project, I am able to test the AY-3 chips I bought in China before integrating them in another prject ! I found that removing the R3 (470Ohm) resistor gives way higher volume without clipping.

    1. I’m happy to hear that it was helpful!

      The schematic I provide is just an example, and your experience depending on how you connected your AY-3, your passive components and even you AY chip may differ. Interesting that R3 added clipping, the R/C network is a band pass filter so to remove too low frequencies and high frequency plus removing the DC components of the AY output (mainly C4 here)

Leave a Reply

Your email address will not be published. Required fields are marked *