Saturday, 21 May 2022

CTC DIY 3D printer Z-axis wobble fix.

25/3/2023 Don't bother reading this. I gave up when I never could communicate via the Arduino to the ANET board.

-------------- ------------------- -------------- ---------------  


From the beginning this printer had a z-axis wobble. It was visible in the way that the screws precessed as they turned. I have tried a number of fixes, but lately have seen that an IBM person on twitter had a fix. He told me to replace the Z-axis screws with proper ones. 

This I have done, and also the adapter that connects to the stepper motor. These screws seem to have a much coarser thread than the original screws, partly because they are 'two-start' threads. 

Now it seems I have to change the control board firmware, and as I am told 'Here be  dragons' 

I have got the Marlin firmware from Github version 2.0.9.3

https://github.com/MarlinFirmware/Marlin

The usual instructions for loading the firmware suggest using the Arduino IDE (I have this), and setting it up for the board that I have. First Dragon: there is no identification on this board, or in the manuals. 

The Board is I think an ANET3D judging from findings on the Internet. 

Picture here: https://grabcad.com/library/anet3d-v1-5-control-board-1#!

And someone debugging it here: https://jestineyong.com/fixing-a8-anet-3d-v1-5-mainboard/

The chip on the board is an ATMEGA 1284P.  Does the Arduino IDE recognize it?  Noooo. 

https://forum.arduino.cc/t/atmega1284p-with-arduino-ide/485720

Ooh, maybe: http://www.technoblogy.com/show?19OV

It suggests that I use https://github.com/JChristensen/mighty-1284p/tree/v1.6.3

which tells me to download the zip file and put it in the Arduino Hardware folder, which I cannot find.  I am using Arduino vn 2. Is that the problem?  

/home/.arduino/plugin-storage/mighty-1248p-1.6.3    change to mighty-1248p

------------- -------------- -------------

A way to get the 1284P recognized:

[1]   https://www.youtube.com/watch?v=lAKyZd63_ns         from about 7:15 in

Compilation error: Error resolving FQBN: missing platform release arduino:avr referenced by board Sanguino:avr:sanguino}  

NOPE!

------------ -------------

Came across this: 

[2]   https://www.youtube.com/watch?v=vG23IHKiaSk

Not entirely happy as it needs an Arduino as an interface to the control board. And a change of screen for the Marlin firmware. Is that going to be necessary? 

at 5:10 in it shows the pins to the ANET board. 

2x5 connector

                                      o  o

Bk Gnd     Gnd              o  o     Reset    Pin 10

Yl  Pin 11  MOSI          o  o      SCK    Pin 13   Or

Red  pinV5   VCC        o  o       MISO  Pin 12  Gn

                                      o  o

Apparently on the Arduino, you need to do something with the reset pin. This video does not explain that. The video does not use the Arduino.     (comment below *Cap)

---------- ------------- -------------

Found a manual that shows use of these menus. Did a search for I3 Pro B.

https://www.geeetech.com/Documents/Geeetech%20Prusa%20I3%20pro%20B%20user%20manual.pdf

But nowhere to save changes in config.

Wrote my own configuration manual  photographing all the screens, but cannot find a save config item.

--------------------------------------

My 'friend' who says  beware dragons has written

"I tried everything! I'm on marlin V1 once you get it on them it's easy to update. But getting it installed in the first place requires a blood sacrifice.i bought 3 different usb programmers and I honestly can't remember how I eventually got it installed. It was a nightmare :("

so I don't think I'll get much help here.

-----------------------

From the links in the files I get to: https://reprap.org/forum/read.php?415,889546

where someone seems to have the same prob. I have made a change recommended there.

The very first thing you should set in a Configuration.h is the #define MOTHERBOARD
This is set to BOARD_ANET_10

**** July 23 Done.

Trying to verify still gets the error. Now I find this that I'll have to think about.

https://forum.arduino.cc/t/solved-sanguino-1284p-chip-for-ender-2/600455/6

----------------------

How to set up the board to be programmed:

[3]   https://www.youtube.com/watch?v=oZVTYpHnpIw        about 8 minutes in it tells how to program the arduino board. 

This ANET3D board has a 2x3 row of holes labelled USB BLE which I think is the serial program link

No It is the 2x5 socket next to the display socket. See above.

I was able to select the board and port, but could not verify it because it could not find a FQBN. I needed to install more firmware for my UNO

Processing Arduino AVR Boards:1.8.5: Downloading arduino:avr-gcc@7.3.0-atmel3.6.1-arduino7

Now it verifys correctly. And uploaded very quickly.


----------------

Oo, look what I found!

[4]   https://github.com/mytja-archive/CTC-Prusa-i3-Pro-B-Anet-board

And the manual - there is a link - has a store memory function. 

------------- ----------

Using [3] I have programmed the arduino board as a bootloader. This is shown at about 8 minutes.  And it tells how to use this to download the Marlin firmware to the controller. 

Now I am trying to find how to verify the marlin firmware in the Arduino IDE. I have 2 copies of Marlin firmware.  2.0.9.3.  and 1.1.8

 see [1]  5:19

in 2.0.9.3 marlin

marlin/src/core/boards.h from about line 174

I might choose board sanguinololu

23/10/22  Marlin 2.1.1 does not have a boards.h file that I can find. I used BOARD_ANET_10 as noted  above. 

--------------- ---------------

A search for 1284P found this: 

https://github.com/MCUdude/MightyCore

and I have downloaded  it. 


https://github.com/MCUdude/MightyCore

Open the File > Preferences menu item.

Enter the following URL in Additional Boards Manager URLs:

https://mcudude.github.io/MightyCore/package_MCUdude_MightyCore_index.json

Separate the URLs using a comma ( , ) if you have more than one URL

Open the Tools > Board > Boards Manager... menu item.

Wait for the platform indexes to finish downloading.

Scroll down until you see the MightyCore entry and click on it.

Click Install.


Verify gives an error:

error: statement-expressions are not allowed outside functions nor in template-argument lists

The error relates to a file  in MCUdude in .arduino15  but I am using Arduino 2.0.0-rc3 so why  is it calling into .arduino15?


---------- ---------------

Found a video about upgrading the ANET board. 

https://www.youtube.com/watch?v=MLAN7gWuRCs         differences between v5 and v7

This leads to this video about putting Marlin Firmware on to the board. It sounds feasible:

https://www.youtube.com/watch?v=wRODgnAqp1A&t=0s    

4 minutes in, download the board  definition files for ANET for arduino.  (Sanguino)

https://github.com/SkyNet3D/anet-board

But no hardware folder in Linux, so copied it into Libraries. It is called avr.

at 5:33  things do not work as described

Used folder /libraries/ANET/avr    and try again.

folder/libraries/anet and found it right at the bottom, not in alphabetical order

From about 9 mins in. 

Copied the example files for the ANET8 to the Marlin folder.


That was the preamble video to this:

https://www.youtube.com/watch?v=ePgpzkjriso

What I need to know are which files of the marlin software I can delete as so many of them are for dufferent languages.  Also how to configure the software for my particular model. 

I have deleted Arduino 2.0.0 rc3 as it kept hanging the computer and installed Arduino 2.0.0. rc8. 

Also have started using Marlin 1.8 software. 

*** July 23 updated to rc9 Arduino IDE. 


from youtube reference [3] above, have downloaded bootloader to UNO, abut now cannot burn the Bootloader because of errors: Failed chip erase: uploading error: exit status 1avrdude: Error: Could not find USBtiny device (0x2341/0x49)

will try again later. 

Do not need to burn bootloader to device, Just need to use Uno Bootloader to update Anet card. 

More later - As the famous line goes ' more work needed here'

Comments from a Thingiverse forum user:

madmachinations just commented on Big Upgrade on CTC DIY Printer - Help needed to Install Marlin. in CTC 3D Printer Owners

So I don't know for sure because I've never tried using that board, but a quick google seems to be indicating that the ATMega 1284P has 128kb of program memory available.

I think I remember reading that Marlin 2 really wants 256kb. Iirc people did get Marlin 2 to run on Anet boards with less space by turning stuff off and chopping stuff out.

So you could try and earlier version of Marlin if you're having build/load issues.

Z-axis wobble is one of those dreaded problems that can be due to all sorts of things, most likely something physical though. But if your threaded rods were more like giant bolts than actual threaded rods, like they tend to be in these cheap kits, then changing them is a good step forward for sure.

When your printer is activating any of the stepper motors on your printer, it's obviously looking to move the associated axis a very precise distance.

So how does Marlin know how to do that? Well you have to calibrate each axis, and you have to calibrate the extruder too.

The process for doing this is basically to:

1) Run the M92 gcode command on the printer, this will spit out the current calibration numbers for each axis, note these down. 2) Place a ruler next to the hot end carriage, make a note of how far off the bed the top of the carriage is. 3) Tell the printer via it's menu to move the Z axis up by 20mm 4) Measure how far the carriage actually moved up 5) Calculate the new calibration figure for that axis with:

new_calibration = (expected_mm_moved / actual_mm_moved) * original_calibration_number

so we tried to move Z up by 20mm, lets assume it moved up by 12mm. Let's assume the original calibration number for the z axis was 62:

new_z_calibration = (20 / 12) 62 new_z_calibration = 1.666666667 62 new_z_calibration = 103.333333333

So in this example our new Z calibration number would be 103.33

[ couldn't do this, but I recorded all the values from the menus]

6) Set this new calibration figure on the printer for the Z access by running the gcode command M92 Z103.33. You can set this command to run before every print you export from your slicer, inside your slicer's settings. You can also set the "steps per unit" in Marlin's configuration file and flash a new build onto your board. However, this approach with a ruler is very inaccurate, and really is just the first step to calibrating an axis after you've lost the original calibration.

7) With your new Z calibration set, print a test cube, something with consistent and known dimensions. Then use a micrometer to measure the resulting cube on the Z axis when it's done printing. If the cube was supposed to be 30mm high and it has produced something 28mm high, then you use these figures to perform the same calculation again as was done with the ruler.

8) Use the M92 command again to set the refined Z axis steps-per-unit figure, or put the refined figure into Marlin's config and re-flash your board. You can use this same cube to refine your X and Y calibrations while you're at it.

If you search youtube for "Marlin calibrate steppers" you will see lots of tutorials for this and for calibrating the extruder with a similar process too.

When it comes to building Marlin itself, the way I did it was to try and find the closest off the shelf config I could and modify it. But it was still a lot of trial and error to really dial it into the way my printer actually is.

I did write a tutorial for building Marlin on these strange CTC kits, my board is different to yours but the process will be similar:

https://www.thingiverse.com/thing:4475743#Step%207%20-%20Test%20printer

The main difference that doesn't apply to you though is where I'm targeting the mega2560/gt2560 board for my builds. You'd want to substitute that bit for the mega1280.

Good luck!


3/8/22  *Capacitor comment.  From https://www.thingiverse.com/thing:4462696  I find where to connect the cap to the reset. I used a 10uF 25v capacitor.

26/9/22 Have edited Configuration.h for the ANET8, using values from the configuration manual I created from the existing config. 

going to move this into the Marlin folder.  and the Config.adv.h file too. 


18/10/22  Back on it. From  https://github.com/jeko89/anet_for_arduino

Have put Anet folder into /peterm/arduino/Hardware folder. 

will also copy to root/usr/share/Arduino/Hardware

Start IDE.  Still cannot find Anet hardware, even with Anet board connected and live.

IDE does not show boards manager. It is IDE 2.1.0.5     [NO, it is 2:1.0.5}  so it is a very old version 1.

Have removed the IDE using synaptic, and downloaded the latest AppImage  and it comes up OK,

Now to look back and see how to find my Anet board in it. 

22/10/22  Appimage loaded very slowly with Marlin 1.1 sketch. A test by editing and saving a simple sketch shows that the IDE will load fast, so I have removed all excess language files and also pins files from the folder. 

Loading that still takes a long time.  Not nearly as long though. 


Even though I have put the MightyDude link in the preferences, it cannot find the library. 


As per suggestion on Arduino forum, I am going to try MArlin 2.1.1  from

https://github.com/MarlinFirmware/Marlin/releases/tag/2.1.1

It loads into the IDE in seconds, and only loads 4 files.

---- - - - - - - 

24/10/22  I think that I need to know more about how the IDE works. To set it up for a new piece of hardware, the ANET card with the 1284 processor, I need to install both a library and the hardware. I do not know which should come first, or even if the hardware should be plugged in to the IDE before setting it up.  One idea is that I somehow need to install the library, and this enables the hardware so that it can be found. 

https://docs.arduino.cc/software/ide-v2/tutorials/ide-v2-installing-a-library

But how do I get the name of the library?   Need to see an example where this is done.  

-------------- ------------ -----------

30/10/2022  Found this and working with it. It answers some other problems that I didn't know that I had. 

https://www.youtube.com/watch?v=38PkynA1uGI

It refers me to another video to download a bootloader to the Anet card: 

https://www.youtube.com/watch?v=RQIizXtf9oo  at about 5:36 in after getting the first bootloader on to the Arduino card. 

steps:

In Arduino, Open Sketch   ??? 

Tools Manager - Open  Anet v.1. Optiboot

I need to go back one step and find the Marlin boards thing














No comments: