Author Topic: Approaches for MCU PWM -> JAMMA audio  (Read 74 times)

0 Members and 1 Guest are viewing this topic.

Offline jameswilddev

  • Contributor
  • Posts: 16
  • Country: gb
Approaches for MCU PWM -> JAMMA audio
« on: April 22, 2021, 09:25:37 pm »
Hello.

I've got an ATMega outputting audio using a PWM pin (approximately 56kHz carrier).  Currently I'm running that through a RC lowpass and into a line-in for testing.

Something I'd like to do is to convert my design into something JAMMA compatible (JAMMA being a connector standard for arcade machines - PCBs with edge connectors are sort of "system on a board" allowing the brains of an arcade machine to be upgraded without replacing the cabinet/display/speakers/controls).  Something unusual about this is that it seems to expect the amplification of the audio to be done on the game PCB rather than in the cabinet, so I need some kind of amplifiction.  The general consensus seems to be that the speaker is 8ohm, and at capable of taking at least a few watts.  There's often a potentiometer in series to act as a volume control.

In my travels I did find a project where somebody made an ATMega644-based JAMMA board (https://www.hwhardsoft.de/english/archive/uzebox-jamma/).  They seem to run the PWM directly into a LM386 without a lowpass.  I've heard mention before that the MCU pin itself can form a lowpass through some form of capacitance at the pin; not sure if that's the intention here (I think the resistor network is just to bring down the ampltiude a little).  The limited slew rate of the LM386 might also be a factor in filtering out the carrier but I'm not sure.



What I was wondering was whether I can get away with something nice and simple like this if I'd be happy with 0.25-0.5W.  I've already got the signal in PWM so it shouldn't have any problems driving transistors in saturation.  I've done nothing before with discrete transistors.  This is a BC327 + BC337; using their minimum spec hFE of 100.  I'm assuming they don't need to be matched or anything if they're being used in saturation?  Collector current seems to be peaking at 200mA in the simulator while the speaker is on about 350-400mW.  Set the low pass frequency at 12.7kHz and the high pass frequency at 60Hz. Seems to be sinking/sourcing less than 3mA from the PWM input so that should be good.



Thanks!
« Last Edit: April 22, 2021, 09:54:16 pm by jameswilddev »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf