Close

LCD Failsafes

A project log for Monoprice Mini Marlin 2.0 Support

Getting Marlin to run on the Monoprice Mini/Malyan M200.

J.C. NelsonJ.C. Nelson 06/12/2019 at 14:580 Comments

So...I've been printing on my mini for nearly a couple years using different flavors of Arduino, different branches of Marlin, etc, and had support for the LCD ever since my great ice-meets-two-wheeled-vehicle accident. Most of my prints are from octoprint, but I often use the LCD to tune the temperature and so on. 

All of that meant I thought I had a fairly decent idea of how everything worked. But in the comments of this project, I found not one, but two different people who reported seeing injected (LCD) commands which switched steppers to relative or disabled them, set temperatures to zero, and so on.

Being as this is my code, a bug is more probable than possible, so I went hunting.

And I found nothing.

My wife and I have been binge-watching House, and while the motto there is "Everyone Lies," generally speaking, people only lie when there's something in it for them. There's nothing in it for someone to report a weird bug that affects steppers/hotends, which means these people were telling the truth.

We began to theorize it was a timeout in which the UI was intentionally injecting "shut down commands as some sort of failsafe.

MRozay was kind enough to confirm for me that he'd hit the same thing in his M4MPD project (which uses a variant of my LCD code). To get around it, he switched to the BUILD screen during homing and heating. The build screen doesn't have such a failsafe.

Ok, great. 

I sat down and fired up my UI tracer sketch, which I modified to report the heaters were active and then started \my M200 printers - an original run V2 (STM32F103) and a second run V1 (STM32F103). Both were hooked to their respective LCDs, both set to trace any input from the LCD so I could figure out exactly what the firmware does.

Twenty four hours later, they were holding steady with zero input.

Then I started looking at reports and thinking. The LCD code in the Minis is something I tinkered with but realized was out of my depth, but I did learn there's several major revisions, and each has quirks. On a hunch I pulled the LCD from my Mini delta, and thirty minutes later, it killed the temps (but didn't trace my output, because I don't have a delta version yet).

So, there IS a timeout.

I can print from Octoprint to the Delta just fine, meaning the stock firmware must do something different I don't know about. This weekend, I'll set up a pass through bluepill to trace communications and run some test prints on the delta. Also, it can't hurt to actually mail Malyan and ask how they avoid it. Worst case is they refuse to explain.

Fingers crossed.

Discussions