Poor sound and "lock"? [SOLVED]

Goodnight,

I come back with a problem with the sound that I mentioned when I introduced myself.

I do not know if this is normal, it is the problem of the small speaker, the design of this hardware, or on the contrary it is a defect of origin (I ordered the console already mounted).

The sound seemed to me of poor quality and at some point saturated, so in my first test program (try to be a very rudimentary metronome) I tried to make two types of sounds according to the pulse using the commands already existing in the Gamebuino library gb.sound.playOK () and gb.sound.playTick ().

As you can see in the video I attached, with low volume seems to work well, but if I gradually increase the volume reaches a point where it seems as if the program will hang and repeating beeps. Subsequently if under the volume seems to stabilize and the program can be resumed as it seems to suffer a reset.

Test sound Makerbuino (Youtube)

I have doubts that it may be a software problem, although in case I also include here the program I have done in case anyone wants to try and wants to give their opinion.

// imports the SPI library (needed to communicate with Gamebuino's screen)
#include <SPI.h>
// imports the Gamebuino library
#include <Gamebuino.h>
//creates a Gamebuino object named gb
Gamebuino gb;

// variables for the metronome default setup
int counter = 0;                              // counter of bpm
int frmsecond = 20;                           // frames per second in screen for tempo adjust
int tempo = 60;                               // number of bpm ( 60 = 1 second, 120 = 1/2 second )
int bpmcompass = 60 * frmsecond / tempo;      // 1 compass 
int bpmtick = bpmcompass / 4;                 // ticks per compass


// the setup routine runs once when Gamebuino starts up
void setup(){
  // initialize the Gamebuino object
  gb.begin();
  // display the main menu:
  gb.titleScreen(F("Metronome"));
  // first pop up message
  gb.popup(F("Let's go!"), 100);

}

// the loop routine runs over and over again forever
void loop() {
  // updates the gamebuino (the display, the sound, the auto backlight... everything)
  // returns true when it's time to render a new frame (20 times/second)
  if (gb.update()) {
    counter++;        // increment frame counter

    // shows counter 
    gb.display.println(counter);
    
    // if reaches one compass (1 second default) plays sound and reset counter
    if (counter>=bpmcompass) {
      gb.sound.playOK();  
      counter=0;
    } else if ((counter % bpmtick) == 0) {  // parcial tick
      gb.sound.playTick();
    }
  }
}

Interesting, it runs fine on mine but it runs a fair bit faster than yours does, do the example sketches in the Gamebuino library run properly for you or are they slow as well?

Well, I would not know how to say this with slowness. I will try other examples to leave doubts and I will tell you. Thank you for your comments.

@gabimarti Are you sure the battery is connected? In you’re video it looks like your powering the Makerbuino via USB.
Both lights on the charging board shouldn’t be on at the same time, this indicates no battery and this is why you’re getting strange sound output.

Hi, yes, I am powering by the USB because I have opened another thread where I explain that the battery does not charge in the last day. :persevere:

An additional problem, and in less than 10 days. :persevere: :cold_sweat:

Hmmm, the resetting and the lights flickering makes me think the voltage is not enough for playing the sound at full volume. As you said, you are powering the console from USB, what limits the power to 500mA (via a PC, or the limit of the charger you are using otherwise).

I tested on mine with the battery disconnected and it does not happen, but the lights also flicker. A bit of difference in your USB cable or PC power supply probably makes yours to receive a little bit less voltage, making the microcontroller to reset as the voltage falls below it’s minimum. It should be fine once you receive a new battery or end up fixing the problem with the charging :slight_smile:

EDIT: reading your other thread… As you said, you could have a bad charging board, wich would also cause this problem.

Yes, it has to be a load circuit problem. I feed it with a 2000mAh phone charger

@ladbsoft @Dalemaunder @bitfogav, thank you for helping out on this topic.

@gabimarti, I’ve come up with a solution in this post:


Please send me your KS username via PM ASAP.

Private message sended.

I await your news. Thank you.

@gabimarti, we’ve shipped you a replacement MAKERbuino and I’ve just sent you the tracking number via private messages.
Thank you for your patience and sorry for this mistake.
Keep making!

1 Like

Thank you very much. I look forward to it impatiently and will inform you of the results.

1 Like

Hi, I have the same problem with de sound quality. I trying connecting headphones and is the same problem. The sound is saturated with battery connected or USB. What can I do?

@faliquintui, thank you for supporting MAKERbuino and welcome to the forum.

What do you mean “The sound is saturated”?
Please, can you open a new topic for your problem in the support category and attach some photos of your device’s front and back side?

Thanks!