Welcome! Log In Create A New Profile

Advanced

Auto Bed Leveling, With a switch?

Posted by Draytology 
Auto Bed Leveling, With a switch?
January 15, 2017 05:30PM
I want to set up auto bed leveling on my printer. I don't have an induction probe, but I do have an assortment of switches. I choose one I sourced out of a microwave door a while back. It has a very light button and after examining it, it seems to be very accurate. It is a NO switch. My questions are, on the endstops when the switch is closed, which wires get connected, the ground and signal? I know that the Arduino freaks out if you accidently bridge the wrong two so I want to make sure I have this right. Would I be able to hook this switch to the black and green wire terminal and just set it up in the firmware or is there more to it I am missing. And assuming this switch is an consistent as I believe can I expect similar results?
Re: Auto Bed Leveling, With a switch?
January 15, 2017 05:55PM
Do I need to add a resistor?
Re: Auto Bed Leveling, With a switch?
January 15, 2017 06:14PM
as long as the IO port is set to input and not output, its not an issue you can short them all you like. The endstop pins are set to be inputs

So yes connect gnd and signal, Ie like all two wire mechanical endstops.

You will need to enable internal pullups if you expect to see a high signal ever. (ie when switch is open)
Re: Auto Bed Leveling, With a switch?
January 15, 2017 06:23PM
While adjusting one of my endstops I accidentally shorted the pins with a screwdriver and my Arduino dissconnected, that's why I'm a little wary. Right now I have my switch wired to a spare stepper motor plug with the red and blue wires removed. I have a 1k resistor wired in only because I wasn't sure. I was about to test it then if it works get started on the firmware and bracket,

Edited 1 time(s). Last edit at 01/15/2017 06:26PM by Draytology.
Re: Auto Bed Leveling, With a switch?
January 16, 2017 08:42PM
Well I printed a bracket to hold the switch to the back of my stepper motor. While eyeballing the fitment and placement of the switch I ran into my first problem that should have been obvious but didn't think of it at the time I decided to try this. the switch, even though it only has about a 1mm stroke until engagement would have to be mounted slightly lower than nozzle to work which would cause obvious problems. So I was thinking about a way to work around this. What I came up with so far is to put a nickel at each corner of my build plate and dial it in so the extruder goes to each of those spots during aout leveling without going nozzle first. I will eventually get a proper induction type switch but if I can get this to work I might put it off because I really do not want a metal sheet on or under my build plate, trying to keep weight down. I might have to scrap the idea but I going to try just for fun.
Re: Auto Bed Leveling, With a switch?
January 17, 2017 03:20AM
There are several designs on thingiverse using an allen head screwdriver as extension to trigger the switch.

see attached pic for an example with the probe in parked position, ready to print.

Edited 1 time(s). Last edit at 01/17/2017 03:22AM by o_lampe.
Attachments:
open | download - allen head probe.jpg (200.8 KB)
Re: Auto Bed Leveling, With a switch?
January 17, 2017 04:39AM
Or you could mount a servo and fix the switch to the servo arm, then rotate servo so switch activates lower than the nozzle and then retracts after levelling
Re: Auto Bed Leveling, With a switch?
January 17, 2017 12:23PM
Thanks for the tip I looked into the servo idea and it's not as difficult as I was expecting. I also have a microservo laying around so I am definitely going with that. Printing the bracket now! I can't find much info on the wiring of a different switch, particularly if I can just wire the switch in or if I need resistors in the circuit or something. I am just paranoid about damaging my Arduino. I am a little worried about adding weight to my gantry, especially with the way it is designed but I should be fine.
Re: Auto Bed Leveling, With a switch?
January 17, 2017 02:32PM
Just wire the switch to Z_MIN gnd and signal pins, no resistor needed just make sure Zmin endstop pullup is enabled in config.h(which it will be if you have removed the // from #define ENDSTOPPULLUPS)

Edited 1 time(s). Last edit at 01/17/2017 02:32PM by obewan.
Re: Auto Bed Leveling, With a switch?
January 17, 2017 03:34PM
Ok cool thank you for letting me know I just wanted to be sure before I start making mods to my Ramps.
I didn't enable the endstop pullup because I guess that is how it is default when I downloaded it.

// coarse Endstop Settings
#define ENDSTOPPULLUPS // Comment this out (using // at the start of the line) to disable the endstop pullup resistors

#ifndef ENDSTOPPULLUPS
// fine endstop settings: Individual pullups. will be ignored if ENDSTOPPULLUPS is defined
// #define ENDSTOPPULLUP_XMAX
// #define ENDSTOPPULLUP_YMAX
// #define ENDSTOPPULLUP_ZMAX
// #define ENDSTOPPULLUP_XMIN
// #define ENDSTOPPULLUP_YMIN
// #define ENDSTOPPULLUP_ZMIN
#endif

#ifdef ENDSTOPPULLUPS
#define ENDSTOPPULLUP_XMAX
#define ENDSTOPPULLUP_YMAX
#define ENDSTOPPULLUP_ZMAX
#define ENDSTOPPULLUP_XMIN
#define ENDSTOPPULLUP_YMIN
#define ENDSTOPPULLUP_ZMIN

I am still learning the basics of code but I am pretty sure I am good to go! Thanks Again.

I printed out all the parts I need even though the mount is meant for a Prusa printer I should be able to mount it to my Nema on my extruder pretty easily.
Re: Auto Bed Leveling, With a switch?
January 21, 2017 07:52PM
Thanks for all the help guys I just got done setting up auto bed leveling and it went very smooth. For some reason there is some jitter in my servo whenever there is power going to my steppers, I am not sure if there is anything I can do to fix that but otherwise working very well. I am about to run my first print to see if it improves first layer quality. I finally took a couple pics of my setup I will post in a few. I tried to record a video of it printing at about 30mm/s but it was having some issues and freezing.

I can't post pictures because they are too big, so I posted them on this site in case anyone is interested. If it doesn't work let me know I just opened an account specifically for this.
[imgur.com]
[imgur.com]
[imgur.com]
[imgur.com]
[imgur.com]
[imgur.com]

Edited 2 time(s). Last edit at 01/21/2017 08:30PM by Draytology.
Re: Auto Bed Leveling, With a switch?
January 21, 2017 08:52PM
It seems like my printer is having a lot of trouble printing while having to do the extra processing of the bed level, I have not been able to get a print , it keeps saying connection timeout. Does anyone have any suggestions?
Re: Auto Bed Leveling, With a switch?
January 21, 2017 09:12PM
Switched to a different print and it seems to be performing better.
Re: Auto Bed Leveling, With a switch?
January 22, 2017 12:22AM
re servo jitter, you probably over loading your power supply

wire up a separate power supply to provide 5v to your servo, a 7805 to the 12v line will do..
Re: Auto Bed Leveling, With a switch?
January 22, 2017 01:12AM
I am very happy with the results of auto bed leveling using a switchthumbs up. It really increases the quality of first layers, which raises the quality of prints as a whole. It was very easy to set up and I definitely recommend this upgrade to anyone considering it. Inductive probes have an advantage in having less moving parts but this was a very simple install and I personally wanted to keep my glass build plate as is. I can't imagine needing more accuracy, using the g29 command I did a couple laps and was able to achieve consistent readings within 1 100th of a mm. The switch I used has a very light enegagement, so I don't have to worry about it pushing down the build plate or flexing my extruder assembly. I used digital calipers to ensure it's trigger point was consistent in advance also.

Now I just have to do some wire management and also figure out why my servo jitters so much while printing. If anyone knows please let me know.
Re: Auto Bed Leveling, With a switch?
January 22, 2017 01:25AM
I think you might be right. Ever since I added the bigger motor I am right on the edge of what my PSU is capable of. I tried increasing the voltage the other day and it cut out. It is only rated for 3.43A at 19.5 volts. I usually draw 2.5 to 3.5 so I am probably only getting away with it since I am at 12v. I am looking for another PSU to either upgrade to or a seperate one and maybe control my hotend with a relay or something. I will look for a old cell phone charger to hook the servo up to and see if it helps.
Re: Auto Bed Leveling, With a switch?
January 24, 2017 09:32AM
To anyone looking to set up auto bed leveling that comes across this thread this is how I set it up.
Once you have auto bed leveling hooked up and loaded into your firmware you can verfiy it is working by using the G29 command. If it works and you have it tuned to where you are satisfied you are good to go!

To use this feature with your prints:

1) Load your model you will be printing.
2) Go into g code editor.
3) Add "G29" directly after the homing command "G28".
4) Save and overwrite the file.
5) Re-load file and print!
* It will not work if you simply use G29 and then load your file and print. It has to be a part of the g code for the file you are printing as far as I know.

If anyone knows an easier way please feel free to share but this is the method I use and it has worked great for me.
These steps are specificallly for Repetier, but I am sure they will apply to other programs like Pronterface.
Re: Auto Bed Leveling, With a switch?
January 25, 2017 03:58AM
Can't you put the G29 in the start code of the slicer? That way you don't have to edit the gcode file.
Sorry, only registered users may post in this forum.

Click here to login