Let's Make Robots!

L298N motor drive and Picaxe

Hello,

I am having trouble connecting the L298N to my picaxe 28x starter pack.

Here are my connections:       ( Sorry for the drawing, I don't have any fancy software :) )

(The Picaxe uses a seperate power supply)

When I set the output pin to high, nothing happens. I am not sure wither I should connect GND on the L298N to GND on the picaxe board and have no idea what is the CURRENT SENSING pin.

Could someone please tell me what did I do wrong?

Thank you.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Thanks everyone, problem solved :)

The Current sensing pin is used to measure the amperage in the motor coils in series with and 0.5R resistor. If you do not use it you must tie it to GND. 

Looking at the connections you made I would change the following:

- tie the EN pins and logic voltage to 5V not directly to the battery, it is possible to fry the L298 using it like this ... if not already

- INPUT 2 is not connected ! please connect it to the Picaxe the logic depends on both being set either high or low

- you tied EN 3/4 but you do not have a load (read motor) on the outputs - this is BAD never enable the L298 without load connected

- you did not post any code but for the motor to turn to one direction you have to set the following pins:

EN - high 

IN1 - high (or low when the other is high)

IN2 - low (or high when the other is low)

- the grounds have to be connected - yes

If you are lucky the chip is still OK and the above will get you started.

Most of the above have been already said ... it does not hurt to say it again though :D

Don't know if it really makes a difference or not, but I believe "Logic supply voltage" should be the same 4.5-5V from your picaxe, not 6V from the motors' power source.

I'll 3rd the "don't leave a floater" thing. Floaters suck.

Always share your grounds. And I 2nd on the 2 input thing.

Oh, God... He left a floater!

If you want to verify the bridge itself is working, you can just use the +5V rail and gnd on input1 and input2, repectively. Your motor should turn in one direction. Then swap them and the motor should turn the other way. If those both work, you know the h-bridge is not the problem.

Then tie two Picaxe outputs to the bridge and test them the same way. With output1 high and output2 low, your motor spins one way. Output1 low and output2 high, the motor spins the other way. Both outputs low, the motor should stop.

To control your h-bridge, you will need TWO outputs from the PICAXE. Connect one digital output to the L298N Input1 and a 2nd digital output to Input2.

I only built that circut to test the H-bridge and see if it works. The motor should move in one direction.

The unconnected input could be floating high, which would prevent your bridge from driving the motor. Either connect it to your Picaxe output, or tie it to ground to be sure this is not your problem.

I am not sure wither I should connect GND on the L298N to GND on the picaxe board 

you should

I just did, but still no movement :(