I saw this product Adafruit STEMMA Speaker - Plug and Play Audio Amplifier PRODUCT ID: 3885 https://www.adafruit.com/product/3885 and the learning guide https://learn.adafruit.com/adafruit-stemma-speaker only has examples for CircuitPython. Would this work on an Arduino board ? I was hoping to get a little better sound than the piezo buzzer. Any code examples for Arduino ?
thanks
Adafruit STEMMA Speaker
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- dastels
- Posts: 15656
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Adafruit STEMMA Speaker
CircuitPython is the big thing. But this board is completely independent of software, it just takes an audio signal. So any code that generates audio in C++ will do, you just connect the breakout's signal input to it (and ground and power, of course).
Dave
Dave
- jimk123
- Posts: 708
- Joined: Sun Dec 26, 2010 7:04 pm
Re: Adafruit STEMMA Speaker
So it would work with the arduino tone command ?
Thanks
Thanks
- dastels
- Posts: 15656
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Adafruit STEMMA Speaker
Just connect power/gnd and the input signal to whatever pin you are generating the tone on.
Dave
Dave
- jimk123
- Posts: 708
- Joined: Sun Dec 26, 2010 7:04 pm
Re: Adafruit STEMMA Speaker
So I bought this and used this tutorial: https://learn.adafruit.com/adafruit-ard ... ng-a-scale
hooking up gnd-gnd , power-arduino 5v, signal to pin 12 in the tutorial
I worked great for the demo (code is only running once in 'setup')
then I moved it into 'loop' so it would play over and over
after about 2-3 minutes there was that distinctive burning smell coming from the speaker and then it got all distorted
:(
hooking up gnd-gnd , power-arduino 5v, signal to pin 12 in the tutorial
I worked great for the demo (code is only running once in 'setup')
then I moved it into 'loop' so it would play over and over
after about 2-3 minutes there was that distinctive burning smell coming from the speaker and then it got all distorted
:(
- dastels
- Posts: 15656
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Adafruit STEMMA Speaker
Ugh. How was the sound up until when the magic smoke visited?
- jimk123
- Posts: 708
- Joined: Sun Dec 26, 2010 7:04 pm
Re: Adafruit STEMMA Speaker
it sounded great ! lol way better than a simple piezo device. The speaker was also getting very warm to touch. Thinking about it now i am not sure if it was just because it because the power pins where attached to 5v/gnd or the fact it was playing over and over, either way it's toast. Maybe if it runs on 3.3v ?
- dastels
- Posts: 15656
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Adafruit STEMMA Speaker
No, the product page says 3-5v so it should have been ok.
Does it do anything now (i.e. once it cooled off)? Also, what was the gain/volume set to?
Dave
Does it do anything now (i.e. once it cooled off)? Also, what was the gain/volume set to?
Dave
- jimk123
- Posts: 708
- Joined: Sun Dec 26, 2010 7:04 pm
Re: Adafruit STEMMA Speaker
Hi Dave,
it still works but the sound is distorted. It seems like if I leave power applied it does not overheat but the speaker gets very warm when I play the sample tone code in the loop section. As far as the potentiometer it appears to be on the loudest setting.
it was not an expensive device at $6 so I"ll try another one and set the gain down a little. It maybe ok for an occasional 'beep', just not running a melody over and over in a loop. It also looks like adafruit sells just the speaker "Mini Oval Speaker - 8 Ohm 1 Watt PRODUCT ID: 3923" https://www.adafruit.com/product/3923 so I'll try a new speaker since it just clips on with a jst connector
it still works but the sound is distorted. It seems like if I leave power applied it does not overheat but the speaker gets very warm when I play the sample tone code in the loop section. As far as the potentiometer it appears to be on the loudest setting.
it was not an expensive device at $6 so I"ll try another one and set the gain down a little. It maybe ok for an occasional 'beep', just not running a melody over and over in a loop. It also looks like adafruit sells just the speaker "Mini Oval Speaker - 8 Ohm 1 Watt PRODUCT ID: 3923" https://www.adafruit.com/product/3923 so I'll try a new speaker since it just clips on with a jst connector
- dastels
- Posts: 15656
- Joined: Tue Oct 20, 2015 3:22 pm
Re: Adafruit STEMMA Speaker
OK. There could have been some damage to the speaker. But that shouldn't happen; they should be robst enough to handle ongoing use... they are used in the PyBadge and PyGamer designs.
Dave
Dave
- supersport
- Posts: 1
- Joined: Thu Apr 01, 2021 10:44 am
Re: Adafruit STEMMA Speaker
jimk123, I'm experiencing nearly the exact same issue...new STEMMA speaker, worked fine for a while, and now it sounds like it's blown out. I was using 5v to power, and had the volume on the factory setting. Was using simpleio.tone() to play Ode to Joy, and I think i just overdid it. I'm thinking for my backup speaker (always buy a spare!) I'll turn down the volume first.jimk123 wrote:Hi Dave,
it still works but the sound is distorted. It seems like if I leave power applied it does not overheat but the speaker gets very warm when I play the sample tone code in the loop section. As far as the potentiometer it appears to be on the loudest setting.
it was not an expensive device at $6 so I"ll try another one and set the gain down a little. It maybe ok for an occasional 'beep', just not running a melody over and over in a loop. It also looks like adafruit sells just the speaker "Mini Oval Speaker - 8 Ohm 1 Watt PRODUCT ID: 3923" https://www.adafruit.com/product/3923 so I'll try a new speaker since it just clips on with a jst connector
Before I risk an issue, did this end up working for you?
Please be positive and constructive with your questions and comments.