L298N Dual H-Bridge motor signal loss when motors connected under load

Customer:

I’m using a Dual H-Bridge L298N to control the speed of a motor. I converted the PWM signal from a 6-channel receiver in an Arduino and output it using analogWrite(). I’m using a Croduino Basic 2. When I tested the motor outputs with a voltmeter without load, everything worked correctly. When I connected the motor, it ran erratically and the voltage constantly oscillated. On the serial monitor, I watched the PWM signal from the receiver itself, and it also oscillated erratically as if something was short-circuited - at moments there was no signal at all. Current was not more than one ampere. Motor voltage was 12V. So when current starts flowing through the H-bridge, something happens. I had to connect the 12V ground to the Arduino ground because of the signal coming into the H-bridge. What is the problem and how do I fix it?

Original message (Croatian)

Pozdrav koristim dual H-bridge L298N za kontrolu brzine motora kojega sam kod vas kupio. PWM signal iz 6-kanalnog receivera sam u arduinu pretvorio i ispisao ga sa komandom analogwrite(); koristim vas croduino basic 2. Kada sam sa voltmetrom ispitao izlaze za motor bez opterecenja sve je radilo kako treba. Kada sam spojio motor radio je nepravilno i napon je stalno oscilirao, na serial monitoru sam pratio PWM signal iz samog receivera i on je takoder nepravilno oscilirao kao da je nesto u kratkom spoju cak ga na momente opce nije bilo. Struja nije bila veca od jednog ampera. Napon za motore je bio 12V. Znaci kada potece struja kroz h bridge nesto se dogada, masu od 12V sam takoder morao spojit sa masom od arduina zbog signala koji dolazi u H-bridge. U cemu je problem i kako da ga otkloniti?Hvala.

Originally submitted via email support on 30 July 2016. Migrated to the forum for community visibility.

Soldered Support:

I found a reference to an identical problem with a solution using the enable pins: http://electronics.stackexchange.com/questions/96044/control-h-bridge-using-pwm You were correct to connect the grounds together.

Original message (Croatian)

sorry na dugom čekanju, ovo je nekako u spamu završilo..
Što mislite pod “receiver”? Kakav sklop imate?
Pretpostavit ću da želite kontrolirati brzinu motora, ne samo smjer. To radite preko enable pinova. Evo identičnog problema kao Vašeg i odgovora kako to riješiti(koristeći enable pinove): http://electronics.stackexchange.com/questions/96044/control-h-bridge-using-pwm

Ako zapnete, javite, pa ću Vam sumirati odgovor s linka.
Dobro ste napravili što ste spojili mase zajedno.
Možete me dobiti i na da brže riješimo ovaj problem.

Customer:

I’m using all 6 pins on the L298N Dual H-Bridge: 4 of them for controlling the direction of rotation of two motors and the other 2 for controlling the speed of those two motors using the analogWrite() command in Arduino. I’m using a classic 6-channel receiver for hobbyists - the Nine Eagles J6Pro model. When I compile the program, everything works as I want but without load. When motors are connected to the H-bridge, the signal from the receiver is immediately lost and the motors spin erratically. Current is not more than 1 ampere and voltage is 12V for motors. From what I understand, the H-bridge itself has a 5V regulator that outputs 5V on the 5V+ connector to power the H-bridge logic itself. The input voltage on the 12V+ connector needs to be greater than 5V, correct? I hope I’ve explained the problem more clearly. What confuses me is how the receiver signal is lost when the motors are connected and current starts flowing, but without connected motors when I look at the voltmeter the voltage changes nicely as I set it and everything works as it should.

Original message (Croatian)

Ja korstim svih 6 pinova na L298N dual H-bridgu znaci 4 od njih su za upravljanje smjera vrtnje dvaju motora a druga 2 za kontrolu brzine tih dvaju motora pomocu komande u arduinu analogWrite();. Ja koristim klasicni 6 kanalni receiver za hobiste, znaci onaj sta se moze kupit na hobbykingu model je nine eagels J6pro. Kada slozim program radi mi sve kako ja hocu ali bez opterecenja, kada se spoje motori na h-bridge odma se signal iz receivera gubi i motori se vrte nepravilno. Struja nije veca od 1 ampera i napon je 12V za motore. Kolko sam ja upucen na samom h-bridgu ima 5v regulator koji izbacije tih 5v na 5v+ prikljucnici i daje za samu logiku h-bridga, naravno ulazni napon na 12V+ prikljucnici treba bit veci od 5V da li sam u pravu? Nadam se da sam vam poblize objasnio problem. Znaci zbunjuje me kako se gubi signal se receivera kada se prikljuce motori i potece struja, a bez prikljucenih motora kada gledam sa voltmetrom napon se lijepo mijenja kako ja to zadajem i sve radi kako treba.

Soldered Support:

I tested the same driver on two different L298N Dual H-Bridge units. Yes, the chip has internal 5V logic, but the motor output passes through whatever it receives as input - maximum 12V. If you wish, we can replace the driver.

Original message (Croatian)

opet u spam.. Ne mogu Vas ovdje staviti na neku white listu.
Možda Vam je driver neispravan, ako ste napravili prema mojim uputama, sumnjam da je do motora. Da, tako je, chip ima unutarnju logiku od 5V, ali na izlaz za motore dalje ono što dobiva kao input, tj. max. tih 12V.
U svakom slučaju, ako želite, možemo zamijeniti driver.

Customer:

I tested two different Dual H-Bridges and the errors were identical on both. I need to know whether I must supply a separate 5V for the logic or does the regulator on the board supply that 5V from the 12V+ input? There must be a short circuit somewhere when the motors are connected or something like that, because I really don’t know why it loses the signal. I’ve checked everything twice and physically I cannot find a short circuit anywhere.

Original message (Croatian)

Znaci ja sam probao na dva razlicita dual h bridge i sve greske su bile identicne. Zanima me da li ja moram dovesti ppsebnih 5v za logiku ili si on sam pomocu regulator dostavi tih 5v sa ulaza 12v+? Negdje ocito dolazi do kratkog spoja kada se spoje motore ili nesto tome slicno jer ja stvarno neznam zasto on gubi signal. Sve sam dva puta provjerio i fizicki nigdje nemogu naci kraltki spoj.

Soldered Support:

You need to supply both 5V and 12V separately. There are pins for this on the board, both at the end near the ground connector. The board requires 5V for the logic.

Original message (Croatian)

Trebate posebno dovesti 5V i 12V. Postoje pinovi za to na pločici, oba su krajem gnd priključka. Treba mu 5V za logiku.