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
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.
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
What HBridge control are you using btw?
Is it the PWM HBridge or the regular HBridge?
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!
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.
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.
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.
...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)....
Oh? Never heard of it. Tell me more