Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 2.68 KB

M4_DAC_AREF_test.md

File metadata and controls

33 lines (19 loc) · 2.68 KB

ADSR Envelope Extension for the Precision Waveform Generator FeatherWing

AD9833_ADSR

M4 DAC AREF Test

In normal operation, the A0 DAC will produce an output voltage that is a fraction of the DAC's reference voltage as present on the Feather's AREF pin. Since the AREF pin is directly connected to the Feather's +3V power (nominally 3.3 volts), the DAC output is a fraction of the +3V supply voltage. Fortunately, the copper trace that connects AREF to 3V was designed to be removed, allowing other reference voltages to be substituted for +3V.

After the trace was removed, the 0v to +3v output of the waveform generator was connected to the AREF pin. The DAC reduced the voltage of the waveform generator, providing a variable amplitude based on the DAC digital input value. The ADSR envelope was generated by manipulating the DAC value in the CircuitPython code.

Image of AREF Test

The signal distortion caused by the AREF minimum bias voltage value (~1v) is clearly shown below. However, the test proved that the M4's on-board DAC can be successfully used to control AREF signal amplitude as long as the AREF signal voltage is between Vcc and +1v.

Test Results

WARNING: Remove the trace between 3V and AREF on the Feather board before attaching anything to the AREF pin. Don't connect any voltage to the AREF pin greater than the 3V provided by the Feather or lower than 0V (no negative voltage).

Image of AREF/3V Trace

Concepts Learned

  1. It's possible to modulate the wave generator's output using the Feather M4 Express DAC AREF input pin (cut the 3.3v trace first).
  2. The AREF pin requires a voltage bias of at least VCC (typically +3.3 volts) and no less than 1.0 volts, although it worked emperically down to 0.5 volts.
  3. The M4 DAC resolution is much greater than required to generate a sufficient ADSR envelope.
  4. Using the AREF pin only changed the DAC reference voltage, not the ADC.
  5. The reference voltage for both on-board DACs was supplied by the single AREF analog input pin essentially making the second DAC useless for other purposes.

Project Ideas:

A manual level control for the CircuitPython audioio library using the AREF pin for both M4 DACs (stereo output). A logarithmic potentiometer may be preferred for audio applications.

Image of Manual AREF Level Control