Power failure, I think

Hi everyone,
The script I made (watching tutorials lol) for a DIY Ghost busters backpack, worked like a clock... until I added a soundmodule that plays a few sounds automatically inside the script using a DFPlayer with a micro SD. I use a 1k resistor between pin 11 and the RX of the DFPlayer, as seen on a tutorial.
The speakers are 2, 3W 8Ohm little ones.
It still compiles without any problem, but as soon as I use my USB batteries to power it, the sound doesn't work and after a few moments the arduino (UNO) board shuts itself off.
When I power it up, one of the leds blinks for a split second, but then everything stays dead.
When I change the script to the one without the sound written in it, it works like a clock again, doing all the colour changes on all the leds (individual and ledcircles).
I'm planning to add a DIY mini smokemachine to it, but I'm afraid the way it goes now, is doomed to failure as well :frowning:
Is this a powerfailure or is it more a scriptfailure?
Could someone point me in the right direction?
Do you need the see the full script?
Any suggestion is welcome as I ran out of options, right now

Without the circuit diagram and the battery specs or the sketch... Who knows ?
Does it still run when you power it from USB ?
Yes please post the sketch within </> code-tags

Thanks for the reply. As soon as I get home, I'll upload the sketch. :slight_smile:

Hi, sorry for a late reply, buty work got in the way.
No, it does not run from the USB power, if I leave the sketch with all the sound functons in it. At the contrary, when I comment them out, it runs both through the compuer and the USB power.

The idea behind it is that:

  1. On powering up the backpack, a sound (warning) can be heard.
  2. The lights start doing their thing
  3. Now and then a sound can be heard
    ...not ready ...
  4. After a certain void of the lights, a little smoke is being blasted, after hearing an alarm sound

Maybe I'm too ambitious? And I'm sure there is a much shorter and certainly more correct way to do this ...

This is the sketch:

// I've comented out all the sound functions and commands. This way the program runs without any problem
// As soon as I uncomment all or part of it, it gets stuck in a loop on lines 172 till 176
// and the arduino shuts off after some 10 - 15 seconds

// Programa para mochilas ghostbusters Reboot VERSIĂ“N HOLTZMAN
#include <Adafruit_NeoPixel.h>
// Desde aquĂ­ se declara los componentes de la mĂşsica
#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
SoftwareSerial mySoftwareSerial(11, 10); // RX, TX
DFRobotDFPlayerMini myDFPlayer;
void printDetail(uint8_t type, int value);


// Cuáles de los pines están conectados al Neopixel?
#define NUMBERS_PIN 2       //  nĂşmeros  (cable naranja)
#define BAR_PIN 3          //  barra de leds (cable amarillo)
#define LEDS_PIN    4  // reactor pequeño chimenea (cable verde)
#define LEDCIRCLE_PIN    5  // reactor circular(cable lila)
#define ENERGIA_PIN 9        // energĂ­a pistola
// #define BARRIL_PIN ??      // barril pistola

//Cuántas leds en cada elemento
#define NUMBERS_COUNT 2
#define BAR_COUNT 8
#define LEDS_COUNT 2
#define LEDCIRCLE_COUNT 24
#define ENERGIA_COUNT 4
// #define BARRIL_COUNT 4


// Asgigna un valor de pin a los botones
//int buttonGhost = 6;
//int buttonHumo = 7;
//int buttonAlarma = 8;
//int buttonPause = 9;
//int buttonNext = 12;
//int buttonPrevious = 13;


// Declara lo(s) NeoPixel circle - bar - leds - numbers - energia:

Adafruit_NeoPixel stripcircle(LEDCIRCLE_COUNT, LEDCIRCLE_PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel stripbar(BAR_COUNT, BAR_PIN, NEO_GRB + NEO_KHZ800);
// Adafruit_NeoPixel stripbarril(BARRIL_COUNT, BARRIL_PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel stripenergia(ENERGIA_COUNT, ENERGIA_PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel stripleds(LEDS_COUNT, LEDS_PIN, NEO_GRB + NEO_KHZ800);
Adafruit_NeoPixel stripnumbers(NUMBERS_COUNT, NUMBERS_PIN, NEO_GRB + NEO_KHZ800);

// Argumento 1 = NĂşmero de  pixels in NeoPixel
// Argumento 2 = NĂşmero de pin de Arduino
// Argumento 3 = Tipo de pixel, juntar si procede:
//   NEO_KHZ800  800 KHz bitstream (la mayorĂ­a de productos de w/WS2812 LEDs)
//   NEO_KHZ400  400 KHz (clássico 'v1' (no v2) FLORA pixels, WS2811 drivers)
//   NEO_GRB     Pixels están preparadas para GRB bitstream (mayoría de productos NeoPixel)
//   NEO_RGB     Pixels están preparadas para RGB bitstream (v1 FLORA pixels, no v2)
//   NEO_RGBW    Pixels están preparadas para RGBW bitstream (productos NeoPixel RGBW)


// setup() Función que será leída 1 vez al arrancar el programa --------------------------------

void setup() {

  stripcircle.begin();           // INICIALIZA EL OBJETO STRIPCIRCLE (REQUIRRIDO)
  stripcircle.show();            // apaga todos los pixels
  stripcircle.setBrightness(204); // Pone intensidad en la luz 80% (max = 255) según la intensidad, irá el consumo de las leds
  stripbar.begin();           // INICIALIZA EL OBJETO STRIPBAR (REQUIRRIDO)
  stripbar.show();            // apaga todos los pixels
  stripbar.setBrightness(190); // Pone intensidad en la luz 75% (max = 255)
  //stripbarril.begin();           // INICIALIZA EL OBJETO STRIPBARRIL (REQUIRRIDO)
  //stripbarril.show();            // apaga todos los pixels
  //stripbarril.setBrightness(204); // Pone intensidad en la luz 80% (max = 255)
  stripenergia.begin();           // INICIALIZA EL OBJETO STRIPENERGIA Y EL BARRIL (REQUIRRIDO)
  stripenergia.show();            // apaga todos los pixels
  stripenergia.setBrightness(204); // Pone intensidad en la luz 80% (max = 255)
  stripleds.begin();           // INICIALIZA EL OBJETO STRIPLEDS (la chimenea) (REQUIRRIDO)
  stripleds.show();            // apaga todos los pixels
  stripleds.setBrightness(190); // Pone intensidad en la luz 75% (max = 255)
  stripnumbers.begin();           // INICIALIZA EL OBJETO STRIPNUMBERS (REQUIRRIDO)
  stripnumbers.show();            // apaga todos los pixels
  stripnumbers.setBrightness(230); // Pone intensidad en la luz 90% (max = 255)

// desde aquĂ­ el setup de la mĂşsica
//mySoftwareSerial.begin(9600);
//pinMode(7,INPUT);
//
//  
// if (!myDFPlayer.begin(mySoftwareSerial)) {  //Use softwareSerial to communicate with mp3.
//    Serial.println("ERROR!!!");
//        while(true);
//  }
//  Serial.println("FUNCIONANDO");
  
// myDFPlayer.setTimeOut(500); //Set serial communictaion time out 500ms
  
//----Set volume----
// myDFPlayer.volume(25);  //Set volume value (0~30).
//  myDFPlayer.volumeUp(); //Volume Up
//  myDFPlayer.volumeDown(); //Volume Down
//  
  //----Set different EQ----
//  myDFPlayer.EQ(DFPLAYER_EQ_NORMAL);
// myDFPlayer.outputDevice(DFPLAYER_DEVICE_SD);
// myDFPlayer.outputSetting(true, 15); //output setting, enable the output and set the gain to 15
//  myDFPlayer.next();  //Play next mp3
//  delay(1000);
//  myDFPlayer.previous();  //Play previous mp3
//  delay(1000);
//  myDFPlayer.play(1);  //Play the first mp3
//  delay(10000); Delay de 10 segundos
//  myDFPlayer.pause();  //pause the mp3
//  delay(1000);
//  myDFPlayer.start();  //start the mp3 from the pause
//  delay(1000);
//  myDFPlayer.playFolder(15, 4);  //play specific mp3 in SD:/15/004.mp3; Folder Name(1~99); File Name(1~170)
//  delay(1000);
//  myDFPlayer.enableLoopAll(); //loop all mp3 files.
//  delay(1000);
//  myDFPlayer.disableLoopAll(); //stop loop all mp3 files.
//  delay(1000);
//  myDFPlayer.playMp3Folder(4); //play specific mp3 in SD:/MP3/0004.mp3; File Name(0~65535)
//  delay(1000);
//  myDFPlayer.playLargeFolder(2, 999); //play specific mp3 in SD:/02/004.mp3; Folder Name(1~10); File Name(1~1000)
//  delay(1000);
//  myDFPlayer.loopFolder(5); //loop all mp3 files in folder SD:/05.
//  delay(1000);


//myDFPlayer.play(1);  //Reproduce el sonido de Opstarten, solamente 1 vez, que está en el void setup, deja 20 segundos para terminar
//                    // la música y seguirá el programa
//delay(20000); // Delay de 20 segundos
}


// loop() function -- Funciona mientras haya corriente en la placa Arduino ---------------

void loop() {

//boolean touch6 = digitalRead(6); 
//boolean touch7 = digitalRead(7);
//boolean touch8 = digitalRead(8);
//boolean touch9 = digitalRead(9);
// if (touch6 == true)
      //{
//  myDFPlayer.play(5);  //Play the Ghostbuster song
//  touch6 = false;
      //}
                                      // if (touch7 == true)
                                      //{
                                    //  XXXXXXXXXXXXXXXXX;  //button to operate teh mini smoke machine (5V pump and 3.7V vaper))
                                  // delay(10000)
                                  //  touch7 = false;
                                    //}
// if (touch8 == true)
//{
//  myDFPlayer.play(2);  //Play Alarm Sound
// delay(50)
//  touch8 = false
    //}
// if (touch9 == true)
//{
//  myDFPlayer.pause();  //pause the mp3
//  delay(1000);
//  touch9 = false
    //}


 
// Las animaciones programadas en los diferentes voids
// OPSTARTEN en alles in rood

colorWipeLEDS(stripleds.Color(170,   0,   0), 300); // Green -leds
colorWipeNumbers(stripnumbers.Color(170,   170,   170), 50); // Green - numbers
colorWipeBar(stripbar.Color(170,   170,   170), 150); // White - Bar
colorWipeLEDS(stripleds.Color(170,   170,   0), 300); // Red - leds
colorWipeLEDS(stripleds.Color(170,   0,   0), 300); // Red - leds
// sonido entre medio
 // smokesound();
// myDFPlayer.play(3); // smoke sound
// delay(2000);
RainbowStripCircle(200);
colorWipeCircle(stripcircle.Color(170,   0,   0), 50); // Red - Circle
colorWipeCircle(stripcircle.Color(0,   170,   0), 40); // Green - Circle
colorWipeCircle(stripcircle.Color(170,   170,   0), 30); // Yellow - Circle
colorWipeCircle(stripcircle.Color(0,   0,   170), 20); // BLUE - Circle
colorWipeLEDS(stripleds.Color(170,   0,   0), 300); // Green -leds
colorWipeenergia(stripenergia.Color(0,   0,   170), 150); // BLUE - energia
colorWipeLEDS(stripleds.Color(0,   170,   0), 300); // Green -leds
colorWipeLEDS(stripleds.Color(170,   170,   0), 300); // Yellow -leds
colorWipeLEDS(stripleds.Color(170,   0,   0), 300); // Red - leds
colorWipeLEDS(stripleds.Color(0,   0,   170), 300); // BLUE - leds
colorWipeLEDS(stripleds.Color(0,   0,   170), 300); // BLUE - leds
colorWipeBar(stripbar.Color(170,   170,   170), 150); // White - Bar
colorWipeNumbers(stripnumbers.Color(170,   0,   170), 50); // White - numbers
colorWipeenergia(stripenergia.Color(0,   170,   0), 150); // Green - energia
colorWipeNumbers(stripnumbers.Color(0,   170,   0), 50); // Green - numbers
colorWipeLEDS(stripleds.Color(170,   0,   0), 300); // Red - leds
colorWipeLEDS(stripleds.Color(0,   170,   0), 300); // Green -leds
colorWipeLEDS(stripleds.Color(170,   0,   0), 300); // Red - leds
colorWipeLEDS(stripleds.Color(0,   170,   0), 300); // Green -leds
colorWipeLEDS(stripleds.Color(0,   0,   170), 300); // BLUE - leds
colorWipeLEDS(stripleds.Color(170,   0,   0), 300); // Red - leds
RainbowStripCircle(200);
colorWipeCircle(stripcircle.Color(170,   0,   0), 100); // Red - Circle --------------RED
colorWipeBar(stripbar.Color(0,   0,   170), 150); // BLUE - Bar
colorWipeLEDS(stripleds.Color(0,   0,   170), 300); // BLUE - leds
colorWipeLEDS(stripleds.Color(0,   170,   0), 300); // Green - leds
colorWipeLEDS(stripleds.Color(170,   0,   0), 300); // Red - leds  --------------------RED
colorWipeNumbers(stripnumbers.Color(170,   0,   20), 100); // Red - numbers ----------RED
RainbowStripBar(250);
colorWipeBar(stripbar.Color(170,   0,   0), 150); // Red - Bar --------------------------RED
colorWipeenergia(stripenergia.Color(170,   0,   0), 150); // Red - energia --------------RED
//delay(5000); //delay de 5 segundos
//myDFPlayer.play(7); //Inbetween sound
//delay(2000); // Delay de 2 segundos
//smokesound();

// Juego de luces, siempre terminando en azul
colorWipeNumbers(stripnumbers.Color(170,   170,   170), 100); // White - numbers
RainbowStripBar(250);
TheaterChaseCircle(stripcircle.Color(0, 170, 0), 100); // Green - Circle
colorWipeCircle(stripcircle.Color(170,   0,   0), 50); // Red - Circle
colorWipeCircle(stripcircle.Color(0,   170,   0), 40); // Green - Circle
colorWipeCircle(stripcircle.Color(170,   0,   0), 30); // Red - Circle
colorWipeCircle(stripcircle.Color(0,   170,   0), 20); // Red - Circle
TheaterChaseCircle(stripcircle.Color(170,   0,   0), 100); // Red - Circle
TheaterChaseCircle(stripcircle.Color(0, 170, 0), 100); // Green - Circle
TheaterChaseCircle(stripcircle.Color(170,   0,   0), 100); // Red - Circle
colorWipeenergia(stripenergia.Color(0,   170,   0), 150); // Green - energia
colorWipeenergia(stripenergia.Color(170,   0,   0), 150); // Red - energia
colorWipeBar(stripbar.Color(170,   0,   0), 150); // Red - Bar
colorWipeNumbers(stripnumbers.Color(0,   0,   170), 100); // BLUE - numbers
colorWipeBar(stripbar.Color(0,   170,   0), 150); // Green - Bar
colorWipeBar(stripbar.Color(170,   0,   0), 150); // Red - Bar
colorWipeenergia(stripenergia.Color(0,   0,   170), 100); // BLUE - energia
colorWipeenergia(stripenergia.Color(0,   170,   0), 100); // Green - energia
colorWipeLEDS(stripleds.Color(0,   170,   0), 250); // Green - leds
colorWipeenergia(stripenergia.Color(170,   0,   0), 100); // Red - energia
colorWipeLEDS(stripleds.Color(170,   0,   0), 200); // Red - leds
colorWipeLEDS(stripleds.Color(0,   0,   170), 200); // BLUE - leds
TheaterChaseCircle(stripcircle.Color(0, 170, 0), 75); // Green - Circle
colorWipeCircle(stripcircle.Color(170,   0,   0), 75); // Red - Circle
colorWipeLEDS(stripleds.Color(0,   170,   0), 200); // Green - leds
RainbowStripBar(250);
colorWipeNumbers(stripnumbers.Color(170,   170,   170), 100); // White - numbers
TheaterChaseCircle(stripcircle.Color(0, 170, 0), 100); // Green - Circle
colorWipeCircle(stripcircle.Color(170,   0,   0), 50); // Red - Circle
colorWipeCircle(stripcircle.Color(0,   170,   0), 40); // Green - Circle
colorWipeCircle(stripcircle.Color(170,   0,   0), 30); // Red - Circle
colorWipeCircle(stripcircle.Color(0,   170,   0), 20); // Red - Circle
TheaterChaseCircle(stripcircle.Color(170,   0,   0), 100); // Red - Circle
TheaterChaseCircle(stripcircle.Color(0, 170, 0), 100); // Green - Circle
TheaterChaseCircle(stripcircle.Color(170,   0,   0), 100); // Red - Circle
colorWipeenergia(stripenergia.Color(0,   170,   0), 150); // Green - energia
colorWipeenergia(stripenergia.Color(170,   0,   0), 150); // Red - energia

RainbowStripBar(250);

//myDFPlayer.play(2); // Alarm sound
//delay(3000); // Delay de 3 segundos
colorWipeNumbers(stripnumbers.Color(170,   170,   170), 100); // BLUE - numbers ----ENDCOLOR
RainbowStripBar(150);
colorWipeBar(stripbar.Color(170,   0,   0), 150); // Red - Bar
colorWipeBar(stripbar.Color(0,   170,   0), 150); // Green - Bar
colorWipeBar(stripbar.Color(170,   170,   0), 150); // Amarillo - Bar
colorWipeBar(stripbar.Color(0,   170,   170), 150); // Amarillo - Bar
colorWipeBar(stripbar.Color(0,   0,   170), 150); // BLUE Bar ---ENDCOLOR
colorWipeCircle(stripcircle.Color(0,   0,   170), 75); // BLUE - Circle ---ENDCOLOR
colorWipeenergia(stripenergia.Color(0,   0,   170), 150); // BLUE - energia ---ENDCOLOR
 
}


// Some functions of our own for creating animated effects -----------------

// Fill strip pixels one after another with a color. Strip is NOT cleared
// first; anything there will be covered pixel by pixel. Pass in color
// (as a single 'packed' 32-bit value, which you can get by calling
// strip.Color(red, green, blue) as shown in the loop() function above),
// and a delay time (in milliseconds) between pixels.


void colorWipeCircle(uint32_t color, int wait) {
    for (int i = 0; i < stripcircle.numPixels(); i++) { // For each pixel in strip...
    stripcircle.setPixelColor(i, color);         //  Set pixel's color (in RAM)
    stripcircle.show();                          //  Update strip to match
    delay(wait);                           //  Pause for a moment
      }
    }

void colorWipeBar(uint32_t color, int wait) {
    for (int i = 0; i < stripbar.numPixels(); i++) { // For each pixel in strip...
    stripbar.setPixelColor(i, color);         //  Set pixel's color (in RAM)
    stripbar.show();                          //  Update strip to match
    delay(wait);                           //  Pause for a moment
     }
    }

void colorWipeNumbers(uint32_t color, int wait) {
    for (int i = 0; i < stripnumbers.numPixels(); i++) { // For each pixel in strip...
    stripnumbers.setPixelColor(i, color);         //  Set pixel's color (in RAM)
    stripnumbers.show();                          //  Update strip to match
    delay(wait);                           //  Pause for a moment
     }
    }

void colorWipeLEDS(uint32_t color, int wait) {
    for (int i = 0; i < stripleds.numPixels(); i++) { // For each pixel in strip...
    stripleds.setPixelColor(i, color);         //  Set pixel's color (in RAM)
    stripleds.show();                          //  Update strip to match
    delay(wait);                           //  Pause for a moment
     }
    } 

void colorWipeenergia(uint32_t color, int wait) {
    for (int i = 0; i < stripenergia.numPixels(); i++) { // For each pixel in strip...
    stripenergia.setPixelColor(i, color);         //  Set pixel's color (in RAM)
    stripenergia.show();                          //  Update strip to match
    delay(wait);                           //  Pause for a moment
     }
    } 


// Theater-marquee-style chasing lights. Pass in a color (32-bit value, a la strip.Color(r,g,b) as mentioned above), and a delay time (in ms)
// between frames.

void TheaterChaseCircle(uint32_t color, int wait) {
  for (int a = 0; a < 2; a++) { // Repeat 2 times...
    for (int b = 0; b < 23; b++) { //  'b' counts from 0 to 24...
      stripcircle.clear();         //   Set all pixels in RAM to 0 (off)
      // 'c' counts up from 'b' to end of strip in steps of 2...
      for (int c = b; c < stripcircle.numPixels(); c += 1) {
        stripcircle.setPixelColor(c, color); // Set pixel 'c' to value 'color'
      }
      stripcircle.show(); // Update strip with new contents
      delay(wait);  // Pause for a moment
    }
  }
}

// Ciclo de arcoiris por todo el cĂ­rculo. Tiempo de espera en vueltas en milisecundos.
void RainbowStripCircle(int wait) {
  // Hue of first pixel runs 2 complete loops through the color wheel.
  // Color wheel has a range of 65536 but it's OK if we roll over, so
  // just count from 0 to 2*65536. Adding 256 to firstPixelHue each time
  // means we'll make 2*65536/256 = xxxxx passes through this outer loop:
  for (long firstPixelHue = 0; firstPixelHue < 2 * 65536; firstPixelHue += 256) {
    for (int i = 0; i < 35; i++) { // For each pixel in strip...
      // Offset pixel hue by an amount to make one full revolution of the
      // color wheel (range of 65536) along the length of the strip
      // (stripcircle.numPixels() steps):
      int pixelHue = firstPixelHue + (i * 65536L / stripcircle.numPixels());
      // strip.ColorHSV() can take 1 or 3 arguments: a hue (0 to 65535) or
      // optionally add saturation and value (brightness) (each 0 to 255).
      // Here we're using just the single-argument hue variant. The result
      // is passed through strip.gamma32() to provide 'truer' colors
      // before assigning to each pixel:
      stripcircle.setPixelColor(i, stripcircle.gamma32(stripcircle.ColorHSV(pixelHue)));
    }
    stripcircle.show(); // Update strip with new contents
    //delay(wait);  // Pause for a moment
  }
}

// Ciclo de arcoiris por todo la barra. Tiempo de espera en vueltas en milisecundos. = void del cĂ­rculo
void RainbowStripBar(int wait) {
   for (long firstPixelHue = 0; firstPixelHue < 2 * 65536; firstPixelHue += 256) {
    for (int i = 0; i < 50; i++) { // For each pixel in strip...
      
      int pixelHue = firstPixelHue + (i * 65536L / stripbar.numPixels());
      stripbar.setPixelColor(i, stripbar.gamma32(stripbar.ColorHSV(pixelHue)));
    }
    stripbar.show(); // Update strip with new contents
    //delay(wait);  // Pause for a moment
  }
}


// Ciclo de arcoiris por todo la energia. Tiempo de espera en vueltas en milisecundos. = void del cĂ­rculo
void RainbowStripEnergia(int wait) {
   for (long firstPixelHue = 0; firstPixelHue < 2 * 65536; firstPixelHue += 256) {
    for (int i = 0; i < 50; i++) { // For each pixel in strip...
      
      int pixelHue = firstPixelHue + (i * 65536L / stripbar.numPixels());
      stripenergia.setPixelColor(i, stripenergia.gamma32(stripenergia.ColorHSV(pixelHue)));
    }
    stripenergia.show(); // Update strip with new contents
    //delay(wait);  // Pause for a moment
  }
}

//// Los diferentes voids de la mĂşsica
//void smokesound() {
//  myDFPlayer.play(3); //smokesound
//delay(2000); // Delay de 2 segundos
//}

Hi,

I try to run the whole setup through 2 x 5V 2600mAh baterries, that are conected in pararel, so they should give me around 5000 mAh and 5V.
Each module (Arduino Uno, DFPlayer and speakers run individually from the poweroutput.
Next thing for me to try is to run only the soundmodule with it's part of the script, to see if it works on it's on.
Hope that someone can help me, as I'm gettng at the end of "my solutions" lol

@bassman65060, your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project. See About the Installation & Troubleshooting category.

1 Like

Maybe tomorrow...?

Would be great. I'm not in a hurry

Well, in a way yes, i think you are a bit thinking that the ledstrip and the soundmodule can be controlled by a single Arduino is optimism, maybe on an ESP, but on an AVR i think it's Utopic.
The issue is that the .show() command needs to turn off interrupts to function properly, and i suspect the sound player needs them turned on at all times.
Also you would anyway have to modify your sketch if you want things to run at the same time, and use millis() for timing.
To be clear, maybe the player can run with the ledstrip being updated while it is playing, but i doubt it.
I don't think there is any hurry with the circuit diagram, your code has plenty of issues.

Good plan.

Ok, maybe next week then.

Thanks for helping out. I appreciate not receiving a "direct solution", I wouldn't learn anything that way. :wink:

I do not need the lights to go together with the sound, in fact it's better if one follows the other.
I placed the sounds where I wanted/needed them after a certain ledstrip should have been turned on or changed it's color(mostly after the ledbarstrip).
I also use delay after each sound, because I found out that if I don't, the sound is being cut by the next change in the leds. That is the reason why I, for example use delay(20000); after the first sound in the void setup();, because it is a 20 seconds long introduction, that welcomes the wearer of the backpack only when she (trying to make this for my wife and 3 of her friends) powers up the backpack.
Anyway, today after work, I'll try only the sound part of the sketch, and see what happens and post it here.
I could go with a "button approach", so that the sound will be turned on pushing a button, but to be honest, I was going to reserve that one, just to play the famous Ghostbuster song, every time the wearer wants to.

I'll be back (I bet you read this with a "Terminator's voice" :blush:

Hi,

just tried the sound sketch on it's own, with the same result ... I can see the power goes through the circuit (I've installed a Voltmeter on the last led, which indicates 4.98V), that way I know there's no powercut in the circuit.
The voltmeter lights up, the 2 leds on the arduino light up, and after around 10-15 seconds the arduno shuts off on its own.
When turning off the power and switching on again, it all starts over with the same result.

I'm looking for a small sketch that reprodeces sound (or songs) to see if that works. At least than I know it's my miserable programming.

I don't think I screwed up with the DFPlayer's circuit.
I've got 5V into the VCC
The RX is conected to pin11 in the arduino with a 1k resistor inbetween
The TX is conected to pin 10
GND is conected to GND in the arduino
Speaker 1 and 2 are conected to the speakers directly
I'm using the USB conector to power the arduino and a direct power (without going over the arduino) for leds and for the DFPlayer module.

When I find a working sound sketch, I'll give it another go.

I think we’re waiting on some important information…
Check the previous replies.

I have no means to make a "decent circuit", so this is what I've come up with

Can you tell a bit more about these, please?

Don't underestimate pencil and paper! Even in late 2021 they're still very powerful tools.

1 Like

:+1:

Well, ... I connected them - to - and + to +, so that I could add up the mAh and maintain the Voltage. I thought it might have been an consum issue.
A part from that they are normal powerbanks, the ones you use to charge a phone ...

You haven't seen my drwaing skills lol

Uhoh. So they are powerbanks, not batteries, which means that there are two power supervisors/battery management circuits potentially battling with each other. Connecting power sources isn't always trivial.
What kind of powerbanks? Have you opened them up and determined what kind of auxiliary electronics are in there and how they might interfere with each other?

NO, as a matter of fact I haven't. I didn't stop to think of that. To be honest I assumed that connecting them would not be a problem.
I can make a battery with several ones (real batteries this time, like 3 x 1,5V ones) and try with that.
Or maybe I should use just one powerbank and run it over the Arduino and power both leds and DFPlayer over the 5V and GND pin?