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
Sound when connecting liniair actuator on pypilot
#18
(2020-04-16, 04:49 PM)jamos.tan@gmail.com Wrote: I've got it now. For if(pwm_style == 2) you need to modify two lines. Search for if(pwm_style == 2) and if below it mentions 16000, change it to a lower one. I've adjusted it to 1000 and the motor sound is perfect! In the newest motor.ino those are lines:

467:         uint16_t OCR1A_u = 1000, OCR1B_u = 1000, ICR1_u = 1000;
482:         ICR1_u=1000/DIV_CLOCK;  //fPWM=1khz original was 16000, now 1000 is more khz

And of course, for the motor to work at all you need to define the proper board. In my case, even though i use an h-bridge i needed to define the  VNH2SP30

119         #define VNH2SP30 // defined if this board is used

Thanks for this man. For myself, however, I turned away from changing the pwm frequency, because it turned out to have undesired side effects. The whole servo system, including the servo slew mechanism, became way more nervous in reacting to input. In particular, the stopping of the motor became so abrubt that it did not sit well with me, and I could not fix that with the slew parameters. So in the lab here the sound is irritating, but chances are on the boat it will drown in the lovely background symphony of wind and water.
Reply


Messages In This Thread
RE: Sound when connecting liniair actuator on pypilot - by ironman - 2020-05-02, 11:30 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)