Asked — Edited

2 H-Bridges?

Hello all,

I am trying to connect 2 H-bridges to my EZ-B. I followed the online tutorial and successfully connected 1. However, when attempting to connect the 2nd one I ran into some trouble.

The second H-bridge would only move one servo, in the up, down, and "stop" positions ... odd. The other servo showed no movement

I want 1 bridge to control forward and backward movement, b/c these two servos will be dedicated to only F and R

The other bridge is to control left and right movement.

Please advise me,

Thank you


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#1  

Cant do that with the movement panel. You will need scripting..... what drive system a are you trying to make? Maybe there is a better or less complicated way.

#2  

Wait... is this a balance bot with x and y axis?

PRO
Synthiam
#4  

Create EZ-Scripts for both HBridges :)

You can control the output of the EZ-B to set the HBridge directions. Also, there is a Custom Movement Panel which allows scripts. You can use the SET() function to enable/disable outputs :)

#5  

D I connect them as described in your video? What about the second one?

PRO
Synthiam
#7  

Connect both HBRidges like you see in the video :)

only one can be controlled by the HBridge movement panel. The other you will need to make a simple script for.

My suggestion is to get one HBridge working first. Read about how it works, then when I say "Make a script for the second hbridge" will make more sense to you:) . And i'd be able to provide a quick script to show you how

#8  

Ok, great. In have the first one working. I hooked it up like in the video.. And I have the wimote controlling it.

PRO
Synthiam
#9  

Awesome :)

Now do the second like you did the first. And tell me what ports you connect it too.

#10  

CRich glad to see you have the first bridge running! Any pics of your build yet? I like this project you don't see that many fun balance bots. Controlling this little guy with the wii is going to be entertaining! - Josh S

#11  

Nothing pic worthy yet ... I will take a few once all "this" is done

#12  

Dj,

I'm using :

D0 D1 D2 D3

And

D9 ....will that work?

#13  

Hey DJ, have you had a chance to do that yet?

#14  

I'm interested in using 2 H bridges too.

I've got a Sabertooth as my main H-bridge, which works, but I need to be able to start / stop/ reverse another motor in the robot for a given duration (to be specific, I'm controlling a semi-automatic car antenna).

Using relays seems to be an option, but it seems like it'd be easier with an H bridge.

Can someone explain how to write a script to do this? or post an example?

Many thanks,

Frank

#17  

Awesome, gonna get on this tonight! Thanks DJ!

#18  

DJ: I read over your script and see what you have done, but I have a question along the same lines, except I want to control two small motors in the wrists on my robots arms to rotate the hands. But instead of using the arrow keys, how do I go about using the voice command to do it. I know how to do it using servos, but I can not get servos small enough for this porpose , so I have to use Small gear motors which requires a 2nd H-Bridge.

I already have the Sabretooth Clone H-Bridge controlling the drive wheels. I need the second one to control the motors in the wrists.

Dan S.

#19  

Its been awhile since I enquired about using 2 H bridges. Has anything changed since then to make it easier to program, or is the scripting DJ talked about still needed?

Thanks,

Frank

#21  

You can just use a second sabertooth or Syren (if you only need to drive one motor)... Sabertooth/Syrens are dead easy to use and only require one port to operate...

United Kingdom
#22  

It's pretty simple to script a H-Bridge to move one motor forward and reverse.

Just hook up the one side as normal (Signal to In1 and In2)

Then have 3 scripts, one for forwards, one for reverse and one for stop.

Assumed In1 on D8 and In2 on D9 with the jumper providing 5v to EnA


# Forward
Set(D8, Off)
Set(D9, On)


# Reverse
Set(D8, On)
Set(D9, Off)


# Stop
Set(D8, Off)
Set(D9, Off)

Then ControlCommand to set the script going for movement or stopping.

Or, you could use 2 TIP transistor circuits, one for each direction, however the setup is likely to me more complex than a simple L298n H-Bridge set up described above.

#24  

Thanks. Ah, but it's not so simple for the feeble minded folks like myself :). I should have studied harder in high school!

I already have a Sabertooth for my wheels-- if I get another one for the other part of my robot, can I simply add a 2nd sabertooth control in the software? I have a 2x12 Sabertooth for the wheels but I'm guessing the other motor (a car antenna) could get by with a weaker version of the Sabertooth.

The other option I'm considering is using 2 relays to move the antenna motor back and forth. I don't need speed control and I think I have a 4 channel relay lying around somewhere. More simplistic control over how far the antenna extends, however would be desirable-- would an H bridge make that any easier for me?

Thanks again,

Frank

#25  

Nope... only one Movement Panel per project.... You'll still need to script the second controller whether it be a sablertooth or a standard H - bridge...

#26  

Just throwing this out there as another option, and it really depends on how interdependent the functions are, but if you really think you need two movement panels for some reason, you can run multiple instances of ARC on the same computer, each with its own Movement Panel (of course, you'll also need multiple EZ-B's unless one of the instances is driving a compatible 3rd party robot like a Roomba).

Scripting probably meets 99% of the needs though.

Alan

#27  

I have been following this thread and I also have a question...

How many serial devices can I use with the EZ-B? For example how many Sabertooth drives could it handle?

Rex

#28  

Quote:

I have been following this thread and I also have a question...

How many serial devices can I use with the EZ-B? For example how many Sabertooth drives could it handle?

Every digital port can send serial, so lots... If you need to receive serial, than D0 plus the other two UARTS.

Alan

#29  

@rgordon... For sending and receiving there are 3 UART ports... For just sending, I believe you can do that on all 24 digital ports.... so 24 sabertooths if you don't need feedback...

Edit Rich is correct 25 ports for sending....

United Kingdom
#30  

25 on the V4 if it is send only. 3 are bi-directional (however 2 of those take up 2 ports). 20 on the V3 however it is send only on all ports.

Looks like three of us posted at around the same time :)

#31  

@Alan... Can D0 send and receive? I thought UART port 0 was a dedicated 4 pin port, UART #1 is D5,D6 and UART #2 was D18,D19...

United Kingdom
#32  

No D0 can't, it's UART0 (the dedicated port), UART1 (D5/D6) and UART2 (D18/D19) which are bidirectional.

Throw in a PIC or Arduino and you can use the I2C port for serial communication too, which would increase the number to a lot :)

#33  

Yeah, you guys are right. I was going from memory, and had D0 stuck in my head from something that made it unique on the V3 (a particular H-bridge that EZ used to sell that only worked from D0 that I was thinking about a use for this morning since I have one in a box....).

Alan