L298n H-bridge

 
#11

Hey Rich, I am currently running EZ-Builder Version 2013.07.22.00. I recently updated from version 2013.06.04.00 . Yes I know, it been a while. My personal life had gotten a little ethic, so I had to step away from robotic building for a while. Before the upgrade, My H-bridge was working perfectly fine. I had it set as:

D10 Left trigger A
D11 Left trigger B
D12 right trigger A
D13 right trigger B
D14 PWM.

After the upgrade EZ-Builder refuse to connect to my ez-b board. It will connect and disconnect, I assume I had an issue with my board. After a few hardwares diagnostic , replacing the fuse etc. I realise it was a compatibility issue from my old save project file to 2013.07.22.00. No biggy, I decided to start from scratch and re-create my project in the latest EZ-B build. Now my Rover refuse to go forward, if it goes forward it will not go reverse. If it goes reverse it will not go forward. I have play around my trigger port setting. Simply refuse to work. I am very anal about saving my projects. I save them as V1.0 V1.0a v1.0b, v2.0 v2.1a , etc, any minuscule change I make, I always make sure I save it into a different version name. But with the latest build. my old project will open, but ezb connection get drop right away and H-bridge set up is a little peculiar. I know we are still in the Beta testing phase no biggy. But have anyone else tested their robot movement forward, reverse, left and right?

#12

I literally just parked my robot up after a quick autonomous roam test and the HBridge panel worked fine.

Do you use the 4 Wire HBriidge control or the 4 Wire HBridge with Speed Control? (I just used the one with speed). You may need to set your left and right speeds although if one direction works and the other doesn't then that wouldn't make sense.

In fact, it doesn't make sense. If it moves forwards it should move reverse.

Add this script.

Code:


# Forwards
Set(D10, on)
Set(D11, off)
Set(D12, on)
Set(D13, off)
PWM(D14, 100)



And this script

Code:


# Stop
Set(D10, off)
Set(D11, off)
Set(D12, off)
Set(D13, off)
PWM(D14, 0)



Run the first one and see if it moves forwards or if it disconnects. Stop it moving by running the second script.

Reverse the sets in the first for reverse (i.e. 10 off, 11 on, 12 off, 13 on) and see what happens.

#13

extremely weird, I uninstall EZ-b and re-install it and problem fix. Thank you for your help Smile

#14

Amazing tutorial.

Many thanks Rich - this helped me a whole lot.

#15

Updated post #1 with V4 connection information

#16

Alternative wiring for a simpler method

The connections on the L298n are simply;

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)*

* EnA & EnB connections optional for speed control, If speed control is not required connect the two jumpers which come with the L298n to link EnA to the +5v pin to it's right and EnB to the +5v pin to it's left.
If combined speed control is required (i.e. one speed control for both channels) a Y-cable can be used to connect both EnA and EnB to one Digital Port Signal (i.e. D12).

No ground or Vcc from the EZ-B to the L298n is required if you have a single source for both EZ-B and L298n or if you have a common ground.

You must make sure you press the switch to enable the on board 5V regulator circuit otherwise it will not operate

Some photos (I'll change them once I get chance to edit and tidy them up but no idea when I'll get the chance so here's the unedited ones).

The L298n in it's stock state
User-inserted image

The L298n wired power connections
User-inserted image

The L298n wired for no speed control
User-inserted image

The EZ-B V4 wired for no speed control
User-inserted image

The L298n with the jumpers removed
User-inserted image

The L298n wired for common speed control (1 PWM adjusts the speed of both channels). White wires is a Y cable, 2 to 1 with the 2 at the L298n end
User-inserted image

The EZ-B V4 wired for common speed control (1 PWM adjusts the speed of both channels). White wire is a Y cable, 2 to 1 with the 1 at the EZ-B V4 end
User-inserted image

The L298n wired for independent speed control
User-inserted image

The EZ-B V4 wired for independent speed control
User-inserted image

#17

Did I read somewhere this controller can control a stepper motor? Thanks. Chris

#18

Yes, info can be found here

#19

Thanks for updating information for ezb v4 controller and h-bridge. I used info to get one pair of motors working on 6 wheel thumper. Work on other pairs tomorrow, one h-bridge down, two more to go.

j

Smile Smile Smile Smile

#20

.... could have just used one 2 x 12 sabertooth motor controller and one port on the ezb.... three H bridges to run the thumper must be an awful rats nest of wires... not to mention using up the majority of digital ports on your ezb.... I guess people still need to do things the hard way....