Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Romania
Asked — Edited

Ez-Robot And Zumo Robot

Hy all,


I am Andrew from Romania , i have a ez-robot platform and a Zumo Robot from Polulu. The Zumo robot came with a H-bridge - DRV8835.

I dont know how to set it up. I know how to connect the motors, but i dont know how to set it up in ez-builder. Excuse my english.
h-bridge from Polulu

AI Support Bot
Related Content
Synthiam
#6  
The phase pins are the same as signal pin in our h bridge tutorial. The enable is the same as enable in the tutorial , you can attach this to a pin with pwm control to adjust speed. To make a robot drive straight the pwm for motor A and motor B may be slightly different. Just adjust accordingly. The VCC pin is the power supply positive to the logic controller and VM is the voltage supply positive. These two can be the same wire. Ground of course is ground to battery on both sides. Lastly is the motor hookups. They are labeled Aout 1 which just means motor A output number 1. 1 is the red pos wire of motor a and Aout2 is black ground wire of motor A. Repeat for Bout1 and Bout2. leave mode empty, that's a special feature pin for stepper motors.
#7  
leave VIN empty as the data sheet does not label or describe its function.
United Kingdom
#8  
Yes that is my understanding too since he gave the link to the technical info.

So, since I have the time to play now, let's give it a go:)


User-inserted image


Nice and easy, it looks like it will work the same as the TB6612FNG Motor Controller

Assuming D15, D16, D17 and D18 can be used.

Signal from D15 to BIN2
Signal from D16 to BIN1
Signal from D17 to AIN2
Signal from D18 to AIN1
Ground from D15 to GND
VCC from D15 to VCC

Battery +ve to VIN
Battery GND to GND
Motor 1 +ve to AOUT1
Motor 1 -ve to AOUT2
Motor 2 +ve to BOUT1
Motor2 -ve to BOUT2

VMM left disconnected
Mode left disconnected

In ARC add a 4-wire H-Bridge
Set the 4 ports to D15, D16, D17 and D18 - you will have to play around with which is which. I assume D18 first down to D15. You can Merge this file I've already set up, just merge the 4 wire h-bridge control panel.

Please post back any feedback you have so I know if it worked or not.
United Kingdom
#9  
@Josh, the VCC and VM shouldn't be the same wire. VMM is an output.

Mode wants to be low, so grounded or disconnected.

VIN is mentioned, 2-11 V motor power supply connection. Operation at low VIN voltages slightly reduces the maximum current output.

VMM is a power supply to other components with reverse voltage protection. It's not needed in this case.

I have edited my post to suit:)


Actually I've started to doubt myself on this one... Will have another look over it in a second.
#10  
The way I see it is if you don't have voltage to VMM its not going to do anything.
United Kingdom
#11  

User-inserted image


VMM has nothing connected.

The datasheet states;

Quote:

VMM This pin gives access to the motor power supply after the reverse-voltage protection MOSFET (see the board schematic below). It can be used to supply reverse-protected power to other components in the system. It is generally intended as an output, but it can also be used to supply board power.


Which is why I said it is an output.

The motor gets it's power through VIN
The logic gets it's power through VCC


User-inserted image

This truth table shows how to supply the board with the GPIO/Digital highs and lows for operation.

So basically, if set up as my earlier post, with D15 & D16 both high it will brake on motor b. If D15 is high it will move motor B forwards and if D16 is high it will move in reverse.
#12  
Hy all,

Thanks for all the reply , i was amaze when i saw all the activity on this thread!

First of all thanks Rich, now i can move the zumo robot with my ez-b. I have connected the ez-b to the zumo as following:

D15 -> BIN2
D16 -> BIN1
D17 -> AIN2
D18 -> AIN1

Ground from D15 to GND
VCC from D15 to VCC

Now in the ARC i have chose a 4 wire HBridge Movement Panel and make the following settings :
Left Trigger A -> D17
Left Trigger B -> D16
Right Trigger A -> D18
Right Trigger B -> D15

Now i have forward , left and right , but no reverse , i still need to play with the pin arrangement.


Thanks all for the fast reply !

This is the robot:)
#13  
Wow that little guy is fast! Are you going to sumo robot wrestle? Sorry Rich heck I guess I missed that in the PDF I read. But I'm glad you was able to figure it out quick.
#14  
Hy jstarne1,

The motors on the zumo robot are 1:100 , they have speed but don`t have power. It is just fast:) .

I will try to find out how to revers the little guy!

Thanks again all for all the help !
United Kingdom
#15  
Reverse *should* be high on both AIN2 and BIN2, however if you have forward, left & right working it makes me wonder if there's something strange that needs to happen too.

When turning left & right does one wheel reverse and one go forward or does one only go forward? Reverse may need PWM on AIN1 and BIN1 or something...

P.S. That's one quick little dude:)
#16  
So when i pres the FW - both of the motors are spinning in the same direction , for left - only the left motors spins , for the right - only the right motors spins. They are not turning in different directions when turning left or right.

I saw the options on the H-bridge for the PWM signal but don`t know how to set it up in the EZ-B?


Thanks all!
United Kingdom
#17  
Looks like you need a custom movement panel, I'm on my phone right now bit when I get to a pc ill throw some instructions your way.
United Kingdom
#18  
Right then, on a computer so it'll make it easier:)

The best thing is to start a new project file for this, you can always merge it with your main project once you have sorted out the code needed.

Assuming you kept the set up of
D15 -> BIN2
D16 -> BIN1
D17 -> AIN2
D18 -> AIN1

In a blank project add the Custom Movement Panel (Control - Scripting)

For Forward use the code

Code:

Set(D15, Off)
Set(D16, On)
Set(D17, Off)
Set(D18, On)


For Reverse

Code:

Set(D15, On)
PWM(D16,90)
Set(D17, On)
PWM(D18,90)


For Stop

Code:

Set(D15, Off)
Set(D16, Off)
Set(D17, Off)
Set(D18, Off)


Try that first, if it works for reverse then I'll do left & right so they spin one side one way and the other side the other. If you are happy with how it is then you can use

Left

Code:

Set(D15, Off)
Set(D16, On)
Set(D17, Off)
Set(D18, Off)


and Right

Code:

Set(D15, Off)
Set(D16, Off)
Set(D17, Off)
Set(D18, On)


Left & right might need adjusting depending on connections.

Let me know what happens.
United Kingdom
#19  
Just looking over the truthtable again,

For forward of one motor you should have
In1 High
In2 Low

For reverse it should be
In1 Low
In2 High

Which is how the H-Bridge Movement Panel works as far as I'm aware...

If the above doesn't work for reverse, try

Code:

Set(D15, On)
Set(D16, Off)
Set(D17, On)
Set(D18, Off)


Otherwise, you could add 2 Digital (Set Digital) controls, one for AIN1 and one for AIN2, see what happens with both off, one on one off, the other on the other off, and both on.
#20  
Thanks Rich , i will try running the script when i arrive home. Thanks for all the support now i finally understand how the ez-b works.
#21  
Hy again,


On the custom Movement Panel i am not able to set multiple parameters like you said.
For example for FW: i can only set one pin D17, on.

How can i set multiple comands on one comand?

Thanks !
United Kingdom
#22  
There's an icon, looks like a pencil, on the right of the command line field, click on it and it opens the script editor.
#23  
i don`t have a pencil , here is a print screen with what i have :

User-inserted image
United Kingdom
#24  
What version of ARC have you got? I thought it was always there but there may have been a version where it wasn't.

Download the latest version (today's version) and it should have the pencil... although I know it is in the previous version too.

User-inserted image


If not, then add a script, throw in the commands as mentioned and in the command box for the Movement Panel use ControlCommand("Script", ScriptStart) where "script" is replaced for the script name.
#25  
Finally it`s working.

I have the following settings:

On a custom Movement Panel :

For stop :
Set(D18, Off)
Set(D16, Off)
Set(D17, Off)
Set(D15, Off)
PWM(D16,0)
PWM(D18,0)
PWM(D15,0)
PWM(D17,0)

For Fw:
Set(D18, On)
Set(D16, Off)
Set(D17, On)
Set(D15, Off)

For right :
Set(D15, On)
PWM(D16,-50)
Set(D17, On)
PWM(D18,50)

For left:
PWM(D15, -50)
Set(D16, on)
PWM(D17, 50)
Set(D18 , on)

For reverse:
Set(D15, On)
PWM(D16,90)
Set(D17, On)
PWM(D18,90)

Thanks again Rich ! you are the man !

Now is time to add some sensors !

Thanks all!