Hi all, I'm new to the Arducopter and am having an issue which I have been unable to resolve on my own that I am hoping this community can help with. I'm planning to use the APM2.5 to control a custom vehicle which uses Hitec HS-50 servos (relatively small ones, ~6g). All of my testing has been performed on a bench being powered through the APM power cable, and I've also tried powering my servos through an ESC with the JP1 jumper moved appropriately. In each case I believe I am getting a clean 5Vs. I am able to connect to the APM through the mission planner software and also have been successful modifying the code to send custom MAVLINK messages. I have not connected any RC equipment, only the servos, ESC, and telemetry radio.
The problem I am having occurs when I try to plug in my servos. I know they are not fried because I can control them using the DemoServo script provided, and I've tried different HS-50s as well. When I plug them in, they make a loud buzzing sound, like the servo is being driven at a very high frequency. Applying a little torque to the servo by hand indicates to me that it is being commanded, but again I believe the servo is being burned out by the way in which it is making noise, and know it is not normal behavior. I've tried writing custom commands in loop(), of the form APM_RC.OutputCh(CH_1,1500) to no avail, the buzzing continues.
Can anyone make a suggestion as to what I should check? Thank you for your help!
Servos under load will buzz. Digital servos buzz - sometime loud - even under no load. But since HS-50 are analog, I guess they're under some load. Or I miss something.
Thanks for your input. In my past experiences using servos and specifically this kind of servo on different projects they have never made this kind of noise. They are also not under load of any kind when I plug them in, the arm is not connected to anything.
Thanks Richard. I have my servos plugged into the output ports. I have another update which provide additional insight:
I checked the PWM signal on a scope coming from the baseline Arducopter code and compared it to the demo servo example which does work. The pulse widths look normal but the difference appears to be in the servo period. The demo program has it at 20ms. The Arducopter period appears to be about 2ms on the scope. Not sure what to make of this since my reading of the code suggests that it should be 20. Does anyone have an insight on this? It's possible the tiny servos I'm using can't handle it? Thanks.
As an FYI for those who may encounter this in the future:
I solved the issue by setting RC_FAST_SPEED 49 in config.h (changed from 490). Now the servo I am using acts normally.
After I identified what the issue was, it was a matter of sleuthing through the code and trying to figure out where the period was being set. It also was a clue that 490 is ~500 Hz, and I wanted 50 Hz. I suspect the issue was that I was trying to control servos instead of motors. The motors may accept the higher frequency where as the servo I was using did not.
I'm not a technical expert on the APM board circuitry, but from my experience of various autopilot and microprocessor-based products, they're not cut out to power servos directly. The main problem is that servo load can change dramatically and hence the current draw on the board will spike at this time. This is a recipe for a burn out, or at best a brown out.
On my rovers I use an H-bridge based servo/encoder IO board with a separated power rail (5V/3.3V out so I can power a microprocessor board off it). There are plenty of off-the-shelf boards out there; I'm sure you could find one for your purposes.
In this case I am fairly sure the issue was not the way in which the servos were being powered as I followed the instructions on the wiki for powering the APM and its accessories. Also the ESC I was using should have zero trouble powering the tiny servo I was experimenting with.