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

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

PRO
Synthiam
#1  

Well, clearly it's not connected correctly:)

The PWM will be necessary for the HBridge to move. So it sounds like the PWM is connected to the Trigger ports instead.

Perhaps you can draw a schematic or take a photo so we can help you fix the connections

PRO
Canada
#2  

One thing that might help you is using the Roli example in ARC which has an "init" script to initialize your pwm lines on "connect".

Do note that the physical connections will be different as the Roli example uses D0-D5 for H-bridge control.

#3  

@Technopro @Jeremie

Sometimes even if wired correctly! It will not work!

Since I have three h-bridges wired to one ezb v4!

I had to logically change order of d8 and d9 to d9 and d8.

If you get more movement then also change d10 and d11 to d11 and d10.

Rich Explains' this in his tutorial...

Also is h-bridge showing a light on? Edited yes you said...

J:D

I will power up my PC in few minutes and check my settings!

Jad

PRO
Synthiam
#4  

Keep in mind that if something is wired correctly, it will work - always:)

Logic prevails, if it isn't working... it isn't wired correctly:D

#5  

i have it this way and it works!

l trigger a d3 l trigger b d2

r trigger a d1 r trigger b d0

@dj sures you are correct,

but depending how the motors state was left by pwm's... try it..

j:D

United Kingdom
#6  

@technopro.

This might be an obvious one and forgive me if you have done this already, but have you pressed the little white regulator button (click up for +5v, click down for external power source, 12v ect) on the H-bridge? Another thing I would suggest is to unwire and repconnect the H-bridge to different ports on the EZ-B, D0 to D5 for example, and see if that makes a difference.

User-inserted image

The photo is how I had mine wired. White wires from the left: D0 D1 D2 D3 Red wires from left (speed control): D4 D5 A little playing with the config menu and this worked great for me.

Anyway, just a thought I hope that helps. ;)

Steve.

United Kingdom
#7  

As DJ says, if it's wired correctly it will always work.

I've spent a lot of time with the L298n H-Bridge and (so far) haven't had one which didn't work as desired.

First check your PWM ports are set, by default these are low or off. They must be set before attempting to move the robot otherwise it'll be trying to move with the speed set to nothing. Just adding the control doesn't set the PWM high. Add a couple of lines in the Init script which is run on connection;

PWM(EnA, 100)
PWM(EnB, 100)

Where EnA and EnB would be the port numbers.

Assuming the In1 to In4 are connected correctly to Left Trigger A, Left Trigger B, Right Trigger A and Right Trigger B it should work as desired.

If it doesn't you need to check the connections are correct and check continuity between the EZ-B and the H-Bridge. Broken wires are not a rare thing.

If that still doesn't work correctly the problem would be with the H-Bridge. You can test a H-Bridge using a couple of jumper cables.

Provide the H-Bridge with +5V, Vcc and Ground Put a jumper from the ground to In2 Put a jumper from +5V to In1 Put a jumper from +5V to EnA Motor 1 should spin forwards

Disconnect the jumpers

Put a jumper from the ground to In1 Put a jumper from +5V to In2 Put a jumper from +5V to EnA Motor 1 should spin backwards

Disconnect the jumpers

Put a jumper from the ground to In3 Put a jumper from +5V to In4 Put a jumper from +5V to EnB Motor 1 should spin forwards

Disconnect the jumpers

Put a jumper from the ground to In4 Put a jumper from +5V to In3 Put a jumper from +5V to EnB Motor 1 should spin backwards

If it doesn't, and you are sure your jumper wires and power supply are OK then you must have a faulty H-Bridge.

#8  

I replicated the my wiring order of my dewy robot and it still work. i can truthfully say that the wiring is correct and checked 5 times. I believe the hbridge might be faulty.

Yes the 5v reg is on.

I'll will take pictures as soon as I can.