, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here
My K-9 2.0 build is just about complete but I've come up against an unexpected issue. After running a couple of drive and script tests to reduce the overall top speed on my controller last week, I had to stop as the drive motors were losing power due to a dud battery. So I ordered a new one and it came today so back to testing. Well, not quite. What I thought to be a dud battery causing loss of power was not the cause as the new, fully charged battery does exactly the same thing. So here are a few details.
Two 12v motors powered by a 12v lead acid battery, now a new 11.1v LiPo.
Motors are the same used in kiddies ride in cars, and got plenty of horsepower left over after robots total weight.
Running through an L298 H-bridge, connected to an EZ-B4 (EZ-B running off its own 7.4 supply).
Using H-bridge with PWM control on EZ-Builder.
H-bridge Speed control connected to EZ-B4 via a 2 to 1 (Y) cable
Wheels go back and forward while HD servo does the steering.
During tests, going forwards and reverse at full speed everything is fine, even doing a few turns. But when I start to use variable speed using a joystick, after a few seconds the bot quickly, but gradually loses power until it comes to a complete stop. I wait 5 seconds and power is back for a couple of seconds then loses power again. But If wait 15 or 20 seconds, and at full speed, everything is fine until I drop the variable speed again and it happens all over again.
I jacked it off the ground and tried it and it never loses power. So, things I'm pretty certain about. I'm sure it's not the overall weight of the bot causing to much traction, as I mentioned before, the motors are made to power a child's ride on car. The bot doesn't weigh that much more than a kids car itself, without a child, so there's more than enough power. Besides, going in straight lines first off the bot goes very quickly (too quick in fact) for a long time.
I'm now positive it's not the battery, as it does the same thing with a brand new fully charged one.
So from what I can make out, it has to be the H-bridge doing something. Is this the case or am I missing something else? It is wired up correctly and connections are good. Has anybody else come across this in the past or can any of you lovely people advise me to what could be causing the temporary drop in power?
As always any help any of you guys can offer would really be appreciated, as this above all else is really bugging me.
I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.
Also, consider reviewing the Learn section for informative lessons and activities.
Check it out!
Hi steve, based on what you said and the description of the motors , I believe your issue is overheating the motor controller. The l298n is meant for 2 amps current. A child's ride on toy motor will probably draw more that that. The ride on toy market uses 400 and 500 series DC brushed motors. I would replace your H bridge with a 10 amp per channel or higher H bridge / Electronic Speed Controller.
I have for example on my project a 45 amp reversible ESC. That's 22.5 amps current available for each motor on my power wheels project. A Sabertooth 2 x 12 is a great programmable controller, but I believe it's about 80 dollars. Ebay may be helpful to find one cheaper.
I agree with Josh... The l298n can't supply enough current for those motors.. I am afraid you might need a better motor controller... Sabertooth 2 x 12 will work awesome and it is even easier to use than the standard H-bridge...
Thanks for your reply. That's what I kinda suspected. So I take it (and correct me if I'm wrong here) that the slower the motors go using PWM, the more amps increase? I wanted to use a multimeter to check but it's a bit difficult to do when K-9 is in motion (or trying to be). I did test these motors at full speed a while ago before installation, and we're pulling about 1.2 amps so I thought I would be ok. Guess not.
Thanks for confirming buddy. It's always nice to have a bit of clarification. One thing, in what way are sabertooth's easier to use than a H-bridge? Ive never used one.
@ Steve , Sabertooth caters to the needs of a hobbiest. In the picture you see they already have Futuba style connectors in place to plug a wireless receiver or your ezb directly to. In RC mode the H bridge power the motors directly proportional to the input signal like a rc car. This is the easiest method. However if you want a challenge you can get the alternate version that uses a serial connection to drive the motors and with that there is a high level of customizing available. You can have ramped starts. These are "soft" transitions from each speed or from/ to a dead stop. It's like gently pressing your cars brake for a smooth stop verses completely slamming it to the floor every time power is cut. You can change the curve of acceleration as well. I know these things sound cool.... and they are. There is going to be a lot more work to get the robot to move.
You only need on EZB4 digital port and only 2 wires... you use simple serial commands to drive it... example...
sendserial(D0,38400,127) #forward full power m1
sendserial(D0,38400,255) #forward full power m2
If you do buy one don't buy the RC version (the one Josh has pictured) buy the mircrocontroller version....
Here's the link to it so you can read up on itSabertooth 2x12
Yup, that does sound easier. But it's a bit out of my price range for the time being, what with Xmas coming up and all. I did find this however. The price is right. Would this do the trick? Straight swap with my current H-bridge. The only thing is I can't see "en1" and "en2" pins on this so not sure how I would get speed control.
Slightly different control method required for that one.
PWM1 and PWM2 are speed for each channel.
Dir1 and Dir2 are direction for each channel (high is one direction, low the other).
So, forwards channel 1 would need PWM1 to be set to a speed, say 100% and DIR1 to be set to high (or 1). It'll then work.
There are posts which cover the control fully however it's not too difficult to figure out and when I have more time I'll gladly relist all control logic.