Thermistor wonky when N / L are switched

So my heatbed thermistor (orange) showed weird fluctuations, sometimes random, sometimes very regular. After a lot of troubleshooting, I noticed it went away when the 230V lines of the heater are not connected. Reconnecting them: wonky again. I checked all cabling (no change) and then had the idea to switch the plug of the printer around (so switching neutral and live), and now its gone as you can see on the second picture. So its fixed, but any ideas what was causing those fluctuations? Is that maybe an indication of a bad SSR or something? Edit: Its still fluctuating, but a lot less. Additional Infos: - Thermistor showed same behavior on a different TH-port, while another thermistor on the normal bed port was fine. - In the first picture the heatbed was off for an extended period, so no power should have been flowing through the bed edit: Fixed: See the summary of this post: https://discord.com/channels/582187371529764864/1189608411109793872/1190773155963351112 Fix: Set your heater pwm to anything but a multiple of 50 Hz. For example:
#pwm_cycle_time: 0.02 #50Hz - default - wonky
pwm_cycle_time: 0.021 #47.62Hz - ok
#pwm_cycle_time: 0.01667 #60Hz - ok
#pwm_cycle_time: 0.01 #100Hz - wonky
#pwm_cycle_time: 0.008333 #120Hz ok
#pwm_cycle_time: 0.02 #50Hz - default - wonky
pwm_cycle_time: 0.021 #47.62Hz - ok
#pwm_cycle_time: 0.01667 #60Hz - ok
#pwm_cycle_time: 0.01 #100Hz - wonky
#pwm_cycle_time: 0.008333 #120Hz ok
No description
No description
208 Replies
Oskait
Oskaitβ€’11mo ago
more screenshots of the wonky times
No description
No description
No description
kokx
kokxβ€’11mo ago
I've been having the same problem since forever. I haven't tried switching live and neutral yet, so I will do so when I'm home. But it makes sense, that a live bed induces a small current in the thermistor wires which influences the measured temperature slightly
Oskait
Oskaitβ€’11mo ago
Thing is once the bed is heating it is a little wonky again which is not ideal. And I'm not sure if it does make sense, even when the ssr is switching the neutral wire theres no closed circuit and therefore no current should flow through the bed. And also I would think it should affect the thermistor more regularly or a lot faster, i.e. the 50 / 60 Hz the 230V are running at But good to know that I'm not the only one seeing this
Oskait
Oskaitβ€’11mo ago
hmmm it happens again, but a lot less deviation compared to before.
No description
Steef
Steefβ€’11mo ago
@oskait Finally, another victim! I have been up and down discussing this with RatRig for a while, never finding a full solution. I have ended up making sure that N \ L is always connected in the same way and left it at that. exactly the same happens for me. The oscillations do not have a constant period, sometimes the frequency of the oscillations slows down (i.e. your "wonky" times) I can only imagine this being an induction effect, we could try shielding the thermistor wires. The last comment I received from RR Pedro was to ensure that the Live wire was always the one going through the SSR. If those are switched, Live goes directly to the bed.
Oskait
Oskaitβ€’11mo ago
Okay so its not just my machine, that is good to know πŸ˜„ I still get some fluctuations with the Live wire going into the ssr, but a lot less as before. I will put the printer in the garage soon, maybe that changes something as well with less consumers running on the same circuit/ breaker
Steef
Steefβ€’11mo ago
Not sure how well these PSUs filter You are also running 230? (so not the meanwell variant of the PSU?)
Oskait
Oskaitβ€’11mo ago
I dont think its the psu, since Live / netral goes directly into the ssr / bed nope got the normal Weho, but yea 230V (germany)
Steef
Steefβ€’11mo ago
Perhaps the SSR does not fully "close" in either case, same issue here, went up and down with RR and Keevono I'll link them this thread
Oskait
Oskaitβ€’11mo ago
Alright then I dont have to try i guess πŸ˜„
Steef
Steefβ€’11mo ago
At first I thought the ground was to blame, I found out my wall plugs didn't actually have a ground wire connected to the pins
Oskait
Oskaitβ€’11mo ago
Maybe one of those filtered IEC plugs might help. uff that sounds like a hazard πŸ˜„
Steef
Steefβ€’11mo ago
that was slightly scary to find out, but wasn't the cause I was thinking the same, something like this (but a higher nominal power variant) https://www.conrad.nl/nl/p/schaffner-fn9244-1-06-fn9244-1-06-netfilter-met-iec-connector-250-v-ac-1-a-l-x-b-48-mm-x-22-5-mm-1-stuk-s-554112.html#productTechData
kokx
kokxβ€’11mo ago
I tested it on mine, reversing the plug (and thus live and neutral) lowers the amplitude of the wave, but not much Mine also isn't grounded. So that might be it
Steef
Steefβ€’11mo ago
oh jikes, definitely ground it - certainly the build plate You may induce a charge on the plate otherwise
kokx
kokxβ€’11mo ago
Unfortunately that isn't possible in my current situation, ground also isn't connected properly here in the utility closet of my place (shitty rental appartement) I mean that definitely happens anyway, but unlikely to happen in an unsafe way
Steef
Steefβ€’11mo ago
Ideally no, but I measured up to ~100 V on the build plate before grounding. You get a small lovetap out of it, very low energy built up on the plate. Still, not ideal
kokx
kokxβ€’11mo ago
Well my buildplate is connected to the frame and the power supply, so that will automatically dissipate the energy though the air quickly enough that it's not an issue (though please don't take this as any electrical engineering advice, I got academic training in it so my solutions are definitely not for general use)
Steef
Steefβ€’11mo ago
I believe I also saw higher thermistor undulations before I grounded, but I'm no electrical engineer
kokx
kokxβ€’11mo ago
Grounding seems like a very likely solution
Steef
Steefβ€’11mo ago
I had assumed that grounding would solve this, but unfortunately the readout undulations on the thermistor still occur after grounding the bed in the case that the live wire goes directly to the bed heater
kokx
kokxβ€’11mo ago
Though I'm a bit surprised that this only shows up while the heater is off, not when it's at 100%
Steef
Steefβ€’11mo ago
in that state, with SSR closed, no current should be running - so I am confused as to how that situation causes a response on the thermistor
kokx
kokxβ€’11mo ago
You grounded your bed as well right?
Steef
Steefβ€’11mo ago
yes, I did now slight leakage to ground?
kokx
kokxβ€’11mo ago
I'm wondering if the PSU is actually inducing a small current in its own casing, that gets transferred through the grounding into the bed That could induce an even smaller current into the thermistor wires, but that would be enough for this
Steef
Steefβ€’11mo ago
surely the PSU casing is grounded he said without verifying
kokx
kokxβ€’11mo ago
Oh it is I checked it, it is grounded as long as you connected the ground wire to the PSU in the designated spot And that grounding is also there to move the induced currents away from the PSU, but will also be transferred to everything else it can get into. Like the grounded bed
Steef
Steefβ€’11mo ago
If it is induction, it should still happen during heating / at temperature perhaps we don't see it due to auto-scaling of the graph
kokx
kokxβ€’11mo ago
That's the thing that gets me indeed It's also very hard to spots due to PWM Ehh, I mean PID
Steef
Steefβ€’11mo ago
We might shield the thermistor wires with a mesh of sorts another thing though, the "wonkyness" of the thermistor output isn't constant while sitting idle, the period of the oscillation can be seen to change dramatically like in @oskait 's pictures above
blacksmithforlife
blacksmithforlifeβ€’11mo ago
You can see the raw numbers in the klipper log
Steef
Steefβ€’11mo ago
I'll give that a look all this being said, if more / many people observed this we would see more reports perhaps something specific to our cases
kokx
kokxβ€’11mo ago
Lots of things that could cause this, one of them could be the sampling rate is very close but not equal to a multiple of the frequency of the introduced noise
Steef
Steefβ€’11mo ago
That's a good point, in that case it should repeat never let it sit long enough to observe that
kokx
kokxβ€’11mo ago
It looks like it does repeat here
Steef
Steefβ€’11mo ago
hmmm I may hook up a scope to the thermistor wires
kokx
kokxβ€’11mo ago
I should get a scope at some point, but yeah I got way too much tools for my small apartment already πŸ˜…
Steef
Steefβ€’11mo ago
I feel your pain, hobby projects go in / out of closets here when being worked on
kokx
kokxβ€’11mo ago
Yeah for me it's not just hobby, in some cases it could save me trips to the lab at work
Steef
Steefβ€’11mo ago
right, intentionally misconnected N/L now - letting it go for a while and grabbing a scope
kokx
kokxβ€’11mo ago
Good luck! Let me know what happens I'm curious
Steef
Steefβ€’11mo ago
heh I can see 50 Hz on the thermistor wires with the bed on L while at idle switching N/L now and only picking up HF noise on the thermistor when I have N/L as intended picking ground from the PSU case @kokx. I think we are just seeing induction from live to the thermistor wires and sampling is causing the wonkyness, as you mentioned doesn't quite explain why it's not seen when we heat - but maybe the PWM control makes that difficult
kokx
kokxβ€’11mo ago
PWM probably hides that completely Ehh, PID That's basically going to be several waveforms added to each other
Steef
Steefβ€’11mo ago
ah yes, because it would respond to the thermistor output which is being affected by the induction
kokx
kokxβ€’11mo ago
In theory if we figure out the amplitude we could probably cancel the wave out of it and make the PID more accurate with some FFF, but I think it that is an amount of work for literally no gain
Steef
Steefβ€’11mo ago
It seems that your electrical engineering background is deeper than mine, would a grounded metal mesh shielding around the thermistor wires prevent the induction on the thermistor wires? ( I say deeper, i'm a mechanical engineer, it's close to zero - hah)
kokx
kokxβ€’11mo ago
Potentially, but it could go worse at the same time
Steef
Steefβ€’11mo ago
could shield the power wires as well
kokx
kokxβ€’11mo ago
Since we also have it when live is not there, it still think that it's also induced through the PSU grounding the bed I'm basically curious about what happens when we do not have ground the bed, but make sure that the bed is not live
Steef
Steefβ€’11mo ago
No description
kokx
kokxβ€’11mo ago
(I'm currently not close to my printer, otherwise I would try it out myself)
Steef
Steefβ€’11mo ago
left with N/L wrong, right with N/L right so it's all but gone in the "correct" installation, but my bed is grounded rather AND my bed is grounded
kokx
kokxβ€’11mo ago
Then I'd say turn the plug if needed
Steef
Steefβ€’11mo ago
that's what we do but this implies that this still happens when we actually power the bed
kokx
kokxβ€’11mo ago
Why go for a complicated solution if you have one that can definitely works
Steef
Steefβ€’11mo ago
Certainly, just to understand the root cause
kokx
kokxβ€’11mo ago
There is a way to check that, basically put a stable current (say 30%) on the bed I'm not sure if klipper can do that though (I wouldn't go for 100, don't want to delaminate the heater from your bed)
Steef
Steefβ€’11mo ago
hmmm could set the PID parameters to 1, 0 , 0 or hmm maybe if klipper lets us use a bit-bang heating control
kokx
kokxβ€’11mo ago
You basically don't want to set a target temperature but a target load
Steef
Steefβ€’11mo ago
yes I understand, just trying to think of a way to enforce that may require an external control on the SSR and avoid trying to do it with klipper
kokx
kokxβ€’11mo ago
PID 1,0,0 would just give you oscillations if I'm correct
Steef
Steefβ€’11mo ago
could wire up a microcontroller to control the SSR with a constant duty cycle just have to keep an eye on the temperature of the bed
kokx
kokxβ€’11mo ago
That would work indeed Though yes, make sure your bed doesn't go above 100 degrees this way to be safe
Steef
Steefβ€’11mo ago
indeed though, logically, it should be there Apparantly EMI shielding shrinkwrap is a thing but that's typically for HF shielding, I wonder if it has any effectiveness at 50/60 Hz
Oskait
Oskaitβ€’11mo ago
easy way would be to configure the ssr as led and put it on 30% pwm. but i would closely monitor the temperature as not to trip the thermal fuse not sure if it is the PSU putting something on ground. during trouble shooting I had ground to the bed but the heater itself disconnected and couldn't see any fluctuations from the thermistor. I also see a very slight fluctuation now with (i think) properly connected Live and neutral, as well as ground going to the bed. PID is fighting it but on closer look its still not as smooth as other thermistors
Steef
Steefβ€’11mo ago
I wonder if that is enough. 30% duty cycle would still make it troublesome to measure. You want a 50 Hz source that is power controlled so you can leave it at 100% duty cycle for a while without risking over-heating but anyway, getting back to the issue at hand - looks like induction from the power cables. I'll post some scope pictures later with my findings @oskait do you see a difference in performance if you have N\L switched while heating the bed?
Oskait
Oskaitβ€’11mo ago
hmm I don't think so, but thats just a feeling. Havent measured it or anything Some scope analysis would be nice, I only have a broken multimeter atm
Steef
Steefβ€’11mo ago
Should be able to see the 50 Hz on the thermistor wires during heating while the SSR is open if it's there Just waiting for a print to finish
Oskait
Oskaitβ€’11mo ago
could you also post some measurements of the thermistor wires with the bed not heating and not heating and N/L reversed? maybe without the bed heater connected to anything as control as well? That would be awesome.
Steef
Steefβ€’11mo ago
That is what I did yesterday, but not posted with Live to the bed and the thermistor wire open to the air, you see the 50 Hz on the thermistor wire with Neutral to the bed, same situation, you see only HF noise that's typically picked up by anything I'll re-do and post some pictures later today
Oskait
Oskaitβ€’11mo ago
Ah you already did. Ok interesting.
Steef
Steefβ€’11mo ago
In the end though - impact on printing performance with the N\L\Ground properly connected is probably negligible possibly some improved stability on the bed heating I suppose
Oskait
Oskaitβ€’11mo ago
yea thats true, After I flipped N/L its not perfect but definitely acceptable for printing. Just interesting to know the cause and maybe finding a fix like shielding would be nice
Steef
Steefβ€’11mo ago
1 - N/L connected as intended. Thermistor wire open to the air. We see 50 Hz, rather low potential. Environment? @oskait
No description
Steef
Steefβ€’11mo ago
2 - N/L connected wrongly. Thermistor wire open to the air. We see 50 Hz, much higher potential. Induction from the bed wire which is now connected to live? Rather crappy sine.
No description
Steef
Steefβ€’11mo ago
3&4. Both with thermistor connected to the board while switching N/L. No difference
No description
No description
Oskait
Oskaitβ€’11mo ago
Well first i thought pic 1 and 2 perfectly show what we see when switching N/L, as we get fluctuations with a high and quite low amplitude, which is in line with your measurements. But that theres no difference when the thermistor is connected to the board is weird. Is the timescale in pic 1 and 2 the same? Cause it shows 74Hz and 50Hz
Steef
Steefβ€’11mo ago
Hmm, I hadn't noticed that - checking
Oskait
Oskaitβ€’11mo ago
ah should be, says 5ms/div. But I have basically no experience on how to read an oscilloscope πŸ˜„
Steef
Steefβ€’11mo ago
it looks like the reported value was faulty at the moment I took the picture, that is indeed 50 Hz doing some more checks
Oskait
Oskaitβ€’11mo ago
If you don't mind, would be interesting whats on the thermistor when its plugged into the board, but the bed heater is disconnected. Maybe the 50Hz is just the poll rate on the thermistor as well
Steef
Steefβ€’11mo ago
hmmm, I would need to disconnect the bed can do, sec first checking what happens on the thermistor when I engage heating
Oskait
Oskaitβ€’11mo ago
yea no worries. Thank you a lot for those measurements, I find it quite interesting maybe I need to get a scope myself πŸ˜„
Steef
Steefβ€’11mo ago
interrestingly, nothing changes on the thermistor wires while connected to the board when enabling heating with N/L connected as intended nothing meaning no change
Oskait
Oskaitβ€’11mo ago
So same as pic 3/4? interesting.
Steef
Steefβ€’11mo ago
Now have N\L connected wrongly watching the temperature graph going up and down with the scope on the thermistor not able to see any change to the signal
Oskait
Oskaitβ€’11mo ago
thats weird, if the thermistor or board can pick up changes in resistance and therefore voltage the scope should pick that up to right?
Steef
Steefβ€’11mo ago
scope measures voltage, not resistance I was just expecting to see a change in the induced noise on the thermistor when I enable the bed heating
Oskait
Oskaitβ€’11mo ago
yea but the board measures the resistance of the thermistor via the change in voltage as far as I know Yea true, its weird
Steef
Steefβ€’11mo ago
can see the SSR getting the output from the control board +24v from the psu is also very clean can see the voltage over the thermistor change as the bed heats the difference is just very small, so I missed it before ok, with a more accurate volt meter you can see the thermistor value changing as expected. I'll wait for the bed to stabilize and then see if I can measure the undulations we see
Oskait
Oskaitβ€’11mo ago
I had an idea, maybe it works so I thought about the cycle time of the bed heater, its set to 50Hz in ratos I just set it to 60HZ in my printer.cfg. Looks a little better honestly
No description
No description
Steef
Steefβ€’11mo ago
eh, the measured value on the thermistor keeps climbing as the bed cools - which is expected, no ghosts. Also means that the reported value in klipper (which is now wonky again) is not actually measured
Oskait
Oskaitβ€’11mo ago
I'll let it run a bit and see if it improves. ok so the reported value in klipper is wonky while the measured voltage is smoothly changing without any wonky behaviour? thats weeeeeiiird
Steef
Steefβ€’11mo ago
It looks like that, I would need a logging multimeter to verify that better waiting for the bed temperature to stabilize
Oskait
Oskaitβ€’11mo ago
yea its probably very minor changes and hard to tell by looking at the value itself
Steef
Steefβ€’11mo ago
it's in the 0.001V range, which can just be seen on my multimeter
Oskait
Oskaitβ€’11mo ago
the PID or power looks a a lot less spikey as well. seems like it improved
No description
Steef
Steefβ€’11mo ago
that's just the frequency of the PWM to the SSR right?
Oskait
Oskaitβ€’11mo ago
yes
Steef
Steefβ€’11mo ago
strange!
Oskait
Oskaitβ€’11mo ago
super strange πŸ˜„
Steef
Steefβ€’11mo ago
what if all this was just a measuring artifact
Oskait
Oskaitβ€’11mo ago
it probably is. I guess the inductive effect on the thermistor is not too large, but maybe because its everything is at roughly the same frequency the thermistor measures alls the high spots, then slowly goes out of sync and measures all the low spots. maybe thats how we get that oscillating temp curve
Steef
Steefβ€’11mo ago
and perhaps the measurements are being done at the pwm frequency?
Oskait
Oskaitβ€’11mo ago
possible. I couldn't find anything on the poll rate or measurement frequency of thermistors in klipper, thats when i thought I'll just try the heater pwm I jsut set the pwm back to default to double check. WIll update in a couple minutes
Steef
Steefβ€’11mo ago
still waiting for it to cool down, lol
Oskait
Oskaitβ€’11mo ago
yea this stuff takes time lol
Oskait
Oskaitβ€’11mo ago
yep cycle time definitely influences it
No description
Oskait
Oskaitβ€’11mo ago
weirdly the extruder thermistor is showing a slightly higher temp with 60Hz
Steef
Steefβ€’11mo ago
I can imagine that faster switching of the heating will better stabilize the temperature but that's quite a noticeable effect here, it seems that the act of measuring the voltage over the thermistor gets rid of the wonkyness
Steef
Steefβ€’11mo ago
No description
Steef
Steefβ€’11mo ago
red marked are measuring intervals
Oskait
Oskaitβ€’11mo ago
its getting weirder and weirder, how did you measure it?
Steef
Steefβ€’11mo ago
between both leads of the thermistor while connected to the board (thin probes can enter the plug from the back to touch the JST crimped to the wire)
Oskait
Oskaitβ€’11mo ago
were the probes only connected in the marked intervals? or were they always connected and the measurement just done there
Steef
Steefβ€’11mo ago
probes were only connected during the intervals
Oskait
Oskaitβ€’11mo ago
Maybe they can "dissipate" the fluctuations...
Steef
Steefβ€’11mo ago
multimeter is essentially a resistor over the pins added in parallel to the thermistor
Oskait
Oskaitβ€’11mo ago
ok I think it is very likely a frequency synchronization issue. Look:
No description
Oskait
Oskaitβ€’11mo ago
set it from 60 back to default (50) and then to 100 Hz. when double the mains frequency we get an even stronger fluctuation
Steef
Steefβ€’11mo ago
so then 120 Hz should be similar to the result at 60?
Oskait
Oskaitβ€’11mo ago
let me try
Steef
Steefβ€’11mo ago
where in the world are you, what is your net frequency?
Oskait
Oskaitβ€’11mo ago
Germany. Should be 50Hz
Steef
Steefβ€’11mo ago
same as me then let's see if I can verify this, are you with N\L connected as intended?
Oskait
Oskaitβ€’11mo ago
They set 50Hz as default so not to cause flickering lights in the EU I think so, with this orientation the fluctuations at idle were less at least dont have exposed live connections where I could check easily
Steef
Steefβ€’11mo ago
input on the PSU?
Oskait
Oskaitβ€’11mo ago
120 Hz looks similar to 60 indeed
No description
Steef
Steefβ€’11mo ago
harmonic of 60, would make sense if it's an artifact somewhere
Oskait
Oskaitβ€’11mo ago
yea true. Would need to get the multimeter tho. Ill check it later. dont really want to put my "lΓΌgenstift" on the live terminals and risk a short in case I slip πŸ˜„
Steef
Steefβ€’11mo ago
that's a spannungsprufer I guess?
Steef
Steefβ€’11mo ago
Switched from N\L to L\N, big difference as expected
No description
Oskait
Oskaitβ€’11mo ago
no, those screwdrivers with the led that lights up when you put it on live and your finger on the end
Steef
Steefβ€’11mo ago
I kind of want to manually set the scale for those graphs to better see this, but ok
Oskait
Oskaitβ€’11mo ago
thats exactly what I got, so I'm pretty sure I'm correctly on L/n now I think you can extract the data from the klippy log
Steef
Steefβ€’11mo ago
indeed, will do so later can indeed still see minor undulations without power, mind you
Oskait
Oskaitβ€’11mo ago
yea same
Steef
Steefβ€’11mo ago
No description
Steef
Steefβ€’11mo ago
even when powered off it seems to have an effect is the control PWM set to 50 but the measuring somehow still at 60 because klipper is developed by an american? heating up to 50 now
Oskait
Oskaitβ€’11mo ago
hmm... I didnt check 60Hz at idle yet. maybe the pwm Hz just helps with fighting those undulations, so we only see that effect when the heater is on
Steef
Steefβ€’11mo ago
the frequency of the oscillations does change after switching to 60 when powered off I'm about ready to call this an artifact of measurement and consult an electrical engineer, lol
Oskait
Oskaitβ€’11mo ago
wait a bit, my oscillations changed when not touching anything
No description
Oskait
Oskaitβ€’11mo ago
yea I think we need a proper electrician for this πŸ˜„
Steef
Steefβ€’11mo ago
This is with the PWM set to ?
Oskait
Oskaitβ€’11mo ago
na that was from the very first post. So default pwm, idle for hours N/L wrongly attached
Steef
Steefβ€’11mo ago
that's what we've seen as well, yes
Oskait
Oskaitβ€’11mo ago
just to show that the oscillations change in frequency and from regular to random without any changes to the printer or config sry for the confusiont
Steef
Steefβ€’11mo ago
indeed, if you leave it longer it would probably return to the higher frequency oscillations lol, 02:00 at night
Oskait
Oskaitβ€’11mo ago
This is from now. With a cycle time of 0.021 (instead of the default 0.02 or 50Hz) on the right (120 Hz on the left) so as long as its not in sync it looks a lot better
No description
Oskait
Oskaitβ€’11mo ago
haha possible. I had my interface set to 12h time so it could've been 14:00 but 2:00 as well. not sure anymore πŸ˜„
Steef
Steefβ€’11mo ago
well, I'm calling this interference or an artifact - I'll talk to the EMI / Electrical guys at work after the holidays - maybe they have an insight I lack the knowledge
Oskait
Oskaitβ€’11mo ago
Managed to extract the heater bed values. Not a lot of help but the differences are clear
Oskait
Oskaitβ€’11mo ago
No description
Oskait
Oskaitβ€’11mo ago
Yes do that πŸ˜„ for now I'm happy with the pwm at not a multiple of 50Hz fix
Steef
Steefβ€’11mo ago
I can't replicate that here but I'll give it some time to stabilize that's quite a difference for you though
Oskait
Oskaitβ€’11mo ago
You cant replicate it? how does yours look?
Steef
Steefβ€’11mo ago
Waiting for it to stabilize at 50 at the moment will take a while hmmm, we should probably be on the same bed PID I have this, what do you have? I'll change to your values
Steef
Steefβ€’11mo ago
No description
Oskait
Oskaitβ€’11mo ago
ah damn, I just started a PID tune πŸ˜„
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 54.167
#*# pid_ki = 0.817
#*# pid_kd = 897.825
#*# [heater_bed]
#*# control = pid
#*# pid_kp = 54.167
#*# pid_ki = 0.817
#*# pid_kd = 897.825
i stopped it. what machine do you have?
Steef
Steefβ€’11mo ago
300 mm
Oskait
Oskaitβ€’11mo ago
same
Steef
Steefβ€’11mo ago
I'll switch to your values, one moment
Oskait
Oskaitβ€’11mo ago
why are they so different then πŸ˜„ you kd value is almost twice. then again I have no idea what those values stand for Its for 60Β°C maybe thats why
Oskait
Oskaitβ€’11mo ago
just for reference, thats mine with cycle_time of 0.021. Ill let it cool down and see if It gets wonky again
No description
Steef
Steefβ€’11mo ago
it's control values that are used to configure the strength of signal power (deviation from setpoint), intergral (long term fault) and dampening (short term fault) ah, 60, ok - will do the same why 0,021 though? 47 Hz?
Oskait
Oskaitβ€’11mo ago
wanted to see if a higher pwm frequency helps or its just the off sync that helps. so a little lower than 50Hz showed that its indeed not the speed of the pwm but being not a multiple of 50 that helps 60 Hz (so 0.016667) looked the same tho 0.021 was just the las i tried
#pwm_cycle_time: 0.02 #50Hz - default
pwm_cycle_time: 0.021 #47.62Hz
#pwm_cycle_time: 0.01667 #60Hz
#pwm_cycle_time: 0.01 #100Hz
#pwm_cycle_time: 0.008333 #120Hz
#pwm_cycle_time: 0.02 #50Hz - default
pwm_cycle_time: 0.021 #47.62Hz
#pwm_cycle_time: 0.01667 #60Hz
#pwm_cycle_time: 0.01 #100Hz
#pwm_cycle_time: 0.008333 #120Hz
Steef
Steefβ€’11mo ago
takes a while for things to buffer out, a moment just switched to 0.021 now, waiting again
Steef
Steefβ€’11mo ago
I stand corrected, it does seem to repeat here
No description
Steef
Steefβ€’11mo ago
Let me grab the logfile and see
Oskait
Oskaitβ€’11mo ago
what do you mean repeats there? it does look a little smoother after the red line
Steef
Steefβ€’11mo ago
I mean that i can replicate your observations πŸ™‚ it's better with 0.021
Oskait
Oskaitβ€’11mo ago
ah yes
Steef
Steefβ€’11mo ago
No description
Oskait
Oskaitβ€’11mo ago
@kokx. : If you don't want to read everything, we improved it by setting the cycle time of the heater to something other than a multiple of 50Hz:
[heater_bed]
#pwm_cycle_time: 0.02 #50Hz - default
pwm_cycle_time: 0.021 #47.62Hz
#pwm_cycle_time: 0.01667 #60Hz
#pwm_cycle_time: 0.01 #100Hz
#pwm_cycle_time: 0.008333 #120Hz
[heater_bed]
#pwm_cycle_time: 0.02 #50Hz - default
pwm_cycle_time: 0.021 #47.62Hz
#pwm_cycle_time: 0.01667 #60Hz
#pwm_cycle_time: 0.01 #100Hz
#pwm_cycle_time: 0.008333 #120Hz
0.016667 (60HZ) as well as 0.021 (47Hz) worked quite well as you can see above in @Steef post and here in mine: https://discord.com/channels/582187371529764864/1189608411109793872/1190273952644354170 just so that he doesn't have to read through all of it πŸ˜„
Steef
Steefβ€’11mo ago
It must be some sort of artifact The bed doesn't switch temperatures like that so fast
Oskait
Oskaitβ€’11mo ago
yea true. ok so now we have kinda fixed it, or rather circumvented the actual issue πŸ˜„ Have to say was fun figuring it out, give an update when you talk to your electrical engineer πŸ™‚ I have to go read some papers. Thanks for measuring and figuring this out with me
Steef
Steefβ€’11mo ago
fun times, I think we found a way around the graph being wonky I wonder if it affected the PID control loop at all in any case, if I gain further insights I'll drop a line time for some actual work here as well...
Oskait
Oskaitβ€’11mo ago
maybe ill condense our post into a pdf or something and then tag someone with more experience on V-cores, maybe mikl or helge... yea I'm quite happy with that πŸ™‚
Steef
Steefβ€’11mo ago
The power setpoint in the graph is also affected, does seem to have an impact on the pid loop... but that could also just be another artifact This deep down the rabbit hole is where dragons are, calling it good for now. Measurement artifact. (with maybe some induction going on when the power wire to the bed is live)
Steef
Steefβ€’11mo ago
haha, exactly - enjoy the papers
Oskait
Oskaitβ€’11mo ago
won't... thats why Im still here. but thanks πŸ˜„
Steef
Steefβ€’11mo ago
@blacksmithforlife πŸ‡ΊπŸ‡Έ we spammed a lot, but concluded things here https://discordapp.com/channels/582187371529764864/1189608411109793872/1190291265296805999
kokx
kokxβ€’11mo ago
Damn, you guys did great work! Very nice to see this
Steef
Steefβ€’11mo ago
@oskait definitely seems to have improved my bed temperature stability. Well, as reported in the graph anyway πŸ˜…
Oskait
Oskaitβ€’11mo ago
very nice. yea mines very smooth as well at 60Β°C now
No description
Oskait
Oskaitβ€’11mo ago
helge said "who cares, a little pid and its fine" https://discord.com/channels/582187371529764864/851109908849491968/1190766337778257920 guess we went a little overboard here haha
Steef
Steefβ€’11mo ago
Of course we did. It worked before. But i think there's nothing wrong with figuring out what is going on πŸ˜‚
Oskait
Oskaitβ€’11mo ago
Guess we wont need this summary then 😦
Oskait
Oskaitβ€’11mo ago
yes i was bored
Steef
Steefβ€’11mo ago
Avoiding reading papers i see
Oskait
Oskaitβ€’11mo ago
got me
Steef
Steefβ€’11mo ago
I think it's great to have this resource available for the next guy that is also bothered by wonky lines Probably in 5 years from now we will find an equally disturbed nutcase
Oskait
Oskaitβ€’11mo ago
IF he reads through all of our messages haha
Steef
Steefβ€’11mo ago
🀣 I sent 10 mails up and down with rat rig at the time I'm sure the poor customer service guy was also wondering why the fuck i didn't let it go
Steef
Steefβ€’11mo ago
You can see the power set to the bed being different as well though I sort want to attach a power logger and see if the consumed power is different over time
Oskait
Oskaitβ€’11mo ago
poor guy
Steef
Steefβ€’11mo ago
I sent him this topics link, i formally apologize Uni is important, go read those papers. I'm going to attach a power logger to feed the crazy a little more
Oskait
Oskaitβ€’11mo ago
hmm might just be that the power changes more as PID is fighting the fluctuations. over a set time more power would lead to a higher temp of the bed, if everything else stays the same haha alright, give updates πŸ™‚
Steef
Steefβ€’10mo ago
πŸ‘πŸ» @Oskait on recommendation from the company electrician, I connected the - of the PSU to ground. This is apparently done in industry to avoid these kind of interferences. Unfortunately, no change. So I'm leaving it permanently connected to a wall socket with a switch and that's it
Oskait
Oskaitβ€’10mo ago
Ok thanks for trying. I'll just leave as is, since helge and other germans have the same "problem" but dont care I think its something that can be ignored πŸ™‚
Steef
Steefβ€’10mo ago
oh for sure, it's printing so it's fine but it leaves a bug in the brain the electrician was also curious so we keep looking, if we find something I will let you know @Oskait
Oskait
Oskaitβ€’10mo ago
haha yea true. oh ok so you got him hooked as well πŸ˜„ nice keep me posted
kokx
kokxβ€’10mo ago
Finally got time to test the fix, it definitely holds much more stable bed temperatures now! Only deviations of about +/- 0.1 degrees instead of about +/- 0.5-ish
_bra1ndead_
_bra1ndead_β€’8mo ago
I've been tinkering with my Ender 3 and rewired my tool head. Was just testing the thermistor and noticed very similar behavior. Reading about 50Hz and grounding I was thinking if this could be because I thought I was clever and used shielded twisted pair as the wire runs for some length and is tucked together with VCC etc. The shield wire I connected to earth ground to properly shield it, but this was exactly what caused the weird wobbly temperature line. I disconnected my earth ground and a nice flat line. I hope this helps someone else on here too.
Want results from more Discord servers?
Add your server