Updating the firmware

Discussion in 'OpenBeam Kossel Reprap and OpenBeam Kossel Pro' started by Matthew Wilson, Jan 18, 2015.

  1. Matthew Wilson

    Matthew Wilson New Member

    These are the official directions on how to update the firmware on your Kossel Pro. I shall be updating these as things change so they should always be correct.

    Before you start

    Linux
    The ModemManager package can cause corruption of the serial data stream when uploading new firmware to the printer. This will at best cause the upload to fail, and at worst may corrupt the bootloader, bricking the board. You can either uninstall modemmanager, or configure your system such that it leaves the printer alone.

    Uninstall from Ubuntu:
    sudo apt-get remove modemmanager
    Uninstall from Fedora: sudo rpm -e ModemManager

    If you would rather keep ModemManager you will need to tell it to ignore the printer and it's bootloader. Create a file called /etc/udev/rules.d/50-ignore-serial.rules with the contents below

    # LUFA bootloader
    SUBSYSTEM=="usb", ATTR{idVendor}=="239a", ATTR{idProduct}=="0001", MODE="0660", GROUP="plugdev", ENV{ID_MM_DEVICE_IGNORE}="1"
    # Marlin on Brainwave Pro
    SUBSYSTEM=="usb", ATTR{idVendor}=="16d0", ATTR{idProduct}=="076b", MODE="0660", GROUP="plugdev", ENV{ID_MM_DEVICE_IGNORE}="1"


    Windows
    In order to see the printer you may need to install a driver. There is a brainwave.inf file in the brainwave-arduino bundle. It is unsigned (it's just a text file) so Windows will complain a lot about trying to install it. (If someone could write up driver install directions I would be most grateful)

    MacOS
    You may have trouble running Arduino on MacOS if you lack the right version of Java. See http://support.apple.com/kb/DL1573 for instructions on installing Java 1.6. You do not need to make it the default (which is a security risk) just have it installed.

    The "easy" way
    You can flash a pre-compiled .hex file directly onto the printer.

    1. Install avrdude
    2. Download the precompiled .hex file of the firmware
    3. Hold down BOOT while you briefly press RESET. The Status LED should start pulsing. If not, try again.
    4. Find the device name that just showed up (/dev/ttyACM0, COM17, etc)
    5. run the avrude command below in a terminal window, replacing devicename with the device name found in step 4.
      Linux/MacOS:
      sudo avrdude -p at90usb1286 -c avr109 -P /dev/devicename -b 115200 -D -U flash:w:KosselProMarlin-20150117.hex:i
      Windows: avrdude -p at90usb1286 -c avr109 -P devicename -b 115200 -D -U flash:w:KosselProMarlin-20150117.hex:i
    6. Power cycle the printer
    The "hard" way
    Install The Arduino application. You need to be running at least 1.0.6 for the current Marlin. Do not use the 1.5.x beta.

    Download the
    brainwave-arduino hardware bundle. Copy the folder inside called 'brainwave' to the 'hardware' directory in your Arduino sketchbook directory. Under Linux this is at ~/sketchbook. On Mac it is in Documents/Arduino. On Windows this is in 'My Documents/Arduino'

    Updating the firmware
    Go fetch The official OpenBeam Marlin branch from github. You can either install git or simply download the .zip file. Documentation on running git is available on github.com.

    1. Open Arduino
    2. Open the Marlin.ino file in the code that you just downloaded.
    3. Connect and power on the printer.
    4. On the Brainwave Pro board, find the RESET and BOOT buttons.
    5. Hold down BOOT while you briefly press RESET. The Status LED should start pulsing. If not, try again.
    6. Choose 'Brainwave Pro' from the Tools->Board menu in Arduino
    7. From the Tools->Serial Port menu select the serial device that just showed up
      1. Under Linux is will be /dev/ttyUSB0 (or ttyUSB1, etc)
      2. Under MacOS it will be ?????
      3. Under Windows it will be COM<something>
    8. Click the Upload button in Arduino and wait until it says 'Done uploading' in the status bar.
    9. Power cycle the printer
    You should now be able to connect to the printer with your favorite host software. It is recommended that you tune the PID controller before printing.
    Last edited: Jan 23, 2015
    samspade4321, RicerX1, sean and 6 others like this.
  2. Terence Tam

    Terence Tam Mr. OpenBeam Staff Member Vendor

    Thanks, Matthew!

    Edited to add:

    The latest build for Windows and MacOS of MatterControl have the latest Brainwave Pro drivers built in as well. They are available here:

    MacOS: https://mattercontrol.appspot.com/downloads/mattercontrol-openbeam-mac-osx/release
    Windows: https://mattercontrol.appspot.com/downloads/mattercontrol-openbeam-windows/release

    Both versions of the software comes with a toll free support telephone number. The line are staffed by the MatterHacker's print solutions group, who have great experience handling 3D Printers (including the Kossel Pro and various other deltabots) and are in a much better position to offer better support. They can help with connectivity issues and software issues on both MatterControl and MatterSlice.

    -=- Terence
  3. Chris

    Chris Member

    Just an update about the new firmware. Between changes in Marlin code, and adjustments of my own, the Z adjustments to G29 have changed. In my case I've moved from `G29 0.55` to `G29 0.2` (I could make it perfect for my printer but I'd rather err on the side of not having someone else get a head crash). There are still some issues with Z not being even across the entire print surface, too, but I'll address them in http://forums.openbeamusa.com/threads/one-vertex-slightly-off.118/
  4. Jackal

    Jackal Member

    Does the end effector arm still brushes against the belt when deploying the probe?
  5. Mike Francies

    Mike Francies Member

    Thank you Matthew, this is the first time I have seen a step by step guide to updating firmware - an absolute essential for a virgin like me. Can anyone tell me if I would benefit from updating the firmware? I don't know what version is loaded on my printer (KS-039) and, as I have mentioned elsewhere, I have not done any uploading of firmware before and it is with some trepidation that I am even thinking about it :). Git Hub is not exactly user friendly either but I think I have managed to get through the first part of getting the Brainwave folder into the Arduino program. However, I am not too confident in taking the next steps as I really don't want my printer as an ornament! I need some reassurance that this is dead easy to do and it fool proof.
  6. Bryce Johnson

    Bryce Johnson New Member

    Ran a 20mm calibration cube with it. Appeared to print fine for me.

    @Jackal it still just barely hit the edge of the belt on mine.

    I changed

    #define TOUCH_PROBE_DEPLOY_2_X -110.00 // Move outward to position deploy pin to the left of the arm

    to

    #define TOUCH_PROBE_DEPLOY_2_X -105.00 // Move outward to position deploy pin to the left of the arm

    and now it misses the belt completely
  7. JoeF

    JoeF Member

    Just in case anyone has the same issue, if you are running Mac OS X and did not upgrade from 10.6 Snow Leopard, you will not have Java 1.6 installed, which is necessary to run the Arduino IDE.

    You will need to download it from http://support.apple.com/kb/DL1573

    If you get a blank page from that link (lots of complains in discussions.apple.com about it), just try another browser (Firefox worked for me) or keep trying every few minutes and eventually it'll come up.

    You do not need to make it your default java, which is a security risk. You just need to install it.
  8. Mike Francies

    Mike Francies Member

    Please excuse me for being stupid but I dare not get any further without an explanation of what is happening. I have just downloaded Chris' Marlin branch, unzipped it and am now confused. Inside the Marlin-deltabot folder are two folders; one called Arduino and one called Marlin plus three other files. Inside the Marlin folder there is one more folder called 'example-configurations' and eighty files. I am assuming the file I want is the one with the Arduino logo just called Marlin. I cannot see a Marlin.ino file. When I load the Marlin file into Arduino I get just 21 lines of code. Is this correct? Does Arduino sort everything out from this very short bit of code?

    Apologies for needing such simplistic instructions but we all have to start somewhere and help would be much appreciated.
  9. Wacky

    Wacky Member

    I've never managed to get this to work. I did manage to upload some revised firmware using the ICSP. But, in the process, I erased the boot loader.
    In Terence's files, there is a Brainwave2 boot loader which is the same as the Brainwave Pro 1286 version from your Github repository.
    I couldn't get that to work at all.

    Mike Z posted a different boot loader. I got that one to start. But it stopped after installing about 3/4 of the Marlin code.

    I would really like to be able to upload new Marlin code over the USB cable without dragging out the programmer.

    Can someone tell me what code to use and the avrdude parameters that I need to set?

    Frank likes this.
  10. Chris

    Chris Member

    @Mike Francies Place that whole "Marlin" folder (the one with Marlin and ArduinoAddons inside of it) inside of your sketchbook folder. On my Mac, this looks like:

    ~/Documents/Arduino/Marlin/ArduinoAddons
    ~/Documents/Arduino/Marlin/Marlin
    ~/Documents/Arduino/hardware/brainwave-arduino

    On Linux, it would be ~/sketchbook/... instead of ~/Documents/Arduino/...

    Then you can open up the Arduino IDE and select the various options, etc.

    On the other hand, if you're comfortable on the command line (I don't know any other way to do this), you can follow @Wacky and others (@protoserge might also be interested in this) and grab my experimental build from here:

    https://dl.dropboxusercontent.com/u/25402900/kossel/KosselProMarlin-20150117.hex
    (pseudo legal disclaimer: this is an experimental build that you should use at your own risk -- I offer no guarantees that it won't harm your printer or drink all of the beer in your fridge)
    (note to future readers: this link will eventually and intentionally expire as newer builds are made, and will most certainly go away once there is an official one)

    To install it from Linux, you can do the following:

    cd {path to directory containing KosselProMarlin-20150117.hex}
    sudo avrdude -p at90usb1286 -c avr109 -P /dev/ttyACM0 -b 115200 -D -U flash:w:KosselProMarlin-20150117.hex:i

    I build it on a Mac but the printer is plugged into a Linux box so I don't know how to do it on Mac/Windows.
    Last edited: Jan 19, 2015
  11. David Boyd

    David Boyd Active Member

    Chris and Mike - Thanks so much for putting this stuff together.

    Quick and likely stupid question. I see in Configuration.h in Chris's branch that EEPROM is disabled.

    Does the Brainwave have EEPROM for storing things like steps per unit, acceleration, etc?

    Generally, I like to update my extruder rate and the PID settings for the hotend via the eeprom verus flashing the firmware.
  12. Terence Tam

    Terence Tam Mr. OpenBeam Staff Member Vendor

    We've been independently doing firmware testing and tuning this weekend to detune the hot end heater (prevent melt throughs) and we've enabled EEPROM on our branch of the older firmware, and tested that it works. It should be pretty trivial to roll that onto the new build that Chris and Matthew had been testing.

    -=- Terence
  13. Mike Francies

    Mike Francies Member

    Chris, I'm sorry but I have never worked with Arduino before, hence the very basic questions. I don't have a 'Sketchbook' folder (see the screen shot) so where do I put the 'Marlin' folder. The dumb questions will only be asked once so once I have managed to update the firmware for the first time, I will be good to go and not have to ask again - maybe!!

    Attached Files:

  14. Wacky

    Wacky Member

    Mike, I cannot tell you directly. (I don't have any Windows machines available) However, if you will start up the Ardunio IDE, it should give you a skeleton of a "sketch". Type anything into that edit window and save it. It should create a folder and a .ino file within it. Then put the Marlin folder next to that folder. (and you can trash the initial sketch)
  15. Wacky

    Wacky Member

    Chris,

    Which commit from your git repository did you use to generate that file?

    (BTW, I suggest that you incorporate my change to the PID range so that you don't get so much overshoot.)
    @Terence Tam -- I'm not convinced that you need to de-tune the PID. Rather, I think that you need to let if start doing its job sooner.
  16. chadman

    chadman Member

    Drop the entire "Marlin - OB Kossel Pro HBP" folder into "Library/Documents/Arduino/".
    Drop the entire "brainwave" folder from "Marlin + Brainwave Bundle/brainwave_hardware_bundle" into "Program Files (x86)/Arduino/hardware/"
    Then after restarting the Arduino IDE, you should see "Brainwave 2" under Tools>Board:>" and you should see "Marlin - OB Kossel Pro HBP" under File>Sketchbook>

    Think that's all I did. Try it out.
  17. chadman

    chadman Member

    Letting it do it's job sooner helped, but I was still having it overshoot pretty bad. I can't help but think this issues is hosing up the hot ends quickly. I set the max temps much lower than their default 275 to protect things. I had to lower the PID_MAX, INTEGRAL_DRIVE_MAX, and tweak the PID parameters to get it to avoid tripping my much more reasonable max. I saw Terence suggest 240 as a safe max. Mine is currently at 245. I don't have any way, yet, to tell if the temp being measured it right. It has been suggested that it reads high, correct? Does anyone have measurement data to confirm that? Anyway, my setup takes a bit longer to heat, but it doesn't go off the chart anymore, and I would prefer to wait for it, especially with the occurrences of hot end melting, etc. I'm looking forward to the pros giving this a little attention and providing some better parameters.
  18. Mike Francies

    Mike Francies Member

    Thanks Wacky - it turns out that Windows puts the files into an Arduino folder under my 'Documents' folder - no wonder I couldn't find it. Anyway, followed the above procedure with fingers firmly crossed and it worked. Brilliant something new learned today.:D

    Chris, I got a bit of a shock when the G29 started as it put a few more positions in than I was used to and much nearer the edge of the build plate. The routine also ran much quicker - not a bad thing but as I am still manually retracting the probe, at the end of the routine, it caught me a bit unaware. I didn't have time to notice but does the end effector now not go down as far to retract the probe, so can I replace the bed hold down clamp?

    Also, another one for Chris - when the end effector is near the build bed, or anywhere some distance from the limit switches, and I issue a G28, the carriages slam into the switches with quite some force. Is there any way of slowing the homing down?

    Cheers, and thanks for all the help everyone.
  19. Matthew Wilson

    Matthew Wilson New Member

    Thanks @JoeF I've added this to the directions.
  20. Matthew Wilson

    Matthew Wilson New Member

    Hi @Mike Francies I've updated the docs to reflect where the Sketchbook is on Windows. Thanks for figuring that out!

    Also yes you should be able to replace the bed clamp now. The 'slamming' is normal, but you can change the HOMING_FEEDRATE to slow it down.

Share This Page