1
\$\begingroup\$

I'm developing an incubator which includes a hot air pump.

I'm generating the heat with 2 40W-12V ceramic resistor from 3D printer conected to a transistor (IRF540N) which is controlled by an Arduino (using PID library.)

For safety, I added an LM35 to check whether the temperature rises over the plastic box melting temperature. The problem I have is that every time I do a measurement (I'm trying to tune the PID parameters) the same strange noise appears almost at the same time (between 200 and 700 seconds.)

Here you can see the schematics for the measurement system:

A0 is Arduino's analog input. The LM35 and the arduino are conected with a 1 m long mesh cable

A0 is the Arduino's analog input. The LM35 and the Arduino are conected with a 1m long mesh cable.

On the other hand, the PID circuit is as follows:

D3 is Arduino's PWM output.

D3 is the Arduino's PWM output.

The error I'm talking about can be seen in the following pictures. It repeats in EVERY measurement but more or less the same shape.

Blue line represents LM35 measurement over time

The blue line represents LM35 measurement over time.

If you were wondering what the PWM signal looks like (I suspect it might have something to do with the ascending signal of the PWM) here it is in a percentage representation:

enter image description here

This signal may change with the PID configuration but the noise is almost the same.

Last but not least, it is worth mentioning that the LM35 is mounted on the same small PCB board where the resistors are.

EDIT: Here you can see other measurements to ilustrate the repetition of the problem (in shape and in time length):

enter image description here enter image description here

\$\endgroup\$
  • \$\begingroup\$ The three signals in the first graph - where are these on the schematic? \$\endgroup\$ – Andy aka Apr 8 at 15:32
  • \$\begingroup\$ How many temperature measurements does the (circled) anomaly represent? \$\endgroup\$ – Brian Drummond Apr 8 at 15:35
  • \$\begingroup\$ @Andyaka . The signal of intrest is the blue one. In the schematic of the first picture you can find it in A0 (middle-right of the picture). The red one represents the setpoint that the green one has to reach ( not a problem for now). \$\endgroup\$ – Shupper Apr 8 at 16:38
  • \$\begingroup\$ @BrianDrummond It represents approximately 200 samples (200 seconds). \$\endgroup\$ – Shupper Apr 8 at 16:41
  • \$\begingroup\$ What is the schematic of your LM35 circuit (what's at the end of that cable)? \$\endgroup\$ – Spehro Pefhany Apr 8 at 17:00
2
\$\begingroup\$

You should have either a series resistor on the LM35 or a compensation network as shown in the datasheet. The resistor or network has to be at end of the cable close to the LM35.

They are quite intolerant of capacitive loading (50pF maximum) so 1m of cable could quite well be pushing it into oscillation.

enter image description here

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Thanks for the answer! I'm going to try this. I have a question though... why would the oscillation be only on one part of the measurement? What would be the difference in the effects between both figures you posted? \$\endgroup\$ – Shupper Apr 8 at 17:59
  • \$\begingroup\$ It’s not unusual for that to happen when a circuit is on the edge of oscillation- some difference in loop gain with different bias or something like that. \$\endgroup\$ – Spehro Pefhany Apr 8 at 18:00
  • \$\begingroup\$ "1m of cable could quite well be pushing it into oscillation" With a frequency of about 0.005 Hz? Could you please explain? \$\endgroup\$ – Huisman Apr 8 at 19:19
  • \$\begingroup\$ Are you capturing the signal at a high enough sample rate to see what is really happening? If not then oscillation can manifest in several ways, one of which is apparent DC shifts, unusual sensitivity to things like cable length or temperature, or sometimes you can pick up aliasing. \$\endgroup\$ – Spehro Pefhany Apr 8 at 19:20
  • 1
    \$\begingroup\$ Even an oscilloscope does not always show the truth if there is a big capacitance hiding internal oscillation— it may show up in DC drift, inaccuracies and increased power consumption. \$\endgroup\$ – Spehro Pefhany Apr 8 at 19:29
0
\$\begingroup\$

Note the break in the continuous curve is symmetrical around the dashed red line (0?) and the slope during the anomaly is several times the neighbouring regions.

I don't know what you are measuring it with, but I bet it has some kind of auto-ranging capability, and is switching to a higher gain setting during this part of the range because the signal is close to 0. Then, whatever tool you are using to plot the result doesn't know about the autoranging.

| improve this answer | |
\$\endgroup\$
0
\$\begingroup\$

Though I'm going to try fixing the problem with @Spehro Pefhany solution. I don't have any components right now. In the meanwhile, the problem was fixed by lifting the power supply case from the surface where the measurement was being done....

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.