PWM Isolator Test Board01 Jul 2016
The GotT has the ability to read in a PWM signal like the ones output by most R/C receivers.
While most receivers do include 5V regulated output it cannot be assumed that the receiver, and whatever it is connected to, share a common Ground connection.
Arbitrarily shorting receiver Ground to GotT Ground, for instance, could release the magic smoke. Thus, isolation is necessary.
This isolation is achieved through the use of an opto-isolator.
Here is a simplified version of the schematic for the PWM isolator test board:
The key component of this design is the aforementioned opto-isolator.
An Opto-isolator is a component that transfers signals between two isolated parts of a circuit using light.
The key feature of an opto-isolator, or any type of isolator for that matter, is that it electrically separates one circuit from another while still allowing for information to be shared between them.
You may notice in the above diagram that the the Ground connection on the right of the circuit is labeled GND while the ones on the left are labeled GNDD.
Technically speaking, GND is usually common Ground, GNDD is digital Ground, and GNDA would be analog Ground.
How they are labeled in the schematic in this case is totally irrelevant. The important thing is that they are in no way connected to one another.
The only connection between the two halves of the circuit are the photons inside of the opto-isolator.
Here is a diagram of the internal structure of an opto-isolator:
If these internal components look familiar, don't be surprised.
The component on the left is a LED and the component on the right is a phototransistor.
Types of opto-isolators
- Resistive opto-isolators (sometimes called a Vactrol) were originally produced in the 1960s and often used incandescent bulbs and photoresistors and generally switched very slowly compared to other options.
One common application of these was the 'tremolo' effect in guitar amplifiers and analog synthesizers though the early 1970s.
- Diode opto-isolators commonly employ infrared LEDs as a light source and a Silicon photodiode as a sensor.
Diode opto-isolators are also generally the fastest switching type of opto-isolator but have very poor current transfer ratios of around 1/10% which can make additional amplification necessary.
The output of photodiodes is also not quite linear which can make them a bit trickier to work with.
- Transistor opto-isolators (which are the type we'll be using here) also typically use infrared LEDs as a light source but employ phototransistors as a detection method.
While somewhat slower than photodiodes (but still plenty fast for an R/C PWM signal of typically 50Hz), phototransistors commonly have current transfer ratios in the neighborhood of 100%-1,000% and have the added benefit of behaving essentially like transistors which is convenient.
Other types of opto-isolators (and isolators in general such as high-speed inductive isolators) exist for specialty applications that require very high speed or high current transfer ratios.
Unidirectional vs. Bidirectional
While all of the aforementioned opto-isolators allow for the sharing of information in one direction (from emitter to detector) it is also possible to construct bidirectional opto-isolators for two-way communication.
While not required for this particular application, bidirectional opto-isolators often rely on the little known fact that virtually all semiconductor diodes (not just LEDs) are capable of responding to light.
Some types of diodes are much better at this than others, particularly near-infrared GaAsLEDs.
Bidirectional opto-isolators are thus commonly constructed using a pair of such LEDs pointed at one another.
Perhaps you are wondering what the funny triangle before the opto-isolator in the above circuit is for?
It's a buffer!
The input value of a buffer is the same as the output which might leave you pondering what in the world it could be of any use for.
The buffer helps to provide reverse protection for the device connected to the input (such as the R/C receiver) as well as ESD protection.
It's main function though is to provide drive current for whatever is attached to its output.
While the regulator powering the +5V rail of many R/C receivers is capable of supplying the current necessary to drive several servomotors, the PWM output of these receivers is primarily a voltage-level signal and might not be able to source enough current to drive the LED inside of our opto-isolator.
The buffer helps us to solve this problem by outputting the same PWM signal with a much more predictable and typically higher drive strength.
The resistor between the output of the buffer and the input or the anode of the LED side of the opto-isolator is a current limiting resistor just like in any normal LED circuit.
It's value can be calculated using the formula:
R = (VS - VF)/IF
- R is the resistance of the current limiting resistor we are attempting to solve for in Ohms (Ω)
- VS is the source voltage output by the buffer in volts (V): +5V
- VF is the forward voltage of the LED inside our opto-isolator in volts (V): +1.2
- IF is the typical current drawn by the LED in Amperes (A): .02A (20mA)
Inserting the above terms into the equation gives the required current limiting resistor value to be:
R = (5 - 1.2)/.02 = 190Ω
190Ω isn't a common resistor value and it is typical practice to round up to the nearest common value which in this case would be 220Ω.
A Potentiometer is simply an adjustable voltage divider.
Here is a scope shot of both the PWM input (CH1) and isolated output (CH2).
The input is the GEAR channel from an RC receiver, seen here in its LOW state.
While the buffer and opto-isolator do impart a very small propogation delay on the signal, increasing the input pulse width by switching the GEAR channel to HIGH translates to an equivalent output virtually instantaneously for the purpose described here.
One noteworthy point is that, while the rise times are both very short, the fall time of the output channel is quite a bit longer than the input channel by a little over 100μs.
All of the design files and BOM for this board can be found on the GotT-Translation-Circuit GitHub page and PCBs may be ordered here: