Sunday, 28 October 2018

Crazy saga setting up Prusa I3, Melzi 2.0 with Main_I3

In a world where number of questions exceeds the number of lines of code ... 

This procedure was exercised on Oct 28 2018 and worked as explained.


 OS

  • Linux myname.local 4.15.0-36-generic #39-Ubuntu SMP Mon Sep 24 16:19:09 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/lsb-release
  • DISTRIB_ID=Ubuntu
  • DISTRIB_RELEASE=18.04
  • DISTRIB_CODENAME=bionic
  • DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

Programmer for boot loader:
  • USBASP AVR Programmer Adapter 10 Pin Cable USB for Arduino

Board:




I clone several git's like:

 8693  git clone https://github.com/nophead/Marlin/ 8712  git clone https://github.com/reprappro/Marlin
 8697  git clone https://github.com/Lauszus/Sanguino


Then for hardware I copied all hardware dedicated folder to
arduino-1.6.5-r5/hardware as follow


nophead  -> arduino-1.6.5-r5/hardware/Marlin/
reprappro  -> arduino-1.6.5-r5/hardware/Marlin-1/
Lazarus  -> arduino-1.6.5-r5/hardware/Sanguino/

For the Melzi 2.0  firmware  I cloned

 8728  git clone https://github.com/muxa/Main_I3


In configuration.h I changed:


// #define BAUDRATE 250000
#define BAUDRATE 115200


BootLoader:

I connected the USBAvr programmer to the SPI on Melzi I have as seen in following pictures.
The AVR programmer SPI connected to Melzi  6 pin ribbon as:


usb avr programmer 10 pins
melzi SPI, (facing: usb connector is on the top right )














Plug  in the AVR USB programmer. This would mount as /deb/ttyUSB0
Plug power to Melzi, or plug a second USB for power. Needs power.
Make sure the jumper by the second voltage regulator (close by to middle of the board) is selected to use USB power.
Reset the board several times form the reset button by the MPU. If the SPI programmer wiring is not that badly wrong (messing +/-) the debug led should blink once when reset is released.

  • Fire up the IDE abomination. Is called 'Arduino IDE'.
  • Select Board Sanguino
  • Select Processor Atmega 1284p 16 Mhz
  • Select Programmer: USBTinyISP (USBIsp did not work for me)
  • Select  burn Bootloader. (Make sure is using  /dev/ttyUSB0 or the USB that belong to the USBISp programmer)

This worked for me with a success rate of 30%.

After boot-loader was successfully burn you can burn the Marlin firmware.

  • Disconnect the USB programer
  • Disconnect the power from the board.
  • Connect back the usb to the board.
  • Clone
  • git clone https://github.com/muxa/Main_I3
  • Open from the ide the Main_I3
  • This just compiled without any problems. 
  • Select Board Sanguino
  • Select Processor Atmega 1284p 16 Mhz
  • Select Programmer: AVR ISP MKII

I changed in config these:


// #define BAUDRATE 250000
#define BAUDRATE 115200

...
#ifndef MOTHERBOARD
#define MOTHERBOARD 63
#endif










I hope this post shine some uv in the muddy messy open source 3d world.

Regards, Marius, Oct 2018

P.S. Do not repeat these procedures if we are already in 2019 or later.





No comments:

Post a Comment