Arduino and L298N motor driver

Hello,

I am trying to use a L298N motor driver with my Arduino Mega to control some DC motors that I have. I have tried one of these controllers before, and nothing happened and the on board LED never even lit so I assumed it was dead. I got another controller from a different manufacturer and the same thing happened. This is my setup with nothing but power plugged in so far:

The controller is being fed with a 24V source which should be ok from what I saw. If anyone could let me know what my issue is that would be greatly appreciated.

Thanks.

put a datasheet, link to a page or explain otherwise (with a drawing) what all those connectors and pins are meant for. Otherwise it seems you have a good chance to burn them and the arduino.

This page has data about each pin on the motor controller: http://www.instructables.com/id/Control-DC-and-stepper-motors-with-L298N-Dual-Moto/?ALLSTEPS#step1

I have found very similar information on many other pages.

The led doesn't turn on if you removed the 5V output jumper, and the 5V output regulator is disabled. The LED shows only whether the output 5V port is active or not.

michaelsm:
Hello,

I am trying to use a L298N motor driver with my Arduino Mega to control some DC motors that I have. I have tried one of these controllers before, and nothing happened and the on board LED never even lit so I assumed it was dead. I got another controller from a different manufacturer and the same thing happened. This is my setup with nothing but power plugged in so far:

The controller is being fed with a 24V source which should be ok from what I saw. If anyone could let me know what my issue is that would be greatly appreciated.

Thanks.

Sure..... it's not your fault actually. Usually it's the stupidity of the people that wrote the instructions for the L298N, or the ones that put the counter-intuitive misleading labels on the L298N board. But this is sort of the same usual thing we deal with for the bulk of user guides and text books etc. Details left out, things vague/unclear etc, and the important stuff is not simply conveyed at the beginning.

The L298N usually has a physical jumper..... it is called the '5V_EN' jumper.....aka 5 Volt Enable. This jumper is connected (by default) I think. If you use a DC supply voltage greater than 12 V DC, then REMOVE this jumper (to avoid damage to the board circuitry). However, removing the jumper disables the onboard 5V regulator....which would normally supply power to some digital logic circuitry on the chip.

Normally, I use 12 V DC or more for the supply, so I remove the jumper, which disables the onboard 5V regulator. No power to the logic circuits. So....to make up for it... need to manually supply 5V from our own 5V source. Where do we feed the 5V source voltage? We feed it to one of the pins on the L298N.... the '5V' pin. The thing about the '5V' pin is..... when the 5V_EN jumper is CONNECTED, then the '5V' pin is a DC OUTPUT pin. But when the 5V_EN jumper is disconnected, then that pin changes to an DC INPUT pin.

In your diagram, I think the '5V' pin is the one with the red wire. The black wire will be ground.....and the ground of your L298N should also be directly connected to 0V of your arduino. And the brown wire will be your 24V DC.

So......looks like you do have the 0V pin of arduino pin connected to the GND pin of your L298N. But looks like you haven't connected the negative terminal of your 24V DC supply to the GND pin of your L298N. So..... if you haven't yet done it..... then you could (if you want) have 2 black wires coming out of the L298N (instead of 1 black wire). One of them should connect to the arduino 0V (GND) pin, and the other black wire should connect to the negative terminal of the 24V supply.

There are other kinds of L298N boards, and their pin layout can be different to yours. But I looked online to check on your L298N board...so the pins I mentioned relate to your board.