Controlling two motors with one gemma

This is a special forum devoted to educators using Adafruit and Arduino products for teaching.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
pmidthun
 
Posts: 10
Joined: Fri Jul 24, 2015 10:23 am

Controlling two motors with one gemma

Post by pmidthun »

I posted on December 8 about an H-bridge for motor control. I have since ordered the recommended part DRV8835 from pololu and hooked it up to the gemma (see attached diagram and code) but it does not work. Help? I am assuming something is incompatible with something, but I have no idea what. Again the motors come in kits designed for 1.5 volts, but I've been running them at 3 no problem.

I double checked all the connections. I did notice the battery pack getting warm...the H-bridge was not.

As dictated by the specs (https://www.pololu.com/product/2512), pins 0 and 1 of the gemma are wired to pins 8 and 10 of the H-bridge.
Attachments
Arduino program for two motors.png
Arduino program for two motors.png (83.38 KiB) Viewed 381 times
Fritzing diagram for 2 motors.png
Fritzing diagram for 2 motors.png (142.97 KiB) Viewed 381 times

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: Controlling two motors with one gemma

Post by adafruit_support_bill »

Pololu should be able to help you with the wiring for this. I believe that you need to provide power for the logic as well as for the motors.

User avatar
Franklin97355
 
Posts: 23912
Joined: Mon Apr 21, 2008 2:33 pm

Re: Controlling two motors with one gemma

Post by Franklin97355 »

You need power to the Gemma and at least a ground between the Gemma and the controller board.

User avatar
pmidthun
 
Posts: 10
Joined: Fri Jul 24, 2015 10:23 am

Re: Controlling two motors with one gemma

Post by pmidthun »

Thanks, that sent me down the right path. Turns out I didn't realize the H-bridge component still needs to be powered separately from the motors' power source coming in to it. Once I had power and ground for both the motors and the H-bridge component wired to the component it worked as intended. Makes sense in retrospect, but somehow didn't compute at the time.

Locked
Please be positive and constructive with your questions and comments.

Return to “For Educators”