Rostock Max: HE280 accelerometer z probe & filament runout sensors

Thank you for writing and maintaining this amazing open source firmware!

I am refurbishing an older SeeMeCNC Rostock Max V2 (it was upgraded to V3 with the HE280 end effector and corresponding wiring whip). This delta end effector uses an accelerometer to detect when the nozzle has contacted the glass bed. SeeMeCNC stopped updating firmware at 0.92.2. They had inserted some crude code for detecting contact (at https://github.com/seemecnc/Firmware/tree/master/).

Basically, it uses a I2C configuration routine to configure an accelerometer (IIS2DH chip). The accelerometer chip has a physical output pin that is triggered when a collision with the bed is sensed. The accelerometer output line is brought back to the RAMBO as a physical wire onto Pin 4 (PS-ON connector). Pin 4 is then set as an endstop for the After collision, this interrupt line must be reset by resending I2C commands to the accelerometer.

In the SeeMeCNC repetier 0.92.2 code... the accelerometer I2C communication handling was added in Communication.cpp. A function isZProbeHit was added to Printer.h to read the z probe status. Code for the z probing was inserted into Printer.cpp functions, with a handful of compiler macros to make it work with or without the sensors. This was set up as a quasi-state machine run through the z probing... I can understand why SeeMeCNC stopped updating their branch, because this would be hard to merge changes moving forward.

I will use a nice little library to add the accelerometer configuration code into the 1.0.5 branch. (based on https://github.com/trash80/HE280AccelerometerInterface). I could install a teensy to do handle the accelerometer, but I'd prefer to add the I2C reset commands into the repetier firmware (which will solve the same issue for others, and hopefully get people back on the main dev branch).

I could create gcode commands to set/reset the accelerometer, then call it as part of the Z_PROBE_START_SCRIPT and Z_PROBE_FINISHED_SCRIPT calls, but that seems quite ugly.

Where would you put the appropriate calls to the I2C commands for configuring the accelerometer before and after the Z probing is run?

Is there a location with example Configuration.h files for specific printer models? I think this could be helpful as a starting point for many users...

Thank you in advance!
Francis Esmonde-White

-----

Purely for others who might stumble on to this post while trying to upgrade their own Rostock Max V2 printers...

I have added some extra wiring to allow the rambo to directly control the layer and hot end fans. It's very annoying to have the fans turn on all the time. I'll connect the fans to Fan0 and Fan1 on the Rambo (screw teminals).

I'm adding filament runout sensors to the (two) extruders that I have installed on my machine. I'll connect them to Xmin and Ymin endstop inputs on the rambo using 0.1" pin headers. Wonderful help from Repetier on the forums here: https://forum.repetier.com/discussion/5770/filament-runout-sensor


-----
For getting the old SeeMeCNC Repetier 0.92.2 code working on modern arduino, see this post (https://forum.repetier.com/discussion/comment/35188/#Comment_35188).

-----
I'm clearly not the only person to try adding endstop sensors to the Rostock Max...
https://forum.repetier.com/discussion/5817/filament-runout-sensor-v0-91-rambo/p1

Here's a link to a user doing bed probing with a precisionpiezo sensor...
https://forum.repetier.com/discussion/6424/z-probe-with-piezo-element-errors/p1



«1

Comments

  • By the way, I'm also happy to move to Repetier 2.x and test this on my printer, if that's possible. Is RAMBO / Arduino Mega 2560 still supported in the 2.0 branch?

    Thanks again,
    Francis
  • There is actually a very easy solution and place. Before probe move and afterwards the same function is called:
    static INLINE void setZProbingActive(bool on) {
    flag0 = (on ? flag0 | PRINTER_FLAG0_ZPROBEING
    : flag0 & ~PRINTER_FLAG0_ZPROBEING);
    }
    in printer.h

    With on you see if it gets enabled or disabled. So just add your reset code in on case and disable signal for off case you I guess you are done.

    V2 would be in deed easier as it has dedicated z probe classes for different kinds and also has automatic geometry calibration. But at the moment avr boards are not supported. It is planned and I hope the 8 bit boards are fast enough for the new system which is especially for deltas much better. On the other side avr is quite slow so motion resolution will still need to be quite coarse. Even a due which is 10 times faster already allows a much higher frequency of updates and smoother moves. The nice thing with V2 is that quality will automatically increase with slower moves, so slow outer perimeter will run it with higher precision automatically.

    We don't have that printer and hence no sample configs, sorry.
  • Hello everyone, I entered the firmware 0.92.2 Dual for the rostock max v2 on my V1, not having the HE280 I can not run the G29 for the autolevel and this creates problems for me as it tells me a slew of error given by the lack of HE280 and related I2C error. I as a probe use an optical endstop guided by a lever as pictured, it works very well and gives me a tolerance of +- 0.04, unfortunately this probe I can only use it with G30, G31, G32 but not G29. can I remove the i2C function and normally use G29? I use the Z-min port of rambo 1.3L, physical port 23 and digital 10.

    Thank you for your suggestions.

    Photos
    https://i.imgur.com/vqDKD0z.mp4
    https://i.imgur.com/fXVI82c.jpg
  • we do not support HE280 - that is a special modification of seemecnc. Your probe solution would be what we support out of stock. Are there any other special optimizations for other hardware? Otherwise you can just use the stock firmware instead. G29 is nothing you should use for deltas. Run G32 S2 and just home for prints.
  • Thanks for the reply I appreciate it!

    Yes is it, is a SeeMeCNC special modification and unfortunately I cannot change firmware because it is the dual version modified by them and the only one I can use with two extruders and a single hotend, the thing to fix would be the removal of the HE280 support or the simulation of a port always connected to my Z-probe. I will try to contact them in this case but I doubt they support as they have already told me they do not provide assistance on modified hardware / software.

    Regarding the G32 S2 does not produce the survey of the three points set on eeprom? X1 Y1 X2 Y2 etc. Unfortunately to me it would revire a solution like this in the video that you proposed on youtube that goes to buy the whole plate giving the correction differences, G29 doesn't need M500 to store the data on eeprom right? I'll try.


  • G29 does not require eeprom right. But G32 S2 also not I think - but you would loose config of course without.

    The shared heater is no problem. Current firmware has a option for shared heater with 2 extruders so this also works with stock firmware now.
  • edited January 2021

  • Latest firmware? I try it ok, I see that there is the possibility to load the old configuration.h, but I have to avoid this if I don't want to run into the same problem. I'll update you soon, thanks!
  • Only works if config was also created with config tool!
  • edited January 2021
    I love! An exceptional configurator! Very fast and advanced, I hope I have done everything right, 90% I copied from the old firmware 0.92.2 of the dual SeeMeCNC but more is new, I install it and update you thanks !!
  • edited January 2021
    I encountered an error when switching on, the machine starts as if it were in print with a request for pause, moreover the machine goes down once you click on confirm. Do I try to reverse the engines? Despite this, even when the end stop max sensors do not work. must I have something wrong with the pins?

    EDIT: The motors are correct, the only problem is that when I start the machine with the request for pause and the end stops that do not work, the state of end stop with M119 is:

    x_max: H, y_max: H, z_max: H, z-probe work well
  • Check original config if you have pull up enabled - these are the mechanical endstops in config tool. Also eventually you might need to use the inverted variant so they are L when not triggered. Also check if you use same pins for them.

    Do you have a sd card inserted with a file init.g that runs on startup? Or a startup gcode set?
  • edited January 2021
    I fixed everything and it works fine now except that after homing the X and Y stay at the end of the stroke and Z regularly drops 5mm. Unfortunately I think I burned the power supply because the card does not turn on anymore, it happened after I started the heaters. Heater of the hotend is ok but that of the bed started with the machine stop. : / The power port is probably wrong or set incorrectly

    Edit: I try to check the resistance of the Bed, the fan of the power supply works, in short, I have to check what the problem is. I plugged in an old rambo and it won't turn on anyway.
  • Ok good luck. Make sure you have set #define ENDSTOP_Z_BACK_ON_HOME 20 or so so you are not directly at the end stops. With 0 at least one will stay there depending on the end stop offsets in eeprom.
  • edited January 2021
    Solved everything was the fuse F3 of the rambo, this surprised me because it would mean that the Rambo 1.1B had the same problem, however now everything is ok and I am going to reassemble everything. Regarding the problem it is definitely the type of power supply I have selected, if I pass the configuration.h you could check if everything is ok with the problem in question?

    Regarding #define ENDSTOP_Z_BACK_ON_HOME 20 I correct it immediately as soon as I connect the printer.

    EDIT

    My doubt is if for the bed the PDM_FOR_EXTRUDER is wrong, the pin I have always used is the last in the row, the digital Pin 3, and when I turned on the first time it did not go because the voltage did not pass, when I moved to the extruder pin 1 the Rambo, the digital pin 7.

    In this link it confirms in all PWM pins, I suspect for this of my mistake but why then hotend was heating up?
    https://reprap.org/wiki/Rambo_development

    I confirm in the older firmware PDM_FOR_EXTRUDER is 0.
  • ENDSTOP_Z_BACK_ON_HOME is set to 0 so it is not that, in the eeprom I have the Park position Z raise to 10mm but also setting it to 0 the carriage of the Z goes down anyway after homing
  • But ENDSTOP_Z_BACK_ON_HOME should be higher then 0 - 0 means at top you are not allowed to move a mm or you will trigger end stop. Therefore you should go down a bit. A print only working at 0,0 at that height makes no sense anyway.
  • edited January 2021
    Honestly I don't know, I proceed to do as you suggest of course, I am setting the digital pins on the fans and more but they still don't work, as the peek fan is pin 6 and I have always activated it with M42 P6 S255 but despite this it does not work , even the fan of the layer which is pin 8 but always nothing. As for the towers with the last modification they returned to give the pause request, even the max limit switches do not work. I messed things up a bit, I need to fix it.

    EDIT

    Ok good news, fixed the towers again and even the tower z remains at the same height as the other two, great! Unfortunately now I have to get behind to understand how to fix the issue of the fan pins, they have always been those and I do not understand why they do not go, surely I will have selected a wrong box. I'll check
  • edited January 2021
    Everything works and the printer would be operational if it were not for the fans that do not turn, the commands for the peek / hotend fan come in because as soon as I enter M42 P6 S255 the fan turns half a turn and stops, on the firmware I set EXTRUDER_FAN_COOL_TEMP 50 for automatic start but doesn't seem to work, instead for the layer fan everything is stopped.

    On the old firmware #define EXT0_EXTRUDER_COOLER_PIN is set to 7 and if I'm not mistaken it should be wrong because the pin I use for the fan is 6, in fact even on start configuration string the coolerPin is set to 6, I don't understand.

    EDIT

    On the LCD, under FAN2 the hotend fan works, yet on configuration.h the pins are very different, I'm going crazy! :s 
  • edited January 2021
    Resolved! Obviously my mistake but without my fault.

    In the firmware modified by SeeMeCNC the command for the hotend peek fan was M42 P6 S255, but correctly as it always had to be the right command is M106 P6. Same thing as the P8 with the difference that it does not turn and heats up! I assume a defect of the fan that until yesterday was going. I will understand!

    Thanks Repetier for the support! AMAZING FIRMWARE I LOVE IT  <3
  • You are right M42 is change a digital pin so is completely wrong for a fan. Correct syntax is M106 S<value 0..255> P<fanid> with fanid being 0 for first fan and 1 for sencond fan if you have 2. You should only have 1. If you have one for cooling the heat barrier of extruder that is EXT0_EXTRUDER_COOLER_PIN and should not work as an official pin.
    Slicers normally just write
    M106 S<vlaue>
    which takes fan 0. So with taht configured now slicers will work much better with the firmware.
  • Today I will finish configuring the rest, the last things like the leveling coordinates and the autotune pid. Having a firmware configured like this helps a lot to understand any problems and knowledge has increased, I hope they recap other opportunities to learn other things!
  • I am encountering an error, a strange problem with G33, practically after starting G1 X0 Y0 Z5 F5000 and starting G33 the probe reads only the first point and then stops giving error G33.

    The coordinates are as follows:

    12:49:24.163 : N16 G33 L0*114
    12:49:24.167 : G33 X-100.00 Y-100.00 Z-0.012
    12:49:24.171 : G33 X-100.00 Y-50.00 Z-0.012
    12:49:24.171 : G33 X-100.00 Y0.00 Z-0.012
    12:49:24.175 : G33 X-100.00 Y50.00 Z-0.012
    12:49:24.175 : G33 X-100.00 Y100.00 Z-0.012
    12:49:24.179 : G33 X-50.00 Y-100.00 Z-0.012
    12:49:24.179 : G33 X-50.00 Y-50.00 Z-0.012
    12:49:24.179 : G33 X-50.00 Y0.00 Z-0.012
    12:49:24.183 : G33 X-50.00 Y50.00 Z-0.012
    12:49:24.183 : G33 X-50.00 Y100.00 Z-0.012
    12:49:24.187 : G33 X0.00 Y-100.00 Z-0.012
    12:49:24.187 : G33 X0.00 Y-50.00 Z-0.012
    12:49:24.191 : G33 X0.00 Y0.00 Z-0.012
    12:49:24.191 : G33 X0.00 Y50.00 Z-0.012
    12:49:24.191 : G33 X0.00 Y100.00 Z-0.012
    12:49:24.195 : G33 X50.00 Y-100.00 Z-0.012
    12:49:24.195 : G33 X50.00 Y-50.00 Z-0.012
    12:49:24.199 : G33 X50.00 Y0.00 Z-0.012
    12:49:24.199 : G33 X50.00 Y50.00 Z-0.012
    12:49:24.204 : G33 X50.00 Y100.00 Z-0.012
    12:49:24.204 : G33 X100.00 Y-100.00 Z-0.012
    12:49:24.204 : G33 X100.00 Y-50.00 Z-0.012
    12:49:24.208 : G33 X100.00 Y0.00 Z-0.012
    12:49:24.208 : G33 X100.00 Y50.00 Z-0.012
    12:49:24.211 : G33 X100.00 Y100.00 Z-0.012


    I with G32 use these coordinates with method 1:

    X1 90  Y1 90
    X2 -90 Y2 90
    X3 90  Y3 -90

    What could it be?
  • G33 is independent from G32. You have a square defined in configuration.h for distortion correction. This must fit on your bed and be reachable with activated z probe offset. So it will only cover a part of the real bed. For deltas you can set extrapolate edges so the outermost 4 edges are not probed. This slightly increases the rectangle reachable.

    When any of these points is outside allowed area it will stop and you need to shrink the area.
  • edited January 2021
    Repetier said:
    G33 is independent from G32. You have a square defined in configuration.h for distortion correction. This must fit on your bed and be reachable with activated z probe offset. So it will only cover a part of the real bed. For deltas you can set extrapolate edges so the outermost 4 edges are not probed. This slightly increases the rectangle reachable.

    When any of these points is outside allowed area it will stop and you need to shrink the area.
    So do I have to reduce these values?
    
    #define DISTORTION_XMIN 10
    #define DISTORTION_YMIN 10
    #define DISTORTION_XMAX 190
    #define DISTORTION_YMAX 190
    
    In this: 
    
    #define DISTORTION_XMIN -90
    #define DISTORTION_YMIN -90
    #define DISTORTION_XMAX 90
    #define DISTORTION_YMAX 90
    
    Right? I have a 280 diameter plate, 140 of radius.
  • edited January 2021
    Solved, I had to run G33 only after G32 right? Once done with G33 it crashed on Y, on the firmware I reduced:
     
    #define DISTORTION CORRECTION R from 100 to 90

    and now it doesn't crash anymore. Should I also run S2 after G32 and G33?
  • Yet after having mechanically calibrated XYZ perfectly, after G30, G32 and G33 I always have this result:

    https://imgur.com/Wbpntgi

    15:22:30.804 : Info:Distortion correction matrix:
    15:22:30.809 : -14, 17, 19, 5, -44
    15:22:30.809 : -22, -2, -5, -40, -41
    15:22:30.813 : -31, -8, -1, 5, -2
    15:22:30.813 : -36, -37, -45, -68, -37
    15:22:30.813 : -32, -38, -14, 26, 115
    15:22:30.813 : G33 X-90.00 Y-90.00 Z-0.400
    15:22:30.817 : G33 X-90.00 Y-45.00 Z-0.450
    15:22:30.817 : G33 X-90.00 Y0.00 Z-0.388
    15:22:30.821 : G33 X-90.00 Y45.00 Z-0.275
    15:22:30.821 : G33 X-90.00 Y90.00 Z-0.175
    15:22:30.821 : G33 X-45.00 Y-90.00 Z-0.475
    15:22:30.825 : G33 X-45.00 Y-45.00 Z-0.463
    15:22:30.825 : G33 X-45.00 Y0.00 Z-0.100
    15:22:30.829 : G33 X-45.00 Y45.00 Z-0.025
    15:22:30.829 : G33 X-45.00 Y90.00 Z0.213
    15:22:30.833 : G33 X0.00 Y-90.00 Z-0.175
    15:22:30.833 : G33 X0.00 Y-45.00 Z-0.563
    15:22:30.833 : G33 X0.00 Y0.00 Z-0.012
    15:22:30.837 : G33 X0.00 Y45.00 Z-0.063
    15:22:30.837 : G33 X0.00 Y90.00 Z0.237
    15:22:30.841 : G33 X45.00 Y-90.00 Z0.325
    15:22:30.841 : G33 X45.00 Y-45.00 Z-0.850
    15:22:30.841 : G33 X45.00 Y0.00 Z0.063
    15:22:30.845 : G33 X45.00 Y45.00 Z-0.500
    15:22:30.845 : G33 X45.00 Y90.00 Z0.063
    15:22:30.850 : G33 X90.00 Y-90.00 Z1.437
    15:22:30.850 : G33 X90.00 Y-45.00 Z-0.463
    15:22:30.854 : G33 X90.00 Y0.00 Z-0.025
    15:22:30.854 : G33 X90.00 Y45.00 Z-0.513
    15:22:30.854 : G33 X90.00 Y90.00 Z-0.550
    15:22:30.858 : Z correction enabled

    What am I doing wrong?

  • First is running G32 S2 and afterwards G33 if you want. Values should swing around 0 also with the 3 point G32 this is not guaranteed.

    Your values show clearly that your printer is not properly calibrated. First calibrate the delta geometry parameter to be precise. Your diagonal or horizontal offset is way wrong. Google "escher delta wizard" and use the 6 parameter variant to update the geometry. Run G33 R0 first to remove distortion correction. Once you have the escher values set in eeprom run G32 S2 and G33 and you will see that the Z corrections are much smaller.

    Apart from this it looks good. 
  • edited January 2021
    By mistake I reset the eeprom, why now the printer moves very slowly with the motors?

    EDIT

    It's ok, accelleration/print reset.
  • So now everything is working - great?
Sign In or Register to comment.