Updating the firmware

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

  1. William Siers

    William Siers Member

    I just unplugged my FSRs and am using the latest expermental version of of Matter Control. Taylor at MH seems to think that I am getting some wierd inputs due to EMI in the wiring. So I am ordering some shielded shrink tube. Mean while paper leveling. Of course now my tip is clogged.
  2. David Boyd

    David Boyd Active Member

    Let me know how that goes.
  3. Jackal

    Jackal Member

    The firmware calibrates fine.
    I just did a A0.2 to see if it works then went straight to A0.05
    So the 2nd run took quite a few hours.
    Will post the result later when I get back.
    However that doesn't solve my X-Y sizing problem.
    I am now suspecting the problem is from the print head since the error doesn't seem to be linear. Need further testing.
  4. William Siers

    William Siers Member

    I am a complete newbie here, but perhaps an adjustment in the stepper motor numbers. I had to go from 160 to 161.
  5. Stafford Brunk

    Stafford Brunk New Member

    I am seriously mulling over converting the printer to Smoothie like @graniac did. Reading the Marlin source + seeing the huge success people have had with Smoothie + the really poor first-level support for the stock setup just makes me want to ditch Marlin/Brainwave.
    grainiac likes this.
  6. Steve Heer

    Steve Heer Active Member

    Ok, I just completed the build of the KP and had no issues with powering up. I had some funky things going on with the calibration process which prompted me to upgrade the firmware to the latest since most of the changes have been related to the auto-leveling issues. Prior to attempting this upgrade, I could connect to the printer via MC and all communications between my windows7 and the printer was working fine.

    So away I go at following the above EASY instructions using avrdude and was bitten by the 69% before failing issue a lot of others have experienced. I now have a machine sitting on my desk that I can no longer communicate with. I have read every post on this thread and am now totally confused as to where to get the correct files to repair my BrainwavePro board so I can communicate again. There seems to be a variety of files available but nobody has posted a detailed procedure on how to get the BrainwavePro back to where it was when I unpackaged it nor is there any direct info on which are the correct files I need to resurrect my printer. Can someone please provide a link to the proper files I need to get my printer communicating with my pc again.

    Here is a copy/paste of what happened during my attempt to do the "official easy" procedure to update the firmware:

    D:\avrdude-6.1-mingw32>avrdude -p at90usb1286 -c avr109
    -P COM6 -b 115200 -D -U flash:w:KosselProMarlin-20150117.hex:i

    Connecting to programmer: .
    Found programmer: Id = "LUFACDC"; type = S
    Software Version = 1.0; No Hardware Version given.
    Programmer supports auto addr increment.
    Programmer supports buffered memory access with buffersize=256 bytes.

    Programmer supports the following devices:
    Device code: 0x44

    avrdude: AVR device initialized and ready to accept instructions

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

    avrdude: Device signature = 0x1e9782
    avrdude: reading input file "KosselProMarlin-20150117.hex"
    avrdude: writing flash (88126 bytes):

    Writing | ################################### | 69% 2.57savrdude:
    ser_send(): write error: sorry no info avail

    IMO, this procedure should be rock solid, fool proof and should NOT be leaving us with a very expensive brick that requires us to purchase headers that require us to solder onto the BWP and an AVR programmer in order to reserrect our printer!!!! This is very discerning! Because this is a kit, I expected to have to do a lot of tweaking to get things the way I want but I did NOT expect to have to go through any additional expense in order to make this thing work. Some please give a concise procedure and links to the correct files to get me communicating with my brick again.

    From the posts I have read, it doesn't seem like anyone has been able to get the BWP to the same state it was in when it arrived in the kit, in terms of the factory bootloader installation. If I am wrong, please direct me to the correct procedure.

    For future reference, I don't think a procedure should be labeled as the official method of doing something if that has a chance to fail. There should also be a plan B posted with the official method in the event of failure and not leave us to wander through the scattered posts trying to make sense of what to do next.
  7. William Siers

    William Siers Member

    I was always directed to use the Hard Way. BWP bootloader seems to like com7.
  8. Steve Heer

    Steve Heer Active Member

    So, what files do I need to fix the board to work again? I have soldered on the header for the programmer to connect to the BWP but there are so many links to different files and I really only want to have to do this once to get back to where it works. It's bad enough that I had to remove the board to solder a header on to make this happen.
    Please provide a link to the correct boot loader and firmware update....
  9. David Boyd

    David Boyd Active Member

    I feel your frustration. We have been begging Openbeam to put up a wiki with a lot of this information. I always used the hardway because I actually felt that was the easier way.
    Are you sure your boot loader is missing/gone?
    If you hold both buttons then release the reset, then the other button does the LED pulse slow Red?
    If so you could load from the source.
    To the best of my knowledge this is the most recent official source: https://github.com/OpenBeamUSA/Marlin
  10. Steve Heer

    Steve Heer Active Member

    I was in touch with Tyler at MatterHackers as per Chris's suggestion, to get the correct links to the BWP bootloader and firmware pages on github. Downloaded them and attempted to use my Arduino UNO's isp connection to the BWP board. The marlin.ino file compiled fine but when I try to upload to the BWP the Arduino shows this: (I'm not familiar with programing ISP using the arduino so I am not sure what all this means)
    Arduino: 1.0.6 (Windows 7), Board: "Brainwave Pro"
    Binary sketch size: 91,520 bytes (of a 126,976 byte maximum)

    D:\Program Files (x86)\Arduino\hardware/tools/avr/bin/avrdude -CD:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -pat90usb1286 -cavr109 -P\\.\COM8 -b115200 -D -Uflash:w:C:\Users\Steve\AppData\Local\Temp\build6626239056934587787.tmp\sketch_sep08a.cpp.hex:i

    avrdude: Version 5.11, compiled on Sep 2 2011 at 19:38:36
    Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
    Copyright (c) 2007-2009 Joerg Wunsch

    System wide configuration file is "D:\Program Files (x86)\Arduino\hardware/tools/avr/etc/avrdude.conf"

    Using Port : \\.\COM8
    Using Programmer : avr109
    Overriding Baud Rate : 115200
    AVR Part : AT90USB1286
    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
    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
    flash 65 6 256 0 yes 131072 256 512 4500 4500 0x00 0x00
    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
    lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
    hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
    efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
    lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
    calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
    Block Poll Page Polled
    Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
    ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
    signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

    Programmer Type : butterfly
    Description : Atmel AppNote AVR109 Boot Loader

    Connecting to programmer: .avrdude: Send: . [1b]
    avrdude: Send: S [53]
    avrdude: Recv:

    avrdude: Recv:
    avrdude: Send: V [56]
    avrdude: Recv:
    avrdude: Send: v [76]
    avrdude: Recv:
    avrdude: Recv:
    avrdude: Send: p [70]
    avrdude: Recv:
    Found programmer: Id = "¡ÿ("; type = ¿
    Software Version = E. ; Hardware Version = ð.
    avrdude: Send: a [61]
    avrdude: Recv:
    avrdude: Send: b [62]
    avrdude: Recv:
    avrdude: error: buffered memory access not supported. Maybe it isn't
    a butterfly/AVR109 but a AVR910 device?
    Anybody have any idea what I may be doing wrong or if it's possible the BWP just won't communicate after the initial avrdude failure at 69%?
    Last edited: Sep 16, 2015
  11. Tyler Anderson

    Tyler Anderson Moderator Staff Member

    Hi Everyone,

    I just put up a comprehensive article on the Dozuki site about all things software related to the Kossel Pro. This includes all the information from the OP of this thread and my own notes (which I sent to Steve earlier today). Please feel free to add anything you want to this page. Its a wiki and its only as good as the community makes it. The details on unbricking (uploading the bootloader) are kinda light at the moment. I will try to flesh these out more tomorrow and hopefully have a closer look at your issue, Steve.
    Corey Morreale and bytecounter like this.
  12. Steve Heer

    Steve Heer Active Member

    Thanks Tyler,

    I have had no luck as of yet so any help you may have would certainly be welcomed!
  13. grainiac

    grainiac Active Member

    I was in the same situation like you and @Wacky was very kind supporting me via IRC! Maybe he can jump in here too if he's still on onboard. We were not able to revive my board because I messed around with the fuses. @Mike Ziomkowski claimed he was able to fix it by connecting with only 9600bauds and resetting the fuses. In the end Mike sent me a new board which was freaking out again - without being tortured by FW updates - after a short period of happy printing. The rest is well known and I switched to SmoothieWare. I still have the board flying around and was planning to throw it into our local electronic waste. Mike seems not interested getting it back for analysis. You can have it if you like, but it needed ~50 power cycles to connect to the printer and also does strange moves during prints. Just drop me a note!
    Last edited: Sep 9, 2015
  14. Steve Heer

    Steve Heer Active Member

    @grainiac Thanks for the offer but for now I think I will wait a bit. This is a brand new printer that hasn't seen a print job yet. I only completed assembly on Sunday and was having issues with the autolevel function so I checked here for the firmware update procedure and followed it to a T and now it just sits on my desk looking 1000% better than it works. :( Tyler said he will take a closer look at my issue and Chris is also aware of it. I'm confident it will be resolved somehow. If @Wacky is around and has any suggestions in the meantime, I would be greatful!
    Last edited: Sep 20, 2015
  15. grainiac

    grainiac Active Member

    Patience...learn you must. :)
    Corey Morreale likes this.
  16. Rick Gordon

    Rick Gordon Member

    You can do what I did after the same thing - solder a 2x3 header onto the board, and use an AVR Programmer to flash it directly, bypassing the now-defunct boot loader. I then installed a jumper cable leading out that I can plug into w/o removing the bed.

    I borrowed an Atmel for this purpose. I have since bought an Olimex with a 2x5 pin output and soldered a conversion board from 2x5 to 2x3, which I'll be trying soon since I need to reflash for the new hotend (and to try out FSR's once I get them hooked up.)
  17. Tyler Anderson

    Tyler Anderson Moderator Staff Member

    @Steve Heer,
    • I am confused about how you setup the Arduino to act as an ISP. What sketch have you uploaded to the Uno and how do you have it wired? If you are following instructions from somewhere, could you post a link to that?
    • I see you have the programmer set to avr109. This is correct for communicating directly from the PC to the Brainwave (via the bootloader) but not for using a dedicated programmer. I'm guessing you should change this to arduino.
    • It looks like you only tried to upload the firmware. You should set the fuses, upload the bootloader, then upload the firmware in that order. Follow the examples here.
  18. Steve Heer

    Steve Heer Active Member

    Hey Tyler,
    Sorry, I've been busy at work the last couple of days... a client clicked a link that executed the CryptoLocker virus that encrypted their data shares on their network. Been busy recovering from backups to get them back up and running.
    I have ordered a replacement Brainwave Pro board as I have a feeling the board is toast. Turns out my hard drive on my computer was having issues and may have corrupted the data prior to me sending it to the brainwave. I also ordered a bus pirate so I can later attempt to resurrect the original once I have more time.
    You are correct, I was trying to upload the firmware first. I had it wired as per @Wacky posted in post #78 of this thread.
  19. Steve Heer

    Steve Heer Active Member

    I received my spare BrainwavePro board and bus pirate yesterday. The new board resurrected my printer but now I want to try and unbrick the first board and need some pointers using the bus pirate. Here are the questions I have:

    1 - Do I need to apply power to the main board or will power from the usb/bus pirate do the job.... if not then how do I hook it up to attempt unbricking. Do I put the failed one back into the printer and use it's power supply or can I attach a different power supply to the BWP and if so, what power specs are required to accomplish the flash?

    2 - Does Linux provide a safer environment for programming avr's? I ask because I used windows 7 ultimate when the flash quit at 69%. I know others have had it stall at 69% as well from reading thru the forums. I just don't know what OS they were using when it happened.

    3- Will the latest firmware fix the issue with the autolevel probe jumping off the bed anchor into the glass when autoleveling. As is, the stock firmware deploys the probe but in doing so it moves off the clamp and hits the glass which is not a good thing.

    4 - Does the PJR firmware work with the autoprobe or is that for using FSR's only?

    I will wait all attempts until someone can answer these questions for me.... waiting patiently :)

    PS: A wiring diagram for using the bus pirate connected to the BWP would be extremely helpful. I also ordered the USBtinyISP programmer made by Adafruit. I just want to be sure I have all ducks in a row when I hit enter to program the old boards bootloader back in..... thx in advance guys!
  20. Tyler Anderson

    Tyler Anderson Moderator Staff Member

    @Steve Heer

    1. I recommend powering the Brainwave from the printer's PSU. You could, of course, use any other 24V supply. Not sure if 12V will work. It should also be possible to power the MCU from the 5V regulator on the Bus Pirate, but I have not tried this.
    2. We had the 69% issue when using Linux.
    3. According to the Git history, adjustments to the probe retraction were last made on April 6, 2015. If you have a firmware from before that, it may fix your problem. If not, you can adjust the retraction points yourself. They start on line 489 of Configuration.h.
    4. PJR does work with the stock probe.

    Heres the best information on connecting the bus pirate to the 6 pin AVR ISP header. When powering the Brainwave from the printer's PSU, you do not need to connect +5V from the bus pirate to VCC. I connected VPU to VCC instead, but this is probably unnecessary as well.
    Last edited: Sep 17, 2015

Share This Page