<script type="text/x-red" data-help-name="AudioOutputPWM"> <h3>Summary</h3> <div class=tooltipinfo> <p>Transmit audio using Teensy 3.1's PWM pins. Two pins are used for coarse and fine pulses, to be combined by scaled resistors.</p> </div> <h3>Audio Connections</h3> <table class=doc align=center cellpadding=3> <tr class=top><th>Port</th><th>Purpose</th></tr> <tr class=odd><td align=center>In 0</td><td>Audio Channel</td></tr> </table> <h3>Functions</h3> <p>This object has no functions to call from the Arduino sketch. It simply streams data from the its input port to the PWM pins.</p> <h3>Hardware</h3> <p>The following circuit is recommended.</p> <p align=center><img src="img/pwmdualcircuit.jpg"></p> <p>Signal range is approx 1.55 Vp-p.</p> <p>These resistor values assume approx 20 ohms output impedance on the digital pins. The 127K resistor may be adjusted or trimmed for variation in output drive and tolerance on the 475 ohm resistor.</p> <p>A plastic film (Polypropylene, Polyethylene, Polyester, etc) or C0G/NPO ceramic capacitor should be used for filtering. Low quality ceramic (X7R, Y5V, Z5U, etc) can cause signal distortion.</p> <h3>Examples</h3> <p class=exam>File > Examples > Audio > HardwareTesting > PassThroughMono </p> <h3>Notes</h3> <p>This object only works properly when Tools > CPU_Speed is set to 48 or 96 MHz. Other speeds aren't supported and will likely fail in strange ways.</p> <p>The PWM carrier frequency is 88.2 kHz. The suggested circuit will only slightly filter the carrier. Extra filtering will be required for a clean signal without the ultrasonic PWM carrier. </p> <p>Analog signals created by filtering PWM waveforms use the digital power supply as their reference voltage. Any noise on the digital power line can directly couple to the output signal. The built-in DAC or <a href="http://www.pjrc.com/store/teensy3_audio.html" target="_blank">audio shield</a> should be used when higher quality signals are needed.</p> </script> <script type="text/x-red" data-template-name="AudioOutputPWM"> <div class="form-row"> <label for="node-input-name"><i class="fa fa-tag"></i> Name</label> <input type="text" id="node-input-name" placeholder="Name"> </div> </script>