Rambo mini not communicating

Hi,

long story short: friend of mine tried to update firmware on his Lulzbot Mini printer based on RAMBo mini 1.1a board. It took too long and failed (let’s do not judge who, how and why failed ;)).
So i took it home and I’m trying do ressurect now.

First of all, it somehow works, lsusb says:
Bus 002 Device 030: ID 27b1:0001

But fan does not start (as it should - i believe).
So i tried to update fimware by Arduino. Downloaded Marlin 1.1.x from github, installed RAMBo board definition and tried to upload it on mini. It failed ofcourse with “avrdude: stk500v2_ReceiveMessage(): timeout” message.

So, i tried to upload compiled (downloaded) hex by hand:
avrdude -v -patmega2560 -carduino -b 115200 -P /dev/ttyACM0 -D -Uflash:w:Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex:i

It failed also.

Finally, I’ve connected USBasp v2 to ICSP* port and:

  • burn bootloader with arduino - success, but still cant upload anything by arduino,

  • burn hex file by ICSP with:
    avrdude -v -patmega2560 -c usbasp -b 115200 -P /dev/ttyACM0 -D -Uflash:w:Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex:i

    avrdude: Version 6.3-20171130
    Copyright © 2000-2005 Brian Dean, [cut link xD]
    Copyright © 2007-2014 Joerg Wunsch

           System wide configuration file is "/etc/avrdude.conf"
           User configuration file is "/home/san/.avrduderc"
           User configuration file does not exist or is not a regular file, skipping
    
           Using Port                    : /dev/ttyACM0
           Using Programmer              : usbasp
           Overriding Baud Rate          : 115200
           AVR Part                      : ATmega2560
           Chip Erase delay              : 9000 us
           PAGEL                         : PD7
           BS2                           : PA0
           RESET disposition             : dedicated
           RETRY pulse                   : SCK
           serial program mode           : yes
           parallel program mode         : yes
           Timeout                       : 200
           StabDelay                     : 100
           CmdexeDelay                   : 25
           SyncLoops                     : 32
           ByteDelay                     : 0
           PollIndex                     : 3
           PollValue                     : 0x53
           Memory Detail                 :
    
                                    Block Poll               Page                       Polled
             Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
             ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
             eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
             flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
             lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
             calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
             signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
    
           Programmer Type : usbasp
           Description     : USBasp, http://www.fischl.de/usbasp/
    

    avrdude: auto set sck period (because given equals null)
    avrdude: warning: cannot set sck period. please check for usbasp firmware update.
    avrdude: AVR device initialized and ready to accept instructions

    Reading | ################################################## | 100% 0.00s

    avrdude: Device signature = 0x1e9801 (probably m2560)
    avrdude: safemode: lfuse reads as FF
    avrdude: safemode: hfuse reads as D8
    avrdude: safemode: efuse reads as FD
    avrdude: reading input file “Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex”
    avrdude: writing flash (91006 bytes):

    Writing | ################################################## | 100% 51.08s

    avrdude: 91006 bytes of flash written
    avrdude: verifying flash memory against Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex:
    avrdude: load data flash data from input file Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex:
    avrdude: input file Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex contains 91006 bytes
    avrdude: reading on-chip flash data:

    Reading | ################################################## | 100% 45.59s

    avrdude: verifying …
    avrdude: 91006 bytes of flash verified

    avrdude: safemode: lfuse reads as FF
    avrdude: safemode: hfuse reads as D8
    avrdude: safemode: efuse reads as FD
    avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)

    avrdude done. Thank you.

And it worked, but with no effect.
Turning on power and connecting USB still gives no effect.

What am i doing wrong or what does not work?
…or, worse scenario, what died? The printer was barely used and is original.

Power led shines, another one blinks twice on RESET but nothing happens with TX or RX leds.

Best regards!

Edit.
Also flashed mega32u2 firmware. Everything went fine…

To be clear, you have the 12V and usb powered, right?

Yup!
And after powering up machine three is 5v on icsp header.

Edit.
Dont know how, but ill try to touch tx line with standalone rs-usb converter and see if there is any output from 2560.

1 Like

Was there a reason the friend was updating the firmware? Was the machine operable before? I have a Lulzbot mini as well and the Rambo mini is extremely susceptible to being fried if there’s a short that causes the extruder heater voltage to touch the extruder body (take a guess as to how I know that). The Zmin pin is connected to the extruder body for use with the leveling feature and if you get a short you basically dump 24v onto a data line.

He said that old firmware didn’t play well with new cura. So he tried to update via cura.
I believe overvoltage would fry mega chip so I wouldn’t be able to flash it via icsp. I’m not sure.
Anyway, this is probably not the case.

edit.
as long as i think about this i believe that ICSP can work on fried CPU. So I’m not sure if my statement was correct. I believe that marlin sends something via RS after reset, so I’ll catch something with RS-USB converter.

Yup the ICSP definitely can work even if the mega gets toasted. At least in my case thats what happened. Not saying yours is toasted just something to consider.

So, I made custom probe device:


Connected rs-usb converter to pc, set baudrate to 250000 and opened communication in cutecom.
Connected gnd of converter to gnd populated on icsp for atmega2560, then “touched” with the probe 3rd pin (Txd0, pe1).

Silent.

So, definitely atmega2560 is dead. Or crystal?

Thanks anyway and best regards.

Before declaring it dead I would disconnect all wires and get it on its own onto a bench. make sure its getting good power and try again. Also try a baud of 115200.

OK, there is something weird around here.
I disassembled mainboard. There are testpoints under it, so it’s bit easier to „touch”.
Again: i’ve connected 5v and GND from RS-USB converter and it continous to be silent - there are two RX and two RX testpoints - I believe one from u2 point of view, second one from 2560.
Anyway on both pairs i can recieve what u2 sends, but there is no response.

BUT!
I’ve started to wonder about led1. It blinks twice after reset. Prevoiusly I assumed that it is connected to u2, so nothing weird, but it isn’t! It is connected to atmega2560, so it has to be alive!
It is PB7 - D13.

At the moment I’m trying to check what that means in Marlin source and in 2560 datasheet…
Anyway it doeasn’t look good at the moment but I belive we are closer to recognize the problem.
…or I’ll try to upload blink program to mega via ICSP.

As a side note. Friend of mine told me yesterday that months or even years ago he was annoyed by this printer so it was standing unused since then. It wasn’t communicating BEFORE he tried to update firmware, so the board might be dead since a long time and with unknown reason.

EDIT!
I’ve uploaded Blink arduino program but it does not blink.
Me no get it.

I’ve uploaded this scetch:

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(13, OUTPUT);
  Serial.begin(115200);
  Serial1.begin(115200);
  Serial2.begin(115200);
  Serial3.begin(115200);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
  Serial.println("Hello Computer");
  Serial1.println("Hello Serial 1");
  Serial2.println("Hello Serial 2");
  Serial3.println("Hello Serial 3");
}

And there is still silence also no blinking. I’ve reuploaded Marlin (hex downloaded from page and compiled in arduino) via ICSP and there is no blink anymore.

Closing RX0 and TX0 testpoints and sending some text in CuteCom gives response…

edit.
Ok, i’m getting verification errors:
avrdude: verifying …
avrdude: verification error, first mismatch at byte 0x0000
0x04 != 0x0c
avrdude: verification error; content mismatch

edit2.
according to this post [https://forum.arduino.cc/index.php?topic=467192.msg3202612#msg3202612] burning bootloader and then flashing via ICSP should help. It does.
But still after flashing simplest program:
void setup() {
pinMode(13, OUTPUT);
digitalWrite(13, HIGH); // turn the LED on (HIGH is the voltage level)
}
Does not turn LED1 on.

final observation (I’m writing while doing new tests):
flash content NEVER equals flashed hex does not change.
Checked by hex diff:
avrdude -v -patmega2560 -cusbasp -b 115200 -P /dev/ttyACM0 -D -Uflash:w:Blink.ino.hex:i
avrdude -v -patmega2560 -cusbasp -b 115200 -P /dev/ttyACM0 -D -Uflash:r:Blink.ino_down4
.hex:i

Upgraded USBASP firmware to v1.5 as instructed here: https://petervanhoyweghen.wordpress.com/2015/12/02/the-usbasp-and-atmega2560-mystery/
It works now. Started to communicate. I’ll need to mount it back into printer but this means case is closed.

Thanks!

Sorry for posts one after another, but need to stress out one more thing.
In some moment i realised that it still does not work (Arduino program uploaded without good config.h applied), so I tried to apply config - and it failed somewhere complaining about something. I didn’t try to investigate since there are ready to use hex files on Lulzbot page.

Anyway, long-story-short: avrdude for some reason didn’t erase chip before flashing (?!), but adding -e swich forced it, so complete command is:

avrdude -v -patmega2560 -cusbasp -b 115200 -P /dev/ttyACM0 -D -Uflash:w:Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex:i -v -e

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "/etc/avrdude.conf"
         User configuration file is "/home/san/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyACM0
         Using Programmer              : usbasp
         Overriding Baud Rate          : 115200
avrdude: seen device from vendor ->www.fischl.de<-
avrdude: seen product ->USBasp<-
         AVR Part                      : ATmega2560
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PA0
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    10     8    0 no       4096    8      0  9000  9000 0x00 0x00
           flash         65    10   256    0 yes    262144  256   1024  4500  4500 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           lock           0     0     0    0 no          1    0      0  9000  9000 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9801 (probably m2560)
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FD
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: reading input file "Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex"
avrdude: writing flash (91006 bytes):

Writing | ################################################## | 100% 43.45s

avrdude: 91006 bytes of flash written
avrdude: verifying flash memory against Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex:
avrdude: load data flash data from input file Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex:
avrdude: input file Marlin_Mini_SingleExtruder_1.1.9.28_193d1f804.hex contains 91006 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 23.34s

avrdude: verifying ...
avrdude: 91006 bytes of flash verified

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as D8
avrdude: safemode: efuse reads as FD
avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)

avrdude done.  Thank you.

Also, there are some info online to change hfuse from D8 to D9 - disable BOOTRST.

If BOOTRST fuse is present, the AVR goes to 32256 at Reset. The Bootloader looks to see if anything is happening. And restarts at 0.

I thought for sure this was going to end in trying to replace the micro, and destroying everything during that incredibly hard procedure. Good job fixing it!