1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Auto Bed Leveling

Discussion in 'Mods and Upgrades' started by Peter Krska, Jan 13, 2014.

  1. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Stephan

    Nice design. Tiny servo is all that's needed - a linear servo would be ok too. Servos under 2g start to get expensive, so a servo around 2 to 2.5g is perfect for the job.
     
    2 people like this.
  2. Stephan

    Stephan New Member

    Joined:
    Mar 18, 2014
    Messages:
    10
    Likes Received:
    14
    Ziggy,

    wow, it works flawlessly! Yesterday I could run a first test print, probing worked like a champ! My starting code is very short now: G28 X0 Y0, G29 that's it. Thank you very much! The last thing I will change is the 1k resistor on the opto endstop because of too high current of 7mA. The resistor to swap is the one beside the LED? You suggest to take a 2,2k resistor?
     
  3. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Hi Stephan,

    Great result.

    Also suggest you

    #define Z_SAFE_HOMING

    in configuration.h and use

    G28; Home x and y, probe for z home
    M565 Z?.??; Set the probe z offset for your design
    G29 ; Probe bed

    as your start gcode after the bed and extruder are hot. Having the M565 makes it much easier to tweak the offset value.

    Re the opto endstop, a 2.2k resistor is fine. The TCST2103 detector does not like being too hot either (spec says max 85c). Where you have yours the extruder fan will keep it cool.
     
  4. Stephan

    Stephan New Member

    Joined:
    Mar 18, 2014
    Messages:
    10
    Likes Received:
    14
    Hi Ziggy,

    yes, Z_SAFE_HOMING is already activated. When making my next prints I will have a sharp look onto the first layer and compensate via the M565 code. But having a almost perfect value in configuration.h is a very good starting point :)
    Another question, perhaps I missed something or it is a silly question, but is there any kind of database or a kind of subsection here in the forum to load up or load down .stl-files regarding mods and stuff around the Robo3D printer? I know, this question doesn't have to do with autolevelling, but couldn't that be a more overseeable place to go instead of thingiverse?
    Perhaps I should open a new thread...

    All the best
    Stephan
     
  5. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
  6. Stephan

    Stephan New Member

    Joined:
    Mar 18, 2014
    Messages:
    10
    Likes Received:
    14
    Yes, probably the easiest way to tweak the first layer. In the moment I'm really satisfied with my current setup, I'm happy not to scratch my print bed with a hotend any more. Thanks alot!

    Stephan
     
  7. John Rygg

    John Rygg Active Member

    Joined:
    Feb 21, 2013
    Messages:
    111
    Likes Received:
    31
    This looks like a great additon , could someone write this up as a DIY with parts lists code and pictures in a step by step guide.?

    a lot of great content here but it is kind of scattered and everything is not up on thingivers
     
  8. Stephan

    Stephan New Member

    Joined:
    Mar 18, 2014
    Messages:
    10
    Likes Received:
    14
    Hi John,

    I modified the wonderful original design from Ziggy to use it with the hexagon hotend.
    First of all you need a tiny servo listed here:
    http://www.hobbyking.com/hobbyking/store/__3714__HobbyKing_2_5g_17kg_12sec_Micro_Servo.html

    After printing the attached z-probe-holder you have to follow Ziggy's instructions on thingiverse:
    http://www.thingiverse.com/thing:301715

    Much luck and all the best

    Stephan

    P.S.: Ziggy, I hope it's ok for you, your design is now working for several weeks without any problems :)
     

    Attached Files:

  9. Jeff Mercado

    Jeff Mercado Member

    Joined:
    Aug 12, 2013
    Messages:
    41
    Likes Received:
    32
    I have an idea I would like to try with the "simpler is better" mindset. While I have 9g tower pro servos ready to go (but not long enough extensions) to implement Ziggy's design, I want to try something different and am interested in advice from those who have implement Ziggy's design. I would like to make it uber-simple and use a coat hanger instead of a specified brass rod. The only thing one would need is an opto-interrupter I think. If you substitute a straight portion of coat hanger (2mm is the norm) and use an manual action to lower the metal probe into position for the start of each print then create a pause in the process after probing to manually stow the probe higher out of the way, it would be possible to implement Ziggy's design concept to probe and measure, pause, stow it, then print... without the servo. It would eliminate the need to jumper the power and get the servo and extension running in the process. All that would be needed is a $4.00 opto-interrupter. (Or any salvaged from a dead printer etc) Most are 5mm in width.

    I see there are opto interrupters that use schmitt triggers to better control the signal, but I am thinking I can get away without that, but if necessary I can rig up a HC7414 to provide schmitt level sensing if the consistency of the probing is an issue. If not I may be in for a $20 opto interrupter, but I doubt it will be necessary. I have several salvaged (non schmitt) opto interrupters from printers that I want to try to utilize.

    I am interested in the thoughts of those who have implemented Ziggy's method for feasibility. While I have the parts to do Ziggy's now, I want to try a simple, manual implementation. I like Mike K's dual switch setup as well, but think that if I can make this work with one print and one opto-interrupter (I have designed and printed a remix of Ziggy's to accept a manual stow with a coat hanger) it may be a very simple simple probe solution. Any thoughts by the group on the concept?

    Zprobeconcept.PNG
     
  10. Jeff Mercado

    Jeff Mercado Member

    Joined:
    Aug 12, 2013
    Messages:
    41
    Likes Received:
    32
    I am still thinking about doing this without the servo. I have a ABS prototype started. I made a simple T slot holder to position the hanger arm and a little JB Weld to secure it. It stows in the up position and can be manually lowered into the probing position. Very smooth action, and yet no slop so it is a good clean mechanical action. The concept is to get it to run the grid with it in the down position and then pause the process... then you stow it and un pause. I will dig into Ziggy's firmware next and see if it is easy enough for me to do (yikes).

    Another thought I had was to reverse the signal from the opto with a simple p-channel mosfet with a pull down resistor to ground on the gate. In this manner the switch will be at a high level until the opto-interrupter is tripped. I think I will just try to get Ziggy's working then see if the mosfet design makes it any easier if I can get it that far. Anyways, looking for thoughts, advice, or mockery from the crew. Attached are some pics thus far... We'll see if the 2mm coat hanger trips the opto interrupter consistently enough. I could put a 1 MM sleeve on the top to get it to better block the opening. The prototype below needs to have the top part of the hangar trimmed off and the opto fitted/attached. They don't like excessive heat someone said so I have some airflow holes in there to assist in the E3D cooling flow and opto cooling. IMG_20150227_215713.jpg IMG_20150227_215728.jpg Screenshot_2015-02-27-22-29-00.png Screenshot_2015-02-27-22-29-26.png
     
    2 people like this.
  11. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    Concept is great and should work fine.

    Couple of suggestions

    - Place the opto interrupter well away from any heat or where it will be cooled by a fan. They don't like much heat.

    - If you are wanting to reverse or control the opto interrupter output trip signal level it probably would be best to use a simple comparator (eg LM311) rather than schmitt trigger or mosfet.

    And if you want any help with the firmware just pm me.
     
  12. Jeff Mercado

    Jeff Mercado Member

    Joined:
    Aug 12, 2013
    Messages:
    41
    Likes Received:
    32
    I am close now. Ziggy mentioned too much power through it may make the mosfet in the opto interrupter fail over time. I redesigned it to ensure less than 1ma is going through it at any time, and use a transistor (2n7000 mosfet - but any transistor will work,) to drive a LED so I know when it is "tripped/blocked." I got it running on a breadboard, then rigged it up on the mount. If it works (it should) I may make a circuit board to clean it up, but the components fit OK. 4 resistors, 1 mosfet, 1 LED and a salvaged opto interrupter. 3 wires: 5V, Gnd and Signal. The signal is high when the beam is interrupted. For a proto, a little messy, but here is a picture of the back of it, and a video showing off printer operation and the front.


    If that doesn't work the title is "Zprobe prototype for robo3d"

    IMG_20150301_140016.jpg

    The wires I have are not braided so not appropriate for mounting yet, but the next steps are to wire it up and play with the firmware. (I dread that)
     
  13. Jeff Mercado

    Jeff Mercado Member

    Joined:
    Aug 12, 2013
    Messages:
    41
    Likes Received:
    32
    With a little help from Ziggy on the firmware, it is up and running. I have probed the grid.
    The firmware was easier than I thought: I am using the the "stock" Auto_Level_7_17_516.
    Changes to the firmware besides my LCD, and hot end settings:
    1. uncomment the baby stepping (enables baby stepping) Uncomment #define BABYSTEPPING in configuaration_adv.h
    2. uncomment auto leveling (enables auto level routine) #define ENABLE_AUTO_BED_LEVELING // Delete the comment to enable (remove // at the start of the line)
    3. change "const bool Z_MIN_ENDSTOP_INVERTING = true;" to false (Thanks Ziggy!) since ours is 5v triggered
    4. measure the offsets to the probe and place them in the firmware.
    5. determine and enter your probe offsets, and how much to raise Z during homing and probing.
    I am using 10 and 200 probe_bed_end_positions in config.h.
    #define LEFT_PROBE_BED_POSITION 10
    #define RIGHT_PROBE_BED_POSITION 200
    #define BACK_PROBE_BED_POSITION 200
    #define FRONT_PROBE_BED_POSITION 10


    These were the numbers for my probe but of course they all will differ depending on mounting and in this case probe length:
    #define X_PROBE_OFFSET_FROM_EXTRUDER 28
    #define Y_PROBE_OFFSET_FROM_EXTRUDER 4
    #define Z_PROBE_OFFSET_FROM_EXTRUDER -6.7

    I used the instructions here, but they are throughout the forums: https://github.com/MarlinFirmware/Marlin/blob/Development/Documentation/BedLeveling.md
    You don't use the M401 or M402 steps since your probe is manually raised lowered.

    I used 10mm to c lear my probe, but even before that, the probe gently slides along the bed so not a critical requirement.
    #define Z_RAISE_BEFORE_HOMING 10 // (in mm) Raise Z before homing (G28) for Probe Clearance.
    and also here:
    #define Z_RAISE_BETWEEN_PROBINGS 10 //How much the extruder will be raised when traveling from between next probing points

    ** You do not need to enable servos or jumper the board for power. Just use the +, -, and S in the same locations the current Z stop switch is plugged into.
    RAMPSendstopConboard.JPG

    I will probably do another probe and wire it up cleaner but it is operational! I'll post a video of it in action soon.
     
  14. Jeff Mercado

    Jeff Mercado Member

    Joined:
    Aug 12, 2013
    Messages:
    41
    Likes Received:
    32
    And the results are in...



    Zprobe results.PNG

    I ran 21 probes to test the accuracy. The standard deviation among the points on the grid is .05... but... the orange runs were completed without a G28 between them to re-home between each. As I look at them it appears I had some Zdrift as the numbers get slightly higher. All but 2 of the points' MAX numbers fall within that range. Maybe I will try to lower the Z acceleration, but I won't run this test again (an hour of my life I'll never get back) but it confirms this is a viable probe for me. I just printed a test ring filling the bed in size, never would have tried that before and it put down a smooth, level first layer! Game-changer! Baby-stepping still required as I don't have my M565 perfectly tuned but VERY EASY!

    My startup code:
    G21 ; milimeters
    G90 ; absolute coords
    G1 Z10 ;ensure the probe doesn't drag when going to G28 homing next time
    G28 ; Home all axes
    G1 Z10 F4800
    M565 Z6.7; set probe offset
    G29 ; probe bed
    G1 Z8.00 F4800 ; get ready to move
    G1 X100 Y110 F4800 ; move to center
    G4 S10 ; dwells for 10 seconds - LCD says "Sleeping..." when this is done - stow probe
    G1 Z0.3


    ** Final thoughts... I started this project with the simpler is better mindset. Well... the design process wasn't simple for me, and the firmware learning curve was steep, and I had to do some soldering... of course it would have been easier to just build the servo version (I have since received the extensions for the servo cables so I have the parts) but I couldn't be more pleased. For me this wouldn't have been possible without the great contributions of Ziggy and Mike Kelly on bed leveling. I am grateful for such a good community of users as we have on this forum.
     
    Ziggy, Mike Kelly and mark tomlinson like this.
  15. Jeff Mercado

    Jeff Mercado Member

    Joined:
    Aug 12, 2013
    Messages:
    41
    Likes Received:
    32
    This has been such a game changer. The M565 amount is tuned in now. Now I can print without even babystepping and have two prints using nearly the full bed with a perfect layer and no warping on ABS. I never could have achieved this twiddling the rods. Why did I wait so long!!? This has been a wild success for me.

    The "rats nest version" on the printer is working so well I don't want to change anything now, but I have designed and etched a board to clean it up. I'll probably do a proto-board version as well to show anyone interested that they can do the same. I purchased 5 ITR9606 optos off ebay with free shipping for $5 since I don't know the type of the salvaged piece and they seem to be very common. I want to make one that someone else could copy if they were so inclined. I'll build a couple and verify they work. The current through the opto is so low (1ma or less) it won't burn out and 3 hours into a print the temperature (laser temp tested) was 35C on the opto itself and the hangar metal was 47C. The tip is only about 8mm from the hot bed at the end so it conducts heat up the shaft. These temps should keep the opto well within the optimal temp range (<85C). I'll stop bombing this thread until the final builds so others can see a decent one built.
    ThroughHole.PNG
    This board is 60mm by 16.5mm

    I will also try a SMD version, the etched board appears workable at 27mm x 14mm but the soldering will be a little tougher.

    smdversion.PNG

    Knowing how well it works... I would now just buy a $5 opto board off ebay and use the hangar setup here. Others have said that the M565 value has changed on them for unknown reasons on their setups, and I can't help but wonder if it is related to the servo or the non-opto switches. Mechanically, there just isn't anything to shift or wear on the this version, and it is so easy to stow it after the grid during the 10 second pause. I suspect it may be a little more accurate with a couple less variables in the mix. The failures Ziggy experienced (too much amperage in the opto, and possibly heat) appear not to be a factor on this design but I am not a volume printer so only time will tell.
     
  16. Ziggy

    Ziggy Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    707
    Likes Received:
    530
    If you want to get PCB prototypes done I would suggest OSH Park (US Based). The guy who runs OSH Park does a great job and sends 3 copies of your proto PCBs anywhere in the world for a standard per square inch cost.
     
  17. Jeff Mercado

    Jeff Mercado Member

    Joined:
    Aug 12, 2013
    Messages:
    41
    Likes Received:
    32
    I sent off the Eagle file to OSH Park... 3 weeks later boards in hand.... but I messed them up since they were made for my etching and I modified the holes to be too small, so I corrected that and resent them. 3 weeks later and I had 6 boards in hand. I produced a few etched versions to test in the mean time. I still have the original rats nest on my printer. I just can't bring myself to take it off. It is so dialed in I haven't tweaked a rod or used babystepping. I just clean the board, lay down the hairspray and print. Perfect first layers!

    I think I am done now. Here you see the finished products. All tested, all working.



    Giving back to the community... if anyone wants one in the US for the cost of shipping (envelope and mail) I'll send one off, PM me with an address. I will give away 2 SMD versions from OSH, 1 etched, 2 through hole from OSH and 2 etched. All have same components. Recipients will have to glue the rods in place after trimming it to size, grinding flat the top of the rod and rounding the bottom. A dremel is all you will need. Glue the handle in place and you are set (they are just press fit now).
     
    Mike Kelly and mark tomlinson like this.
  18. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,958
    Likes Received:
    7,344
  19. Mike Kelly

    Mike Kelly Volunteer

    Joined:
    Mar 11, 2013
    Messages:
    6,967
    Likes Received:
    2,278
    That's slick. Though I don't fully understand what drives the probe
     
  20. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,958
    Likes Received:
    7,344
    Unobtanium. Or Dilithium crystals. One of the two.

    :)

    Its cool ...
     

Share This Page