Giter VIP home page Giter VIP logo

ultimaker2marlin's Introduction

Marlin 3D Printer Firmware

Flattr this git repo

Quick Information

This RepRap firmware is a mashup between Sprinter, grbl and many original parts.

Derived from Sprinter and Grbl by Erik van der Zalm. Sprinter's lead developers are Kliment and Caru. Grbls lead developer is Simen Svale Skogsrud. Sonney Jeon (Chamnit) improved some parts of grbl. A fork by bkubicek for the Ultimaker was merged, and further development was aided by him. Some features have been added by: Lampmaker, Bradley Feldman, and others...

Features:

  • Interrupt based movement with real linear acceleration
  • High steprate
  • Look ahead (Keep the speed high when possible. High cornering speed)
  • Interrupt based temperature protection
  • preliminary support for Matthew Roberts advance algorithm For more info see: http://reprap.org/pipermail/reprap-dev/2011-May/003323.html
  • Full endstop support
  • SD Card support
  • SD Card folders (works in pronterface)
  • SD Card autostart support
  • LCD support (ideally 20x4)
  • LCD menu system for autonomous SD card printing, controlled by an click-encoder.
  • EEPROM storage of e.g. max-velocity, max-acceleration, and similar variables
  • many small but handy things originating from bkubicek's fork.
  • Arc support
  • Temperature oversampling
  • Dynamic Temperature setpointing aka "AutoTemp"
  • Support for QTMarlin, a very beta GUI for PID-tuning and velocity-acceleration testing. https://github.com/bkubicek/QTMarlin
  • Endstop trigger reporting to the host software.
  • Updated sdcardlib
  • Heater power reporting. Useful for PID monitoring.
  • PID tuning
  • CoreXY kinematics (www.corexy.com/theory.html)
  • Configurable serial port to support connection of wireless adaptors.
  • Automatic operation of extruder/cold-end cooling fans based on nozzle temperature
  • RC Servo Support, specify angle or duration for continuous rotation servos.

The default baudrate is 250000. This baudrate has less jitter and hence errors than the usual 115200 baud, but is less supported by drivers and host-environments.

Differences and additions to the already good Sprinter firmware:

Look-ahead:

Marlin has look-ahead. While sprinter has to break and re-accelerate at each corner, lookahead will only decelerate and accelerate to a velocity, so that the change in vectorial velocity magnitude is less than the xy_jerk_velocity. This is only possible, if some future moves are already processed, hence the name. It leads to less over-deposition at corners, especially at flat angles.

Arc support:

Arc support: Old versions of Slic3r (before v2.0) can find curves that, although broken into segments, were meant to describe an arc. Marlin is able to print those arcs. The advantage is the firmware can choose the resolution, and can perform the arc with nearly constant velocity, resulting in a nice finish. Also, less serial communication is needed.

Temperature Oversampling:

To reduce noise and make the PID-differential term more useful, 16 ADC conversion results are averaged.

AutoTemp:

If your gcode contains a wide spread of extruder velocities, or you realtime change the building speed, the temperature should be changed accordingly. Usually, higher speed requires higher temperature. This can now be performed by the AutoTemp function By calling M109 S T F you enter the autotemp mode.

You can leave it by calling M109 without any F. If active, the maximal extruder stepper rate of all buffered moves will be calculated, and named "maxerate" [steps/sec]. The wanted temperature then will be set to t=tempmin+factor*maxerate, while being limited between tempmin and tempmax. If the target temperature is set manually or by gcode to a value less then tempmin, it will be kept without change. Ideally, your gcode can be completely free of temperature controls, apart from a M109 S T F in the start.gcode, and a M109 S0 in the end.gcode.

EEPROM:

If you know your PID values, the acceleration and max-velocities of your unique machine, you can set them, and finally store them in the EEPROM. After each reboot, it will magically load them from EEPROM, independent what your Configuration.h says.

LCD Menu:

If your hardware supports it, you can build yourself a LCD-CardReader+Click+encoder combination. It will enable you to realtime tune temperatures, accelerations, velocities, flow rates, select and print files from the SD card, preheat, disable the steppers, and do other fancy stuff. One working hardware is documented here: http://www.thingiverse.com/thing:12663 Also, with just a 20x4 or 16x2 display, useful data is shown.

SD card folders:

If you have an SD card reader attached to your controller, also folders work now. Listing the files in pronterface will show "/path/subpath/file.g". You can write to file in a subfolder by specifying a similar text using small letters in the path. Also, backup copies of various operating systems are hidden, as well as files not ending with ".g".

SD card folders:

If you place a file auto[0-9].g into the root of the sd card, it will be automatically executed if you boot the printer. The same file will be executed by selecting "Autostart" from the menu. First *0 will be performed, than *1 and so on. That way, you can heat up or even print automatically without user interaction.

Endstop trigger reporting:

If an endstop is hit while moving towards the endstop, the location at which the firmware thinks that the endstop was triggered is outputed on the serial port. This is useful, because the user gets a warning message. However, also tools like QTMarlin can use this for finding acceptable combinations of velocity+acceleration.

Coding paradigm:

Not relevant from a user side, but Marlin was split into thematic junks, and has tried to partially enforced private variables. This is intended to make it clearer, what interacts which what, and leads to a higher level of modularization. We think that this is a useful prestep for porting this firmware to e.g. an ARM platform in the future. A lot of RAM (with enabled LCD ~2200 bytes) was saved by storing char []="some message" in Program memory. In the serial communication, a #define based level of abstraction was enforced, so that it is clear that some transfer is information (usually beginning with "echo:"), an error "error:", or just normal protocol, necessary for backwards compatibility.

Interrupt based temperature measurements:

An interrupt is used to manage ADC conversions, and enforce checking for critical temperatures. This leads to less blocking in the heater management routine.

Implemented G Codes:

  • G0 -> G1
  • G1 - Coordinated Movement X Y Z E
  • G2 - CW ARC
  • G3 - CCW ARC
  • G4 - Dwell S or P
  • G10 - retract filament according to settings of M207
  • G11 - retract recover filament according to settings of M208
  • G28 - Home all Axis
  • G90 - Use Absolute Coordinates
  • G91 - Use Relative Coordinates
  • G92 - Set current position to cordinates given

RepRap M Codes

  • M0 - Unconditional stop - Wait for user to press a button on the LCD (Only if ULTRA_LCD is enabled)
  • M1 - Same as M0
  • M104 - Set extruder target temp
  • M105 - Read current temp
  • M106 - Fan on
  • M107 - Fan off
  • M109 - Wait for extruder current temp to reach target temp.
  • M114 - Display current position

Custom M Codes

  • M17 - Enable/Power all stepper motors
  • M18 - Disable all stepper motors; same as M84
  • M20 - List SD card
  • M21 - Init SD card
  • M22 - Release SD card
  • M23 - Select SD file (M23 filename.g)
  • M24 - Start/resume SD print
  • M25 - Pause SD print
  • M26 - Set SD position in bytes (M26 S12345)
  • M27 - Report SD print status
  • M28 - Start SD write (M28 filename.g)
  • M29 - Stop SD write
  • M30 - Delete file from SD (M30 filename.g)
  • M31 - Output time since last M109 or SD card start to serial
  • M42 - Change pin status via gcode Use M42 Px Sy to set pin x to value y, when omitting Px the onboard led will be used.
  • M80 - Turn on Power Supply
  • M81 - Turn off Power Supply
  • M82 - Set E codes absolute (default)
  • M83 - Set E codes relative while in Absolute Coordinates (G90) mode
  • M84 - Disable steppers until next move, or use S to specify an inactivity timeout, after which the steppers will be disabled. S0 to disable the timeout.
  • M85 - Set inactivity shutdown timer with parameter S. To disable set zero (default)
  • M92 - Set axis_steps_per_unit - same syntax as G92
  • M114 - Output current position to serial port
  • M115 - Capabilities string
  • M117 - display message
  • M119 - Output Endstop status to serial port
  • M126 - Solenoid Air Valve Open (BariCUDA support by jmil)
  • M127 - Solenoid Air Valve Closed (BariCUDA vent to atmospheric pressure by jmil)
  • M128 - EtoP Open (BariCUDA EtoP = electricity to air pressure transducer by jmil)
  • M129 - EtoP Closed (BariCUDA EtoP = electricity to air pressure transducer by jmil)
  • M140 - Set bed target temp
  • M190 - Wait for bed current temp to reach target temp.
  • M200 - Set filament diameter
  • M201 - Set max acceleration in units/s^2 for print moves (M201 X1000 Y1000)
  • M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!!
  • M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec
  • M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate
  • M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk
  • M206 - set additional homing offset
  • M207 - set retract length S[positive mm] F[feedrate mm/sec] Z[additional zlift/hop]
  • M208 - set recover=unretract length S[positive mm surplus to the M207 S*] F[feedrate mm/sec]
  • M209 - S<1=true/0=false> enable automatic retract detect if the slicer did not support G10/11: every normal extrude-only move will be classified as retract depending on the direction.
  • M218 - set hotend offset (in mm): T<extruder_number> X<offset_on_X> Y<offset_on_Y>
  • M220 S- set speed factor override percentage
  • M221 S- set extrude factor override percentage
  • M240 - Trigger a camera to take a photograph
  • M280 - Position an RC Servo P S<angle/microseconds>, ommit S to report back current angle
  • M300 - Play beepsound S P
  • M301 - Set PID parameters P I and D
  • M302 - Allow cold extrudes
  • M303 - PID relay autotune S sets the target temperature. (default target temperature = 150C)
  • M304 - Set bed PID parameters P I and D
  • M400 - Finish all moves
  • M500 - stores paramters in EEPROM
  • M501 - reads parameters from EEPROM (if you need reset them after you changed them temporarily).
  • M502 - reverts to the default "factory settings". You still need to store them in EEPROM afterwards if you want to.
  • M503 - print the current settings (from memory not from eeprom)
  • M540 - Use S[0|1] to enable or disable the stop SD card print on endstop hit (requires ABORT_ON_ENDSTOP_HIT_FEATURE_ENABLED)
  • M600 - Pause for filament change X[pos] Y[pos] Z[relative lift] E[initial retract] L[later retract distance for removal]
  • M907 - Set digital trimpot motor current using axis codes.
  • M908 - Control digital trimpot directly.
  • M350 - Set microstepping mode.
  • M351 - Toggle MS1 MS2 pins directly.
  • M928 - Start SD logging (M928 filename.g) - ended by M29
  • M999 - Restart after being stopped by error

Configuring and compilation:

Install the Classic Arduino software IDE/toolset v1.0.5 https://www.arduino.cc/en/Main/OldSoftwareReleases#1.0.x

Copy the Marlin firmware https://github.com/Ultimaker/Ultimaker2Marlin (Use the download button)

The firmware can be built from either the Arduino IDE or from the command line with a make file.

To build with the Arduino IDE: Start the arduino IDE. Select Tools -> Board -> Arduino Mega 2560 (or your microcontroller) Select the correct serial port in Tools ->Serial Port Open Marlin.pde

One time change: The UM2 made changes to the I2C driver. You will have to remove this driver function from the Arduino IDE by removing the entire TWI_vect interrupt routine (located in arduino/libraries/Wire/utility/twi.c, starting at line 364). Note: when you compile the sources using the makefile you can skip this step.

Click the Verify/Compile button

Click the Upload button If all goes well the firmware is uploading

That's it. Enjoy Silky Smooth Printing.

ultimaker2marlin's People

Contributors

banjer avatar bkubicek avatar borislandoni avatar brackendawson avatar buildrob avatar cdeboer avatar codexmas avatar daid avatar danielesdei avatar elgambitero avatar erikdebruijn avatar erikzalm avatar ijackson avatar illuminarti avatar jcrocholl avatar jothan avatar kevinoconnor avatar kiyoshigawa avatar linagee avatar maikstohn avatar markfinn avatar scuba82 avatar setar avatar stb3 avatar thinkl33t avatar thinkyhead avatar tinkergnome avatar triffid avatar yuroller avatar zetaphoenix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ultimaker2marlin's Issues

Aborting a print causes excessive retraction

Under 13.12 firmware for UM2... several forum users have reported that when aborting an Ultigcode print, the filament gets rewound to the original E=0 position from the start of the print.

I have tested it myself (with both Mac and Windows format gcode files) and can confirm the behavior.

It seems that for some reason the G92 E%i line in the abort routine is having no effect, although having looked at it quite a bit, I couldn't see why it wouldn't.

Bug in material customization

Material properties become messed up after custom entries are added.
Looks like the current changes are stored to a different, wrong place...
mat1
mat2

My extruder fan: always on?

On my UM2, My extruder fan is always turning (I mean, not the lateral 12V fans, but the center 5V one), why don't it stops when not printing?

M0 and M1 don't function on Ultimaker 2

It's my understanding that M0 and M1 are supposed to stop moves, and wait for a prompt on the controller. M0 is used by the Pause at Height plugin, and while the head moves to the specified park position from the plugin, it then immediately resumes printing with no interaction on the controller.

Voltage alert feature (mobile battery-pack equipped UMs)

The voltage shouldn't drop below a threshold. The current Mainboards can measure the voltage. If it's on a battery, it should trigger an alarm.

This will make walking around with batteries a lot easier. Does anyone think hot-swapping could somehow be possible? Just hook up a second battery in parallel?

Parsing gcode from SD Cards - and end/abort

gcode from SD cards is parsed differently, depending on whether it was created on windows or mac.

Windows uses \r\n to delimit lines. So, in Marlin_main.cpp at line 637, the \r gets treated as the end of the command, and it is buffered. The code then loops, and reads the \n next. This activates the 'empty line' code at line 658, and the parser 'returns', going on to process the gcode in the line it just buffered, monitor timers, etc, before returning to read and buffer the next line in the next pass through the main loop.

On the other hand, on a Mac, only \n is used as a delimiter. Therefore, the 'empty line' code is almost never triggered, and after reading one command, the code loops and reads and buffers the next, and the next until the buffer is full. Only then does it go and parse and act on the gcode in the first line that was read.

As a result, gcode from a Mac will typically keep the buffer full, while gcode from a pc will keep just 1 or 0 lines in the buffer.

I think that the intent was probably to put a 'continue' in the empty line case, rather than a return.

This looks to be worked around in the latest source by flushing the command buffer, but I think that has some issues too...

On an abort, it's ok to flush the command buffer first. And it should probably flush the planner buffer too, so that printing stops immediately.

But there is also some code in there to clean up when EOF is reached. However, that code gets triggered when the EOF gets detected while reading into the command buffer. When in fact, there may still be buffered commands waiting to be parsed. That then interacts with the LCD UI code for 'check print finished', and it all just seems very tangled.

Since the 'get commands' code is only called when there is at least 1 slot in the buffer, I think a better approach for 'end of file' would be to add a single new gcode command to the buffer which later gets parsed to mean 'we're done, sync up the planner buffer, and then run the end gcode'. (which would only be added in the case that we're using ultigcode, and expecting the source file to not take care of it). This would have the advantage of keeping the buffering and parsing logic separate, rather than entwining them quite as much.

Similarly, for 'Abort', just adding a single command to the command buffer, and then allowing the process_commands logic to handle it might be a better option. Again, decoupling the UI and operational logic as much as possible.

Another option that might be considered is adding a second 'system use' command buffer that only the system can write to. That could have a flag associated with it, that indicates how to treat the buffer: 'run the system buffer when the user buffer empties' or 'ignore and empty the user buffer, and run the system buffer immediately' or 'run the system buffer commands first, but then go carry on with whatever is in the user buffer' so that the system buffer can play different roles as needed. Again that would avoid having the buffering, parsing and UI code needing to tromp all over one another quite as much.

The SD file utils seem to have some problems, btw. One subtle issue seems to be that it's a bit vague whether sdpos is the last byte read, or the next byte to be read. The lower level cur_position is the value of the next byte to be read. But for instance, in card.get() sdpos is set before the character is then read and returned - making sdpos the last character read. But then in other routines like setIndex, sdpos is set to the offset of the next character to be read. So, for instance in the error reset code in get_commands, it actually jumps back to the last character of the previous line rather than the first character of the next line. Since that's generally a newline or carriage return, it probably doesn't make much material difference, but it's wrong, as best I can tell.

Wake-up light

Wake up with your Ultimaker, go to bed with your Ultimaker... Fade in lights at a certain time.

Possible issues:

  • Clock drift needs syncing?
  • Clock needs sync
  • Numeric Input

So this is why it's in the Icebox, but still the idea is cool.

seperate load and unload material command

Hi there,
While working with the UM2 I noticed that it might be nice to have a seperate command for loading and for unloading material. If I unload the material, shut down the machine (for example for transporting the machine) then turn on the machine and want to load material, I first have to go through the load sequence.
Thanks!
Cheers,
Bas

error when compiling

here's the error message:
" Wire\utility\twi.c.o: In function __vector_39': C:\Program Files (x86)\Arduino\libraries\Wire\utility/twi.c:364: multiple definition of__vector_39'
UltiLCD2_low_lib.cpp.o:C:\Users\USERNAME\AppData\Local\Temp\build1949403233647085642.tmp/UltiLCD2_low_lib.cpp:181: first defined here
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.3.2/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions "
How to solve it? Thanks.

Marlin lite uses M142 for RGBW LED coloring, this M code is allready used, M420 is intended for this.

Over on the reprap gcode wiki, it is states that M142 is used for Holding Pressure: http://reprap.org/wiki/G-code#M142:_Holding_Pressure

For RGB coloring, M420 is already reserved: http://reprap.org/wiki/G-code#M420:_Set_RGB_Colors_as_PWM
For example M420 R255 E255 B255 (all caps as all gcodes), however W is missing here, which we can extend the current definition with.

The only weirdness here is that E is used rather then G, as G is normally used for regular GCodes. I'm not educated enough to claim to know if this actually holds true.

Makefile is outdated and does not match current common software

The Makefile references arduino as the programmer to be used, but this should be wiring (because of DTR/RTS toggeling)

Also the INSTALL_DIR, VERSION and AVRDUDE_FLAGS parameters will always have to be tuned to the specific platform and OS in use, defaulting to somewhat more logical location matching common setup.

This should by no means will replace _do_make.bat used by certain platforms to override this variables anyway

Filament Monitor Support

I've developed a device to ensure that filament is constantly flowing into the machine properly. If the filament stops flowing for any reason (i.e. empty, clogged, jammed) the print will go into a pause allowing the user to fix the filament issue and then continue the print.

The change that is needed is to use a GPIO as a digital input that is pulled high. When my device alarms, it pulls that line low (to about .5V). Also a 5V and 0V connection are required, but those are not related to firmware.

I'm a EE and have designed this device to protect the GPIO on the motherboard against shorting to a rail.

I'd love it if marlin could support this device. I think it would save a lot of potential failed prints.

Here's the device:
https://sites.google.com/site/tunelldev/home/filamentmonitor
https://www.youmagine.com/designs/filament-monitor
img_1221

Z init failure?

Sometime (about 1/5 print) the Z init fails and is too near of the plate ,resulting of a first layer failure (and plate damage...)

Maybe the Z homing is not accurate enough?

manual set fan speed during print will last only one layer

Changing the fan speed during print only last until the next layer is starts.
In Cura the "fan full on height" is set to 3 mm. during print we wanted to increase the fan speed bevore reaching 3mm height. The manually set speed is only used when you do not left this menu.

For me the manual set one should overwrite G-Code ones.

(If this is not the right Place for UM2 firmware issues, please contact me)

WiFi icon in the corner

. If it's connected it should show the signal strength.

  • Designing of several icons: Wifi connection possible, AP mode, Connected Strong, Connected Medium, Connected Weak (signal), Wifi unavailable (crossed?)
  • We should be able to display a Wifi pictogram in the corner of the screen
  • The icon should be changed through status codes coming from the Linux-board

Flow shouldn't affect filament change, or retraction codes

If flow is set to 50% then you do a filament change it only moves half as far as normal.

Person who mentioned this bug thinks it might occur on retractions also (but seems unlikely):
And retractions if set to 4.5mm may actually be half that. Similarly with flows greater than 100%. Of course this applies to G10, G11 only. Retractions done with G0 or G1 commands are supposed to be multiplied by flow rate I would think.

http://umforum.ultimaker.com/index.php?/topic/5391-retraction-length-vs-material-flow/#entry47708

Compiling Marlin

I spent a few days looking for this function and didn't exactly find what I needed. Thank you for your reply.

when looking for this function
SIGNAL(TWI_vect)" function from "libraries/Wire/utility/twi.c

I looked here C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\twi.c
and found this function.

I deleted this function and was not able to compile still. Is there anything else I should be aware of.
Is it ok that I am working on WINDOWS 7. I can try working with the platform you suggest.

ISR(TWI_vect)
{
switch(TW_STATUS){
// All Master
case TW_START: // sent start condition
case TW_REP_START: // sent repeated start condition
// copy device address and r/w bit to output register and ack
TWDR = twi_slarw;
twi_reply(1);
break;

// Master Transmitter
case TW_MT_SLA_ACK: // slave receiver acked address
case TW_MT_DATA_ACK: // slave receiver acked data
// if there is data to send, send it, otherwise stop
if(twi_masterBufferIndex < twi_masterBufferLength){
// copy data to output register and ack
TWDR = twi_masterBuffer[twi_masterBufferIndex++];
twi_reply(1);
}else{
if (twi_sendStop)
twi_stop();
else {
twi_inRepStart = true; // we're gonna send the START
// don't enable the interrupt. We'll generate the start, but we
// avoid handling the interrupt until we're in the next transaction,
// at the point where we would normally issue the start.
TWCR = _BV(TWINT) | _BV(TWSTA)| _BV(TWEN) ;
twi_state = TWI_READY;
}
}
break;
case TW_MT_SLA_NACK: // address sent, nack received
twi_error = TW_MT_SLA_NACK;
twi_stop();
break;
case TW_MT_DATA_NACK: // data sent, nack received
twi_error = TW_MT_DATA_NACK;
twi_stop();
break;
case TW_MT_ARB_LOST: // lost bus arbitration
twi_error = TW_MT_ARB_LOST;
twi_releaseBus();
break;

// Master Receiver
case TW_MR_DATA_ACK: // data received, ack sent
// put byte into buffer
twi_masterBuffer[twi_masterBufferIndex++] = TWDR;
case TW_MR_SLA_ACK: // address sent, ack received
// ack if more bytes are expected, otherwise nack
if(twi_masterBufferIndex < twi_masterBufferLength){
twi_reply(1);
}else{
twi_reply(0);
}
break;
case TW_MR_DATA_NACK: // data received, nack sent
// put final byte into buffer
twi_masterBuffer[twi_masterBufferIndex++] = TWDR;
if (twi_sendStop)
twi_stop();
else {
twi_inRepStart = true; // we're gonna send the START
// don't enable the interrupt. We'll generate the start, but we
// avoid handling the interrupt until we're in the next transaction,
// at the point where we would normally issue the start.
TWCR = _BV(TWINT) | _BV(TWSTA)| _BV(TWEN) ;
twi_state = TWI_READY;
}
break;
case TW_MR_SLA_NACK: // address sent, nack received
twi_stop();
break;
// TW_MR_ARB_LOST handled by TW_MT_ARB_LOST case

// Slave Receiver
case TW_SR_SLA_ACK: // addressed, returned ack
case TW_SR_GCALL_ACK: // addressed generally, returned ack
case TW_SR_ARB_LOST_SLA_ACK: // lost arbitration, returned ack
case TW_SR_ARB_LOST_GCALL_ACK: // lost arbitration, returned ack
// enter slave receiver mode
twi_state = TWI_SRX;
// indicate that rx buffer can be overwritten and ack
twi_rxBufferIndex = 0;
twi_reply(1);
break;
case TW_SR_DATA_ACK: // data received, returned ack
case TW_SR_GCALL_DATA_ACK: // data received generally, returned ack
// if there is still room in the rx buffer
if(twi_rxBufferIndex < TWI_BUFFER_LENGTH){
// put byte in buffer and ack
twi_rxBuffer[twi_rxBufferIndex++] = TWDR;
twi_reply(1);
}else{
// otherwise nack
twi_reply(0);
}
break;
case TW_SR_STOP: // stop or repeated start condition received
// put a null char after data if there's room
if(twi_rxBufferIndex < TWI_BUFFER_LENGTH){
twi_rxBuffer[twi_rxBufferIndex] = '\0';
}
// sends ack and stops interface for clock stretching
twi_stop();
// callback to user defined callback
twi_onSlaveReceive(twi_rxBuffer, twi_rxBufferIndex);
// since we submit rx buffer to "wire" library, we can reset it
twi_rxBufferIndex = 0;
// ack future responses and leave slave receiver state
twi_releaseBus();
break;
case TW_SR_DATA_NACK: // data received, returned nack
case TW_SR_GCALL_DATA_NACK: // data received generally, returned nack
// nack back at master
twi_reply(0);
break;

// Slave Transmitter
case TW_ST_SLA_ACK: // addressed, returned ack
case TW_ST_ARB_LOST_SLA_ACK: // arbitration lost, returned ack
// enter slave transmitter mode
twi_state = TWI_STX;
// ready the tx buffer index for iteration
twi_txBufferIndex = 0;
// set tx buffer length to be zero, to verify if user changes it
twi_txBufferLength = 0;
// request for txBuffer to be filled and length to be set
// note: user must call twi_transmit(bytes, length) to do this
twi_onSlaveTransmit();
// if they didn't change buffer & length, initialize it
if(0 == twi_txBufferLength){
twi_txBufferLength = 1;
twi_txBuffer[0] = 0x00;
}
// transmit first byte from buffer, fall
case TW_ST_DATA_ACK: // byte sent, ack returned
// copy data to output register
TWDR = twi_txBuffer[twi_txBufferIndex++];
// if there is more to send, ack, otherwise nack
if(twi_txBufferIndex < twi_txBufferLength){
twi_reply(1);
}else{
twi_reply(0);
}
break;
case TW_ST_DATA_NACK: // received nack, we are done
case TW_ST_LAST_DATA: // received ack, but we are done already!
// ack future responses
twi_reply(1);
// leave slave receiver state
twi_state = TWI_READY;
break;

// All
case TW_NO_INFO: // no state information
break;
case TW_BUS_ERROR: // bus error, illegal stop/start
twi_error = TW_BUS_ERROR;
twi_stop();
break;
}
}

Motor current left on after homing/levelling

I noticed that the X-Y-motor stays powered indefinitely after leveling the buildplate and after running "Home Head".
I don't know if it is considered a bug or a feature but it seems unnecessary to keep them powered.

Possible false positive temp sensor errors

A couple of users (one for me, one for the Swedish support group) have reported printers that previosuly worked fine but then immediately refuse to turn on, after upgrading to the firmware that came with Cura 15.02. Both gave 'Error - Stopped Temp Sensor' errors.

In both cases, the behavior continued after downgrading to firmware in Cura 14.12, but went away when they downgraded to firmware from 14.09.

At least one of these users went through the process a couple of times, and was able to replicate it.

Trying to verify and compile? Has this happened to you before?

Arduino: 1.6.4 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

Wire\utility\twi.c.o: In function __vector_39': C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\utility/twi.c:364: multiple definition of__vector_39'
UltiLCD2_low_lib.cpp.o:C:\Users\NICHOL~1\AppData\Local\Temp\build6992659436616663863.tmp/UltiLCD2_low_lib.cpp:184: first defined here
c:/program files (x86)/arduino/hardware/tools/avr/bin/../lib/gcc/avr/4.8.1/../../../../avr/bin/ld.exe: Disabling relaxation: it will not work with multiple definitions
collect2.exe: error: ld returned 1 exit status
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.

Wrong temperature for ABS: 280C - should be lower

In the Ultimaker 2 menu structure, you can select ABS as material.
From MATERIAL->SETTINGS->ABS
The temperature is then set to 280C.

However, the firmware seems to have a limit (I'm guessing at 260C since that is the official highest in specifications in User Manual) whenever heating the printhead.

So when you do MATERIAL->CHANGE it first brings up:
"Heating printhead for material removal"
as it comes up in temperature (to 260C I guess)

it eventually stops with an:
"ERROR - STOPPED Temp sensor contact [email protected]"

I'm guessing this is simply about changing the ABS temperature to a lower value?

(It would of course be extremely useful to be able to add other materials and also change temperatures for both ABS and PLA)

Vanity mode

A mode for photography and demos, selectable in the advanced menu

  • Allowing you to constantly see an Ultimaker logo with your own text, e.g. from display.txt (e.g. to display www.engadget.com under the logo).
  • Allowing you to set the RGB colors of the rotation dial and the brightness of the backlight.

Simple clarification on Ultimaker2 extruder gear

Hello,

The following line:

#define DEFAULT_AXIS_STEPS_PER_UNIT   {80.0,80.0,200,282}  // default steps per unit for ultimaker2

Imply that there is 282 steps per mm on the extruder gear, right?
It is a 1.8° stepper motor with 1/16 microstepping, still right?

Which means that there is 3200 steps (200*16) in a full revolution. So:

3200 / 282 = 2 * pi * r

Where r is the radius of the drive gear. Thus:

r = 3200 / (282 * 2 * pi)
r = 1.8 mm

Where am I wrong? I guess the drive gear is really bigger than that

Aborting a paused print can result in strange things

If you pause a print and abort it in the paused mode, the platform and print head remains in the paused state.

If you now go to the Advanced-menu, "lower platform" and "home head" will not respond and if you select "move material", something strange will happen.

The situation can be recovered by selecting the print menu instead, the head and platform will then home.

Ultimaker 2 firmware not fault tolerant

I was trying to confirm that I would get "unknown command" for M200, but...

SENT: M200 S0.0
RECEIVED: ok
SENT: M1024
RECEIVED: ok
SENT: M9999
RECEIVED: ok
SENT: M99997654321
SENT: M99997654321
SENT: M999976
SENT: M99999
SENT: M9999
SENT: G28

The firmware went out to lunch after I entered M99997654321. It eventually stopped responding altogether (which is to say I couldn't enter any further commands).

Then, after I restarted the printer and reconnected, I entered MGOBBLEDYGOOK and the nozzle moved all the way forward until it collided with the front of the printer!

The reason I think this is an issue that should be fixed is:

  1. The printer should not allow itself to be damaged due to bad input.
  2. I suspect this is part of the problem with USB printing. That is, if any part of communication fails, the firmware can break utterly.

I understand that garbage in means garbage out, but the firmware should validate its input before executing it, otherwise, printer damaged. :(

still printing but cooling down if job was canceled

Hey guys,

I just recognize that Cura 14.07 (latest official Version and Firmware update) has some problems if the job was canceled.

I just pressed cancel for a job with very long edges. I know that the printing will stop if the printing Que of 20 "walks" is finished.
My problem is that during the "cancel is in progress" screen the nozzle is already cooling down and feeder is pushing also.
I used ABS and the temperature was very fast too low for printing but the Que wasn't empty and the feeder did not stop pushing.

I can think the best solution is to wait until the Que is empty before the nozzle is turned off. Or maybe it is also possible to stop the feeder if the job was canceled.

Greetings
Killerregenwurm

Bed leveling wizard instructions

Would it be possible to change the onscreen instructions to remind users which way to turn the screws to move the bed? Given the way it's assembled, it's not really obvious to me which way they turn just by looking at it, and it took me ages to remember that 'right is NOT tight'. Instructions should be something like 'Turn front of screw to the left to reduce the gap between bed and nozzle'. Talking in terms of clockwise and anti-clockwise doesn't help much, because it depends whether you're looking up at the screw or down on it. Otherwise it becomes a bit frustrating, having to turn the screw further than you really wanted, then wait for it to settle, and then see whether it made the problem better or worse.

Missing note about how to compile and run the simulator

Hey, I tried compiling and running the MarlinSimulator a bunch of times, there are some issues related to:

  1. SDL on Mac OS X
  2. Compilation fails with Clang.

Maybe some small description on how to compile the simulator would be useful. I still could not get it to work.

CardReader::lsDive - buffer overflow during M20 command

The "M20" command uses this function to list all files on the sdcard.
The variable "path" is defined as

char path[13*2];

...but it concatenates up to 10 directory names in this buffer during the recursive calls (MAX_DIR_DEPTH):

strcat(path,prepend);

See:
cardreader.cpp - lines 64 to 89

Minor menu issues

  • Print speed menu heeft geen "Return" zoals temperature. Allemaal hetzelfde (met Return? Ook consistent alles met hoofdletters en geen "Back" en "Return" door elkaar.
  • Set point in groot font weergeven, de current temp weergeven als: "Current temp: 123 C"
  • Add option to the advanced menu to insert filament by rotating the dial in the front. Should heat up to custom temp (configurable) and then allow you to decide how far to retract. If the filament loading and unloading is foolproof, this may not be required anymore... so we can also focus on that.

First run wizard:

  • Teksten naar 1e persoon. De Ultimaker mag een persoonlijkheid hebben :)
  • Now your Ultimaker knows what kind of material it has and how to use this -> "Thanks! Now I know what material I'm working with and how to use it."

Low memory available, stability problems may occur.

Arduino version: 1.6.5
OS: OS X Yosemite - Version 10.10.1
Board: Arduino Mega or Mega 2560
Processor: Atmega2560 (Mega 2560)

Removed function
ISR(TWI_vect)
from
\hardware\arduino\avr\libraries\Wire\twi.c

IDE output
Sketch uses 116,414 bytes (45%) of program storage space. Maximum is 253,952 bytes.
Global variables use 6,314 bytes (77%) of dynamic memory, leaving 1,878 bytes for local variables. Maximum is 8,192 bytes.
Low memory available, stability problems may occur.

screen shot 2015-07-09 at 12 05 22 pm

First run wizard slams head into frame

After leveling the bed, the first run wizard moves the head front and center to await filament loading; it moves too far forward, and bangs into the front edge of the frame.

This still happens in the 14.02 firmware.

13.12 tag wrong?

If my github client speaks the truth, it looks like the 13.12 tag on UM2Marlin got applied a couple of commits early - prior to the buffer-emptying fix. Please can that get updated?

Write identifier file upon SD-card entry or upon start

Write identifier file upon SD-card entry or upon start

This can be used by Cura to trigger a question:
"Would you like to switch to the Ultimaker Original profile?"
or
"Would you like to switch to the Ultimaker 2 profile?".

Bed-leveling wizard head position

The bed leveling wizard puts the nozzle right behind the front right glass clip. On my printer, the central, horizontal part of the fan shroud is extremely close to catching on the raised back edge of the clip when the head is in that position. Also, because the nozzle is so close to the clip, it is obscured by it, making it very hard to see the clearance between nozzle and bed, and awkward to try to slide a piece of paper in to use as a feeler gauge. It would be better to position it a couple of cm to the left, and back a few more mm, so that it's easier to see what is going on.

M106 S255 sets fan to 49% not 100%

in Cura the fan speed is set to 100% above layer 3.
In the Gcode i can see following lines:

;LAYER:3
M106 S255

The Ultimaker 2 in the Tune menu says "Fan Speed: 49%"

It is possible to change the Fan Speed to 100%, and the speed of the fan changes noticeable.

Just a side note regarding that new "Z20-move"

I would like to comment this new change in UltiLCD2_menu_print.cpp:

static void doStartPrint()
{
  plan_set_e_position(0);
  current_position[Z_AXIS] = 20.0;
  plan_buffer_line(...);

...

Imho, this should be done in the G-code.

The poor machine itself has absolutely no knowledge about what is going to happen.
Yes, maybe we're extruding hot filament at Z0.1, creating some cool, printed stuff.
But maybe someone (...) attached a syringe paste extruder or a freakin' laser there, moving straight into the platform...

Although my UM2 is running in "UltiGCode mode", I always had these few extra lines
built-in right from my UM2 start (re-enabled start/end G-Code panel in lastes
Cura versions):

G01 F6000 X120
G01 F3000 Z50
G01 F50 E75
G92 E0

A standard setup, which I have been using for years now, on almost every printer.
This does exactly the same (In addition, the E75 step also removes all the old
plastics, lacking any plasticizer, but this is another story).

Having the "print" (or freakin' laser (#yeah)) preparations in the G-code just "feels" better, imho...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.