Overview
Symptom
Audio plays back / loops indefinitely as intended when motors are not connected. When motors are connected, audio sometimes stops (code continues running without resetting). If the code is written to start playback when audio is stopped, then these dropouts manifest as the audio file restarting once the code detects the audio file is no longer playing. It typically happens after audio has been playing for more than a minute or two.
Suspected cause:
The battery pack is not supplying enough current. I have not yet been able to test this but am on my way home to do so. Posting in case there is something else I am missing, or if someone can confirm that this might be consistent. I think I mistakenly thought it could supply 3A from each port but it is in fact only capable of supplying either 3A total from either, or possibly 1.5A from each max.
I can post the circuit board that connects all the peripherals together if it seems relevant. There is also a radio module but I am able to reproduce that issue without the radio module involved as in the code below (radio module works fine with audio playback by using different CS pins and only checking if radio data is available when audio is not playing). Have not been able to test yet with a more minimal version of the motor action.
- Using Teensy 3.1
- Using Audio shield and SD card
- SD library optimization activated
- 3 DC motors, each controlled by an H Bridge stepper driver (Teensy pins 3+4, 5+6, 21+20)amazon link
- Controlled by battery: Anker Powercore 20000
- Currently everything is run off of one of the battery’s power ports. There is a second one available. I am not sure yet if these are independent ports or if they are bridged.
- "billy" is an array that stores the three different motor objects running different animation behaviors based off of audio level.
- have not yet been able to test with simple motor on/off signals but will do so later, posting here first to get feedback ASAP since this is on a deadline for a show.
Symptom
Audio plays back / loops indefinitely as intended when motors are not connected. When motors are connected, audio sometimes stops (code continues running without resetting). If the code is written to start playback when audio is stopped, then these dropouts manifest as the audio file restarting once the code detects the audio file is no longer playing. It typically happens after audio has been playing for more than a minute or two.
Suspected cause:
The battery pack is not supplying enough current. I have not yet been able to test this but am on my way home to do so. Posting in case there is something else I am missing, or if someone can confirm that this might be consistent. I think I mistakenly thought it could supply 3A from each port but it is in fact only capable of supplying either 3A total from either, or possibly 1.5A from each max.
I can post the circuit board that connects all the peripherals together if it seems relevant. There is also a radio module but I am able to reproduce that issue without the radio module involved as in the code below (radio module works fine with audio playback by using different CS pins and only checking if radio data is available when audio is not playing). Have not been able to test yet with a more minimal version of the motor action.