<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[SoliForum - 3D Printing Community — Bed Level Sensor experiment]]></title>
		<link>https://www.soliforum.com/topic/4707/bed-level-sensor-experiment/</link>
		<atom:link href="https://www.soliforum.com/feed/rss/topic/4707/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Bed Level Sensor experiment.]]></description>
		<lastBuildDate>Sat, 01 Mar 2014 05:03:06 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/51167/#p51167</link>
			<description><![CDATA[<p>I just saw this <a href="http://deltabot.tumblr.com/post/78006548776/instead-of-the-retractable-z-probe-now-using">http://deltabot.tumblr.com/post/7800654 … -now-using</a> today, and remembered this thread. <img src="https://www.soliforum.com/img/smilies/smile.png" width="15" height="15" alt="smile" />&nbsp; (Didn&#039;t see you had it working btw, nice!)</p>]]></description>
			<author><![CDATA[null@example.com (spapadim)]]></author>
			<pubDate>Sat, 01 Mar 2014 05:03:06 +0000</pubDate>
			<guid>https://www.soliforum.com/post/51167/#p51167</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/47290/#p47290</link>
			<description><![CDATA[<p>congratulations! thats neat for sure and probly looks alot better than the ztop on a servo arm.</p><p>now increase the angle and challenge it some more!</p>]]></description>
			<author><![CDATA[null@example.com (MolecularConcept)]]></author>
			<pubDate>Tue, 21 Jan 2014 03:13:16 +0000</pubDate>
			<guid>https://www.soliforum.com/post/47290/#p47290</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/47286/#p47286</link>
			<description><![CDATA[<p>OK, the magic has happened! It works:</p><p><a href="http://home.comcast.net/~tomhorsley/hardware/solidoodle/solidoodle-bedlevel.html#Working!">http://home.comcast.net/~tomhorsley/har … l#Working!</a></p><p>I printed 4 perfect test cubes on a solidoodle that has the z-stop screw cranked down about a millimeter too far and the front left bed leveling screw cranked down about 2 millimeters, yet the cubes come out perfect:</p><p><span class="postimg"><img src="http://home.comcast.net/~tomhorsley/hardware/solidoodle/bedlevel/worked-top-view.jpg" alt="http://home.comcast.net/~tomhorsley/hardware/solidoodle/bedlevel/worked-top-view.jpg" /></span></p>]]></description>
			<author><![CDATA[null@example.com (Claghorn)]]></author>
			<pubDate>Tue, 21 Jan 2014 02:27:36 +0000</pubDate>
			<guid>https://www.soliforum.com/post/47286/#p47286</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/47162/#p47162</link>
			<description><![CDATA[<p>Either reprap, or you can read the list of commands right in Marlin firmware.</p>]]></description>
			<author><![CDATA[null@example.com (Hazer)]]></author>
			<pubDate>Sun, 19 Jan 2014 13:33:19 +0000</pubDate>
			<guid>https://www.soliforum.com/post/47162/#p47162</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/47160/#p47160</link>
			<description><![CDATA[<p>I&#039;ve tried it now, and I think something about my setup is confusing the microcode - I haven&#039;t found every place that needs to change yet.</p><p>It may be paying attention to the z-stop switch all the time even though I&#039;ve tried to arrange for it to be used only as the starting place for me to measure the bed level (which always goes beyond the z-stop).</p><p>Of course, I also may just be doing something completely idiotic because I don&#039;t know what everything I&#039;m calling actually does :-).</p>]]></description>
			<author><![CDATA[null@example.com (Claghorn)]]></author>
			<pubDate>Sun, 19 Jan 2014 13:26:13 +0000</pubDate>
			<guid>https://www.soliforum.com/post/47160/#p47160</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/47155/#p47155</link>
			<description><![CDATA[<p><a href="http://reprap.org/wiki/G-code">http://reprap.org/wiki/G-code</a> for standard stuff<br />the autobed level stuff though is mainly commented in the marlin readme and the source code.</p>]]></description>
			<author><![CDATA[null@example.com (adrian)]]></author>
			<pubDate>Sun, 19 Jan 2014 05:50:15 +0000</pubDate>
			<guid>https://www.soliforum.com/post/47155/#p47155</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/47154/#p47154</link>
			<description><![CDATA[<p>is there a G code library? where it defines waht all the G and M commands mean?</p>]]></description>
			<author><![CDATA[null@example.com (MolecularConcept)]]></author>
			<pubDate>Sun, 19 Jan 2014 05:48:31 +0000</pubDate>
			<guid>https://www.soliforum.com/post/47154/#p47154</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/47147/#p47147</link>
			<description><![CDATA[<p>Yup. And it requires you to send a G28 code right before you do that (also in the start code).</p>]]></description>
			<author><![CDATA[null@example.com (Hazer)]]></author>
			<pubDate>Sun, 19 Jan 2014 03:54:51 +0000</pubDate>
			<guid>https://www.soliforum.com/post/47147/#p47147</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/47139/#p47139</link>
			<description><![CDATA[<p>OK, my latest firmware change seems like it might be working now:</p><p><a href="http://home.comcast.net/~tomhorsley/hardware/solidoodle/solidoodle-bedlevel.html#Results">http://home.comcast.net/~tomhorsley/har … ml#Results</a></p><p>but I realize I still have a foolish question: &quot;How do I use it?&quot; :-).</p><p>I assume I need to wedge a G29 bed probe command into the start code before it prints?</p>]]></description>
			<author><![CDATA[null@example.com (Claghorn)]]></author>
			<pubDate>Sat, 18 Jan 2014 23:34:03 +0000</pubDate>
			<guid>https://www.soliforum.com/post/47139/#p47139</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/46258/#p46258</link>
			<description><![CDATA[<p>Wow auto bed leveling is cool but writing firmware sounds tricky as hell!</p>]]></description>
			<author><![CDATA[null@example.com (MolecularConcept)]]></author>
			<pubDate>Thu, 09 Jan 2014 18:45:00 +0000</pubDate>
			<guid>https://www.soliforum.com/post/46258/#p46258</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/46236/#p46236</link>
			<description><![CDATA[<p>Actually that does make sense to me :-). Thanks. I guess that combined with the reading I&#039;ve already been doing in the code helps.</p><p>I don&#039;t think I need to involve the stepper code with checking the analog input. (And I didn&#039;t invent the timer event to read the analog input, that timer was already there, and without major restructuring of the microcode it is where all analog inputs must be read since it is in control of the ADC mux - in fact without major modifications it can&#039;t read more than 4 analog values, so I&#039;ve just stolen one to use for my FSR).</p><p>My current plan (which I think I&#039;ve decided I can wedge into the microcode) is something like this:</p><p>1. Physically adjust the z-stop screw so the nozzle will be above the bed at least a little when it is hit.</p><p>2. Teach run-z-probe() to first home to the endstop, then disable the endstop and move just a little bit at a time till it sees the analog value change.</p><p>There is already an ifdef flag that says ENDSTOPS_ONLY_FOR_HOMING, so if that actually works, I can turn it on, and no one will be paying attention to the endstop or the analog value except when homing, when I&#039;ll know what is going on.</p><p>No doubt I&#039;ll have to include some geometry checks so I won&#039;t try to detect the nozzle touching the bed when I happen to be positioned off the bed surface.</p><p>At some point I might actually want to make it pay attention to the analog value all the time for really large changes so it can possibly detect the case where a large piece just got knocked at an angle and is jammed between the nozzle and the bed (but that&#039;s just a possible future frill).</p><p>And if I can&#039;t get any of that to work, I can always just write a stand alone program to use what I have now to detect the bed level and tell you exactly how much to turn each leveling screw and the z-stop screw to get into perfect adjustment :-).</p>]]></description>
			<author><![CDATA[null@example.com (Claghorn)]]></author>
			<pubDate>Thu, 09 Jan 2014 13:18:59 +0000</pubDate>
			<guid>https://www.soliforum.com/post/46236/#p46236</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/46208/#p46208</link>
			<description><![CDATA[<p>Auto bed level uses a single switch. It also requires you to home all axis (G28) before you run the auto level command (G29). This is because the auto bed level uses absolute positioning for the probe points. </p><p>Also try to remember the code was written with the idea of using a servo to swing the switch out. So, if you home Z or home All, it swings the switch down and then uses that to &#039;home&#039;. Then, you run the auto level command and it will (again) swing the switch down and probe three points on your bed. These three points (and not the first one) are used to calculate the correction factor. As a matter of fact, the G28 command will zero out the correction factors. Take a look at some of the introduction youtube videos to see that the switch for homing is the same for the auto level.</p><p>Now, Adrian can correct me if I am wrong, but the Z probe function just tells the Z axis to move down (further than it expects to go).&nbsp; The homing functions work the same way. It tells the axis to move 1.5 times farther than the axis length is defined. In other words, it is commanded to purposely hit the endstop. In the stepper.cpp file is the stepper Interrupt routine, which constantly checks the endstops while it writes the &#039;steps&#039; to the output pins. If an endstop is defined, and is triggered, the MCU no longer writes any more &#039;step&#039; outputs until the move is finished. The planner then knows what position it is in.</p><p>So. </p><p>What nobody has told you yet is that you will need to get pretty creative here. If you try to rewrite the stepper interrupt service routine, you will be hosed if you run a G28, since the nozzle will NOT be under the print surface after it homes X and Y. Possible fix would be to add an X/Y move to place the nozzle over the bed before it runs the HOME[Z-AXIS] in the G29 command.</p><p>I have no idea how you plan to insert the analog value into this to begin with. It sounds like your using a timer event to read the analog input. At the time you read the analog value, you should set/clear a bool value (as in HIT or NOT HIT). This could be the value you would evaluate in the stepper interrupt (instead of the Z switch pin). My only concern is that if you use one interrupt to read an analog value and another interrupt to write stepper output pulses governed by that analog value, your analog routine better run at nearly the same speed as the stepper routine or else the stepper will move much farther than what your sensor tells you it should stop.</p><p>Quite frankly, this is alot of firmware work, with a great opportunity for introducing alot of bugs into the system (analog noise cause and endstop hit when nowhere near the print surface, or what about when the nozzle hits a curled up edge in the middle of a print job?). Honestly, a much easier solution would be to run the sensor into a separate comparator that can output a digital high/low signal that would then be input to the MCU. Its more hardware, but you leave the fimrware alone. Although, this would still require you to perform an alternate method of homing all your axis before running the G29 command.</p><p>EDIT: reading what I posted sounds pretty ugly. If you want me to, I can post in laymans terms what is happening during the homing and auto-bed-level functions in another post. Then what I said might make more sense.</p>]]></description>
			<author><![CDATA[null@example.com (Hazer)]]></author>
			<pubDate>Thu, 09 Jan 2014 04:22:51 +0000</pubDate>
			<guid>https://www.soliforum.com/post/46208/#p46208</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/46185/#p46185</link>
			<description><![CDATA[<p>I&#039;ve been reading the run_z_probe() code, and things would be a lot easier if I knew what was actually going on :-).</p><p>In the existing bed level setup, are the bed probe switches on the carriage connected to the same pin as the z-stop switch? Is the code measuring the position at normal Z home, then measuring it again after swinging down the probe and using that difference to drive the algorithm?</p><p>If I&#039;ve got that right, I&#039;d just have to home the Z axis, then disable the checks for the Z stop and move the bed manually (slowly I turned) till I monitored a change in resistance, perhaps backing off and enabling the z axis micro stepping to get the most accurate position estimate.</p><p>Am I on the right track here? I hate chasing wild geese :-).</p>]]></description>
			<author><![CDATA[null@example.com (Claghorn)]]></author>
			<pubDate>Wed, 08 Jan 2014 23:37:09 +0000</pubDate>
			<guid>https://www.soliforum.com/post/46185/#p46185</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/45889/#p45889</link>
			<description><![CDATA[<p>The progress continues! I now have firmware that adds a new command to tell me what values I&#039;m been seeing on the analog pin I have connected to the force sensitive resistor, and I can run it in the manual control scree of RH and see different values when I&#039;m not touching and touching the nozzle. (I&#039;ve included a patch to the beta firmware on my web page showing exactly what I did - probably somewhat kludgy, but it works).</p><p>Still have to figure out how the heck to interface with the existing bedlevel code, but it does occur to me that I could write a stand alone program now to move the head around and measure the level at different positions and tell me how much to adjust the screws by to level the bed :-).</p>]]></description>
			<author><![CDATA[null@example.com (Claghorn)]]></author>
			<pubDate>Mon, 06 Jan 2014 01:40:15 +0000</pubDate>
			<guid>https://www.soliforum.com/post/45889/#p45889</guid>
		</item>
		<item>
			<title><![CDATA[Re: Bed Level Sensor experiment]]></title>
			<link>https://www.soliforum.com/post/45787/#p45787</link>
			<description><![CDATA[<p>Meanwhile, I&#039;ve been digging through the firmware and have reached a point of confusion about how to proceed. Is there any good place where a discussion of the innards of Marlin might provide good results? My problem at this point is the best way to add my analog input to the interrupt routine that polls all the analog inputs in temperature.cpp. Do I pretend the FSR is a thermistor and ifdef code elsewhere using the results? Do I add new cases to the switch and screw up the timing that appears to expect 8 cases in the switch? Do I add complicated ifdefs to replace one of the thermistor cases with an FSR case? Do I doulbe the number of cases in the switch and double the frequency of interrupts so the timing will be the same?</p>]]></description>
			<author><![CDATA[null@example.com (Claghorn)]]></author>
			<pubDate>Sun, 05 Jan 2014 00:32:17 +0000</pubDate>
			<guid>https://www.soliforum.com/post/45787/#p45787</guid>
		</item>
	</channel>
</rss>
