Asked — Edited

Ez-B And Hbridge Are Fighting Me

Hey.

Following rich's hbridge tutorial, which is the following wiring:

Quote:

Vcc = Motor Supply Positive Gnd = Motor Supply Ground (ensure this is common if using more than one supply) +5V = Not Connected

In1 = Digital Port Signal (i.e. D8) In2 = Digital Port Signal (i.e. D9) In3 = Digital Port Signal (i.e. D10) In4 = Digital Port Signal (i.e. D11) EnA = Digital Port Signal (i.e. D12)* EnB = Digital Port Signal (i.e. D13)*

I wired up my ez-b(V4) and now have triple checked my wiring so I do in fact have this exact wiring. Proof that my ARC control is correct:

User-inserted image

Now, when I press any button on my control, the hbridge does nothing. No lights(except the one indicating 5V), no motor movement, no nothing. When I mess up the control ports, I can get something to move.

With the current wiring, D10 when PWM'd will move the left track forward. D11 PWM'd causes the left track to go backwards. No other ports cause an action.

Any help is appreciated.


ARC Pro

Upgrade to ARC Pro

Subscribe to ARC Pro, and your robot will become a canvas for your imagination, limited only by your creativity.

#25  

PWM causes the setup to fail! Made a video to show it.

PRO
Canada
#26  

Hi @TechnoPro,

I noticed that you didn't test with the PWM sliders actually ON. By default the PWM sliders are at 0% PWM (OFF) so this won't allow your motors to move. Try bringing them both up over 30% and try again.

You could also try using the H-Bridge Movement Panel with PWM to have everything in one place. It makes things a little cleaner. Just make sure that if you don't use an "init" script, like in the Roli example, that you move the sliders a bit before use to initialize the PWM lines.

#27  

Worked! In the pwm 4wire hbridge control, the pwm sliders have to be moved around before it will actually work.

Thanks for the help guys!

United Kingdom
#28  

You must be setting something up incorrectly, if PWM didn't work on the EnA and EnB then neither would the +5V work. Also, with PWM at 100% it should be full on and practically the same as with the jumpers attached.

Double check continuity of the jumper wires connected to the EnA and EnB pins. Double check they are attached to EnA and EnB not +5 Double check you have set a PWM (start at 100% and work down)

Failing that; Try out the H-Bridge test script I posted the other day and see if that does anything.

Edit: I guess you edited the post once you found the issue however see post #11 -

Quote:

Set the PWM on D4 and D5 using the sliders on the Movement Panel, you will need to move both of them even if they show being set to 100%

#30  

I have had bad l298n I bought in sets of 5 on ebay. One channel would not reverse. I swapped to another hour bridge all identical and worked fine. So sometimes you can get a dud.