Battery power problems

Hello all, i'm in a bit of a pickle here. Let me describe the problem as clearly as possible: I've built a small controller for sending MIDI messages. It has 10 buttons and 11 3mm LEDs (8 green, 1 red, 1 yellow) with a 220 Ohm resistor on each of them. It's based on an Arduino Pro Mini and powered by a 9V battery (fed into the RAW port). Extra IC's in use are a 74HC595 (for multiplexing the LEDs) and a CD4067B (for multiplexing the buttons). The problem I'm having is that when I have 6 of the LEDs lit up and make a 7th go on, the arduino reboots. Am I trying to draw too much current from the battery? If so, how can I go about fixing it? I can make a schematic of the whole thing if needed. And of course, I would really appreciate any help and insight!

Here's a picture of it assembled:

That looks really neat, where did you get those transfers from?

Anyway, it is possible, as long as it is any 7 LEDs that cause a reboot. You can check by using an external power supply and making sure it doesn't happen.

With 220R resistors you are probably drawing more current than you need. I have found the difference between 220R and 470R is not much in brightness but it is half the current so I would investigate changing them. Alternately you could try a metal hydride rechargeable battery, you can get more current out of those.

I bought the stickers in Tokyo a few years back. (can't get enough of cute stickers!) Figured they would make the unit look less like a remote from the 80's, heh.

It doesn't reboot with an external power supply, so I guess it's drawing too much current then. I will go ahead and change the resistors. I was thinking about changing battery type, but I figured that it's probably a good thing if you can run it with a standard battery. Anyhow, thanks for the help! I'll let you know how it goes with the new resistors. Cheers.

Sorry for the double-post, but couldn't find the edit button (is there any?). I tried changing all the LED resistors to 470 Ohm, but still no luck. However, it seems the problem lies elsewhere, or at least gets 'help' from another problem. With 6 LEDs lit, if I hold down a couple of buttons it reboots after a second or two. I'm using the method outlined in the tutorial section ( to read button state. Which means I have a bunch of resistors on the other end of a 4067 multiplexer. Could these be drawing too much current somehow?

That's a cool little midi controller! And nice work on mounting everything - very clean.

9V batteries are very low current power sources. At 9V, even 470 ohm resistors will allow around 15 mA to each LED. Multiply that by the number of LEDs plus the current drawn by the buttons when they are pressed and you're probably draining the battery too quickly and causing its voltage to drop. A 9V power supply or larger batteries won't drop as easily. Change the internal power source from a 9V rectangle battery to a 6-pack of AA or AAA batteries and you should be good to go.

As a general rule, you should use the highest value of resistor that works for your needs. This saves power and can help keep you from frying pins on your Arduino. So if you're in the mood to change all the resistors again, :P install 680 ohm resistors for each LED. That will drop the current from around 15 mA to around 10mA on each LED. It will make your batteries last a little longer and the LEDs should still be plenty bright. (test on one LED before doing all of them to be sure)

Thanks koyaanisqatsi! Unfortunately the inside isn't as clean :) I might be able to squeeze 6 AAA batteries into the compartment, but if I can make it work with a 9V battery it's more preferrable and easier to change once it runs out. Ok, i'm changing all the resistors again. Would it help if I also changed the resistors for the buttons? I noticed I had used 100 Ohm's on all of them, for some weird reason (must have been temporarily colourblind).

EDIT: Didn't have to change the LED resistors. I put 1 KOhm resistors on the switches instead, and the problem was solved. I should probably change the LED resistors too to improve battery life but at least it's working perfectly now! (All LEDs lit + almost all buttons pressed = no reboot = good enough for me!)

Good to hear it's more stable for you. If it does still get unstable at times, there's two things you may be able to do within the constraints of the space you have: 1) the buttons will probably still work even with 10K or 20K ohm resistors. Most logic only needs a fraction of 1 mA to sense the pin state. 2) You can put two 9V batteries in PARALLEL (both + wires together and both - wires together) to get twice the life from them, and twice the ability to deliver current. Be careful to NOT wire the two batteries in series or you'll fry something.