Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
reprap:anet:anet_mainboard_overclocking [2018/01/04 04:13] – gmarsh23 | reprap:anet:anet_mainboard_overclocking [2018/01/04 05:27] – [Table of Contents] gmarsh23 | ||
---|---|---|---|
Line 9: | Line 9: | ||
* Is this reliable/ | * Is this reliable/ | ||
* Tools required | * Tools required | ||
- | | + | |
- | * Directions | + | * Choosing a new crystal |
- | * Crystal replacement | + | * Replacing the crystal |
- | * Bootloader installation | + | * Updating bootloader |
- | * Marlin firmware changes | + | * Downloading and compiling Optiboot |
+ | | ||
+ | | ||
* platformio.ini | * platformio.ini | ||
* macros.h | * macros.h | ||
* pins_ANET_10.h | * pins_ANET_10.h | ||
* speed_lookuptable.h | * speed_lookuptable.h | ||
- | | + | |
- | * Potential issues | + | |
==== Introduction ==== | ==== Introduction ==== | ||
Line 39: | Line 40: | ||
As far as safety goes, 3D printers by nature aren't safe, especially cheap printers like the A8. There' | As far as safety goes, 3D printers by nature aren't safe, especially cheap printers like the A8. There' | ||
- | ==== Tools required | + | === Tools required === |
To change the crystal, you will need soldering iron, solder (lead or lead free is fine), solder wick, and a suitable place to work. Desoldering HC49S packages is a pain in the ass, having two irons or a hot air rework station greatly helps with getting the old crystal off. | To change the crystal, you will need soldering iron, solder (lead or lead free is fine), solder wick, and a suitable place to work. Desoldering HC49S packages is a pain in the ass, having two irons or a hot air rework station greatly helps with getting the old crystal off. | ||
Line 45: | Line 46: | ||
Having a power supply to power the control board outside of the printer during reflashing greatly helps, this lets you make sure that everything works before you reassemble your printer. The Anet board will run from a 9V to 15V supply. | Having a power supply to power the control board outside of the printer during reflashing greatly helps, this lets you make sure that everything works before you reassemble your printer. The Anet board will run from a 9V to 15V supply. | ||
- | Doing this modification requires updating the bootloader on the ATMega1284P chip, so you'll need an ISP capable programmer to do this. There are a number of possibilities - buying a cheap "USB ISB" or " | + | Doing this modification requires updating the bootloader on the ATMega1284P chip, so you'll need an ISP capable programmer to do this. I suggest getting |
- | ==== Crystal selection ==== | + | ==== Crystal selection |
+ | |||
+ | === Choosing a new crystal | ||
The Anet V1.0 board requires a " | The Anet V1.0 board requires a " | ||
Line 60: | Line 63: | ||
| 27MHz | +68.8% | +35% | May be unstable.\\ significant baud rate error (see below)\\ Can be salvaged from video equipment (DVD players, etc) | | | 27MHz | +68.8% | +35% | May be unstable.\\ significant baud rate error (see below)\\ Can be salvaged from video equipment (DVD players, etc) | | ||
- | If you're using the USB interface of the printer, using Octoprint for example, the crystal you choose affects how accurate the baud rate of the Mega1284P' | + | If you're using the USB interface of the printer, using Octoprint for example, the crystal you choose affects how accurate the baud rate of the Mega1284P' |
^ MHz (below), baud (right) ^ 115200 ^ 230400 ^ 250000 ^ 460800 ^ 500000 ^ 921600 ^ 1000000 ^ 1500000 ^ | ^ MHz (below), baud (right) ^ 115200 ^ 230400 ^ 250000 ^ 460800 ^ 500000 ^ 921600 ^ 1000000 ^ 1500000 ^ | ||
Line 75: | Line 78: | ||
* Actual baud rate and desired baud rate should be +-5%, preferably +-2.5% | * Actual baud rate and desired baud rate should be +-5%, preferably +-2.5% | ||
- | ==== Directions ===== | + | === Replacing the crystal |
- | === Compile | + | Before replacing the crystal, I'd suggest doing the first step in " |
+ | |||
+ | Unplug your printer, disconnect all wiring, and remove the motherboard from your printer. | ||
+ | |||
+ | Desolder the existing crystal. Hot air and a pair of tweezers makes this very easy, as does using two soldering irons. But if you have just one iron, the best method is to apply two large blobs of solder to the joints at each end of the crystal, and move your iron back and forth between the two sides to try to get both sides simultaneously melted, very gently pulling up on the crystal when you do this. Eventually it will come loose, or you'll be able to get one end lifted up enough to clean under it with solder wick. | ||
+ | |||
+ | Clean up the crystal footprint pads on the PCB with solder wick, and apply a thin layer of fresh solder. Install the new crystal and solder both ends. | ||
+ | |||
+ | ==== Updating the bootloader ==== | ||
+ | |||
+ | Once the crystal is changed, put the control board back in your printer and connect ONLY the power input to the board; leave everything else disconnected for now. Connect your ISP programmer to the board. | ||
+ | |||
+ | === Downloading and compiling | ||
You'll need to download and compile Optiboot first. More information can be found on the Optiboot github page: https:// | You'll need to download and compile Optiboot first. More information can be found on the Optiboot github page: https:// | ||
Line 87: | Line 102: | ||
Save the .hex file for later. | Save the .hex file for later. | ||
- | === Marlin Firmware changes | + | === Backing up existing firmware |
- | A number of files have to be modified. | + | Use AVRDUDE: |
- | __platformio.ini__ | + | avrdude -p atmega1284p -c <your programmer> |
+ | |||
+ | === Flashing new firmware === | ||
+ | |||
+ | Use AVRDUDE: | ||
+ | |||
+ | avrdude -p atmega1284p -c <your programer> | ||
+ | |||
+ | Once the board is programmed, connect the board to your PC via its USB connection, and attempt to " | ||
+ | |||
+ | avrdude -c arduino -p m1284p -P COM1 -b 57600 -v | ||
+ | |||
+ | If everything goes well, you should see a screen that looks like this, indicating that the bootloader is up and running. | ||
+ | |||
+ | avrdude: AVR device initialized and ready to accept instructions | ||
+ | |||
+ | Reading | ################################################## | ||
+ | |||
+ | avrdude: Device signature = 0x1e9705 | ||
+ | avrdude: safemode: lfuse reads as 0 | ||
+ | avrdude: safemode: hfuse reads as 0 | ||
+ | avrdude: safemode: efuse reads as 0 | ||
+ | |||
+ | avrdude: safemode: lfuse reads as 0 | ||
+ | avrdude: safemode: hfuse reads as 0 | ||
+ | avrdude: safemode: efuse reads as 0 | ||
+ | avrdude: safemode: Fuses OK (E:00, H:00, L:00) | ||
+ | |||
+ | avrdude done. Thank you. | ||
+ | |||
+ | ==== Marlin changes ==== | ||
+ | |||
+ | A number of files in Marlin have to be modified for operation at frequencies other than 16 or 20MHz. This is in addition to the changes to the Configuration.h and Configuration_adv.h files. | ||
+ | |||
+ | === platformio.ini === | ||
Find the following section of this file: | Find the following section of this file: | ||
Line 107: | Line 156: | ||
board_f_cpu = 24000000L | board_f_cpu = 24000000L | ||
- | __Marlin/macros.h__ | + | === Marlin/macros.h === |
Find the following section: | Find the following section: | ||
Line 121: | Line 170: | ||
#define DELAY_8_NOP DELAY_1_NOP; | #define DELAY_8_NOP DELAY_1_NOP; | ||
#define DELAY_9_NOP DELAY_1_NOP; | #define DELAY_9_NOP DELAY_1_NOP; | ||
- | |||
- | Next, find the following two lines: | ||
- | |||
- | #define DELAY_10_NOP DELAY_5_NOP; | ||
- | #define DELAY_20_NOP DELAY_10_NOP; | ||
- | |||
- | Add the following lines immediately after: | ||
- | |||
- | #define DELAY_11_NOP DELAY_10_NOP; | ||
- | #define DELAY_12_NOP DELAY_10_NOP; | ||
- | #define DELAY_13_NOP DELAY_10_NOP; | ||
- | #define DELAY_14_NOP DELAY_10_NOP; | ||
- | #define DELAY_15_NOP DELAY_10_NOP; | ||
Lastly, find the following section: | Lastly, find the following section: | ||
Line 143: | Line 179: | ||
#endif | #endif | ||
- | Add a new " | + | Add the two middle lines shown, with the values altered to correspond |
#if CYCLES_PER_MICROSECOND == 16 | #if CYCLES_PER_MICROSECOND == 16 | ||
Line 153: | Line 189: | ||
#endif | #endif | ||
- | __pins_ANET_10.h__ | + | === pins_ANET_10.h === |
+ | |||
+ | If you're using the stock A8 display, you can ignore this section. If you're using the full graphics display from the A6, this is required or else the display on the printer will be garbled. | ||
+ | |||
+ | Find the following three lines, these control how fast data is written to the LCD: | ||
+ | |||
+ | #define ST7920_DELAY_1 DELAY_0_NOP | ||
+ | #define ST7920_DELAY_2 DELAY_1_NOP | ||
+ | #define ST7920_DELAY_3 DELAY_2_NOP | ||
+ | |||
+ | Change them to the following values for 24MHz operation. If your display becomes glitchy or garbled, try adding 1 to the ST7920_DELAY_2 and ST7920_DELAY_3 settings. | ||
+ | |||
+ | #define ST7920_DELAY_1 DELAY_1_NOP | ||
+ | #define ST7920_DELAY_2 DELAY_3_NOP | ||
+ | #define ST7920_DELAY_3 DELAY_7_NOP | ||
+ | ==== Compiling and installing new firmware ==== | ||
+ | There are many guides online describing how to compile and install Marlin on an Anet A8. Find one and link it here :) |