0

Circuit Playground Sqealing?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Circuit Playground Sqealing?

by fishm on Mon May 20, 2019 2:20 pm

Hi folks - I'm trying to put together a course for my 7th grade students using Circuit Playground Express and MakeCode. I was experimenting with the sound sensor and the graph function as demonstrated here: https://www.youtube.com/watch?v=VxH16mT1xZU. My results were very different from his - always showing a relatively significant level of noise coming in.

When I output the sound sensor variable to the console in the Windows 10 app, I'm getting constant noise ranging from about 45 to 120. And here's the thing - when I put the CPX up to my ear, I can actually hear a very high pitched squealing, which is what I'm assuming is causing the problem, as this must be what the sound sensor is picking up.

I've verified this happening with multiple CPX devices, as well as when I am powering with USB or with a battery pack.

This is making the sound sensor pretty unusable. Any thoughts on how to fix or what I might be doing wrong?
Attachments
code.png
code.png (87.41 KiB) Viewed 1157 times

fishm
 
Posts: 11
Joined: Mon May 06, 2019 7:25 am

Re: Circuit Playground Sqealing?

by fishm on Wed May 22, 2019 4:21 pm

Would love to know if anyone has thoughts on this!

fishm
 
Posts: 11
Joined: Mon May 06, 2019 7:25 am

Re: Circuit Playground Sqealing?

by adafruit_support_carter on Wed May 22, 2019 7:21 pm

I just gave this a test and it worked pretty much the same as the video. What about other MakeCode programs. Do they seem to load and run OK?

My test code:
https://makecode.com/_DRaKakcJsT7u

adafruit_support_carter
 
Posts: 12971
Joined: Tue Nov 29, 2016 2:45 pm

Re: Circuit Playground Sqealing?

by fishm on Wed May 22, 2019 9:43 pm

So far, other programs are loading and running with no problem. This is such a nice visual for students that I was hoping to get it to work. Here is a demonstration of what I am seeing / hearing. What I'm trying to show is that even though there is no noise in the room, there is a constant oscillation of sound being detected by the sound sensor. In practice, this is showing as constantly "graphing" sound, even when there really isn't any and sounds that are introduced (me speaking) are not "graphed" by the CPX until they are quite loud like me shouting.

Finally, I have a recording of what I hear when I hold the CPX to my ear. My theory is that the LEDs are creating a constant background noise that is impeding the sound sensor's ability to properly receive ambient sound.

What do you think?

https://www.youtube.com/watch?v=Pkq4d9w ... e=youtu.be

fishm
 
Posts: 11
Joined: Mon May 06, 2019 7:25 am

Re: Circuit Playground Sqealing?

by adafruit_support_carter on Fri May 24, 2019 12:14 pm

I think it's working. Notice in the video you linked he sets the upper limit to 75, not 255.
https://youtu.be/VxH16mT1xZU?t=79
That will change the sensitivity of the NeoPixels response to noise. I'm running mine with 255 and it looks just like in your video. Try clapping your hands to get all the NeoPixels to light up.

And then try changing that value to 75 and see how that changes things.

I'm not sure what the noise is, but I don't think that is affecting the mic levels at all.

adafruit_support_carter
 
Posts: 12971
Joined: Tue Nov 29, 2016 2:45 pm

Re: Circuit Playground Sqealing?

by fishm on Fri May 24, 2019 12:27 pm

I'll give that a shot - thanks for your help!

fishm
 
Posts: 11
Joined: Mon May 06, 2019 7:25 am

Re: Circuit Playground Sqealing?

by kevinjwalters on Tue Jun 11, 2019 10:54 am

I'm wondering if this is the USB power. My USB power from my desktop is far from flat/constant - it has a lot of variation (electrical noise) on it. If you're interested, this is easy to rule out if you have some normal batteries. USB power packs wouldn't be my first choice here as they have some crafty (and electrically noisy) electronics to boost the voltage from the internal battery producing 3.7-4.2 to 5.0V.

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

Re: Circuit Playground Sqealing?

by mifish on Tue Jun 11, 2019 3:15 pm

Interesting! I'll give it a try with battery packs!

mifish
 
Posts: 1
Joined: Tue Jun 11, 2019 3:14 pm

Please be positive and constructive with your questions and comments.