Thanks Thanks:  0
Likes Likes:  1
Dislikes Dislikes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    3D Printer Noob
    Join Date
    Apr 2019
    Posts
    6
    Post Thanks / Like

    CR-10 How to get power loss recovery working

    Hi All,

    I have just upgraded the firmware on my old CR-10 to Marlin 1.1.9 to make use of new features. Unfortunately I can't get the Power Loss Recovery working as enabling it seems to push it over a memory limit preventing compile in Arduino IDE.

    Here is the change I made in configuration_adv.h. I just removed // from lines 1, 3 and 4 to enable the feature

    #define POWER_LOSS_RECOVERY
    #if ENABLED(POWER_LOSS_RECOVERY)
    #define POWER_LOSS_PIN 17 // Pin to detect power loss
    #define POWER_LOSS_STATE HIGH // State of pin indicating power loss
    #endif


    The compilation error is shown below.

    c:/users/j/appdata/local/arduino15/packages/arduino/tools/avr-gcc/5.4.0-atmel3.6.1-arduino2/bin/../lib/gcc/avr/5.4.0/../../../../avr/bin/ld.exe: region `text' overflowed by 280 bytes

    collect2.exe: error: ld returned 1 exit status

    Has anyone succeeded getting power loss recovery working on a CR-10 (not CR-10S) ?

    cheers
    John

  2. #2
    Super Moderator
    Join Date
    Nov 2016
    Posts
    1,957
    Post Thanks / Like
    Any other useless bit of code you can remove? Remove an unnecessary library? Any non-CR10 functionality that can be remarked?

  3. #3
    3D Printer Noob
    Join Date
    Apr 2019
    Posts
    6
    Post Thanks / Like
    Thanks for the quick response Tommy.

    Quote Originally Posted by TommyDee View Post
    Any other useless bit of code you can remove? Remove an unnecessary library? Any non-CR10 functionality that can be remarked?
    Marlin provides a folder with configuration examples for CR-10 and a lot of other popular printers. I assumed/hoped that would have filtered out unwanted code. They have disabled PLR on purpose. The code is very easy to break if you just hack about.

    I tried this approach https://www.spainlabs.com/foros/tema...overy-en-CR-10 but that broke something else.

    cheers
    John

  4. #4
    Super Moderator
    Join Date
    Nov 2016
    Posts
    1,957
    Post Thanks / Like
    Just learned about this trick recently and have not done anything with it, but I do know how to replace the standard bootloader.
    Doesn't recover any additional space, however. You can start looking into custom bootloader specifically to make this work on the CR10.

    Is that a Mega 2560 in the CR10 from the factory? Not sure if there is a "bigger" one. Would be cool if you could stripe them across MP's

  5. #5
    3D Printer Noob
    Join Date
    Apr 2019
    Posts
    6
    Post Thanks / Like
    Not sure what you mean by standard bootloader. My original CR-10 didn't have a bootloader so I had to use an Arduino to put one on.

    The original CR-10 board uses an ATMega1284 16Mhz that has 130048 bytes memory. The Mega2560 has 253952 bytes so would have been fine!

    I tried hacking code to remove files for mesh leveling and unused languages, but it didn't make any difference. The compilation is smart to ignore most of what is not used.

  6. #6
    Super Moderator
    Join Date
    Nov 2016
    Posts
    1,957
    Post Thanks / Like
    Aha... No bootloader on the original? That's strange.

    In the ReCube thread under Cube3 I went through the bootloader process using a Nano master to Nano slave. Worked wonders.
    This loads the Arduino bootloader supplied by Arduino IDE and uses the sample "ArduinoISP" sketch on a master Nano and making it the "Arduino as ISP" to update the slave device's bootloader.
    Not that I fully understand your linked site but sounds like a similar process.

    I did read/you-tube somewhere that you can load a space-saving bootloader that would provide a little extra program space.

    280 bites short is a bummer indeed. But you could upgrade to the Mega 2560 and all your problems should be solved, right?
    Then you will be ready for release v2.0!

  7. #7
    3D Printer Noob
    Join Date
    Apr 2019
    Posts
    6
    Post Thanks / Like
    I tried using the "ArduinoISP" bootloader but it didn't work for me. The Nick Gammon alternative method in this link worked fine though https://www.instructables.com/id/Fla...-to-the-CR-10/

    It seems that the CR-10S v2.x boards have the Mega2560 chip with almost twice the memory. The question is whether the connections are all the same?

  8. #8
    Super Moderator
    Join Date
    Nov 2016
    Posts
    1,957
    Post Thanks / Like
    That's a great write-up! Indeed, the connections are the same where only D10 (master) to Reset (slave) as the variation on the 6 pins.

    The Melzi pinout or the Mega pinout? I was not even aware of a 1280 version of the MP until today Thx.

    - - - - - - - - - -

    ...and the thing I learned about Nano's from China is that most have an old bootloader. The only difference is that the old bootloader requires 57600 baud communication instead of the 115200 baud for the current bootloader. This must have something to do with the USB part of the circuit. Maybe that is what is getting in the way of your way. I was also dumb enough to have my configuration in Windows 10 for the COM ports set to only 9600 baud. Its been a learning experience!

    If this is the right ATMEL package, it says 64/128/and 256 are the same pinout.

    - - - - - - - - - -

    Budget chip de-soldering tool Flameless heat sufficient to remove parts.

    Just got a spare in the mail yesterday.
    Last edited by TommyDee; 04-17-2019 at 12:45 AM.

  9. Likes john p liked this post
  10. #9
    3D Printer Noob
    Join Date
    Apr 2019
    Posts
    6
    Post Thanks / Like
    Thanks for digging about. I didn't know there was a 64k version. That must be very constraining for a 3D printer.

    I dabble with Arduino and can concur that the Tools > Processor must use the "AtMega328P (Old bootloader)" option

    The idea of just replacing the 128k chip with the AtMega2560 is appealing but is quite risky. They may have the same pinout but there may be dragons. I have never replaced an SMD chip with so many pins.

    Someone else must have tried this?

  11. #10
    Super Moderator
    Join Date
    Nov 2016
    Posts
    1,957
    Post Thanks / Like
    Kester Flux Pen! No worries, I'm of a similar skill level with very different intent. You might find these dragons are a lot tamer than others lurking about. Anyone ever get a real conversation going with Creality on these upgrades?

    I was careful to say that removing the chip can be made easier. I use that torch for installing a couple of surface mount contacts. Also stripped a few donor boards this way. There is a lot of video on how to install SMT processors. Basically you are trying to keep the board really clean without exposing too much trace by accidentally removing solder-mask with solder-wick (not a fan!) in trying to minimize the build-up on the tinned pads. Some fine stranded wire bathed in flux makes for much more manageable wick and seriously less destructive to fine circuits. A few junk practice boards can hone your skills. Re-installation is all about surface tension using a soldering iron. That's the reason for copious amounts of flux. Once you have 2 pins locked down, the rest should be easy.

    I might consider a cheap UPS supply just to run the printer as an alternative. I can always pause the printer for a duration of a blackout. 10 years ago it would have been a necessity where I am located.

    Good luck on your project if you decide to go ahead John.

 

 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •