7,2V 2500 mAh can't hadle 2 motors and sensor?????

I built a robot recently, it works perfectly being powered by USB, but when i'm using the batteries to power it, the ultrassonic sensor doesn't work correctly. I suspect the batteries aren't enough.

I'm using 6 1,2V 2500mAh cells, and it powers directly the motors, then the arduino, that powers the sensor and the motor driver.

I think this battery pack should be enough, am i doing something wrong?

PS: I tested with 2 battery packs at the same time (one to the motors, the other to the arduino) and it worked, but i don't want to have 12 batteries on my robot.

Can you post a picture of your robot and some specs? Perhaps 2500mah is not enough, maybe you need more juice.

Go to your nearest RC Hobby shop and see if there are any 5000mah battery packs for sale.

What's the voltage & current rating on the motors? I believe USB is rated at 1.5A (at 5V).

...the ultrassonic sensor doesn't work correctly.

If the motors are working and just the sensor isn't working, you've probably got a different problem (unrelated to the amount of current available).

Do you have a multimeter to check if the battery voltage is holding-up when the motors try to start?

I would expect 2500mAhr batteries to put-out more than 2500mA (depending the load of course), but the amp-hour rating isn't a current rating. Technically, it's an indication of how long the battery will last (such as 2500 hours @ 1mA.)

Smug: PS: I tested with 2 battery packs at the same time (one to the motors, the other to the arduino) and it worked, but i don't want to have 12 batteries on my robot.

It looks like you have your answer right there - you need batteries with more capacity. Are you sure the 6 batteries were fully charged? It might be worth trying a single pack with 8 cells giving 9.6v because then there would be more headroom to accommodate voltage drop.

...R

I have a multimeter, and in fact, the batteries are a bit overcharged, it was with 7,8V, but i suspect the motors are sucking too much current of the arduino, and this affects the sensor, so i think i'm goind to put a 9V battery with a LM7805 to reduce it to 5V, and connect it directly on the sensor, that should correct the problem right???

The reason why it is not recommended to run the arduino external dc power from the same p.s. that is powering motors is that the inrush current for the motors can cause negative spikes (dips) in the input to the 5V regulator, causing brief fluctuations in the regulated 5V. This is normally addressed by adding large electrolytic caps 470uF to 1000uF on the unregulated input and another 470uF on the regulated 5V.

Smug: so i think i'm goind to put a 9V battery with a LM7805 to reduce it to 5V,

Just to warn you. PP3 type 9v batteries are generally useless for Arduino applications as they can produce very little current (amps) and they have very low capacity (amp-hrs).

...R

Thanks, can you show me how to connect the capacitors ??

I've made some tests, and the motors can draw about 1 A when started, but after a brief moment, it drops to 80 mA, what capacitance do i need to filter this peak?

You guys are helping me a lot :)

so i think i'm goind to put a 9V battery with a LM7805 to reduce it to 5V,

A 9V PP3 smoke alarm battery has a mAh rating of about 250 - 300. The arduino itself will draw about 60 mA if nothing else is running off the 5V, which would give you 4 to 5 hours of operation on one battery.

Ok, i won't use the battery if i discover how to filter the current peak, how do i do that?

see Reply#5

Well.... this explains a lot of my issues with other projects. Thanks!

Well.... this explains a lot of my issues with other projects. Thanks!

This is standard operating procedure for most circuits but becomes critical when motors are involved. The difference in performance is proportional to the value of the caps added.