**5. Analog to Digital Conversion**

The SSCB was tested using the MEGA 2560 R3 microcontroller. The controller has a 10-bit resolution ADC and operates with a 16 MHz clock. The ADC conversion rate was increased from 9600 Hz to 50 kHz, resulting in one read every 20 μs. The equation governing the output of the ADC converter is

$$\mathbf{V\_{a}} = \mathbf{R\_{v}} \ast \mathbf{5}/1023,\tag{9}$$

where Va is the analog voltage read by the converter and Rv is the integer return value seen by the controller. Equations (1) and (9) were combined to determine the current passing through the SSCB, resulting in the following equation:

$$\mathbf{I}\_{\rm in} = 0.239 \ast \mathbf{R}\_{\rm V} - 25.544.\tag{10}$$

Equation (10) was multiplied by 1000 to avoid the use of floating-point numbers and coded as

$$\mathbf{I}\_{\rm input} = 239 \,\mathrm{\*}\,\mathrm{R}\_{\mathrm{V}} - 25544 \,\mathrm{,}\tag{11}$$

where Iinput = Iin ∗ 1000. The current will be incremented up or down by a minimum of 0.239 A due to the ADC integer return values from 0 to 1023. Therefore, it should be noted that a slight range in variation is to be expected at any given setpoint.
