+20mV increase with larger load when reading absolute magnetic encoder - Mega

I've got an MAE3 absolute magnetic encoder outputting an analog signal to my Arduino Mega.

It's job is to keep track of the rotational position of a 16-vial carousel (powered by a Trinamic TOS-100.)

This carousel is lodged within a small metal box that uses a fan, Peltier sensor, LM35 sensor, and PID algorithm to keep drive the temperature from room to about 4 deg. C.

Once the PID algorithm takes the temperature down to 4 deg. (called the setpoint), this transistor I wired to the peltier output goes into high impedence, so the overall load experienced from the start goes from 4.6A to around 0.44A. This is expected.

The PID algorithm hovers around 4 deg. C by sending the proper output to the transistor, so the load switch from 4.6A to 0.44A (once the algorithm is working to maintain 4 deg.) occurs every 10 seconds or so.

Here's my concern:

If the switch goes from 4.6A to 0.44A, the analogRead value of my absolute encoder drops 20-25mV (and vice-versa, except increases 20-25.)

The 10-bit ADC means that each bit is roughly 4.88mV, and when I print out the analogRead values, there's always a steady 4-5 bit increase.

If this all makes sense so far, how do prevent this fluctuation in analog signal?

Honestly, it's not imperative at all. I have a calibration procedure that allows me to move the carousel to the 1st vial, capture a fairly-accurate A/D value from the encoder, then map the other values to the 15 vials.

However, if a customer should manually move this carousel, the encoder should detect a change in the A/D that's outside a specific range...and the Trinamic should rotate the carousel to get back to the vial spot.)

Because there's a 4-5 bit fluctuation, I put my range at +- 10 bits. This is all fine and dandy, but I still want to figure out how to marginalize the error.

Thanks.

This almost certainly has to do with variation in the supply voltage to your Arduino, as by default Vcc is the reference for your ADC. With these currents it's hard to avoid small differences in Vcc, and if Vcc changes, the ADC reading changes accordingly.

As I understand from you, your encoder produces an absolute voltage, and for that you best use an absolute reference. The Arduino has a 1.1V reference built in, iirc the Mega also has a 2.5V reference. This also means you have to bring down your encoder's voltage to fall within that range, this you can do with a simple voltage divider.

This will also improve the reading of your LM35 sensor - those also produce an absolute voltage.