0

Pybadge LC internal speaker no sound
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Pybadge LC internal speaker no sound

by blnkjns on Sun May 30, 2021 2:03 pm

Just tried the PRJC Audio Lib on my PyBadge LC for another forum topic, but I could only get sound from an external piezo connected to the A0 and GND pins. The internal one does not give any sound. Do you need to connect some solder pads on the bottom for it to work? The non LC version seems to have a few extra components between the built in speaker and pin A0.

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Pybadge LC internal speaker no sound

by dastels on Sun May 30, 2021 3:43 pm

The only audio circuitry difference should be the external speaker connector. To use the external speaker, the trace labelled "A0" next to the onboard speaker should be cut (disabling the onboard speaker). Check that jumper/trace. If it's been cut, that'd be why you don't get sound from the onboard speaker. You can pick up the amplified A0 output on the square pad (of the two on either side for the cuttable trace) farthest from the edge of the board (i.e. toward the reset button).

Dave

dastels
 
Posts: 6912
Joined: Tue Oct 20, 2015 3:22 pm

Re: Pybadge LC internal speaker no sound

by blnkjns on Mon May 31, 2021 12:14 am

The trace is not cut, and the A0 jumper contacts do not have a signal (on neither side).
I do get sound when connecting either the A0 or A1 pin to a piezo.

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Pybadge LC internal speaker no sound

by dastels on Mon May 31, 2021 7:06 am

Can you post a clear photo of the bottom of the board?

Dave

dastels
 
Posts: 6912
Joined: Tue Oct 20, 2015 3:22 pm

Re: Pybadge LC internal speaker no sound

by blnkjns on Mon May 31, 2021 9:39 am

WP_20210531_15_32_15_Raw.jpg
WP_20210531_15_32_15_Raw.jpg (908.52 KiB) Viewed 444 times

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Pybadge LC internal speaker no sound

by dastels on Mon May 31, 2021 10:00 am

Thanks. Everything looks fine.

Since you say there's no signal, my thought is that you aren't enabling the amplifier. That's done by setting the SAMD51 pin PA27 high.

Dave

dastels
 
Posts: 6912
Joined: Tue Oct 20, 2015 3:22 pm

Re: Pybadge LC internal speaker no sound

by blnkjns on Mon May 31, 2021 11:31 am

Thanks, that was it. Maybe it should get a place in the speaker section of the guide.
PA27 did not work, but in variants.cpp I fount you can use:
Code: Select all | TOGGLE FULL SIZE
  pinMode(51,HIGH);
  digitalWrite(51,HIGH);
Last edited by blnkjns on Mon May 31, 2021 11:43 am, edited 1 time in total.

blnkjns
 
Posts: 663
Joined: Fri Oct 02, 2020 3:33 am

Re: Pybadge LC internal speaker no sound

by dastels on Mon May 31, 2021 11:41 am

I wasn't sure what the Arduino pin number was for that. PA27 is the MCU internal pin number as far as I can tell.

But great news. Have fun with it!

Dave

dastels
 
Posts: 6912
Joined: Tue Oct 20, 2015 3:22 pm

Please be positive and constructive with your questions and comments.