I made a RGB led cube as my first project.

I made a RGB led cube as my first project. But I want to add batteries. But how do I do this with the possibility of having the dc power in as well? I tried connecting a battery pack just to the gnd and 5v but I was afraid to put in the dc power simultaneously. Not sure how to do this. Any suggestions are greatly appreciated. This is how I wired everything

What’s the DC power for? Only powering the Arduino + LEDs? Or also recharging the battery? And the “USB” port, is that only for a battery, or can a computer also get connected to provide power? There are too many variables and not enough information. It can be something as simple as a three-way, ON-OFF-ON switch, or as complicated as a full recharging and input power switching circuitry.

DC power is for powering the leds and Arduino. Not for recharging the batteries. But if it’s easier with rechargeable batteries then I will make it like that.USB port connects a computer and from what I read it can give the Arduino power simultaneously with the dc power. But Its used to code the Arduino

Computer USB ports only supply 500mA of current. It’s not recommended you drive a lot of LEDs with that.

Many hand held radios are both battery powered and plugin. The plugin with barrel jack will disconnect the battery supply automatically as the socket is plugged in to be energized by land line. So the default ON would be when unplugged & it will be battery power.

I know, thats what’s the dc power is for. the usb is only used for sending code to the Arduino. but it gives power as well. can’t turn that off but its not bothering me so

You have the wire the barrel jack correctly for that to happen, or, again, have the proper circuitry to do the switching. Look at the Arduino schematic, it also does switch from USB power to the barrel jack if plugged in, but it’s not using the barrel jack as the “switch”. It has onboard circuitry that detect the voltage on the barrel jack and switches over.

How big was the cube? Im wanting to make an RGB cube as well. I only have a 3x3x3 i made years ago lol

its a 5x5x5 cube. I have a vid but don’t know how to post it

Upload it to youtube then share it

That enclosure around your cube. How did you make it or where did you buy it?

it’s a Ikea synas light box. You have to open it up and remove the led strips. but then it’s perfect

I need to make 1 for a 3x3 lol

Ok so Im just gonna use diodes to keep the dc power from transferring into the batteries. But I have a 6 * AA battery holder. And I only want to get 6V from them. is it ok if I put 4 batteries in series and attach the remaining two in parallel? Or is this a bad idea. I have no experience with batteries and don’t want to destroy anything here.

@Nick_Verschuren ​ just use a paperclip to bypass the last 2 batteries

Its what i usually use

ya but is it possible to add the last two for more mAH?

without adding voltage