Asked
— Edited
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
Dave
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.
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?
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!
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.
Is the delay in seconds or milliseconds?
H-bridge model ?
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.
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.
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
Is it the PWM HBridge or the regular HBridge?
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!
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.
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.
RoboClaw motor controller
Alan
(edited)
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.
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.
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?