Close

Learning to hate ADCs

A project log for 1 Square inch 4-quadrant floating power supply

A 4-quadrant power supply built on a 1sqin PCB, +/-12V, 100mA, and floatable for multiple paralleling/series. 4layer, $10 OSHPark PCB.

martin-heldMartin Held 09/30/2018 at 16:300 Comments

I am learning to hate ADC's on this ATSAMD21 chip.   The datasheet has all the relevant information I'm sure, but it's just a hot mess to understand. 

3V into the ADC is producing an ADC value of 2960-ish, on a 1/2 (VDDANA) reference (3.3V/2) using a 1/2 gain preamplifier.  Somewhere, somehow, I'm missing something in my configuration.  I have to travel today though to visit parents, so I'll have some time to think about it in the car.

I'm going to have to change the gain of my voltage amplifier from 0.125 to 0.1, as the 1.65 voltage reference used as the center reference for the amplifier cause the negative range (-12V) to show a 13.65V difference, which * 0.125 is 1.70V above the reference (1.65) and that's above the 3.3V rail where the ADC should even be operating.  Fortunately, this means changing a 1.2k resistor to a 1.0k resistor.  NBD.

I could probably lower the reference to like 1.5V if I so desired, but I don't think it's worth monkeying with at this stage.

Alrighty, off for 7 hrs of driving...

Discussions