0

Speaker issues on CLUE
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Speaker issues on CLUE

by mikebeller on Thu Dec 24, 2020 5:55 pm

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 | TOGGLE FULL SIZE
#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()

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

Re: Speaker issues on CLUE

by mikeysklar on Sat Dec 26, 2020 8:31 pm

@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 | TOGGLE FULL SIZE
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?

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

Re: Speaker issues on CLUE

by mikebeller on Sun Dec 27, 2020 11:59 am

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

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

Re: Speaker issues on CLUE

by kevinjwalters on Sun Dec 27, 2020 5:36 pm

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

kevinjwalters
 
Posts: 962
Joined: Sun Oct 01, 2017 3:15 pm

Re: Speaker issues on CLUE

by mikebeller on Wed Dec 30, 2020 4:29 pm

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

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

Please be positive and constructive with your questions and comments.