ESP32 Feather V2 with Music Maker FeatherWing

Please tell us which board you are 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
xarteos
 
Posts: 7
Joined: Mon Nov 14, 2022 5:16 am

ESP32 Feather V2 with Music Maker FeatherWing

Post by xarteos »

Hello everybody

I'm having some troubles getting my Music Maker FeatherWing running. I'm trying to build an juke box for my daughter and descided to use the Adafruit ESP32 Feather V2 in combination with the Music Maker FeatherWing with Amp.

I followed all the installation instruction for the ESP32 and the Music FeatherWing. Everything seemed to work fine, I could upload the example sketch "feather player" but in the serial monitor I'm always getting this Error:

Code: Select all

Adafruit VS1053 Simple Test
Couldn't find VS1053, do you have the right pins defined?
I checked all pins. I even deleted all the conditional config from the sketch and defined the correct pins (32, 33, 14, 15) explicit. Still no luck.

I even tried a new ESP32 Feather V2 board with connector pins where the wing could be stack directly on top of the feather because I suspected doing something wrong in the wiring on the breadboard (even tough I connected ALL pins to be sure all necessary pins are connected). I also double checked the soldering with the multimeter. Everything looks fine. I can even hear a white noise in the speaker as soon as the feather gets powered up and the wing gets slightly warm after some minutes (not hot just warm) around the amp (guess the chip right next to the speaker connectors ist the amp).

Does anyone have any experience with the ESP32 Feather V2 in combination with the Music Maker FeatherWing? Could it be any software/firmeware problem? Is there a way to debug the wing? Or am I the unlucky one who got a faulty board?

Thanks for any help!

Patrick
Attachments
mounted directly on the feather
mounted directly on the feather
IMG_7974.jpg (556.29 KiB) Viewed 262 times
connected on the breadboard (ALL pins!)
connected on the breadboard (ALL pins!)
IMG_7975.jpg (602.05 KiB) Viewed 262 times

User avatar
xarteos
 
Posts: 7
Joined: Mon Nov 14, 2022 5:16 am

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by xarteos »

Update on this: I figured out that I had selected the ESP32 Feather instead of the ESP32 Feather V2, didn't see there are both in the list.

Now the VS1053 is detected and also the SD-Card seems to work, the file listing woks even though I have tons of hidden files from macOS.

The Music Maker seems to work so far. It plays the test tone from the example sketch but then, when it should play the music the whole script starts over and over. As if the board gets constantly reseted.

Does any one have similar experiences? Can the macOS files cause this?

User avatar
Ial_Mazan12
 
Posts: 8
Joined: Wed Nov 16, 2022 8:00 am

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by Ial_Mazan12 »

Hi Patrick,


I've just had a similar error which generates the same repetition once and again.
I can't answer you about macOS files, but I wanted you know that the same is happening to me.

I've tried everything: checking conections, changing the HUZZAH32 board (I got two of them), changing the uSD card, changing audio files format, making all code and conection changes that appears on the official troubleshooting page... But none of them worked. Even more, none of the characters of the error changed.

Is your error code similar to the one below?:

Code: Select all

Adafruit VS1053 Feather Test
VS1053 found
SD OK!
track002.wav		5299354
track001.wav		5299346
Playing full track 001
Guru Meditation Error: Core  1 panic'ed (Unhandled debug exception). 
Debug exception reason: Stack canary watchpoint triggered (dF⸮?) 
Core  1 register dump:
PC      : 0x40084583  PS      : 0x00050036  A0      : 0x3ffb097c  A1      : 0x3ffb08bc  
A2      : 0x00000029  A3      : 0x3ffbe110  A4      : 0x400845eb  A5      : 0xc0000000  
A6      : 0x3ffb097c  A7      : 0x3ffbdc1c  A8      : 0x000000f9  A9      : 0x4008459f  
A10     : 0x80000000  A11     : 0x3ffbdf58  A12     : 0x3ffbdf5c  A13     : 0x3ffbdf2c  
A14     : 0x00008000  A15     : 0x3ffbdc1c  SAR     : 0x00000001  EXCCAUSE: 0x00000001  
EXCVADDR: 0x00008000  LBEG    : 0x40087151  LEND    : 0x40087161  LCOUNT  : 0xfffffffa  


Backtrace:0x40084580:0x3ffb08bc |<-CORRUPTED




ELF file SHA256: 0000000000000000

Rebooting...
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13160
load:0x40080400,len:3036
entry 0x400805e4
I hope us to get the answer as soon as possible.


Good luck!
Iñigo

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by adafruit_support_mike »

What are you using as a power source?

Speakers are power-hungry beasts, and could potentially overload a USB connection limited to 500mA.

User avatar
xarteos
 
Posts: 7
Joined: Mon Nov 14, 2022 5:16 am

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by xarteos »

Hi Mike,

Thanks for your reply.

I indeed just had the usb from the computer as power source. I tried a 3A usb-c charger and also connected a 1000mAh lipo battery. But both didn't help. It keeps rebooting. I figured out that it occurs on the on the playFullFile or startPlayingFile command. If I don't play any music it won't reboot.

I'also tried different file formats (mp3, wav, ogg). No difference. I disconnected the speaker, so there is no hungry power consumer. But still the same.

Here ist the console output I get right before the reboot:

Code: Select all

Adafruit VS1053 Feather Test
VS1053 found
SD OK!
System Volume Information/
	WPSettings.dat		12
	IndexerVolumeGuid		76
TRACK001.MP3		764176
TRACK002.WAV		1073218
TRACK003.OGG		1089524
ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 271414342, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13160
load:0x40080400,len:3036
entry 0x400805e4

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by adafruit_support_mike »

That definitely rules out a power issue, thanks.

The next most likely option would be keeping the VS1053's input buffer filled. Are you using interrupts or calling feed_buffer() directly?

User avatar
xarteos
 
Posts: 7
Joined: Mon Nov 14, 2022 5:16 am

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by xarteos »

I'm not sure if I understand the question but removing the interrupt function:

Code: Select all

musicPlayer.useInterrupt(VS1053_FILEPLAYER_PIN_INT);
seems to make it work! I don't understand what it does and I don't know the feed_buffer() function.

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by adafruit_support_mike »

The VS1053 has an output pin that it sets high when its input buffer starts to run low.

The VS1053 library has a function named .feed_buffer() that checks the pin and sends the VS1053 more data if necessary.

There are two ways .feed_buffer() can be executed: one is to use an interrupt handler that automatically trips when the 'need more data' pin goes high. The other is to call it manually at regular intervals.

It sounds like your sketch was trying to use an interrupt but having problems. Disabling the interrupt switched over to calling the function directly, which works better for devices like the ESP32.

User avatar
xarteos
 
Posts: 7
Joined: Mon Nov 14, 2022 5:16 am

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by xarteos »

I see. So this means by disabling the interrupt, I have to handle the feed_buffer() in my code somehow?

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by adafruit_support_mike »

Yes. Just add a call to feed_buffer() at the beginning or end of loop() and you should be okay.

User avatar
xarteos
 
Posts: 7
Joined: Mon Nov 14, 2022 5:16 am

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by xarteos »

Hi Mike

Sorry for the long silence. This worked well, thank you!

But I'm getting a pretty stuttering sound. Needs to be said that I'm chaining a RFID reader (RC522) into the SPI bus and this seems to cause this.

Is this simply not possible because of the busy stream from the SD card to the player or is it more a configuration issue, like the SPI clock speed or something like a buffer size on the VS1053?

Thanks for any advice!

Patrick

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: ESP32 Feather V2 with Music Maker FeatherWing

Post by adafruit_support_mike »

You're running into timing conflicts between systems, and you have two options:

1 - Rewrite all the systems competing for CPU time so they make room for each other.

2 - Export some of the time-critical responsibilities to another microcontroller.

What you're dealing with is an early form of cooperative multitasking. Ultimately there are no shortcuts around making all the pieces play nicely with each other, just different ways to move the problems around. Interrupts, asynchronous code, and so on are just different ways of making competing jobs yield time to each other. They all require every piece to play by the same rules.

It's extremely common for projects to keep adding new complexity until they hit the physical or practical limits of the hardware. Frankly, as inexpensive as microcontrollers are these days, adding another one tends to be easier, more effective, and more reliable than trying to tune several independent code libraries so they work together.

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

Return to “Feather - Adafruit's lightweight platform”