I'm working on converting a co-ax rc heli to computer control and I think I've come up with a very simple way of doing it.
As far as I can tell, the controls are simple variable resistors and by decreasing or increasing the resistance, the speed is increased or decreased.
My hope is that I can connect an opto-isolator between a PWM port on the arduino and the terminals on the current controllers and then use that to switch between manual and computer control.
Is my theory (that by using PWM to increase/decrease the brightness of the LED inside the opto-isolater and thus raising/decreasing the resistance across the two terminals allowing the helicopter to fly) sound?
Not so sound.
PWM only works with an LED because it flashes so quickly the eye integrates the brightness, it does not change the resistance.
What you could try is PWM filtered and applied to an opto isolator with an internal FET rather than the more usual transistor. However there will be a dead space when the filtered PWM is not high enough to turn on the LED.
No.
This is not the way it works, but it would be the way you would see the light emitted from that LED if you could.
Analog out is not what its name makes you think, it is a PWM output.
PWM doesn't reduce brightness, it reduces average brightness.
It does that by sending pulses which have a variable on/off time.
This time is called "duty cycle", and that tells you how much percentage of the total time, the level is HIGH.
A LED connected to a PWM signal is blinking quite fast, but your eyes can't see that blinking.
Instead it is "translated" into brightness.
If you use PWM to control an optocoupler, the LED , and so also the output will be blinking.
That's why you need some kind of filter to get a steady voltage that is analog to the duty cycle, but no longer pulsating.
What you want could be possible, but it isn't as easy as you hoped for.
There's 3 wires going to you potmeter, and only 2 wires that can be connected to the optocoupler.
You need to understand how a potmeter works, and you need to learn how to simulate that using PWM.
The remote control probably reads the voltage (not current) out of the potmeter, so you'd need to create a similar voltage by PWM and filtering.
I suggest some experimenting with PWM to learn how that works and how to get a "real" analog signal form that.