This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
L298N and Arduino Nano
#8
(2019-08-15, 01:37 PM)seandepagnier Wrote:
(2019-08-15, 11:54 AM)jamos.tan@gmail.com Wrote:
(2019-08-15, 09:35 AM)jamos.tan@gmail.com Wrote: Hi Sean,

I've found an article online which helped me understand more about the L289N board in combination with arduino, and an example sketch steering it.
https://www.teachmemicro.com/use-l298n-motor-driver/ and this is also a good one: https://howtomechatronics.com/tutorials/...-h-bridge/

I've also looked at motor.ino more closely, but don't know how to combine the information I've found in the example sketch from the article, and what to change in motor.ino
Hope I am not asking for too much, but I was wondering if you could help me.

Ok, update here. I've downloaded the newest motor.ino from your github.
My bad, I didn't uncomment the #define VNH2SP30 // defined if this board is used

Autopilot has no errors! When engaging the AP and changing direction of the magnetic compass, polarity reverses OK.
Also manual buttons work.

However, the electromotor is not realy spinning I think. It makes a high pitch sound (recognize it from your video from youtube, makes the same sound)
When measuring it, it is only using about 2 volts.

I'll need to tweak with the gains / and the maximum / minimum settings in the client for that probably right?
Only thing I modified for compensating the low power board I have is change this line:

uint16_t max_current = 200; // 2 Amps


Try just supplying vcc to the ena pin, and see if the motor spins both ways.

Maybe the frequency is too high.   Look for where the pwm parameters are set and change it.

Its working! I've done it by adjusting the max skew settings. Tiller from the autohelm st4000 works like a charm now! You are the best.
Reply


Messages In This Thread
L298N and Arduino Nano - by jamos.tan@gmail.com - 2019-08-13, 05:17 PM
RE: L298N and Arduino Nano - by seandepagnier - 2019-08-14, 02:21 PM
RE: L298N and Arduino Nano - by seandepagnier - 2019-08-14, 08:36 PM
RE: L298N and Arduino Nano - by seandepagnier - 2019-08-15, 01:37 PM
RE: L298N and Arduino Nano - by jamos.tan@gmail.com - 2019-08-15, 03:38 PM
RE: L298N and Arduino Nano - by ironman - 2019-08-31, 09:48 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)