Help with arduino l298n code

Dear All,

 

i'm rying to code my arduino uno r3 to my l298n so that i can control 2 dc motors via my futaba receiver. i managed to get some movement from my motors but allbeit very jumpy.

 

any assistance will be greatly appreciated.

 

craig

Hi craig

Can you please post your code ?

Maybe this tutorial can help you : https://howtomechatronics.com/tutorials/arduino/arduino-dc-motor-control-tutorial-l298n-pwm-h-bridge/

Also did you already connect the receiver ? If so can you also post a diagram of the wiring ?

Timing is all

Your Arduino can certainly handle everything.

Receiver -> Arduino

Search "Arduino read RC Signal"

PWM -> Speed

Once you have the PWM value, you’ll need a bit of code to translate that to a speed. Normally 1500 is centered, 500 is one extreme, and 2500 is the other extreme (i.,e. opposite direction). You’ll need to create a bit of custom code for this, knowing what the L298N requires as input, and if the RC signal is decoded as anangle or as a PWM pulse.

Arduino -> L298

Search "Arduino L298N"

Wiring

You’ll have to do all the wiring yourself, ensuring common ground. You may or may not be able to power the RC receiver from the Arduino, but since the L298N also needs power at 5V… be a bit wary of total current consumption.