[sdiy] Quantizer with Arduino, ADS1115 and MCP4725

Mike Bryant mbryant at futurehorizons.com
Thu Jun 20 03:30:40 CEST 2024


Either that or just put a resistive divider and buffer on the input to scale the 83.33mV steps down to 83.33 * 5 / 5.333 mV steps and use 5V on the reference.

________________________________
From: Synth-diy <synth-diy-bounces at synth-diy.org> on behalf of Scott Bernardi via Synth-diy <synth-diy at synth-diy.org>
Sent: 20 June 2024 02:16
To: SDIY List <synth-diy at synth-diy.org>
Subject: [sdiy] Quantizer with Arduino, ADS1115 and MCP4725

I'm thinking of doing a quantizer with Arduino nano and external ADC using ADS1115.  With that I get 4 input channels at 16 bits.
My question is surrounding changing the reference voltage (which would have to be the VDD of the ADS1115) to 5.3333v (instead of standard 5.0v so I can get to the 1/12v for a semitone in 1v/octave (83.33mV) by a binary divisible value.  For example, 5.3333 / 64 = 83.33 mV which is our value for a semitone.
For a 16 bit ADC, (ADS1115 is actually 15 bits with a sign bit for a total count of 32,768) each semitone would then be represented by 512 bits.
Internally in the Arduino code I could represent the values for scales as number of semitones. For example, a major scale would be
0   2   4   5   7   9   11         semitones.
Minor would be
0   2   3   5   7   9   10
The necessary binary counts would then be 512 times these.
Using the number of semitones for the scales is convenient, because then for the 12 bit MCP4725 output, I would multiply by the bits per semitone value of 32. Or another way to think of it is to throw away the 3 least significant bits and the sign bit to go from 15 bits plus sign bit to 12 bits for the output.

I think running the ADS1115 at 5.3333v would be OK.  The chip itself can run up to a max of 7 volts.  The inputs can accept a max of VDD + .3v and -0.3 voltage; so using schottkys to clamp the inputs should be OK.
The MCP4725 can be run up to 5.5v so 5.333v should be OK.
Maybe use a single MCP4725 and some sample/holds to handle four outputs.

I am a rank beginner at Arduino programming but am a programmer by profession and somewhat familiar with C++.

Does this sound feasible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://synth-diy.org/pipermail/synth-diy/attachments/20240620/6023e197/attachment.htm>


More information about the Synth-diy mailing list