Speaker noise on CPX/crickit

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
sabarrett328
 
Posts: 36
Joined: Tue Mar 07, 2017 8:53 pm

Speaker noise on CPX/crickit

Post by sabarrett328 »

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

User avatar
mikeysklar
 
Posts: 13824
Joined: Mon Aug 01, 2016 8:10 pm

Re: Speaker noise on CPX/crickit

Post by mikeysklar »

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?

User avatar
sabarrett328
 
Posts: 36
Joined: Tue Mar 07, 2017 8:53 pm

Re: Speaker noise on CPX/crickit

Post by sabarrett328 »

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.

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”