United Kingdom
Asked — Edited

Using Two 2.5 Amp L298 Motor Controllers With One Ez-B.

Hi everyone.

I posted a question in regards to reducing the speed of my two 12v motors on the forum last week and I have been pointed in the direction of using motor controllers, and after a response I got from Rich, I found out that it is possible to use two controllers through one EZ-B, so I have ordered two 2.5 amp motor controllers from EZ Robots.

The reason why I need to use two is because the drivetrain for my robot build runs off a 12v battery and has two 12v drive motors that draw about 0.50 amps while running, but can hit about 1.4 amps peak for a split second, so using both channels on the 2.5 amp motor controller with a max peak limit of 3 amps per channel, that takes care of the drive motors.

The drive train also has one 12v steering motor that runs at 0.24 amps with a peak of about 1.3 to 1.4 amps, so apart from needing a third channel I wanted to leave a safety margin, that's why I will require a second motor controller (only using one channel) connected to the EZ-B v4, which I wasn't sure could be done. But as I mentioned above, Rich told me that although it is not done often, it can be done but the second controller would require scripting. So what I would like to ask is...

1.) Has anybody else done this with a similar set up to my example?

2.) Are there any examples of this in action? e.g, controlled via on screen sliders ect.

3.) I'm assuming that I will have to run 2 pairs of power leads from my 12v battery and connect to each L298. Is this correct?

4.) How would to L298's be wired up to a single EZ-B with speed control? I know Rich has a tutorial but I would also like to hear from other members who have done this. synthiam.com/Community/Questions/4096

5.) And finally, and this is the main point I am unclear of, one L298 can be controlled through the EZ-B via on screen sliders, smartphone or Wii remote accelerometer movement, voice control ect ect. But I have read that the EZ software will only have these controls for one L298, so how will I be able to control the second L298 for the steering, say for example if I wanted to use it in a "radio controlled" scenario, with both the drive motor control slider and the steering motor slider on one computer/touch screen?

I am waiting for my first batch of EZ goodies to arrive sometime this month, so I am new to all this and only going by what I have read and seen online so far, so any help and/or advice any of you kind people can offer would be gratefully received. There is not that much mentioned about using 2 controllers with one EZ-B on the forum so hopefully any answers or advice given will go towards helping others too. Rich has already offered me help in regards to scripting a second controller which I surly will take him up on, but it this "how will my finished robot physically be controlled Via an iPhone of tablet PC once its scripted" thing I'm scratching my head over.

Thanks everyone.

Steve ;)


ARC Pro

Upgrade to ARC Pro

Your robot can be more than a simple automated machine with the power of ARC Pro!

United Kingdom
#17  

You have 8 pins, 4 are covered by jumpers (EnA and EnB to +5v). Remove the jumpers and connect a PWM to EnA and another to EnB if required or leave the jumpers on if you don't need speed control.

As for steering, how is the steering done?

United Kingdom
#18  

The steering in using one channel from one of the H-bridges. If I use the Hbridge PWM movement control, the 2 sliders move the steering on one H-bridge, while the arrows control the 2 drive motors on the second H-bridge.

Then I went to try the 2 H-bridge example and forward, back, left, right all work. But when steering goes left it goes fully left, and same for right, but can't find a way to center the steering.

I just had a bit of a scare when writing the last post. When the steering was fully locked right, there was no noise so I assumed that it had stopped turning. Then all of a sudden thee was an electrical scream and smoke. I killed the power and the steering H-bridge was REALLY hot. It cooled down and it is all still working. Phew. eyeroll

#19  

Is that your bot on the pervious page? Two drive wheels and a single front steering wheel? If so, a servo would have been a better choice for steering due to it's 180 deg positioning ability....

Or you could remove the motor and H-bridge from the front steering mechanism and just use the front wheel as a castor (swivel back and forth freely). Then use tank type differential steering for the drive wheels...

United Kingdom
#20  

It sounds like a little bit of being unaware of what a H-Bridge does and what are the best ways to do everything.

I agree with @Richard, a servo would be the better option for the front wheel. A servo will have position feedback where a H-Bridge (without extra parts) doesn't.

The H-Bridge would have been telling that motor to turn in one direction, no mention of how long for and no feedback to tell it to stop therefore it would, or could, have been spinning it clockwise or anti-clockwise (counter clockwise for the Americans) until told otherwise.

Changing it to a servo would mean you can have position 90 as centre and forwards. Position 30, 45, somewhere around there (trial and error to find what works best) for turning one direction, 125, 140, again trial and error, for the other direction.

Or, and this is dependent on the servo used and experimental... Strip the guts out of a servo, use the servo board to power the turning motor. Use the feedback pot to let the servo board know the position of the wheel... basically rebuilding the servo outside of it's casing. I did similar in Melvin's eyes (however have no photos of that unfortunately).

But personally I would change it for a normal servo. One port, comes with position feedback too, no messing around. Just would require a simple script for the movement panel

United Kingdom
#21  

Hi Richard. Yes that is the chassis of my bot. The reason it has a motor for the steering is because the bot has a secondary R/C system when I can't use WiFi. I agree with you about the servo idea but when the bot is finished it will weigh a heck of a lot, too much for a servo to steer.

The other point you make about diff steering again is a valid one, but due to the design of my bot (based on Doctor Who's K-9) and available space I have in my humble abode, I wanted more of a "point and shoot" design to limit any head or tail over swing. (hope that made sense).

I know there is a way to limit the turning circle but I havnt figured it out yet.

United Kingdom
#22  

Throw in limit switches and feedback pots if that's the case.

Dave had some on his B9, I think the details are in his B9 showcase post but if not just search for limit switches and feedback pots and they should pop up.

United Kingdom
#23  

Thanks for the advice Rich and to Richard too.

Ive bit the bullet and spent the last couple of hours doing a bit of redesigning on the chassis making it in to a front wheeled, differential steering drivetrain and now only using one L298 and a coaster wheel Richard mentioned. Not the way I wanted to go, but on the plus side it has given me a little more room to work with losing the steering section and relocating the drive battery.

In regards to the H-bridge, it was more of I was misinformed rather than I misunderstood. I am aware what a H-bridge does and what it's function is, its just that it was hinted to me that I could do what I wanted to with 2 H-bridges with ARC but that's obviously not the case, although I don't see why not. Motors through H-bridge, H-bridge to EZ-B, and say to EZ-B with an editable slider control or peace of script "This is center. I only want you to turn this far," or "40 degrees left and right from center maximum" just like a servo does. The EZ-B seems to have the ability to do so, so perhaps it could be something for a future update.

Anyway, I read what you said Rich, about the jumpers on the L298. I didn't realise they were removable jumpers as I haven't seen it mentioned anyware, and thought it was a board redesign I was unaware of blush . So hooking up 2 more wires to the EnA & EnB to 2 more signal pins on the EZ-B will give me vairable speed control? Quick question, what ARC control do I use for this? I don't think I've come across it yet. Only arrow controls with one speed.

Cheers, Steve.

#24  

There is no way to update ARC or the ezb4 in order to read position of an H-bridge controlled motor... It's the motor's and controller's job to relay this position back to ARC. With an H-bridge and a dc motor this is impossible because there is nothing to measure position with... The motor has no idea where it is rotation wise... A servo measures it's position with it's built in potentiometer... You might be able to do it using a Sabertooth motor controller and a Kangaroo board, however...