Asked — Edited

Second Hbridge

Can I hook up 2 of the 2.5 Amp L298N Motor Driver H bridges to the the EZ-B? I see in the manual that you can only have one controller per project but I've read others say they are placing several H bridges in their robots. I plan to have at least 4 DC motors in my robot. If so how is it wired up? According to DJ's video there only seems to be room for one set of signal wires on the EZ-B.

Thanks, Dave Schulpius


ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

#1  

OK, Ignore this post. I got a bit confused. I took a second look and realize now that one H Bridge is attached to 4 different Digital ports. One signal wire to each port. Then there is a 5vdc & Ground going to the H Bridge. As long as I don't run out of ports I can line up the H Bridges.

Dave

#3  

I'm facing a problem I've been dealing with for days and it is clear now that this is because I'm reaching the limits of my understanding of HBridges... which is not very high in the first place:D

My hbridge has its left side starting up slower than the right side, resulting in a left turn each time the robot stops and starts again.

I'm using two hbridges connected to the same EZBV4 and each of those bridges is connected to a set of two motors (because these 12V tetrix high torque motors take too many amps to be all four on the same bridge).

Could this be related ? It seems though that it is not because I tried disconnecting one bridge and working on one only and no change.

I tried different ports. Different boards too.

If anyone has an idea on where to look. I measured the current comming out of the bridges to the motors and it clearly appears that the current takes more time on one side to reach its peak than on the other side, so it is not motors related.

Hridges are both connected to D ports 19, 20, 21, 22.

thanks in advance for your help.

PRO
Synthiam
#4  

How are you measuring the voltage between the two to see that one is coming on before the other?

Can you physically see the first motor starting to turn before the second motor?

I cannot imagine a scenario where that would happen, unless the hbridge was behaving strangely due to extreme thermal conditions (i.e. too hot), but don't quote me on that because i don't know how the controller would behave under extreme thermal conditions.

Are you certain that one channel of the hbridge is not just merely PWM slower? Or, that your motors are displaying attributes of the physical world? In that not all motors spin the same speed at the same voltage due to the fact that they're not the same physical device sharing the same point in space/time?:) meaning, no motors spin the same speed without a sensor encoder and pwm modifier. Which is why you see the Kangaroo mentioned so often on this forum.

#5  

Hi DJ

The motors are of same model. But no encoder.

I do physically see one starting slower than the other.

No thermal issue from what I can see, heat sink is ok, barely warm.

pwm are identical on left and right but I tested with no pwm at all and same issue was going on.

I measure the current on both left and right outputs of the Hbridge.

left : 1,xx V then 2. xx volts then goes to pwm set max voltage.

Right : immediately 2 V and very fast goes to max voltage.

And this on both sides and even if I'm changing ports and even with different motors. I think I tried everything!:) I don't know how the 2 hbridges could have the same issue. I have a spare, but identical so if this is a manufacture problem it might not make a difference, although it used to work fine with the same bridge.

It used to work. I don't know what's going on. I have one spare new hbridge so I will hook it up to see if it changes anything.

I can't run any one of my scripts now, especially the docking ones, which are orientation sensitive, even using scripting in custom motor movement (adding delays, and playing with pwm).

Thank anyway for your answer.

ELfège.

PRO
Synthiam
#6  

That's such a strange thing - I have no idea how something like that can occur. So it's noticeable to the human eye? How much of a delay are you seeing?

Is the delay in seconds or milliseconds?

PRO
USA
#7  

Elfege,

H-bridge model ?

#8  

I think Im gonna use encoders. I just thing know how I am supposed to use them. I guess it's a digital read value, right? In pretty sure there's already a Tuto for this I'll look it up.

I managed to lower the delay to a minimum by changing all the wires. Some wires must have had issues with time and 12-16v loads at 2 amps...

But even with brand new wires I always had a slight delay, like 20ms, which is enough to be a problem for some Operations. So... Encoders will be the next step.

Thank you all.

PRO
Synthiam
#9  

You don't need to query the digital ports at all for the encoders. From what i understand, the sabertooth combined with a kangaroo will do it for you.

If not, we can whip up simple code for an arduino to be an encoder count for you. So all you would have to do is have the ez-b send a command to the arduino that says something like "Forward Left 10 degrees" or "Forward Right 10 degrees" or "Forward"

probably best to go with the sabertooth/kangaroo since there are quite a few users on here and a few tutorials. Press the ? question mark next to the X on the sabertooth hbridge for the tutorials.

#10  

All things being equal I'd say you have a funky motor. If they once worked properly then something must have happened to one of them. Probably got overloaded or hot. Might be something simple as mechanical failure. Were they both new when you got them? If they are used then one could have more miles on it then the other. Motors do wear out.

I'd move forward one of Three ways; *Get two new matched motors. *Buy a Kangaroo for your Sabertooth and place encoders on your wheels or motor shaft. *Both of the above

If you buy a Kangaroo and you have a screwy motor, you will still have a problem.

Personally I'd buy two new motors with the encoders already mounted on them and add a Kangaroo to the Sabertooth. Not only will you have a precise and smooth buggy but you'll also now have speed ramping. No more whiplash for Barbie and Ken.

These are just my ideas and how I'd move forward If I faced this issue. However in the past I've been accused of needing to learn how to buy hardware more wisely and not gold plate everything. So If you are looking to go the route of least expense then perhaps others have better advice. LOL ;)

PRO
Synthiam
#11  

What HBridge control are you using btw?

Is it the PWM HBridge or the regular HBridge?

#12  

I'm using 2 L298N Dual H Bridge DC Stepper For Arduino

I fixed the issue. It was really a wiring problem, very stupid... it happens to me a lot : I ask for help and in the mean time I find the solution to a pb I was struggling with for days!:D

I'm still going to opt for new motors with built in encoders.

@Dave Schulpius thanks for your response. Motors are brand new, like couple weeks old and stricly identical. I actually have two different sets : one set of 500 rpm geared but lower torque (not enough for my robot, too heavy) and one set of 300rpm tetrix geared motors high torque. Pretty good motors as a matter of fact.

now that it works I also hooked these motor controllers to 2 EZBs using diodes to avoid floating the ports. It seems to work pretty well and allows for redundancy backup in case I lose control of a board while using the robot remotely. I have redundancies for pretty much everything but I had not set one for the motors (although I did it on my older project using Wowwee's rovio frame, gears and wifi interface).

Any advice is welcome to know how to hook up motors with encoders. Do I simply have to read the signal coming from the encoders and so hook the digital wire to any digital port? No idea, never used encoders so far.

Thank you, Elfège.

#13  

Ezb does not support encoders. You need to either run the encoders through an Arduino hooked to the ezb and write code for both or use a kangaroo x2 attached to the Sabertooth. If you go the last route you attach to one of ezb's Uart ports and send Simple Serial commands to move your wheels. You can also set up the kangaroo in RC mode and operate it like that. In fact there are several ways to command the Sabertooth movement through the kangaroo x2.

PRO
Synthiam
#14  

Yeah, the ezb is hub. It's not that it doesn't support encoders. It's that it is a hub for devices. You will need to connect a low cost mcu to the ezb, as I mentioned in an earlier post, to manage the hbridge and encoder. It's real easy.

If you go the encoder direction - you have an option of using a kangaroo or a diy with arduino. Either way, they are devices which connect to the ezb.

#15  

...Or you can use a Roboclaw motor controller as it has built in encoder support. No need for something external like the Kangaroo... As a bonus it functions much like a sabretooth (same serial commands)....

PRO
Synthiam
#16  

Oh? Never heard of it. Tell me more

#17  

@DJ... This is the 7A per channel version, but they do have other higher rated controllers... Basically it is a sabretooth copy (so to speak) and I am almost sure the sabretooth control in ARC will drive it... There is a manual for it somewhere I am sure... Have a look and see what you think... RoboClaw motor controller

#18  

@kamaroman68 I think uses a 25 amp roboclaw and it does work with the Sabertooth controller and/or send serial commands.

Alan

(edited)

#19  

great! So impatient to struggle even more! LOL. But I really need to gain more precision for my robot.

roboclaw looks like the easiest way. The tutorial for sabertooth and kangaroo seems to be only for use of a motor as a servo, which is not what I need, unless that includes continuous servos mode.

The cheapest way is arduino, especially that I already have everything at home. I only don't know where to start for everything I found online so far seems to indicate that it's one arduino per motor, am I right? It seems I can't use only one same arduino for two motors, or more. So should I use 2 arduinos each one hooked to a h bridge and then send serial signal to ezb from 2 different sources?

Elfège.

#20  

@Dj

you said earlier "we can whip up simple code for you". Did you mean to add this feature in an upcoming update ? That'd be great. Not that I would not write (or copy paste most of it anyway) the code myself, but that would be really awesome if it were directly integrated with EZB. Well I'd still have to upload the code into the arduino board... so, yep, I'm not sure what you meant. Not sure to even get the word "whip up"... haha.

Thanks anyway.

#21  

Hey Alan, yup roboclaw, actually 3 of them. Custom Movement Panel for the track drives, and the rest all scripted with simple serial commands. They have a lot of features, lots of fault protection. Haven't had any issues with any of them and firmware is easy to update. However I don't use encoders at this point but possibly in the future.

#22  

ok don't know what happened it seems I didn't send my last post. So, in few words, I managed to make this work with arduino and hridge. However now I'm looking to find some instructions on how to make this communicate over serial to EZB. Do I just connect arduino's rx and tx to EZB's and then I will be able to read whatever string / value is in the serial buffer?

#23  

I also need to have the arduino to receive commands or can I just connect signal wires from EZB to hbridge? Excuse me... I'm thinking out loud actually, it's not like I can ask my wife to listen to me about this...:D

I think it's pretty simple, I disconnect the signal wires which go from arduino to IN1,IN2, 3, 4 on the hbridge and put the EZB's instead. I only need the arduino to read the signal from sensors V out.

oh, there was that question in my last post that I didn't send : I'm using only sensor A Vout, what is the white wire for (sensor B Vout) ? does anyone know that?