Calculating Unknown Resistor with Arduino

Ok, here is the diagram. Probably have some things wrong and am probably missing other aspects, but this should be drawn correctly anyways.

Some notes about it:

  • The W5500 ethernet shield sits directly on top of the Mega, so I didn't think it'd be necessary to include its digital pins.
  • I am quite unsure how the relay is wired, but I think I got it right. I'm assuming the squiggle on the left of it is the coil? Regardless, the relay is triggered via the 5V from D8. This relay also activates a vacuum pump that is independently powered via it's own built-in power supply. I think the guys before me just rewired something on the inside to have the relay act as a power switch.

How this unit works:
When the user presses the "Master Test Switch" (connected to D2), the Mega (writes HIGH) D8 and then waits for the vacuum switch to throw on D3. During this time, the pump and the circuits are active. When that throw is detected, the Mega reads the analog inputs and (writes LOW) D8, disabling the circuits and the pump.

If I have something mis-wired, please do let me know. I am back within my goal and don't think I can get more accurate than what I am right now without ripping this unit apart completely (or adding a correction factor in code). Regardless, thank you to everyone--through the frustration--on your help. Hopefully you won't see me again :slight_smile:

P.S. I'm leaving this thread with "No solution". It's far too difficult to determine what suggestions actually really fixed this unit, and would be unfair to others who suggestions contributed.