Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

Speaker noise on CPX/crickit
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Speaker noise on CPX/crickit

by sabarrett328 on Sun Oct 17, 2021 10:12 am

I'm making an animated Halloween project with the crickit/circuitpython combo. I have a sound file playing while servos are moving. Randomly the audio gets garbled, not always at the same time though, so its not the file.

Part 1 - Could I be overdriving the amp? I was wondering if there is a way to change the volume on the audio output from this combo through code or would I have to scale the audio file in Audacity or something?

Part 2 - does anyone know if there are issues with the servo causing noise in the audio output?

Thanks for the help

sabarrett328
 
Posts: 29
Joined: Tue Mar 07, 2017 8:53 pm

Re: Speaker noise on CPX/crickit

by mikeysklar on Mon Oct 18, 2021 7:59 pm

Are you using audiocore to play a WAV file or audiomp3 to play an MP3 file?

You can take a look at audiomixer.MixerVoice which does support a volume level between 0 --> 1 (floating point values).

https://circuitpython.readthedocs.io/en ... audiomixer

Servos are noisy. Are you cables short? Are your cables shielded?

mikeysklar
 
Posts: 6198
Joined: Mon Aug 01, 2016 8:10 pm

Re: Speaker noise on CPX/crickit

by sabarrett328 on Tue Oct 19, 2021 9:06 am

I'm using audiocore per the instructions here:
https://learn.adafruit.com/adafruit-cri ... thon-audio

No shielding. The servos are simply plugged into the Crickit, and the speaker cable is connected to the Crickit speaker terminal. The strange thing that makes me wonder if its something else is that its not all the time, or during the same servo moves. But that also makes me think the issue isn't volume either.

I"ll try the audiomixer and see if volume controls help. Thanks.

sabarrett328
 
Posts: 29
Joined: Tue Mar 07, 2017 8:53 pm

Please be positive and constructive with your questions and comments.