Can I power my arduino uno with 2 9V batteries?

hello, so Im trying to power a relay with my arduino. The code works, everything works. Only problem I got is that the 9V battery I power the arduino up with messes the whole thing up. For more context, I connectred an on and off switch to the GND pin of the relay-arduino. When I connect the board to my laptop, it works witout complications. I turn the switch on and off and the relay turns on and off. but when I unplug the board from my laptop and switch to battery, it doesnt do anything than just dimming the light on the arduino and the relay. Im thinking of connecting another battery but idk if its supposed to be connected parallel or not. I also dont want to fry my board so if tehre are any other alternatives to do this, Im open to ideas (the space I have is limited and I cant connect the board to my laptop once I assemble the whole thing)

A 9V PP3 battery is going to struggle to power both the Arduino and the relay at the same time. You could put two in parallel (not in series!) but I am not sure that they will last that long either. You could use batteries with more capacity (e.g. AA, C or even D size) with a suitable multi cell holder. There may also be a solution using a Lithium battery and shield/charger board, although I haven't really researched the latter.

the time isnt a problem for me. I just need it to run for 30 mins ish. Im just gonna show it to a couple of people.
do I parallel connect them then?

Batteries in parallel increase capacity (mAh) while voltage (v) remains constant.

If you plan using PP3 9v, don’t.

No, because while in theory you get twice the amount of current capacity in practace the batteries try and charge each other, and this makes them have a shorter life.

One trick you can do to avoid this is to wire a diode from each battery to a common point. And power your system from the common point.

However 9V PP3 batteries have very little current capacity and are normally useless for Arduino projects.

so if I parallel connect them, nothing changes other than the batteries draining faster?

Yes, but that is not acceptable, is it?

Yup, the item in LarryD's post is what had in mind.

1 Like

I guess not. Any other way I can supply my arduino with the required amount of voltage (12V) in a limited space without connecting it to a laptop?

  • What is the maximum space available ?

I carved a bowl like thing of styrofoam and I only have the walls of it to place anything. I can fit 2 9V batteries with teh space I got rn. But I might be able to carve out a little bit more without breaking the thing

BE VERY CAREFUL! Styrofoam will create huge static electricity voltages that can destroy your electronics.

1 Like

well good thing Im not using expensive stuff and theres not that much electricity in the circuit

Which relay?

image
this one
it works as intended, but the 9V alone cant turn it on and off

Sorry, I can't make out the relay voltage from the fuzzy picture and you haven't said which Arduino.

it says

10A 250VAC 10A 125VAC
10A 30VDC 10A 28VDC
SRD-05VDC-SL-C

on the blue part

its an arduino uno

Well, the relay coil draws 72mA, so 2 9V batts in parallel won't last very long. Are you sure you know how to connect them in parallel?

I dont trust myself with connecting them the way I know. dont want to mess this one up