extrasensory
Posts: 3
Joined: Mon May 13, 2019 3:44 pm

Re: extruder heating stops when print starts

Mon May 13, 2019 4:56 pm

Hello All,

I have an AnyCubic i3 Mega (Not S), which was running V1.1.0 software flawlessly for quite a long time.
Good printer, accurate, the only problem I had was with the end-stops, which needed little holders for the adjustment screws, where they go through the top layer of metal. Fix is available at https://www.thingiverse.com/thing:3115854
Frankly, I had used it too little and avoided fixing it, since I have 3 other printers - so I am not too sure SOME of the Z axis problems were not the problem mentioned in this bug report (as opposed to an end-stop problem).

I checked the G-code produced by Simplify3D and there is absolutely no reason for this. I also experienced both heaters turning off, JUST as the printing started. That can be fixed pressing PAUSE and then setting the target temperatures, then back to RESUME the printout.
It did not happen every time. The SD card was untouched since I successfully printed the first couple of items I have used the printer for.
It happens with HOME from Cura and Repetierhost too. It has nothing to do with Simplify3D.

I checked Dr. Google for solutions. Only the SD card being "too complicated" and overheating, perhaps of the PSU, due to the bottom plate being turned 180 degrees, was suggested. My bottom plate does however leave lots of air for the PSU fan. I still tried putting an extra fan on the controller case, left side front, where the controller card is. It SEEMED to work at first, but it came back, once it had given me HOPE!

SO I decided to update my firmware, somewhat scared I'd brick the printer.
Fueled by paranoia, I tried to read out the Arduino code from the USB with avrdude, the usual way (flash and eeprom).
avrdude -C avrdude.conf -p atmega2560 -c stk500 -U flash:r:"c:/arduino.hex":r -P\\.\COM2 -b112500
avrdude -C avrdude.conf -p atmega2560 -c stk500 -U eeprom:r:"c:/arduino_ee.hex":r -P\\.\COM2 -b112500

That however did not work at all. I tried 250000 baud as well, resetting, turning on etc. with no luck.
That's because the USB port is NOT connected to an Arduino. Particularly not to THE arduino ruinning Marlin.
It's connected to the MKS TFT42 board with the nice color display, which gets commands over a UART and sends G-code to the MKS Base V1.4 board
that runs the Marlin Arduino program. Much like when you use a Raspberry Pi to make a good looking frontend.
I COULD HAVE DONE IT CONNECTING TO THE USB PORT ON THE MKS BASE BOARD ... but I did not know it was unused, inside the machine.

Cura uses special trickery to program the Arduino VIA the display. So I had to forget my backups of the stock firmware.
I downloaded the V1.1.2 firmware from the Anycubic Website, http://www.anycubic3d.com/support/show/594016.html on May 10/2019.
I got a file that was called ANYCUBIC_I3_XL(20170906).hex , 275k in size.
I flashed it with Cura (V4.0 works just fine, no need to roll back to special vendor versions).

Then all hell broke loose. All 3 axes were inverted, but the end-stops were NOT. The printer made a nice plow-furrow across the UltraBase glass bed, in best Kirkegaard style hopped off the deep end to the right and crunched down on the right, minimum end-stop. POWER OFF!
I could not move the extruder in any direction because the end-stop had been hit and misinterpreted, until I manually moved the motors away from the end-stops. Careful experiments verified the motor directions were inverted. Sweaty moment....

Since there are no "old versions" of the firmware on Anycubic's support web site, I had to locate an earlier version of the firmware in clandestine places. I found one on Thingiverse - https://www.thingiverse.com/thing:2732424.
The file I tried out was I3_MEGA_Ultrabase_V1.1.hex (several options in the zip file). Flash with Cura ... I was now back to square one.
Including the turning off the heaters and flaky Z axis HOME function. It appears this firmware was the same as the printer was shipped with.

So I contacted Anycubic's tech support. They came back to me next morning, linking me to a .hex file in an "uploads" directory on their servers, dated the same day. I got that file, Mega.hex_ULTRABASE_.hex . Then I went back to the support site and it appears they changed the V1.1.2 firmware update file to a file named Mega.hex_V1.1.2_20181008.hex Seeing both files were 312 kByte, I ran a windiff on them - they put the same file on their support website. I note the file I got yesterday was only 275kByte, so I suspect that was a MUCH older version of Marlin - and with a wrong configuration.h file.
WinDiff revealed lots of changes between the "stock file" from Thingiverse and the new V1.1.2 from the Anycubic Support website.

SO TRY AGAIN - THE NEW FILE IS NOW ON THE ANYCUBIC SUPPORT PAGE.

So far the printer has behaved. I am running it on a fairly large part, the extra fan turned off. Then I will try again and report if it acts up still.

Failing that, it should be possible to change the MKS Base board out. They are about $25, but they have subtle differences to them. I'd burn the .hex file using the USB on the MKS Base board. If you want to experiment, get a RepRapDiscount Full Graphic Smart Controller board and attach that to EXP1 / EXP2. That will provide a "normal" display with direct contact to the MKS board and access to the SD card on the display. Display can be removed once you are sure the Marlin Configuration.h file is 100% in order.
Newest Marlin Bugfix 2.0.x even has example files for Anycubic i3 in the \config\examples\Anycubic\i3 directory.

Fear not the Marlin. If you just have the u8glib library installed, (https://github.com/olikraus/U8glib_Arduino or library manager) it will compile and burn right away. Latest Arduino environment works. Latest everything works.

So that's what "hexenwerk" you can do with the Anycubic i3 Mega. Most of it probably voids the warranty. Now I told you.
I'll let you know if I am right or if the World corrects me going forwards. I have a spare board....

Kent

extrasensory
Posts: 3
Joined: Mon May 13, 2019 3:44 pm

Re: extruder heating stops when print starts

Tue May 14, 2019 12:47 pm

Replying to my own post: UPDATE.

The printer has become much more well behaved with the updated firmware, but it can STILL do strange things with the Z axis.
With the new firmware, the Z2 axis does NOT go higher up than the Z axis, they seem to follow each other nicely when the problem occurs.
I have not seen the "turn off heater" problem again.

At this point I am speculating the Z end-stop lines pick up noise from the stepper motor
, OR, even more likely,
some power spike finds its way into the atmega2560 and corrupts a few RAM locations.
(The problem can occur when the printer has just sat overnight cooling down).

This would explain the random nature of the problem as well as the very different behavior.

Anycubic Support has been sent a video of the problem and various suggestions. Marlin has two ways of reading end-stops,
one based on oversampling (old way, slower), and one based on level change interrupts (less robust).

The story continues ...

Kent

extrasensory
Posts: 3
Joined: Mon May 13, 2019 3:44 pm

Re: extruder heating stops when print starts

Wed May 15, 2019 6:24 pm

The continuing story of the end-stops on the AnyCubic i3 Mega.
--------------------------------------------------------------------------------------------

Suspecting noise on the end-stop wires of the printer, I was looking for a good place to put a ferrite ... it seemed like a fast thing to try.
I noticed there were only 2 wires to the Z, Z2 and X endstops (GND and Signal). The Y axis, however, had 3 wires (VCC, GND, Signal).
It seems Anycubic ran out of pins on the Z2 / end-stop plug on the right side and rely on pull-ups.

The Marlin 1.1.1 that AnyCubic uses can be found on github. https://github.com/ANYCUBIC-3D
In that, I can see they have enabled internal processor pull-ups for the end-stops.
Those are in the atmega2560 datasheet specified as "20-50kOhm" which is too high impedance for a noisy environment with stepper motors running.

The board in the i3 MEGA seems to be a TriGorilla board. They can still be found on AliExpress.
It looks very difficult to change to another MKS Base board, since Anycubic has connector boards
stacked on top of the TriGorilla board, which cleans up the common spaghetti wiring. I understand ...

What IS worth noting about the TriGorilla board is it has no pull-up resistors. It is plain vanilla RAMPS 1.4.
NONE of the RAMPS boards (1.4 to 1.6) have pull-up resistors on them.
With different, less neat wiring, you MIGHT get away with the processor pull-ups alone, but it's way too high impedance for my taste.
It happens to be true - birds-nests are quite noise immune because the wires don't lie parallel for very long stretches.

On most (if not all) new MKS boards, there is a bank of resistors and capacitors near the end-stop connectors.
They seem to be 4.7kOhm between S and VCC and about 0.1uF between S and GND.
That's a time constant of 4.7ms returning to "not activated" state, which would work just fine.

I have not had everything apart, but measuring with an ohm-meter on the end-stop connectors say there is no "real" pull-ups.
On the later MKS Base, when turned OFF, I can measure 4.7kOhm steady between S and VCC.

This is NOT fixable in software, it will take a little hardware work (I have not yet tested this, but I am 95% sure).
* Purchase 3 small through-hole resistors, for instance Stackpole RNMF14FTC4K70, which is only 3.30mm long.
Digikey: S4.7KCACT-ND . The distance between S and VCC on the header is 0.2" = 5.08mm, plenty of room.
* Solder them between S and VCC, on Z, Z2 and X end-stop headers on the back side of the TriGorilla board.

For further de-noising, you could add an 0805 surface mount capacitor, maybe 0.022uf / 50V, soldered between S and GND. It can sit between
the pins directly, the resistor avoiding the middle pin (GND) by going to one side.

That ought to remove the noise.

Kent

Return to “Troubleshooting and Bug Reports”