Hobby radio control receivers typically output a 1-2 or 0.5-2.5 ms pulse every 50 milliseconds, and only the duration of the high pulse matters. Now the best way to decode this signal is probably with a microcontroller. What would be a good way to convert this signal to a voltage without a micro? A sample & hold or track & hold amplifier latched on the falling edge?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
You use an integrator to get the area of the pulse. Since they are all the same height, area is directly proportional to the width (on time) and therefore your voltage output is directly proportional to the pulse width.
You would have to reset the integrator though. Perhaps you can feed the integrator output into a S&H amplifier triggered on falling edge then resetting the integrator.
You could do this easily with an integrator and S&H.
Integrate a fixed reference voltage during the high time, and when the output goes low, stop integrating, capture the output voltage with a S&H (delay for acquisition time), and then disconnect the integrator and only then reset the integrator accurately to 0V (or some other known voltage).
Figure a 4016 (quad analog switch) and a couple op-amps, plus some timing stuff (could be done with 74HC123 or op-amps or CMOS gates with diodes, resistors and capacitors etc.). The hold time is only 50msec maximum, so something like a 100n film or NP0 capacitor would be suitable for the hold and integrating caps (possibly 10n for the integrating cap).
Doing this with a single power supply is completely feasible, but would involve a few more parts.
All-in-all, the microcontroller approach would probably win in most cases, if only because the accuracy of even the "free" clock in the microcontroller would be better than most practical RC tolerances that would limit the integrator accuracy (you might need a trimpot for calibration). In either case, a voltage reference (might be the power supply) is required.
You could use the same tricks that a slope-oriented ADC works. Start a counter counting on the pulse, and read the count on the falling edge. If analog is a must, you can use a shift register to shift the count into a D/A, or just use an R-2R ladder.
Alternatively, you might be able to use the high pulse to gate a constant current source and use it to charge a capacitor to a voltage which will increase linearly with charge time. You'd probably want some logic/relays/switches/caps to hold the voltage on the count until the next update.
By the time you're done with this, you might find that learning some 8-bit microcontroller environment might be cheaper and faster. Even if you insist on sticking to something like the Arduino, it would probably work better in the long run