Now, that I am building my own ROV (more on that soon, maybe), I had a need for a solution, as most of what's on the web was either over-complicated or just didn't work. Controlling an brushless DC motor via an ESC using an Arduino is surprisingly simple, yet a bit frustrating at times due to three facts:
- ESCs seem not to come with pulse widths defined (min, max) in their manuals. At least not the HobbyKing Quik 60A and the Flyermate 80A.
- Even if "auto throttle range" is supported, it still needs to be within an acceptable range.
- Figuring out the ideal range can be "labor intensive".
Below is a sketch that works just perfect with both the Quik 60A and the Flyermate 80A. The only difference between the two is that the Flyermate seems to respond better to a shorter range of 700 - 1700, while the Quik responds to 700 - 2300.
Tested on Arduino Mega2560.
Tested on Arduino Mega2560.