This design, along with its firmware and scripts were made so that the CVs of the Eurorack MIDI to 16x16 CV Gate Module (MIDI_16Gx16CV) could be calibrated and the other functions tested. That module is difficult to validate after assembly and had some teething issues that I wasn't able to figure out without a way to measure all of the CVs across a wide range of outputs. I tried to make measurements of the module manually on the first few I made but the results weren't amazing.
The initial intent was for the main board of the MIDI_16Gx16CV to plug directly into the test fixture. The test fixture has connector sockets aligned with the main board. Unfortunately I made a classic mistake mirroring the design so I had to create some cables to connect the test fixture to the DUTs. In the end that worked out okay, I'm not sure it would have worked if the headers had been correct (for other reasons).
The test fixture uses an Arduino Pro Mini. To get enough I/O to read the gates and CVs of the DUT, the fixture uses a MCP23018 a 16 pin I/O expander and two MCP3208 ADCs. The I/O expander is connected to SPI and the ADCs are connected to I2C.
The fixture has 3 LEDs which I've assembled with different colors these could be used for a various statuses.
After assembling the test fixture I found that the ADCs were in need of calibration. The LM4040 voltage reference for the ADCs was disappointing. I think the LM7805 provides a more accurate and stable 5V. With either voltage reference, the ADCs need to be calibrated to get the measurement accuracy needed in the DUTs so the first step in using them was to get voltage readings from 0-10V in 0.5V steps, read the ADCs several times and average the readings. At that point I decided that trying to create a self-contained auto-calibration test fixture wasn't going to happen. I settled on recording the test fixture's calibration values and applying them in the scripts used to measure and calibrate the DUTs. This choice has (for now) kept the test fixture firmware fairly simple.
The test fixture firmware accepts command strings via the serial port normally used for uploading firmware updates. The commands can trigger the test fixture to read the digital or analog inputs and they can send MIDI commands to the DUT.
The rest of the calibration is managed by some python scripts.
To test/calibrate a DUT the general steps are:
- Connect the DUT (all 3 cables, one for each header), plug in a USB serial adapter to the test fixture's Arduino.
- Run the test_dut_cv.py script to activate every midi note on the the DUT and measure the CVs with the test fixture.
- Use convert_dut_cv_to_cal_table.py to convert the output of test_dut_cv.py and get the DAC_CAL_VALS table (see DUT firmware).
- Reprogram the DUT with the DAC_CAL_VALS table.
- Run the test_dut_cv.py again and then useconvert_dut_cv_to_cal_table.py to validate the result.
An uncalibrated DUT's CVs look something like this before calibration:
Before Calibration |
|
After Calibration |
After Calibration |
- The 20pin headers are on the wrong side to use directly with the DUT. Fixing that would make it a lot simpler to use but it would need a completely new PCB layout.
- Figure out a replacement or simplify the 5V reference for the ADCs. The LM4040 wasn't very good. The LM7805 is probably fine.
- To get the test fixtures serial port to work at the same time as the MIDI output to the DUT a rework needs to be done. Here's a redline of the schematic for that.
- R100-R115 need to be 11kΩ to keep a 10V input in the range of the ADC. Noted in BOM not on schematic.
- Could probably switch to SMD i/o expander and ADCs if available. I designed for DIP versions because other packages were difficult to find.
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Comments
Post a Comment
Comments are moderated. Comments containing links are marked as spam.