Tempature code sent then drops out with control preheat

If I go into control and click either preheat hotend or build plate at times 190 shows for a split second then drops right back to zero. Sometimes this is just after printing with no problem. If I reboot octoprint it works correctly. What could be causing this?

What did you already try to solve it?

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)

I think I'd have to ask if you're trying to adjust the temperature while a current blocking command is already running which is trying to adjust the temperature.

The difference here is an M104 (nonblocking) versus an M109 (blocking, a.k.a. "wait until this temperature has been reached").

I know that sometimes I send a job to be printed and I see the temperature graph and think "oh! I sliced this for carbon fiber!" and slightly panic. I know that the GCODE contains a blocking heat-up command for 205C somewhere there at the top. I can fix that using the Control tab but I have to wait until 205C has been reached and the printer is ready to relinquish control.

No, this can be just after starting the machine up even. I typically go to the tempature screen and click set hot end an bed before I start loading a build. No commands running.

Alright then... it's starting to suggest (to me anyway) that you have a loose wire/connection to the hotend or the related thermistor (sensor) on it.

Maybe others have their own thoughts on this.

As soon as I reset the Pi all is well. More a pain in the but then anything. No loose wires that I could find(already had looked) Upgraded connectors to the bed and mosfets on both the bed and hotend.
Sometimes it is the hotend that will no heat and sometimes it is the bed

MOSFETS, yea

Have you tried seeing what happens if you remove the mosfets ?

I also have an anet a8, 2 in fact, and the first thing I was told is to install those mosfets otherwise my house would burn down

Well, I installed them, and they gave me nothing but trouble. Then I did some homework on the circuit board, and it turns out that the transistors are rated just fine for the load on that board. As it turns out, it's the plugs and sockets that are failing and causing the fires. So I removed the mosfets, and the types of problems you're describing went away...

Until the plug on the bed fried and started smoking

So I removed that too, and soldered the wires directly to the bed

I'm not going to advise you to remove a safety item, only that you test your printer without it temporarily

On the other hand, don't blame me if your house burns down

Yah, I haven't tried that yet. Was really thinks ngbit was octo where I would click it and the temp show for a second then drop back to 0.

Usually the temp thing is a thermistor, but, with the anet a8, if the thermistor disconnects, you get an error that says "def", not a zero. And, even if it's not heating, the thermistor would at least show room temperature, which would also (unless you live someplace really cold) not be zero

I'll throw this out there that sometimes the printer manufacturer doesn't know what they're doing and they install wiring and especially connectors which aren't up to the challenge of the power they're attempting to push through there.

It's typical for connectors to internally arc a little if the connection isn't rock solid. The typical vibrations in a printer will exacerbate this and the arcing will increase over time. Soon, there's a layer of black at the connection boundaries, which increases the resistance, increases the heat and you get a chain reaction of fail ultimately.

Secondly, a lot of these designs produce what are essentially square waves instead of analog signals. This then increases the arcing. A stepper smoother circuit should almost be mandatory, you'd think, but they're always throwing cheap everything at these commodity printers.

Understood, and agreed, but that's not what a mosfet does, or even tries to do, or is even connected to

The mosfet basically replaces the transistor that's built onto the motherboard of the printer

How it does that is by having the EU physically rewire the printer, by taking the output signal from the motherboard, and and then taking the power from the power supply, and then sending it's own power to the bed or tip.

This way it's the mosfet that's taking the weight of pushing voltage to the bed or tip, and the motherboard is only pushing a signal to the mosfet, telling it to push, and how much to push

Now, all this is well and good, in theory, but, that still leaves the weak spots of the cheap connectors which are responsible for starting the fires in the first place

My original Air Force background is in electrical engineering, btw. I did depot-level circuit board maintenance in the Pentagon. I have a stash of MOSFETs in a cool-looking box at home with my gear since I bought out two RadioShack stores when they went out of business.

At one time in my illustrious past, I was an electrician at a campground in the middle of nowhere. Those external A/C outlets get a beating from the folks who bring in their "cheater plugs" for the bus-sized RVs.

You might also look into TRIACs.

The real issue here, usually, is that some of those FET boards wind up under driving the FET. This is because they have a bridge rectifier before the FET to handle consumers reversing polarity on the connection and some of the manufacturers use FETs with a Von of 12V. Even with a Von of 12V, that's going to be the typical Von or max Von, not an absolute value for every single FET in every circumstance, so it often works just fine. If it were the min Von, they'd all fail because of the rectifier. That's all well and good in theory, but the voltage drop across the diodes is enough to cause the FETs not to turn on when they need something closer to 12V. Some of the FET boards are fine, others not so much. It depends on what your 12V rail is actually running at.

I'm willing to bet if you nudge your PS to a slightly higher quiescent voltage, your problem will disappear, but I would measure the voltage first, to make sure you're not over driving other components on the board (you're not likely to within the range of the voltage adjustment on the PSU, but it isn't impossible if you really go to town on it and it's using cheap enough components that you happen to be on the high end of the tolerances for). In all likelihood, another .1-.3V or so will be enough for them to behave reliably, since one or the other will work most of the time. I suspect it's just the voltage sag under load causing it to be under driven, especially considering it's probably a cheap, under-rated PSU to make the machine as cheap as possible. They very likely didn't even put a meter on it and adjust the voltage before it left the factory, so it could be running below 12V to begin with.

I should also mention that, if you aren't used to working with mains voltage/don't know how to safely work with mains voltage, don't measure at the PSU. Instead, you can measure at the board, and unplug the machine before making adjustments to the PSU each time.

If do you know how to work safely around mains voltage (or have someone who can teach you and/or are willing to read up on it and watch videos and take proper precautions) and have a ceramic screwdriver to adjust the pot, you can adjust it with the board unplugged and a meter attached to the PSU.

The ceramic screwdriver is important when you're doing something like this, btw. It serves 3 purposes: 1) keeps you from shorting anything and releasing magic smoke, 2) reduces the likelihood of you shocking, burning, or electrocuting yourself, and 3) it keeps your tool and body from messing with the adjustment on the ultra-cheap and crappy trim pot they likely used. #3 is less of an issue for PS adjustment than for capacitive circuits, but the trim pots on ultra-cheap PSUs can be crappy enough to conduct through a metal screwdriver. Those crappy ones may also need protection from mouse farts in Japan, as they are known to be susceptible to random adjustments by remote rodent flatulence.

@OutsourcedGuru I wish the RatShacks up here had still carried components when they were shutting down...I SO would have done that.

No signs of arcing no signs of burning. Octoprint did this from day one. Plus switches between heating items. Where it is an intermittent condition it is a PITA to troubleshoot.

That also is understood but you had mentioned it measuring ambient temperature without the heating element heating the ambient temperature should be shown therefore not showing a tempature of zero. That is referencing the thermal reading and that is why I had said it is not the thermistor. I grasp the electronics here.
If, by chance the motherboard did not catch the square sine wave it quite possibly should if I click the preheat again and again. But when I click preheat PLA the heat to tempature shows up for about 1 second then sets back to 0. If you look at the tempature graph in octo there is no signal sent shown

My background is also military. Radio and loudspeaker repair for special ops group Psychology Operations. Didn't buy out a radio shack but once out ran my own satellite TV repair and installation business.
Totally new to 3D Print.

Have you changed the firmware at all ?

And, just to double check that we're talking about the same thing, there's a set temp and an actual temp

The fact that this is intermittent and on both extruder/bed suggests that this is either the serial connection or it's the power train. It would be great to be able to rule out one of those and then focus on the other.

It's optimal if the serial connection between Raspi and RAMPS board is shielded. In the absence of shielding, it's "close enough" to add a ferrite core around it.

Your ~/.octoprint/logs/serial.log could perhaps help us here but you might have to turn that on either in the Settings or in the logging.yaml file. For this to be useful, I think we need to see a session in which it failed.

Once I realized they were going out of they had next to nothing.