Community
Wiki Posts
Search

ESC/Motor Response

Thread Tools
 
Search this Thread
 
Old 02-25-2024 | 05:24 PM
  #16  
Thread Starter
Tech Rookie
 
Joined: Feb 2024
Posts: 7
Default

Originally Posted by PDR
I tried your code with my clone Uno with the output on pin 9 and it seems to behave as the code expects. The PWM output matches the intended value pretty much down to the microsecond. I have a little PWM tester that shows me pulse width and framerate. My Arduino is outputting @ 49Hz, which should be virtually identical to the default setting of the servo tester (the one you have should default to 50Hz and capable of 125Hz and 250Hz by pressing the button).

Some other thoughts:
  • How are you powering your Arduino board? Note that they typically run at 5V - be careful about it clashing with the output from the ESC BEC (maybe make sure the positive wire is disconnected).
  • I'm using Arduino 1.8.19 (the 2.X releases don't work well with some of the add-on cores I use). It looks to be using the included Servo library in the release (ie: ...\Arduino\libraries\Servo\src\avr\Servo.cpp). Entirely possible a different version of library could behave differently.
Thanks so much for taking the time to check my code and also provide input/feedback. Turns out I was able to get everything working by simply using an Arduino Uno R3 board. I had previously been using the Arduino R4 WiFi board. Surprised that the switch to the R3 resolved my issues, but grateful that it’s all working now. Any thoughts on why the R4 might have had trouble with my setup?
Mattwold42 is offline  
Old 02-25-2024 | 05:41 PM
  #17  
PDR's Avatar
PDR
Tech Elite
iTrader: (31)
 
Joined: Oct 2008
Posts: 2,207
From: Sydney, Australia
Default

Chances are it's a bug in the Arduino core/version, so maybe check for updates on that front. From the quick scan of the R4 board, hardware PWM on pin 9 should be fine. I'd still test if it's better on one of the marked analog pins.
PDR is offline  

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Contact Us - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

Copyright © 2026 MH Sub I, LLC dba Internet Brands. All rights reserved. Use of this site indicates your consent to the Terms of Use.