Hey people,
so I've built two interactive audio players for a museum. Both use identical hardware.
The hardware setup:
I used a teensy 4.0 with the audio adaptor shield. Additionally there are 12 pushbuttons (0-9, Accept, Delete), which can be used to type in the index of the audio file the visitor would like to hear. For listening there are two Headphones. I've installed a 10k potentiometer for leveling the volume on the audio shield. The whole system is powered by a LiFePo4 battery. It's output is 12,8V which gets stepped down to 5V for the teensy by a stepdown DC/DC converter (LM2596). The files are stored on a micro SD plugged into the audio shield. I've tried different ones as some micro SDs produced occasional audio glitches. Which worked fine are a "Samsung EVO, 32GB, SDHC" and a "SanDisk Ultra, 32GB, SDHC, A1".
While testing, the first station ran without a problem for two weeks straight. But for some reason it stopped working reliably. Now it crashes after a few hours. The first time it crashed, the onboard LED showed a 4 times blink pattern. I was able to reset it by holding the button on the Teensy for 15 seconds. Afterwards I uploaded the code and it was working fine again. Then it crashed again, showing the 4 times blink pattern again. This time I replaced the teensy and SD card, so far it runs without crashing. But I also received the information that the other station, which is already installed at the museum also crashed today
(As it is further away, I don't know yet if it is also showing the same blink pattern)
Now I am wondering what is causing the crash. If someone here could have a look at my code and tell me if there might be a bug inside, or could point me into a direction for checking the hardware setup I would be super grateful, as I feel a bit clueless right now.
Many thanks in advance,
Matti
P.S. I attached the the first version of the code which I used while the station was running for two weeks without a crash and the newest version which is running now. In the meantime I tried to improve the code and fix potential crash issues, but maybe I have "verschlimmbessert" the code (german for making things worse when you actually wanted to make things better). For the latest version of the code I also translated the comments so it is a bit more understandable.
so I've built two interactive audio players for a museum. Both use identical hardware.
The hardware setup:
I used a teensy 4.0 with the audio adaptor shield. Additionally there are 12 pushbuttons (0-9, Accept, Delete), which can be used to type in the index of the audio file the visitor would like to hear. For listening there are two Headphones. I've installed a 10k potentiometer for leveling the volume on the audio shield. The whole system is powered by a LiFePo4 battery. It's output is 12,8V which gets stepped down to 5V for the teensy by a stepdown DC/DC converter (LM2596). The files are stored on a micro SD plugged into the audio shield. I've tried different ones as some micro SDs produced occasional audio glitches. Which worked fine are a "Samsung EVO, 32GB, SDHC" and a "SanDisk Ultra, 32GB, SDHC, A1".
While testing, the first station ran without a problem for two weeks straight. But for some reason it stopped working reliably. Now it crashes after a few hours. The first time it crashed, the onboard LED showed a 4 times blink pattern. I was able to reset it by holding the button on the Teensy for 15 seconds. Afterwards I uploaded the code and it was working fine again. Then it crashed again, showing the 4 times blink pattern again. This time I replaced the teensy and SD card, so far it runs without crashing. But I also received the information that the other station, which is already installed at the museum also crashed today
Now I am wondering what is causing the crash. If someone here could have a look at my code and tell me if there might be a bug inside, or could point me into a direction for checking the hardware setup I would be super grateful, as I feel a bit clueless right now.
Many thanks in advance,
Matti
P.S. I attached the the first version of the code which I used while the station was running for two weeks without a crash and the newest version which is running now. In the meantime I tried to improve the code and fix potential crash issues, but maybe I have "verschlimmbessert" the code (german for making things worse when you actually wanted to make things better). For the latest version of the code I also translated the comments so it is a bit more understandable.