To add onto the video +ThanktiK shared. I shamelessly copied his design and integrated it into my RoBo3D.
I did take a new approach for it. He used a long lever arm switch where I figured out if you put the switch at an angle you could activate it properly and highly repeatably.
For the solenoid I used this one from sparkfun: Solenoid - 5V (Small) - ROB-11015 - SparkFun Electronics Adafruit sells a very similar one as well.
You need to use a mosfet circuit similar to this: http://i.imgur.com/Bbs3Mmg.png
With a voltage converter to turn 12v into around 5v. 10pcs Ultrasonic Module Hc-sr04 Distance Measuring Transducer Sensor Arduino for sale online | eBay
While you’re on ebay you should get some jst 2.0 ph connectors for the solenoid: http://www.ebay.com/itm/121357773068?_trksid=p2059210.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT
The firmware modifications took a while for me to understand but with the help of @ThantiK and donhuevo from Robo3d forums I was able to nail down the changed needed for it to work.
You first need to enable automatic bed leveling if you haven’t. This should be custom configured for your own printer. With it the Z_Probe offset
uncomment #define PROBE_SERVO_DEACTIVATION_DELAY 300
uncomment #define NUM_SERVOS and set the value to at least 1
Then uncomment
#define SERVO_ENDSTOPS {-1, -1, 0} // Servo index for X, Y, Z. Disable with -1
#define SERVO_ENDSTOP_ANGLES {0,0, 0,0, 0,0} // X,Y,Z Axis Extend and Retract angles
I set all the angles to 0, but you need to enable that from some remnant code
Now is where things get dirty, you need to go into marlin main and look for engage_z_probe
You can uncomment the engage_z_probe and replace it with this code:
static void engage_z_probe(int d = 100) { //lower z probe
digitalWrite(Z_PROBE_PIN, HIGH);
delay(d);
}
then do the same for retract_z_probe:
static void retract_z_probe(int d = 100) { // raise z probe
digitalWrite(Z_PROBE_PIN, LOW);
delay(d);
}
You can look at my complete code here: Dropbox - MK_Probe_Level_Dual_12-13.zip - Simplify your life




