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
Motorbehavior not as expected
#1
Hi together,

I finally made it to build the awesome Autopilot from Sean D'Epagnier (a huuuuuuge Shoutout for your work! Cool ) and steered already some miles with it and figuring out the right parameters.

But I noticed, that if the the Motor (Autohelm Motor, directly connected to the H-Bridge (this one)) travels to starboard, it is smooth and direct way.

But if it goes to port, the Rudder ist first moving for a half second to starboard, than moving to port for a while, but if the motor stops, it ends with a short movement again to starboard.
And therefor the Distance is shorter and the Boat is making huger oszilations to one side, 'cause of the corrections pypilot has to make.

I tried to figure out, why this is happening, going through the motor.ino code but couldb't find any point, whats the reason for this behavior.
The H-Brige also works fine, when I test the Mosfets by pulling the Inputs on High for each direction.

Does somebody has any ideas, why this is happening?

Thanks a lot in Advanced,
Maarten
Reply
#2
Does the motor move in both directions equally in manual control?
Reply
#3
Yes it does it there to.
If I do very small changes in manual Mode, the Motor isnt able to go reverse, because of this strange movement its moving in just on direction more and more.

Just to make shure:
The two Inputs on the H-Bridge have to be Connecteted to one LowSide and HiSide Port on the Arduino, thats right?
Reply
#4
I'm not sure what kind of hbridge you are using.. There are 4 pints on the arduino for the hbridge, 2, 3 are low side and 9, 10 high side.

Did you try reducing servo.period? Sometimes integration takes time. Otherwise, the software and hardware is normally symmetrical, so if there is a difference in one direction I would check your circuit.
Reply
#5
Okay, thanks for your Answer, I just thought about the low and high side..
Maybe I got something wrong, I bought two H-Bridge Modules () () (they are behaving same).

They have to inputs vor each direction with a PWM.
So I connected

PIN2 -> H-Bridge IN1
PIN10 -> H-Bridge IN2

Would it be more correkt to use the Pins 2 & 3 for the Inputs or doesn't work this setup at all?
Reply
#6
yes, using 2 and 10 is not balanced, you should use pin 2 and 3 (will be either on or off only) or maybe pins 9 and 10 if inputs can take pwm.

If pwm is separate on the hbridge from in1 and in2, then you will have to modify motor.ino, see pwm_style==2 for hints.
Reply
#7
Thanks, that was really the problem, I swapped the pins and now its working like a charm! Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)