Circuit keeps overloading my Microcontroller. Anything I can add/subtract?

Discussion in 'Power Electronics' started by patrickstefanski, May 17, 2019 at 3:35 PM.

  1. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    Hi all.
    Project overview. This is the head for my Star Wars Droid project (BB-8). The head is pretty simple. Push button on BT remote control. Mp3 Player in head plays sounds. There are also NeoPixel lights on all the time, and one that responds to the volume of the sound from the mP3 player.

    The problem is when the volume is at maximum, and the sound level reaches its peak the arduino resets (all lights shut off, and then restart in a half second).. I'm pretty sure the problem comes from the tranducer i am using as a speaker drawing too much power. If I remove the speaker, everything works fine, the lights still respond to the mP3 player output (even though there is no sound). If I put a less powerful speaker on, everything works great as well. I would like to use the loud transducer, but obviously not at the cost of my project. Are there any passive components I can add to keep it from overloading?

    Circuit Overview: (schematic attached)

    7.4v Lipo Battery (2x3.7v wired in series). BattPower (VCC) goes to ProMicro RAW pin. VCC also goes to two L6932H1.2 Linear Regulators. The first (5v) powers the NeoPixels and the mP3 player. The second (3.3v) powers the Bluetooth Module (HC-05, no breakoutboard).

    -The 5v regulator is rated to 2A output.
    -I am running 17 neopixels. They have a max draw of 60mah. But most are off or not fully on. I calculate my neopixel draw to be 340mah. Lets call it 500mah to be safe.
    -The mP3 player has a 3W amplifier.
    -The transducer is a TT-25 from MrRC Sound. There is little info to be found unfortunately. https://www.mrrcsound.com/tt-25-info
    schematic.JPG
    I'm wondering if anyone can help me figure out how to keep my project running with this lovely loud transducer.
     
  2. dendad

    Distinguished Member

    Feb 20, 2016
    2,514
    674
    For a start, add a 2200uF (or larger) electrolytic capacitor across your battery.
    And if that does not help, put the cap on the Arduino power input and add a power diode, like 1N4004, in series from the battery, Anode to the battery, Cathode to the Arduino.
    Have you measured the battery volts with the sound running? Your battery ma be too small a capacity.
     
  3. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    Thank you so much for your reply. Should I put the Capacitor before or after my switch? bora.JPG
     
  4. dendad

    Distinguished Member

    Feb 20, 2016
    2,514
    674
    Before is ok. Then the switch does not have the charging surge. Do you have one to test with?
     
  5. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    Thanks. The largest capacitor I have is the 2200uF and that unfortunately did not fix the problem.
    I measured the voltage across the battery and it stays pretty consistantly at 7.94v from the charged 3.7v lipos.
    When the power blinks out it dips to 7.89, but no significant drop.

    I'm not 100% sure how to follow your 2nd recommendation with the cap and diode on the arduino.
    I am looking into higher capacity batteries that will fit this project. The current ones are 800mAH (2 wired in series) with a 25C discharge.
     
  6. dendad

    Distinguished Member

    Feb 20, 2016
    2,514
    674
    ArduinoPower.jpg
    Try this.

    Next, run the Arduino on a separate supply for a test to check for some other cause, not battery sag.
    It could be ground bounce, depending on how you have physically wired it up.
    Ensure each circuit module only has its 0V connection at the battery and does not run the 0V from one module to the next one.
    Can you post a photo of yous circuit wiring?
     
  7. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    4,139
    6,068
    You could replace your linear regulators with switchers. Not only will you get longer run times (and less heat) , but the switches will eat some of the drop-out from the batteries during high-load conditions.
     
  8. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    I ran all my tests on a breadboard with a different speaker (DUMB!)
    and then had some cheap PCBs made. Attached are my front and back of the boards, I labeled as much as I can to make it somewhat follow-able.

    The back has a GND plane.
    The top board is the Arduino (Sparkfun Pro Micro)
    The bottom board is the mp3 player.
    The 5 components surrounding the 2 linear regulators are the passive components for the regulators.
    BackPanel.JPG FrontPanel.jpg
     
  9. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    Thanks Joey, I've never heard of switchers before, but I'll definitely look into it! Do you have a link to one that might be helpful?
     
  10. dendad

    Distinguished Member

    Feb 20, 2016
    2,514
    674
    Your power tracks look very thin. Always make power tracks as big as practical. They do have to carry some current. Try adding wires under the board to increase the current carrying capacity from the battery.
    Do you have an oscilloscope? Watching the power on the RAW pin could be interesting. The battery may well be holding up, but I reckon you are dropping volts over your thin tracks.
     
  11. joeyd999

    AAC Fanatic!

    Jun 6, 2011
    4,139
    6,068
    You claim about 0.5 amp for the neopixels, and a 3W audio amp (this implies at least 0.6A current at 5V). The sum of the currents is 1.1A. With a 7.4V battery, the regulator is experiencing a 2.4V drop. At 1.1A, the regulator is dissipating 2.7W.

    You don't have a lot of copper around the regulator. I bet it's going into thermal shutdown.
     
    narkeleptk likes this.
  12. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    Thanks Joey and dendad. I will recreate the board and try to focus on larger copper traces/pads in key places. Will post an update
     
  13. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    I remade the board with much larger traces for all power lines and grouped things a little more logically. I hope this will fix the problem!
     
  14. dendad

    Distinguished Member

    Feb 20, 2016
    2,514
    674
    Those tracks look better. Let us know how it works please.
     
  15. Zaishens

    New Member

    Today
    13
    0
    I do not see any planes on this PCB, like in your original version you had a GND plane, i would keep this and make it so that around the Vref is enough copper to transfer its heat.

    I also see that the bottom pad of the Vref is not connected to GND is that true?
     
    Last edited: May 20, 2019 at 9:58 AM
  16. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2

    You are correct. I looked at the data sheet for the L6932H1.2 (here) and it didn't look like that bottom pad was connected to GND so I removed it in hopes of gaining more space for traces. You can see I used that internal area on the top one to get to the 3.3v pad. I guess this was a bad idea?

    I can put them back in and attach to GND if it would help with heat transfer. Any tips on how to solder those?
     
  17. Zaishens

    New Member

    Today
    13
    0
    The middle pad, pins 6(gnd), 7 and 8 (both NC) are connected to GND, this is required to dissipate the heat.
    the "normal" L6932 (non H1.2) has no middle pad, but 4 GND pins.

    If you want to solder the bottom pad, you have to (re)flow solder it using a solder wave or heat gun, this can be tricky.
    Alternatively you can attach a heat sink on top with thermal glue and hope that it enough.
     
  18. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    Great. thanks for the tips. I will update the board again!
     
  19. patrickstefanski

    Thread Starter Member

    Apr 15, 2017
    31
    2
    Thanks for all the help with this. I updated the board again.
    This is just the bottom but I think that's where the meat of everything is.
    I updated the library for my L6 932H1.2 to add the pad back in at the bottom. The pad, the GND pin and the NC pins are all connected to the full ground plane now for maximum heat transfer.

    I think it's getting more clear that the current problem is thermal shutdown on my 5v L6932H1.2. As it is the two NC pins are not connected to anything and the PAD is also not connected to anything, just the ground pin. So I'm hoping this clears it up. Beginner inexperience at it's finest!

    A reflow station has been on my list for awhile now, so I guess this is a good time to pull the trigger on that purchase.
     
  20. dendad

    Distinguished Member

    Feb 20, 2016
    2,514
    674
    On the gnd pads, have them fully connected, no thermal slots as the main purpose is to take the heat away. One trick you can use is to put a plated through hole in the pad so then the IC pad can be soldered down from under the board with a soldering iron.
    It is probably not the best way, but it does work ok. I use a hot air tool, a must for SMT work.
     
Loading...