I have 4 boards for this Arduino project:
(from bottom up):
- Arduino Mega 2560 - powered by 12V supply
- Trinamic TOS-100 stepper motor card - powered by 12V supply
- Custom board with LM35 component going to 5V pin, GND (on that same 8-pin section), and Vout going to A2 (using 1.1V reference to read in analog values.) - powered by the regulated 5V from Mega (which currently reads 4.83V).
- 16X2 LCD display (powered by a separate regulator circuit from 12V supply so as not to compound current draw from Mega.)
The component setup of entire project:
- 12V supply powers fan
- Fan blows air into a small cube.
- Inside the cube is the LM35.
- In between the cube and the fan is a Peltier sensor.
- The Peltier hot is connected to 12V, the cool is connected to IRL530NS transistor which is connected to digital output 42 on Arduino.
- A PID looping algorithm is used to bring ambient down to setpoint of 6 degrees C.
- When setpoint is reached, digital output 42 sends appropriate signal to transistor, switching it, allowing the Peltier to stop cooling to bring temperature back above setpoint.
As the PID is driving down the temperature, the current draw for all these components is ~4.33A.
When the setpoint is reached, and the temperature goes to < 6 degrees, the transistor switches, and current draw is now (appropriately) ~0.38A.
The only after-effect is the readings produced from the LM35. If the temperature on the LCD reads 5.89 deg C (for example), the transistor switches, then the readings become ~1.2 deg C.
I read about how LM35 needs its ground pin to be the sole connection to the ground pin on the Arduino.
However, because of the stacked design, that ground pin passes through the Trinamic TOS-100 ground pin.
When I removed the Trinamic and just ran the same setup, the current drop still ended up ~0.38A but the LM35 no longer produced faulty data (at least, according to the LCD display.)
Clearly, the Trinamic is disrupting the reading of the LM35. Here are the questions that I have (as a beginner in engineering.)
Why is this?
How can I electrically categorize the error?
How can I determine if it truly is conflicting grounds that produce the error?