Just a quick question regarding battery use on a hack RC car

Would it be a bad idea to power my robot with one battery. I would be using 5 rechargerable batteries which will give me 6-7volts or should I just power my atmega328 and maybe ultrasonic ping sensor with a 9volt batteries and the rest with the rechargerable.

Standalone atmega328

1 dc motor with L293D

1 micro servo

1 ultrasonic ping sensor

6 leds (3 sets each)

Well from my personal

Well from my personal experience a 9V battery does not deliver enough juice (current) to keep both an atmega (custom*duino) and an ultrasonic module. The ultrasonic module will spit out silly value if it is not “well fed” (needs stable 5V) also the atmega will just reset if the circuit tries to pull too much current at some point leading the voltage to drops below the brownout voltage. Capacitors can help keep the voltage stable (work as buffers) but may not be enough if the “juice” supply is not very good!

There’s expansive ranting on that subject on my first’s bot’s page if you care to read. But the gist of it is has I told you. Personally I ended up going with two battery packs of rechargable batteries, also because I couldn’t get rid of problems arising from using just a simple pack for all. Although it’s not mentioned I hope that you have aware if you’re going to standalone atmega route you’ll be needing voltage regulation.

Yea I will be using a 5v

Yea I will be using a 5v reglator for the Atmega. Since basically I switch out 1 dc motor for a micro servo I might be able to just use the battery to also power the ultrasonic sensor from it too.

9v battery power:

atmega328

3 sets of led

 

6-7v power:

1 dc motor with L293D

1 micro servo

1 ultrasonic ping sensor (with 5v regulator)