<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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.</div>
<div id="appendonsend"></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>From:</b> Synth-diy <synth-diy-bounces@synth-diy.org> on behalf of Scott Bernardi via Synth-diy <synth-diy@synth-diy.org><br>
<b>Sent:</b> 20 June 2024 02:16<br>
<b>To:</b> SDIY List <synth-diy@synth-diy.org><br>
<b>Subject:</b> [sdiy] Quantizer with Arduino, ADS1115 and MCP4725</span>
<div> </div>
</div>
<div style="direction: ltr;">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.</div>
<div style="direction: ltr;">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.</div>
<div style="direction: ltr;">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. </div>
<div style="direction: ltr;">Internally in the Arduino code I could represent the values for scales as number of semitones. For example, a major scale would be</div>
<div style="direction: ltr;">0 2 4 5 7 9 11 semitones.</div>
<div style="direction: ltr;">Minor would be</div>
<div style="direction: ltr;">0 2 3 5 7 9 10</div>
<div style="direction: ltr;">The necessary binary counts would then be 512 times these.</div>
<div style="direction: ltr;">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.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">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.</div>
<div style="direction: ltr;">The MCP4725 can be run up to 5.5v so 5.333v should be OK.</div>
<div style="direction: ltr;">Maybe use a single MCP4725 and some sample/holds to handle four outputs.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">I am a rank beginner at Arduino programming but am a programmer by profession and somewhat familiar with C++.</div>
<div style="direction: ltr;"><br>
</div>
<div style="direction: ltr;">Does this sound feasible?</div>
</body>
</html>