0

Trinket M0 and PAM8403 audio amplifier
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Trinket M0 and PAM8403 audio amplifier

by EricLarge on Fri Jan 18, 2019 7:56 pm

Hey all.

Given that the Trinket M0 doesn't have I2S, I'm thinking of connecting a PAM8403 amplifier board to the DAC out pin. The idea is to create a simple waveform generator that can play out on a speaker (I'm playing around with interrupt code and making it as efficient as possible). I'm a bit spooked though, as I managed to fry a couple of the digital I/O pins just connecting my oscilloscope (cheapie DSO138), so I want to make sure I don't try to push too much current out the DAC pin.

I wasn't able to get a measurement of the input impedance on the PAM8403 (the board probably includes an input capacitor already, rendering my multimeter pretty useless). Should I be considering a current-limiting resistor in series between the DAC pin and the amplifier input? I would imagine this would create an unwanted R/C filter in the circuit, but I really don't want to burn out the analog pin.

Thanks in advance for any advice you can give.

Eric

Small update: Turns out I didn't fry my GPIO pins after all. Adafruit_NeoPixel_ZeroDMA grabbed them and wouldn't let go.

EricLarge
 
Posts: 15
Joined: Tue Apr 26, 2016 2:31 pm

Re: Trinket M0 and PAM8403 audio amplifier

by adafruit_support_mike on Sun Jan 20, 2019 5:13 am

The PAM8302 does have built-in decoupling caps, so no DC current will flow from the Trinket M0 to the PAM8302 at all.

The AC current will also be negligible. The PAM8302's input impedance is pretty high.

adafruit_support_mike
 
Posts: 55974
Joined: Thu Feb 11, 2010 2:51 pm

Re: Trinket M0 and PAM8403 audio amplifier

by XRAD on Sun Feb 10, 2019 4:51 pm

you could use :

#include "SoftwareSerial.h"

If you need serial control of something with the M0....

XRAD
 
Posts: 229
Joined: Sat Nov 19, 2016 3:28 pm

Re: Trinket M0 and PAM8403 audio amplifier

by adafruit_support_mike on Mon Feb 11, 2019 5:48 am

Our SAMD21 board support package doesn't have a SoftwareSerial library, and I don't think the generic SoftwareSerial works on a SAMD21.

There isn't as much need for it though. The SAMD21 handles USB communication internally, so its hardware TX/RX pins are free for use with other devices. There are also a couple of free SERCOMs that you can configure for additional hardware Serial ports if you need them.

adafruit_support_mike
 
Posts: 55974
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.