Looking for developer to help with generator code

Hi all,

It may be coming in the new versions, but we are after a code to control a generators servo throttle based off voltage. And to vary with incremental settings based on voltage readout.

Jeff

We need a lot more details than that.

No problems.

Currently we are using a 2400W generator that used to have a standalone ECU that controlled its voltage by having an external board that sensed voltage and raised its PWM output to compensate. However we found that this tended to raise the throttle too far for longevity and it backed off too fast resulting in surges.

Considering the ECU added weight and wasn’t working like we had hoped we removed it and found a work around just by using arducopter.

We used the MOT_BOOST setting on an assignable channel 6. Using this we plugged the servo in directly to the Cube orange and we’re able to vary the min and max PWM to get it to idle and follow throttle input in stabilise and auto flight. We then varied the MOT_BOOST value to find a charging voltage that maintained during phases of flight.

We have this almost perfect whereby through all phases of flight it is maintaining 48.5-49V (12S) which keeps our batteries around 85-90 percent on landing keeping enough for reserves without overcharging.

Our hope was to have some code written for simpler generators like this that use the MOT_BOOST or similar parameters to vary that weighting of it, if for some reason it starts to overcharge or undercharge which keeps the pilot focussed on the mission without worrying about the voltage monitoring.

This coding could be if the voltage trends over 49V to apply a percentage reduction to the MOT BOOST value or if it’s too low to apply the same theory with an increase. Maybe even a PID loop.

This would provide options for everyone to make their own generators with simpler control rather than the generator options now which require telemetry connected and selecting a particular brands ardupilot code like richenpower etc.

Thanks for asking :slight_smile:

This looks like a job for lua scripting. Have a look at that is easy enough that users can do it. You do not need to compile the code.

Thanks for that! Very helpful:)