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

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

#9  

I have wired the connections differently twice, once following the tutorial and once on my own.

Here are the pics.

User-inserted image

User-inserted image

United Kingdom
#10  

The L298n H-Bridge is a very robust and solid H-Bridge, they don't go faulty too easily to be honest.

Have you checked the EnA and EnB pins are getting a PWM or +5V? Pop the two jumpers back on to them and try it without speed control first.

I would say from your earlier posts regarding PWM on the Trigger Ports making it work that the H-Bridge isn't at fault but the wiring may be or the configuration since the H-Bridge would not act that way under fault conditions.

Can you try it on another EZ-B? Even a V3 would do.

Connect In1 to D0 Connect In2 to D1 Connect In3 to D2 Connect In4 to D3 Connect EnA to D4 Connect EnB to D5

Set Left Trigger A to D0 Set Left Trigger B to D1 Set Right Trigger A to D2 Set Right Trigger B to D3 Set Left PWM to D4 Set Right PWM to D5

Connect to the EZ-B in ARC 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% Test the H-Bridge with the Movement Panel direction controls (pay attention to the LEDs on the H-Bridge, it could be as simple as faulty motors).

#11  

But what I don't get is the motors move with a different configuration. I'll do more testing when I'm home.

United Kingdom
#12  

If you set it up as my last post (D0 to D5) run the following script to test each connection.


# L298n H-Bridge Test Script
# Author: Rich Pyke
# Version: 1.3
# Last Updated: 2014-09-01

# Set Enable pins high
Set(D4, On)
Set(D5, On)

# Move Channel 1 Direction 1 for 5 seconds
Print("Channel 1 Forwards")
Set(D0, On)
Set(D1, Off)
Sleep(5000)

# Move Channel 1 Direction 2 for 5 seconds
Print("Channel 1 Reverse")
Set(D0, Off)
Set(D1, On)
Sleep(5000)

# Stop Channel 1
Print("Channel 1 Stopped")
Set(D0, Off)
Set(D1, Off)

# Move Channel 2 Direction 1 for 5 seconds
Print("Channel 2 Forwards")
Set(D2, On)
Set(D3, Off)
Sleep(5000)

# Move Channel 2 Direction 2 for 5 seconds
Print("Channel 2 Reverse")
Set(D2, Off)
Set(D3, On)
Sleep(5000)

# Stop Channel 2
Print("Channel 2 Stopped")
Set(D2, Off)
Set(D3, Off)

# PWM Ramping Test
# Kill both Enables
Set(D4, Off)
Set(D5, Off)

# Set H-Bridge Channels 1 and 2 for Direction 1
Set(D0, On)
Set(D1, Off)
Set(D2, On)
Set(D3, Off)

# Begin slow ramp up of PWM from 0 to 100
Print("Ramp Up Test")
$PWM_Speed = 0
RepeatWhile($PWM_Speed < 100)
$PWM_Speed++
PWM(D4, $PWM_Speed)
PWM(D5, $PWM_Speed)
Print("Speed: " + $PWM_Speed)
Sleep(50)
EndRepeatWhile

# Begin slow ramp down of PWM from 100 to 0
Print("Ramp Down Test")
RepeatWhile($PWM_Speed > 0)
$PWM_Speed = $PWM_Speed - 1
PWM(D4, $PWM_Speed)
PWM(D5, $PWM_Speed)
Print("Speed: " + $PWM_Speed)
Sleep(50)
EndRepeatWhile

# Reset all pins low
Set(D0, Off)
Set(D1, Off)
Set(D2, Off)
Set(D3, Off)
Set(D4, Off)
Set(D5, Off)

Print("Test Complete")
Halt()

I can't remember if I ever tested or used the above but it's commented and if there are any errors with it you should be able to find out where and how to fix them.

#13  

Are you trying to operate a +5V device with a +3.3V controller board?

#14  

@Purple... H-bridges work perfectly with the ezb3 and ezb4... In fact Roli rolls off (pun intended) the assembly line with an H-bridge as a motor controller...

United Kingdom
#15  

He has the on board regulator providing the +5v required by the L298n based H-Bridge. This method works perfectly fine. The L298n will see the 3v3 from the signal pins as a high and operates correctly with the EZ-B V4.