Lulzbot TAZ 1.0: Difference between revisions
From HacDC Wiki
Ubuntourist (talk | contribs) (Fixed external link to active-configuration.md) |
Ubuntourist (talk | contribs) (Oops. Load the .ino) |
||
Line 378: | Line 378: | ||
...Tools -> Board -> Rambo | ...Tools -> Board -> Rambo | ||
...Tools -> Port -> /dev/ttyACM1 # SUBJECT TO CHANGE !!! | ...Tools -> Port -> /dev/ttyACM1 # SUBJECT TO CHANGE !!! | ||
...File -> Load -> Marlin.ino # (Navigate to directory first) | |||
...(checkbox, i.e. compile) | ...(checkbox, i.e. compile) | ||
...(right arrow, i.e. upload) | ...(right arrow, i.e. upload) |
Revision as of 03:34, 15 February 2019
TAZ v.1.0 Marlin firmware
Last edited by Ubuntourist ([email protected]) (kjc) 2019.02.14
See the forked Lulzbot TAZ 1.0 git repository on GitLab.
Determining which version of the TAZ and connecting to it
The “newest” addition to our collection of 3D printers is actually the oldest: The Lulzbot TAZ is actually, a Lulzbot TAZ 1.0 (according to the serial number on the back: KT-PR0010-5147).
The index.html
at http://devel.lulzbot.com/TAZ/ says, among other things: *"B" - KT-PR0010 - TAZ 1.0
Using minicom
, the baud rate was determined to be 115200. Sending G28
to home it made it grind gears.
$ pronsole offline> connect /dev/ttyACM2 115200 ttyACM2 21°>
Eventually, I found http://download.lulzbot.com/TAZ/1.0/hardware/electronics/RAMBo/ which identifies the board as “based off of the Arduino MEGA” with “5 stepper drivers” and “5 MOSFET switched outputs” with documentation at http://reprap.org/wiki/rambo
As near as I can tell, the latest in firmware and other software lives at http://download.lulzbot.com/TAZ/1.0/software/current/firmware/Marlin/
Lulzbot offers instructions on re-flashing your 3D printer’s firmware and see also RepRap’s RAMBo firmware page.
Because we neither have the original paperwork for the TAZ, nor were the EEPROM settings previously enabled, we may be forced to determine the ESTEPS settings via, IMHO, a method fraught with inaccuracy by trying to manually calibrate using the OHAI instructions.
Adding a dynamic symlink to the TAZ…
After massaging the OS with the procedures listed in Dynamic symlinks for 3D printers we see:
$ pronsole WARNING:root:Could not setup DBus for sleep inhibition: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11 Welcome to the printer console! Type "help" for a list of available commands. offline> offline> connect /dev/TAZ 115200 start Printer is now online External Reset Marlin 1.0.0 Last Updated: 2013-03-06 | Author: LulzBot Compiled: Apr 17 2015 Free Memory: 5504 PlannerBufferBytes: 1232 TAZ PC> TAZ 21°>
Note the details on the firmware. Namely:
- Marlin 1.0.0
- Last Updated: 2013-03-06 | Author: LulzBot
- Compiled: Apr 17 2015
Fixing Arduino
The Arduino IDE complains
Ignoring bad library name <@pronterhost> The library "U8glib-new" cannot be used. Library names must contain only basic letters and numbers. (ASCII only and no spaces, and it cannot start with a number.)
Und zo, after tracking down the symbolic links and such…
sudo -i $ cd /usr/share/arduino/libraries $ rm U8glib-new $ mv /home/demo/Taz/Marlin/ArduinoAddons/Arduino_1.x.x/libraries/U8glib-new /home/demo/Taz/Marlin/ArduinoAddons/Arduino_1.x.x/libraries/U8glibNew $ ln -s /home/demo/Taz/Marlin/ArduinoAddons/Arduino_1.x.x/libraries/U8glibNew . $ exit
Calibrating the TAZ
$ pronsole WARNING:root:Could not setup DBus for sleep inhibition: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files Welcome to the printer console! Type "help" for a list of available commands. offline> connect /dev/TAZ 115200 Printer is now online TAZ 21°> move z 10 TAZ 21°> move x 10 TAZ 21°> move x 10 TAZ 21°> move x 10 TAZ 21°> move x 10 TAZ 21°> move x 10 TAZ 21°> move x 10 TAZ 21°> move x 10 TAZ 21°> settemp 215 Setting hotend temperature to 215.0 degrees Celsius. TAZ 21°> TAZ 21°/215°> TAZ 21°/215°> TAZ 21°/215°> TAZ 22°/215°> . . . TAZ 215°/215°> TAZ 215°/215°> extrude 10 TAZ 215°/215°> extrude 10 TAZ 215°/215°> extrude 10 TAZ 215°/215°> extrude 40 . . .
NOTE: Moving Z 10 “mm” resulted in the extruder assembly climbing WAY too high (especially compared to the multiple X movements which, even after 7 of them resulted in considerably less distance total.)
(Extrusion repeated until green filament residue became clear filament.) At which point Bobby took over and deemed the current feed calibration to be “close enough” but the ESTEPS value is still unknown.
BTW, Bobby says the Y calibration is 0.24 mm per step.
Fun with Firmware Flashing
Downloading all the firmware:
$ wget -r -np -R "index.html*" -e robots=off http://download.lulzbot.com/TAZ/1.0/software/current/firmware/Marlin/Marlin/
In order to get the current settings from the TAZ, EEPROM_SETTINGS
needs to be enabled which is apparently done in Configuration.h
Hopefully, the arcane details can be ferreted out of the Marlin Configuration,h documentation
First, Configuration.h
has ridiculously long lines, now word-wrapped for sanity.
Next, a more vexing problem, I think: pronterhost
has Arduino v.2.1.0.5+dfsg2-4.1
. Naturally, Marlin only offers Arduino add-ons for Arduino 0.xx
and Arduino 1.x.x
.
Fortunately, further research yielded a tidbit from the Arduino Playground: An SPI library is now included in the Arduino software. See the SPI library reference for details.
$ cd Marlin/ArduinoAddons $ find . -type f ./Arduino_0.xx/Gen6/boards.txt ./Arduino_0.xx/libraries/SPI/keywords.txt ./Arduino_0.xx/libraries/SPI/SPI.cpp ./Arduino_0.xx/libraries/SPI/SPI.h ./Arduino_0.xx/libraries/LiquidCrystal/keywords.txt ./Arduino_0.xx/libraries/LiquidCrystal/LiquidCrystal.cpp ./Arduino_0.xx/libraries/LiquidCrystal/LiquidCrystal.h ./Arduino_0.xx/Sanguino/boards.txt ./Arduino_0.xx/Sanguino/programmers.txt ./Arduino_0.xx/Gen7/boards.txt ./Arduino_1.x.x/libraries/SPI/keywords.txt ./Arduino_1.x.x/libraries/SPI/SPI.cpp ./Arduino_1.x.x/libraries/SPI/SPI.h ./Arduino_1.x.x/libraries/LiquidCrystal/keywords.txt ./Arduino_1.x.x/libraries/LiquidCrystal/LiquidCrystal.cpp ./Arduino_1.x.x/libraries/LiquidCrystal/LiquidCrystal.h ./Arduino_1.x.x/sanguino/boards.txt
According to the SPI library reference documentation, the SPI stands for Serial Peripheral Interface`.
The LiquidCrystal library, as one might guess, allows Arduino to control LCDs. Since we don't have an LCD on this machine, it's currently irrelevant.
In a previous life, I used a tool called dfu-programmer
to flash a PrintrBot's firmware... (Under Arch Linux, I have both the dfu-programmer
and dfu-util
packages installed.)
Backup the flash memory:
$ avrdude -C /etc/avrdude.conf -p m2560 -c wiring -P /dev/TAZ -b 115200 -U flash:r:flash-2019-02-14.hex:i avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.01s avrdude: Device signature = 0x1e9801 (probably m2560) avrdude: reading flash memory: Reading | ################################################## | 100% 33.56s avrdude: writing output file "flash-2019-02-14.hex" avrdude: safemode: Fuses OK (E:FD, H:D0, L:FF) avrdude done. Thank you.
And the EEPROM:
$ avrdude -C /etc/avrdude.conf -p m2560 -c wiring -P /dev/TAZ -b 115200 -U eeprom:r:eeprom-2019-02-14.hex:i avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.01s avrdude: Device signature = 0x1e9801 (probably m2560) avrdude: reading eeprom memory: Reading | ################################################## | 100% 4.20s avrdude: writing output file "eeprom-2019-02-14.hex" avrdude: safemode: Fuses OK (E:FD, H:D0, L:FF) avrdude done. Thank you.
Examining the dumped EEPROM .hex file above seems to indicate that it’s empty: Basically filled with binary 1’s (a.k.a. Hex FF, integer -1, Boolean TRUE).
See active-configuration.md for a look which lines are not commented out in Configuration.h.
For comparison, here’s what the Lulzbot Mini reports (word wrapped for sanity):
$ pronsole WARNING:root:Could not setup DBus for sleep inhibition: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files WARNING:root:RPC server bound on non-default port 7979 Welcome to the printer console! Type "help" for a list of available commands. offline> connect /dev/MINI start Printer is now online Marlin 1.1.0.11 Last Updated: 2016-04-27 12:00 | Author: (Aleph Objects Inc., LulzBot Mini) Compiled: Dec 21 2016 Free Memory: 4404 PlannerBufferBytes: 1232 V23 stored settings retrieved (396 bytes) Steps per unit: M92 X100.50 Y100.50 Z1600.00 E833.00 Maximum feedrates (mm/s): M203 X800.00 Y800.00 Z8.00 E40.00 Maximum Acceleration (mm/s2): M201 X9000 Y9000 Z100 E1000 Accelerations: P=printing, R=retract and T=travel M204 P2000.00 R3000.00 T2000.00 Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum XY jerk (mm/s), Z=maximum Z jerk (mm/s), E=maximum E jerk (mm/s) M205 S0.00 T0.00 B20000 X12.00 Z0.40 E10.00 Home offset (mm): M206 X0.00 Y0.00 Z0.00 PID settings: M301 P28.79 I1.91 D108.51 C100.00 L20 M304 P294.00 I65.00 D382.00 Filament settings: Disabled M200 D3.00 M200 D0 Z-Probe Offset (mm): M851 Z-1.43 MINI PC>
Upgrading the Arduino IDE
The MatterHackers article “How To Successfully Flash Your 3D Printer’s Firmware” indicates we need a special RAMBo boards JSON file to install into the Arduino IDE…
The instructions for installing don’t match what I see… Sigh. Naturally, the Linux version has version number suggesting it is much more recent than whatever Arduino guides suggest using… But, wrong. And also naturally, there’s nothing distributed as a .deb package – at least not from a source I trust. So. I need to install using the official Arduino Guide for Linux.
$ sudo dpkg -P arduino arduino-core [sudo] password for ubuntourist: (Reading database ... 336652 files and directories currently installed.) Removing arduino (2:1.0.5+dfsg2-4.1) ... Purging configuration files for arduino (2:1.0.5+dfsg2-4.1) ... Removing arduino-core (2:1.0.5+dfsg2-4.1) ... dpkg: warning: while removing arduino-core, directory '/usr/share/arduino/libraries/Wire/utility' not empty so not removed dpkg: warning: while removing arduino-core, directory '/usr/share/arduino/libraries/SPI' not empty so not removed dpkg: warning: while removing arduino-core, directory '/usr/share/arduino/libraries/LiquidCrystal' not empty so not removed dpkg: warning: while removing arduino-core, directory '/usr/share/arduino/hardware/tools' not empty so not removed Processing triggers for shared-mime-info (1.10-1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for mime-support (3.62) ... Processing triggers for desktop-file-utils (0.23-4) ... $
And this is why we document… Apparently, the stock Arduino Debian packages have been futzed with, and I apparently wiped whatever mods might have been there.
/usr/share/arduino/libraries/Wire/utility$ ls -Al total 36 -rw-r--r-- 1 demo demo 16386 Oct 19 2013 '#twi.c#' lrwxrwxrwx 1 demo demo 49 Oct 19 2013 .#twi.c -> [email protected]:1381110447 -rw-r--r-- 1 demo demo 16366 May 5 2013 twi.c~ ubuntourist@pronterhost:/usr/share/arduino/libraries/Wire/utility$ diff -u twi.c~ \#twi.c# --- twi.c~ 2013-05-05 13:55:52.000000000 -0500 +++ #twi.c# 2013-10-19 20:10:50.817962597 -0500 @@ -202,6 +202,7 @@ while(TWI_READY != twi_state){ continue; } + twi_state = TWI_MTX; twi_sendStop = sendStop; // reset error state (0xFF.. no error occured) @@ -210,11 +211,12 @@ // initialize buffer iteration vars twi_masterBufferIndex = 0; twi_masterBufferLength = length; - + // copy data to twi buffer for(i = 0; i < length; ++i){ twi_masterBuffer[i] = data[i]; } + // build sla+w, slave device address + w bit twi_slarw = TW_WRITE; @@ -224,6 +226,7 @@ // in the ISR. Don't do it again. // if (true == twi_inRepStart) { + // if we're in the repeated start state, then we've already sent the start, // (@@@ we hope), and the TWI statemachine is just waiting for the address byte. // We need to remove ourselves from the repeated start state before we enable interrupts, @@ -242,7 +245,7 @@ while(wait && (TWI_MTX == twi_state)){ continue; } - + return twi_state; if (twi_error == 0xFF) return 0; // success else if (twi_error == TW_MT_SLA_NACK) $
And, whatever [email protected]:1381110447
was, it appears to be no more. The symbolic link above points nowhere. A more complete picture of what the purge did not remove:
$ cd /usr/share/arduino $ ls -AR .: hardware libraries ./hardware: Sanguino tools ./hardware/Sanguino: boards.txt bootloaders cores programmers.txt ./hardware/Sanguino/bootloaders: atmega644p ./hardware/Sanguino/bootloaders/atmega644p: ATmegaBOOT_324P.hex ATmegaBOOT_644.hex ATmegaBOOT_644P.hex ATmegaBOOT.c Makefile README.txt ./hardware/Sanguino/cores: arduino ./hardware/Sanguino/cores/arduino: binary.h main.cpp Print.h WConstants.h wiring_digital.c wiring_shift.c WString.h 'Copy of wiring.h' pins_arduino.c Stream.h WInterrupts.c wiring.h WMath.cpp HardwareSerial.cpp pins_arduino.h Tone.cpp wiring_analog.c wiring_private.h WProgram.h HardwareSerial.h Print.cpp WCharacter.h wiring.c wiring_pulse.c WString.cpp ./hardware/tools: '#avrdude.conf#' ./libraries: hardware libraries LiquidCrystal SPI U8glib u8glib_arduino_v1.18.1.zip U8glibNew Wire ./libraries/LiquidCrystal: LiquidCrystal ./libraries/SPI: SPI ./libraries/Wire: utility ./libraries/Wire/utility: '#twi.c#' .#twi.c twi.c~ $ cd ~/ $ mkdir build $ cd buid $ tar xJvf arduino-1.8.8-linux32.tar.xz $ sudo ./install.sh Adding desktop shortcut, menu item and file associations for Arduino IDE... done!
Gah! Who said I wanted a desktop?
$ sudo ./uninstall.sh Removing desktop shortcut and menu item for Arduino IDE... done!
So. I have to run from within the user directory where I untarred. Bleah!
Compiling and uploading with modified Configuration.h
$ arduino ...Preferences -> Additional Boards Manager URLs ...https://raw.githubusercontent.com/ultimachine/ArduinoAddons/master/package_ultimachine_index.json ...Tools -> Board -> Board Manager -> RAMBo -> Install ...Tools -> Board -> Rambo ...Tools -> Port -> /dev/ttyACM1 # SUBJECT TO CHANGE !!! ...File -> Load -> Marlin.ino # (Navigate to directory first) ...(checkbox, i.e. compile) ...(right arrow, i.e. upload) Sketch uses 48566 bytes (18%) of program storage space. Maximum is 258048 bytes. Global variables use 2627 bytes of dynamic memory. Sketch uses 48566 bytes (18%) of program storage space. Maximum is 258048 bytes. Global variables use 2627 bytes of dynamic memory. $ pronsole WARNING:root:Could not setup DBus for sleep inhibition: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.ScreenSaver was not provided by any .service files WARNING:root:RPC server bound on non-default port 7979 Welcome to the printer console! Type "help" for a list of available commands. offline> connect /dev/TAZ start Printer is now online External Reset Marlin 1.0.0 Last Updated: 2013-03-06 | Author: LulzBot Compiled: Feb 14 2019 Free Memory: 5429 PlannerBufferBytes: 1232 Using Default settings: Steps per unit: M92 X100.50 Y100.50 Z800.00 E800.00 Maximum feedrates (mm/s): M203 X500.00 Y500.00 Z10.00 E45.00 Maximum Acceleration (mm/s2): M201 X9000 Y9000 Z100 E10000 Acceleration: S=acceleration, T=retract acceleration M204 S500.00 T3000.00 Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s), Z=maximum Z jerk (mm/s) M205 S0.00 T0.00 B20000 X5.00 Z0.40 E5.00 Home offset (mm): M206 X0.00 Y0.00 Z0.00 PID settings: M301 P22.20 I1.08 D114.00 TAZ PC> TAZ 22°> M501 SENDING:M501 Using Default settings: Steps per unit: M92 X100.50 Y100.50 Z800.00 E800.00 Maximum feedrates (mm/s): M203 X500.00 Y500.00 Z10.00 E45.00 Maximum Acceleration (mm/s2): M201 X9000 Y9000 Z100 E10000 Acceleration: S=acceleration, T=retract acceleration M204 S500.00 T3000.00 Advanced variables: S=Min feedrate (mm/s), T=Min travel feedrate (mm/s), B=minimum segment time (ms), X=maximum xY jerk (mm/s), Z=maximum Z jerk (mm/s) M205 S0.00 T0.00 B20000 X5.00 Z0.40 E5.00 Home offset (mm): M206 X0.00 Y0.00 Z0.00 PID settings: M301 P22.20 I1.08 D114.00 TAZ 22°>
Success!