Forum >Available current from Arduino Mega plus mega sensor sheild.
ArduinoGeneral

Available current from Arduino Mega plus mega sensor sheild.

userHead russel_wood@hotmail.com 2013-01-29 11:30:19 8408 Views8 Replies
Hopefully this will seem like a simple problem to the seasoned vets here as I am but a super noob to robotics. Thanks in advance for any help offered.

Ok here goes.

I have the dfrobot mega 2560 with mega sensor shield sitting on top. For sensors I have connected 2 dfrobot analog sound sensors and 1 Dagu compound eye. For motor control I have the dfrobot 2A(3max) dual h-bridge motor controller. And the platform is the dfrobot 2wd turtle.

First off I know the motor controller matches the motors as I researched the current needs and am only suppling 6 volts as rated. I have 5 x 1.2 ni-mh for 6V for the motor board. Second the arduino is powered by 8 x 1.2 ni-mh for 9.6 V so its within spec too.

Ok.... here's issue... With the 2 sound sensors and the compound eye connected if I send a pwm speed signal to the motor pins of higher than 60 the board keeps crashing and restarting it seems. If I leave pwm at 60 it runs motors slow but all is fine.

Am I really running out of current with 2 analog sound sensors, 1 compound eye, and controling 2 motors by pwm???? Or is there something I'm missing

If I disconnect all the sensors and run a simple go in square box pattern program I can run up to 255 which I assume is max pwm.

Could 2 analog sound sensors and one compound eye really be too much current drain for the arduino. Am I really running out of current with 2 analog sound sensors, 1 compound eye, and controling 2 motors by pwm???? Or is there something I'm missing?

Also a concern... will this damage my arduino in anyway? It's not getting too much current that's for sure. Can this sort of problem hurt things?

What would resolve this?

Awaiting advice.
2013-02-01 04:33:02 What about the issue of having one tiny jumper ground wire when I'm using 4 jumper wires to source motor rotation and pwm? Could the circuit be unbalanced in such a way? Do you think adding a larger wire would have same effect as it did with batteries? I'm going to try it tonight when I get home. userHeadPic russel_wood@hotmail.com
2013-01-31 19:14:41 Actually since I changed the battery leads to a heavier wire my problems have mostly cleared up. I am running the motors, audio sensors, compound eye and both the servos in the Dagu pan and tilt kit.

My battery is a home made 2 x (8AA @ 1.2V) = 9.6V banks.

I am running the pwm at 150 now with no issue but pushing past 175 still causes occasional reset (low power reset I'm assuming)

Obviously using larger battery leads allowed more current through. I still have a 750mA fuse in there to protect against over current.

The battery pack to the motors still has teeny weeny wires. The motors have a home made 1 x (5AA @ 1.2V)=6V. Could a current drain be getting passed on to the logic part of the motor controller and thus on to the pwm signals somehow?

I only have a small thin jumper running from the GND on arduino to the motor controller ground. Could I source its shared ground right off the 2 x (8AA @ 1.2V) = 9.6V banks? Or would having ground from 9.6 connected with ground from 6V be an issue?
userHeadPic russel_wood@hotmail.com
2013-01-31 18:46:39 Hi Moment,

One time 9V power hooked up at same time as USB by accident . I think that's all right, don't worry. :) 
Can you tell me what battery you use & give a link ?
The hardware you use just  2 analog sound sensors, 1 compound eye, and  2 yellow motors & two tiny tiny servos included in the Dagu pan and tilt kit once?
Your problem is that  the motors can't work properly via PWM if you  hooked up other sensors ?
userHeadPic Phoebe
2013-01-31 12:59:06 IT WAS THE LITTLE TINY WIRES THOSE PACKS COME WITH!!!!

I love it when I finally figure it out, but I detest how its always something simple!
userHeadPic russel_wood@hotmail.com
2013-01-31 08:28:12 In all reality I only have 10 pins total in use. 11 if you include the shared ground. Thats a total max of 400mA if all pins at max current.

Would not max pwm also have to be below 40mA. It stands to reason they would.

So we stand with understanding of max possible needs of current curcuity of 400mA. Thats max capacity though . When I tested accross the positive battery lead going to the board it said I was drawing around 150mA with these ten pins connected and the motors being sent a pwm value of 150 or so.

If it resonable to expect to have to have more than 2 x 8AA 9.6V to provide this amperage? If so thats cool, I just wanna know if I'm getting expected results or if something is out of wack?

Could it be the tiny little wires those battery packs come with?
userHeadPic russel_wood@hotmail.com
2013-01-31 06:20:14 Thank you so much for replying!!!

Yes I power the board with the 9.6V double AA set up and the motors with the 6V setup.

The motors are from the DFRobot 2WD platform specs here...

Yellow motor:

• Motor Model: 130 Motor
• Output Mode: Two-way shaft output
• Gear ratio: 1:120
• No-load speed (3V): 90RPM
• No-load speed (6V): 180RPM
• No load current (3V): 120mA
• No load current (6V): 160mA
• Locked-rotor current (3V): 1.5A
• Locked-rotor current (6V): 2.8A
• Size: Long 55MM W 48.3MM high-23MM
• Weight: About 45g

Yes they share the ground with the board. When I use the sample code from the wiki with no other sensors hooked up I can push pwm to max and have no reset. But when sensors hooked up and motors too, with 2 x 8AA 9.6V banks I can not push pwm past 135 or so with out a shortage of power which manifests itself as a reset.

It's really only when I try to push the pwm speed I get the issue. I know I havn't blown the pins cause they are 40mA only and still working.

I did one time have 9V power hooked up at same time as USB by accident! Would this cause any damage? Also I was was running the two tiny tiny servos included in the Dagu pan and tilt kit once. I know servos have higher demands but I assume its less than 40mA per servo as they ran no problem and pins are still fully functional. These only things I ever did that I'm worried about.

Thank you so much for your help.

I'm thinking about this battery  [url=http://www.robotshop.com/ca/bat-04-7-2v-ni-mh-rechargeable-battery.html]http://www.robotshop.com/ca/bat-04-7-2v-ni-mh-rechargeable-battery.html[/url]  but assume I would still need more than one the way things are looking.

userHeadPic russel_wood@hotmail.com
2013-01-31 01:44:44 Hi Moment,

1.You power the arduino with 9.6V & the motor board with 6V . Did you connect the arduino GND to  the motor board GND? You should connect the two systems with one GND.
2. Can I know which  motors do you use?  Are they from dfrobot?
userHeadPic Phoebe
2013-01-30 13:01:49 I doubled up in parallel to 2 packs of 8 x AA 1.2 ni-mh for double the amps. I can now run pwm to the motors of 175 in the code before the board  resets. Thats 16 AA! If I go to 24 AA I believe I will be able to get the motors up to full pwm potential. Does this seem normal? I have no previous experience. Is it normal to need 3 banks of 8 x AA for a project? Am I simply just not providing enough current to my project?

Also BTW , when I made double bank battery I placed a 750 mA inline fuse.

Thoughts please.
userHeadPic russel_wood@hotmail.com