I am building (slowly) a 2 wheel hanging pendulum robot that uses 2 26" Bicycle wheels and Kelly reversing controllers.
The problem I have is that the controllers use a pot or 0-5 volt input for a throttle and not PWM pulse width.
While I am initially configuring the robot I would like it to be testable with an RC radio system only.
And for this what I would like to do is provide the simplest hardware conversion of the RC receivers PWM output directly to a 0 - 5 volt throttle signal.
The typical - simple RC filter approach for converting PWM to a voltage level won't work because the Radio Control PWM output signal is not a zero to 100% PWM pulse.
Rather it is a long low pulse with a short but variable high pulse the second half of which defines the 0-100% state of the PWM.
This is probably doable but complicated in discreet components (Op amps, pots and capacitors), but messy and is not something I think would be worthwhile to undertake.
Certainly it is doable to edit the Pixhawk code to allow it to drive a digital pot or D/A from I2C and that is what I am planning on doing eventually in any case.
But if anybody knows of an existing (module) specifically designed to accept a radio control style PWM signal as input and provide a variable voltage as output that is what I would very much like to implement at this stage.
I have looked but been unable to find anything online that can actually deal with a radio control style PWM input.
There are plenty that will take a zero to 100% style PWM input (including a simple RC circuit) but none that will deal appropriately with a radio control style PWM.
Any help appreciated.
Failing this I will simply start with either my Pixhawk or - more likely - my Beagle Bone Black.
I think for many uses, if we simply supply conservative defaults for low PWM values and High PWMs values that this may be a non issue for most users.
Simply set low PWM high enough so that it is pretty much guaranteed to be at zero with transmitter stick in zero position and high PWM low enough so that it is also pretty much guaranteed to be full on when the transmitter stick is in full on position it will work for majority of applications.
On my transmitter endpoints are adjustable, but even where they are not, full range would still be within stick travel.
However, we probably still need to have some level of user adjustability and I think for that to be reasonable we will need 4 I/O lines, but one would be the existing LED.
Possibly add 2 buttons and one additional LED.
First button selects and sequences through programming options.
Second button would cause currently selected low or high stick PWM endpoint to be set.
The existing LED and added LED on / off and blink pattern could indicate channel selected and high or low endpoint to be set by pressing set button. (Possibly room for additional user adjustments as well).
I notice we still have one I/O line (pin 6) which could be used as one of the I/O lines (the second LED).
Possibly the other 2 could be (borrowed) from your 7 pin connector.
The 2 buttons could go to 2 of the ADCs and if we used normally open buttons they wouldn't interfere with normal use and the additional LED could go to pin 6 set as a digital output and that plus your existing LED should provide sufficient information for a variety of programming indications.
That way no functionality would be lost as exists in your current design.
Might want some weak pull down resistors on the 2 ADC lines the PWM set buttons are connected too and then run other side of button to +5.
Additional LED blink patterns and settable options could be also incorporated for more user setup if desired.
The user could probably hold down both buttons during power up to cause it to go into user setup mode. (So long as the ADC inputs weren't allowed to both be 5 volts at power-up that should work.)
This is the mechanically simplest and still somewhat straight forward user adjustment method I can think of.
Also, I would like to see a second ground pin on the analog outs so that a two pin connector could connect to each output.
So 4 pins instead of 3.
This is just some thoughts and happy to hear any other ideas you have, board and capabilities look great so far.
Did you get this solution going? I have a golf cart motor controller that requires 0-5v for the speed control, same as your controller. Any other off the shelf solution available since this thread started? Otherwise I will try the Radio control type DC motor controller and an RC filter as mentioned above.