Speaker issues on CLUE

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
mikebeller
 
Posts: 7
Joined: Thu Dec 10, 2020 2:54 pm

Speaker issues on CLUE

Post by mikebeller »

Hi

I just received my new CLUE today and noticed the speaker is barely audible. I'm pretty confident that's not right -- I have a CircuitPlayground_Express and it is MUCH louder. Here is CircuitPython code that will run on either board (just comment in or out the first two lines). The tone played is quite loud on the CPX and barely audible on the CLUE (have to strain to hear it at all). Note as a check I also computed the RMS of the sine wave sample on both boards just to check if the two libraries were using different waveforms. The RMS is the same on both, so no.

Perhaps my CLUE board is defective?

Mike

Code: Select all

#from adafruit_circuitplayground.express import cpx as brd
from adafruit_clue import clue as brd
import time, math

def rms(xs):
    mn = sum(xs) / len(xs)
    smsq = sum((x - mn) * (x - mn) for x in xs)
    return math.sqrt(smsq) / len(xs)

brd.start_tone(550)
time.sleep(1)
print("wave RMS", rms(brd._sine_wave))
brd.stop_tone()

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

Re: Speaker issues on CLUE

Post by mikeysklar »

@mikebeller,

Does it make a difference when you try our examples from the CLUE docs?

https://circuitpython.readthedocs.io/pr ... t/api.html

Code: Select all

from adafruit_clue import clue

while True:
    if clue.button_a:
        clue.start_tone(523)
    elif clue.button_b:
        clue.start_tone(587)
    else:
        clue.stop_tone()
What are you powering the CLUE from? Does it make a difference if you use a different power source?

User avatar
mikebeller
 
Posts: 7
Joined: Thu Dec 10, 2020 2:54 pm

Re: Speaker issues on CLUE

Post by mikebeller »

Yes the barely audible tones issue happens with your example code too.
I tried 3 different power supplies with same results:

* USB cable to my mac (which I use for development -- same one I use on my CircuitPlayground Express which is plenty loud).
* Adafruit 3xAA JST supply with fresh-ish batteries
* 5V micro USB wall power supply

Thoughts?

Mike

User avatar
kevinjwalters
 
Posts: 1025
Joined: Sun Oct 01, 2017 3:15 pm

Re: Speaker issues on CLUE

Post by kevinjwalters »

Mine are certainly quieter. The pitch of the sound makes a big difference. Try squeaky stuff in the 2k-3k range.

User avatar
mikebeller
 
Posts: 7
Joined: Thu Dec 10, 2020 2:54 pm

Re: Speaker issues on CLUE

Post by mikebeller »

Thanks @kevinjwalters -- you are correct. The higher tones are fine -- like above 1000. It's just the low frequencies (e.g. 500) that are much quieter on the CLUE than on the CPX. I guess I can live with that.

Mike

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

Return to “CLUE Board”