Go Down

Topic: Conflicting grounds for 1 sensor and 1 stepper motor controller card (Read 79 times) previous topic - next topic


I have 4 boards for this Arduino project:
(from bottom up):
1. Arduino Mega 2560 - powered by 12V supply
2. Trinamic TOS-100 stepper motor card - powered by 12V supply
3. 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).
4. 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:
1. 12V supply powers fan
2. Fan blows air into a small cube.
3. Inside the cube is the LM35.
4. In between the cube and the fan is a Peltier sensor.
5. The Peltier hot is connected to 12V, the cool is connected to IRL530NS transistor which is connected to digital output 42 on Arduino.
6. A PID looping algorithm is used to bring ambient down to setpoint of 6 degrees C.
7. 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?


That's probably not a ground problem.   Check the 5V to the LM35 to make sure it's holding constant, check the output-voltage from the LM35, and while you're at it check the LM35 ground to make sure it reads zero.

You may also need a 0.1uF bypass capacitor across the LM35 (between +5V and ground, and as physically-close to the LM35 as possible).


The 5V going to the LM35 was dead on with the output of the Arduino's 5V regulator...so that was ok.
The output voltage was also dead on with the 10mV/deg.C conversion versus output.

My bad, I had forgotten to mention the 26.7k and 0.1uF low pass filter on the output.

Turns out, I removed the wire from the ground of the LM35 (which, again, was directly in line with the Trinamic ground), and wired it to one of the GND pins on the side of the double-pin bus on the Mega.

This did the trick. 

To finer-tune the output, I'm going to make another 5V regulated circuit for the power to the sensor (although I don't know if this will affect the 1.1V reference usage for reading the analog signal..seeing as it's relative to the Arduino (at least that's how I think it works.))

Go Up