Temp Fluctuating when connecting and disconnecting the power to stepper motors on Arduino Uno CNC Shield

Basic Information:

Printer Model: Custom
MCU / Printerboard: Arduino Uno
Host / SBC: Raspberry Pi
klippy.log

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

I have connected the wires for a thermistor to my Arduino Uno at Analog Pins 3 and 4. Whenever I connect the power supply, the temperature reading jumps up about 20 degrees, and when I disconnect, it jumps back down. It occurs both when the thermistors are connected and when they are disconnected. My temp circuit has no joined connection to the heater. The power supply for the stepper motors is 24V 2.5A. I need help to figure out the cause of this bizarre behaviour. Thank you
logs-20250723-204803.zip (132.6 KB)

When I look at your klippy.log, I definitely see some strange things at 2:00:

You’re going to have to provide a lot more information regarding your hardware.

What kind of shield are you using for the Arduino Uno?

How have you wired things together?

A wiring diagram would be very helpful.

Hi. Sry for not providing those details. I am using Arduino Uno Cnc Shield V3. I have attached the wiring diagram and the cnc shield pic. Thank you


That’s not a wiring diagram.

I would like to see the wiring for the entire printer including how you are powering the printer. Of particular importance, especially in this case, is understanding how GND/VIN- is wired.

Why are you using a 100k resistor as the pull up for your thermistor? Traditionally it’s 4.7k 1%.

This is the diagram for the connections to the 24 V. I have tried to disconnect the probe, but the temp still fluctuates. Both the thermistor temps show the same fluctuation. Only other thing powered by the 24V are the stepper motors. Nothing else is connected to the circuit. I googled how to connect a thermistor to Arduino, and it said to connect a 100k thermistor to a 100k resistor. Sry for the bad drawing. Thank you

My 5v is coming from the Arduino itself. It is powered by a usb connected to the pi.

Getting there but not what I am asking for.

Can you add the Adurino power wiring, it’s connection to the Raspberry Pi Host and how the Raspberry Pi is powered.

You’re saying you get a jump in the measured temperature when you turn on the 24V - that means there is a problem somewhere in the power wiring.

Please provide a complete diagram showing:

  • The Arduino Shield (as you’ve done)
  • The Arduino power supply and connection to the Raspberry Pi
  • The Raspberry Pi power supply

The quality of what you’re providing is fine - I just want to see a diagram of the entire system with power.

Sorry, what is “PROBE”?

You should really change the 100k pull up resistor to 4.7k 1% - it will give you a better dynamic temperature range.

Sry for the confusion. The probe is the Inductive Proximity Sensor LJ12A3-4-Z/BX.

I have a Raspberry Pi Model B with the original Raspberry Pi 15W adapter. I am powering the Uno with the USB A to B wire. Excluding the stepper motors, I have three endstops, two MOSFETs (Powered by an Arduino 5V), and a Proximity sensor. Those 2 MOSFETs are for the hotend heater and the part cooling fan. I will change the resistor, but for now, I wanted to find the problem here. Should I disconnect the probe GND from the 24V and try again?

The shield is placed on top of the Arduino Uno. I will attach its schematics in the next post.
I have attached the pic of my setup. It’s messy—Sry for that.




I have another 12V power supply that is only used for the fan and the hotend heating. It is only connected through the MOSFET and isolated from the Uno. When I disconnect and reconnect, the temps don’t change.
I have attached the updated drawing, which includes the 12V option. Really sry for the bad drawing. Thank you

This last picture is getting closer to what I’m looking for:

Please confirm that the Arduino Shield is attached to the Arduino Uno and the Arduino Uno is powered by the Raspberry Pi that it is attached to - correct? That is what I’m taking from what you’ve written.

What is the 24V power supply that you’re using? Is it plugged into the wall and how is it wired? I want to understand how you’ve connected AC “Earth” (if you’ve done so).

What is the 12V power supply? Is it plugged into the wall and how is it wired? I want to understand how you’ve connected AC “Earth” (if you’ve done so).

Now, for the “HotEnd” and “Fan” MOSFETs, you don’t have a common ground between the MOSFET’s Source and GND on the Arduino Shield - you’re driving the Gate without a reference to the Gate’s voltage.

Oh. I got it. I cut the probe wire from the GND of the thermistor and connected it to the GND on arduino and it worked. Now it doesn’t fluctuate anymore. Thank you for helping me out

What happened was that the probe required 3 resistors and voltage dividers. They were interfering with the input pin on Arduino due to stray current.


My impression is, 100k Ohm (pull-up resistor) is way too weak.
I would stick to the Klipper documentation Configuration reference - Klipper documentation and try it.
I wonder about
heater_bed: target=0 temp=-80.5
from your klippy.log. Why is “temp=-80.5” negative and so off from the target temperature?

and
extruder: target=200 temp=107.1
follows with the same pull-up. Why?

Arggh. I should have caught that you have a ground loop (in Blue):

So you should have made the cut where I put the Red “X” - correct?

Now, what are you doing about the floating 12V GND/-V (relative to the 24V GND/-V in the rest of the circuit).

I like that too. Definitely worth a try.

What I did was connect it directly to the Uno, rather than to the GND of the thermistors.

??? I was asking about the 12V wiring because the MOSFETs and the driving signal don’t have a common Ground reference according to your diagram.

The 12V V- should be connected (at one location) to the V- of the 24V supply which is connected to the GND (at one location) of the Uno shield.

Everything needs a common ground reference.

Yeah sry abt the mistake in diagram. I connected the Ground to the Ground pin on the uno directly.