<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Ultrasonic Z-height sensing?</title>
        <description>dc42 has done sterling work with the IR sensing and continues to explore [url=http://forums.reprap.org/read.php?340,310337]other solutions[/url]. I have another proposal which I think ought to have it&#039;s own topic to avoid any hijacking!

A 40kHZ Ultrasonic source and receiver can measure time-of-flight to and from the bed to within a few millimeters, and switch to phase comparison for final homing below 8mm (25us/cycle * 340um/us = 8500um or 8.5 millimeters per cycle). It should be a pretty clean return from the plane surface of the bed and could perform the X homing using a tab on the back of the X motor (similar to the original IR homing technique). I&#039;ve done some ranging with ultrasound using PIC chips and obtained good results so it should fly. Any comments?</description>
        <link>https://reprap.org/forum/read.php?340,310360,310360#msg-310360</link>
        <lastBuildDate>Fri, 11 Sep 2026 01:18:55 -0400</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,322572#msg-322572</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,322572#msg-322572</link>
            <description><![CDATA[ Not so easy to get hold of a 320kHz source and as you say Flyskyhy, the wavelength drops to 1mm so finding the right maximum is going to be all but impossible. Echo timing might be a better proposition but the ring-down for this frequency would still be subject to too large a blindspot. 30mm seems to be the ballpark figure for commercial U/S range detectors.]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Mon, 10 Mar 2014 06:39:55 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,322567#msg-322567</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,322567#msg-322567</link>
            <description><![CDATA[ Have you tried ultrasonic at higher frequency, like 320kHz? That should have much lower dependency on temperature. Of course, it will be harder to determine how many wavelengths you are from the bed.]]></description>
            <dc:creator>Flyskyhy</dc:creator>
            <category>Ormerod</category>
            <pubDate>Mon, 10 Mar 2014 06:18:48 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,322561#msg-322561</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,322561#msg-322561</link>
            <description><![CDATA[ Hi karabas, my printer has all original parts made in PLA so I've not dared use high bed temperatures even for testing. Air is a pretty good insulator though - if you could monitor the temperature at your IR sensor location (about 3mm above the bed) with the bed up at 120c that would be interesting to know. Otherwise we're just guessing really, but you would need to make sure the air was very still. I really have no idea if it would get above 80c. If you are using dc42's firmware (why would anyone not be using it?!?) your hot-end thermistor could tell us this temperature once it stabilized.<br />
<br />
I think the maximum operating figure of 85c is somewhat generic for many commercial (non-industrial) specifications, it might not be the actual "brick-wall" for using the transducer. What really counts, as far as I've seen, is the movement of the air. If I fan the air around with everything at room temperature there's absolutely no detectable change to the probe reading. As I step-up the heat in the bed, the reading becomes more variable as I fan the air (introducing a mix of air masses ranging from ambient to bed surface). The hotter the bed the more pronounced the effect. However, inside a full enclosure, I would expect a far more settled reading. Natural Convection could make it take a long time to stabilize though.]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Mon, 10 Mar 2014 06:10:13 -0400</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,321888#msg-321888</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,321888#msg-321888</link>
            <description><![CDATA[ I should point out that all the low-cost ultrasonic transducers I have looked at, and also the TCRT1000 IR sensor used in the original Z probe board and in my replacement, have an operating temperature range limited to 85C at the top end. So I can't recommend doing z-probing at bed temperatures much greater than this. For those printing in ABS, I suggest doing Z homing (and, if you want, bed-levelling) at 75C, and using one of the solutions discussed elsewhere on this forum to ensure that the bed height and level remain stable when the bed temperature is increased to 100C.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Sat, 08 Mar 2014 14:47:23 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,321834#msg-321834</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,321834#msg-321834</link>
            <description><![CDATA[ What does happen at 120C?  If I close my printer in a box to prevent side air moving will Z probe repeatable?]]></description>
            <dc:creator>karabas</dc:creator>
            <category>Ormerod</category>
            <pubDate>Sat, 08 Mar 2014 12:35:22 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,321659#msg-321659</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,321659#msg-321659</link>
            <description><![CDATA[ Hi karabas, good time for a summary so far: the two-transistor circuit I posted above [<a href="http://forums.reprap.org/read.php?340,310360,315946#msg-315946" target="_blank"  rel="nofollow">forums.reprap.org</a>] has been Z-homing my Ormorod directly in place of the original IR sensor board since I put it together last week. I would say it's very reliable at low temperatures (&lt;70c) but the effects of air temperature become more and more pronounced as it increases due to air movement.<br />
<br />
The circuit makes use of a handful of cheap components that some people might already have at hand - so I had been hoping a few more people might try it and pool results. The transistors could be any general purpose amplifier for instance BC108 or 2N2222 as alternatives. The rest of the values need to be the same (5% tolerance or better) although L1 and C1 can be juggled a bit so long as the combination remains resonant at 40KHz (e.g. 3.3nF/4.7mH).<br />
<br />
Ormorod uses the Z probe to home the X axis as well so a modification to the platform on the Z-motor mount may be required depending on where the Ultrasound transducer is fitted. dc42 shows an example of this kind of modification in the bottom photo of this post: [<a href="http://forums.reprap.org/read.php?340,310184,320781#msg-320781" target="_blank"  rel="nofollow">forums.reprap.org</a>] Mine is a bit of bent Meccano that I'm too ashamed to show.<br />
<br />
dc42 has rolled a superb all-in-one hot-end all-singing-all-dancing PCB that incorporates a driver for an Ultrasound source in addition to modulated IR sensing and other features but his Ultrasound driver and detection scheme are a little bit different to mine. Essentially though we are both using the fact that, at close range, a continuous wave from the source is measurably perturbed by constructive/destructive interference from it's reflection back from the bed surface. This can be seen in the earlier plots in this thread that look like a damped sine wave. Threshold detection can therefore be used to identify the occurrence of the peak and hence corresponding distance between moving hot-end and bed.]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Sat, 08 Mar 2014 05:06:52 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,321634#msg-321634</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,321634#msg-321634</link>
            <description><![CDATA[ Sorry, I did not fully understand - Is it ready for replication? or need further development?]]></description>
            <dc:creator>karabas</dc:creator>
            <category>Ormerod</category>
            <pubDate>Sat, 08 Mar 2014 03:31:20 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,320726#msg-320726</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,320726#msg-320726</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>dc42</strong><br />
If your first peak is at 6.4mm transducer face height and the second one at 11mm, then your half-wavelength is 4.6mm, and you should get another, larger peak at about 1.8mm face height if your transducer was lower. As this is such a low value, I suspect that your maxima correspond to my minima, and vice versa. This may mean that your oscillator is operating at the parallel resonant frequency, not the series one. Components L1 and C1 will also affect the resonant frequencies, as does the 4.7mH series inductor in my drive circuit. Does your oscillator still work if you increase L1 to 4.7mH and omit C1?</div></blockquote>
<br />
Yes it does, although harmonics start showing up in the waveform. With the two-transistor circuit driving the transducer, the reuslts are 180' out of phase when compared to direct-driving with the PIC chip. I've plotted both at different temperatures for comparison:<br />
<br />
[attachment 28101 zprobe3.png]<br />
<br />
The upper four plots are the PIC chip drive, the lower four are the transistor oscillator circuit (raw Z-probe readings against height of nozzle in mm). For all plots, I mounted the Transducer on the hot-end assembly and put the electronics at the other end of the cable to eliminate temperature effects and to do both sets using the same transducer in the same location.<br />
<br />
There sure is an awful lot going here. First up I can see that drafts are more of an issue at higher temperatures. The lower 100c plot was done with shielding to keep drafts to the minimum (It was the last run and I couldn't face re-doing all the others). One surprise is that the parallel resonant drive suffers from a greater reduction in the difference between minimums and maximums as temperature increases, and the fixed-frequency series resonant drive experiences a bigger spread of position over the same range of temperatures. Can you see anything I might be missing?]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Thu, 06 Mar 2014 11:42:52 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,320063#msg-320063</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,320063#msg-320063</link>
            <description><![CDATA[ Hi Radian,<br />
<br />
My sensor face is 3.05mm above the bed. The sensor had a grille on the front, so the actual piezo element is a few mm above the face. With the bed cold, I see the first peak (raw reading 870) at a nozzle height of 0.55mm, a broad minimum (410) at 3.4mm, the second maximum (670) at 4.9mm, and the second minimum (450) at 7.4mm. I use M558 P3 and G31 P600 Z1.0 T60 C0.003. So when homing from a height, the second maximum is 220 above the second minimum, and the first maximum is 460 above the first minimum. This gives plenty of discrimination between the two. I am driving the piezo at its series resonant frequency. The difference between the heights at the first and second maxima (4.35mm) represents half a wavelength.<br />
<br />
If your first peak is at 6.4mm transducer face height and the second one at 11mm, then your half-wavelength is 4.6mm, and you should get another, larger peak at about 1.8mm face height if your transducer was lower. As this is such a low value, I suspect that your maxima correspond to my minima, and vice versa. This may mean that your oscillator is operating at the parallel resonant frequency, not the series one. Components L1 and C1 will also affect the resonant frequencies, as does the 4.7mH series inductor in my drive circuit. Does your oscillator still work if you increase L1 to 4.7mH and omit C1?<br />
<br />
If you use M338 P3 instead of P2 then I think it should work for you, even though you a little less discrimination than I do.<br />
<br />
PS - in my next firmware release, I will modify the fine z-homing to allow 10mm additional travel instead of 1mm.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Wed, 05 Mar 2014 07:33:45 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,319642#msg-319642</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,319642#msg-319642</link>
            <description><![CDATA[ OK thanks dc42. I forgot to check your blog. I think I might be seeing a different response from the fixed frequency driver you're using (and I used before I settled on the resonant drive circuit). I quickly knocked out a python program to extract probe readings vs. height and pasted the output into a spreadsheet:<br />
<br />
[attachment 27974 zprobe1.png]<br />
<br />
That's the result of 3 runs at the same temperature. The face of the Ultrasound source is 2mm above the tip of the nozzle. The plot is of nozzle height and the first maximum is at 4.5mm and the secondary peak happens at 9mm.]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Tue, 04 Mar 2014 12:30:41 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,319580#msg-319580</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,319580#msg-319580</link>
            <description><![CDATA[ Hi Radian,<br />
<br />
I had similar problem when I was using unsuitable ultrasonic homing parameters. The modified homing sequence lowers at normal homing speed until 90% of the target Z probe reading is reached, then slows down and moves at most another 1mm. I could increase that 1mm to 10mm if you like, but z-homing from height would still be rather slow.<br />
<br />
You might like to try the ultrasonic probe support in the firmware, by using the M558 P3 command. This monitors the minima that have been passed as the probe is lowered and looks for the difference between the current and minimum values, which provides better discrimination between the main peak and the next peak, and (for my sensor at least), lower sensitivity to temperature. See the section about cailbrating the ultrasonic transducer near the end of [<a href="http://miscsolutions.wordpress.com/assembling-and-using-the-eschertech-ormerod-hot-end-board/" target="_blank"  rel="nofollow">miscsolutions.wordpress.com</a>].]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Tue, 04 Mar 2014 10:12:20 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,319563#msg-319563</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,319563#msg-319563</link>
            <description><![CDATA[ Hi dc42 - I've been using firmware version 0.57r-dc42 and can happily report that your modified Z homing sequence works well with the two-transistor Ultrasound circuit posted above. However, this is with the proviso that Homing is initiated when the nozzle is no more than 2mm above the bed. If the nozzle is any higher, homing always ends with the nozzle much higher than where it started from.<br />
<br />
So, for example, I get a Zprobe reading of 880 at 4.5mm and the next high is 833 at 9.0mm. So I set the threshold as G31 Z4.5 P880. Then starting with the nozzle 1mm off the bed I initiate Home Z. This finishes with the nozzle 0.05mm off the bed. All good.<br />
<br />
However, if I start homing from 5mm above the bed, it finishes with Z0 at 9mm off the bed. If I take it up to 4.5 (13.5 in reality) to see the Zprobe reading at this height it's 820, nowhere near the 880 threshold I set. So what caused it to trip there? Any ideas?]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Tue, 04 Mar 2014 09:24:17 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,319269#msg-319269</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,319269#msg-319269</link>
            <description><![CDATA[ Farnell have a few receivers left, and I already ordered one earlier today to try out. It will need to be driven at a different frequency because its resonant frequency is lower. I may need to find a way to configure the frequency from the Duet, unless I can get the on-board mcu to sense it automatically. However, enough people seem to be willing to pay a little more for me to order 10 or so from Mouser.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Mon, 03 Mar 2014 17:12:03 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,319223#msg-319223</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,319223#msg-319223</link>
            <description><![CDATA[ From your topic <a href="http://forums.reprap.org/read.php?340,310184,319137#msg-319137" target="_blank"  rel="nofollow">Re: Anyone interested in a modulated IR sensor + fan control + illumination board?</a><br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>dc42</strong><br />
One snag is that there has been a run on 10mm 40kHz ultrasonic transducers since I built the prototype, and neither Farnell nor RS has any in stock. This may delay the Kit 5s till sometime in April, unless I add £3 to the price and source more expensive ones from Mouser, or ship the Kit 5s without the transducer.</div></blockquote>
<br />
Are you using a Transceiver or a Transmitter? Receivers work pretty well too - AFAIK the only real difference is that transmitters have more mechanical damping to minimise ringing.<br />
<br />
These suppliers also have a variety of devices:<br />
<a href="http://www.rapidonline.com/FFSearchResults.aspx?sortPrice=asc&amp;followSearch=9942&amp;keywords=ultrasonic" target="_blank"  rel="nofollow">Rapid Electronics</a><br />
<a href="http://www.conrad.com/ce/en/Search.html;jsessionid=F673A78344ADDBEF37AB29651420C2E1.ASTPCEN32?search=ultrasonic&amp;sort=Price-asc" target="_blank"  rel="nofollow">Conrad</a><br />
<a href="http://cpc.farnell.com/jsp/search/browse.jsp?N=411+2005+212462&amp;Ntk=gensearch&amp;Ntt=ultrasonic&amp;Ntx=mode+matchallpartial&amp;getResults=true" target="_blank"  rel="nofollow">CPC</a><br />
(links to search results)]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Mon, 03 Mar 2014 16:12:35 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,317067#msg-317067</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,317067#msg-317067</link>
            <description><![CDATA[ I don't know what the definition of a Colpitts oscillator would be other than the use of a 180deg. phase shift amplifier and capacitive divider to shift another 180deg. to get things oscillating. Out of the two topologies I can only get the one I drew out above to work reliably... so far.]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Thu, 27 Feb 2014 13:48:04 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316963#msg-316963</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316963#msg-316963</link>
            <description><![CDATA[ Radian, I'm not convinced that circuit is a Colpitts oscillator at all. The designs I have used are similar to this <div id="div_1d0e47f60fefd4b8ea3e5368a79d3dcb"
     class="mod_embed_images"
     >

  

    
      
    

    <div id="imagediv_1d0e47f60fefd4b8ea3e5368a79d3dcb" class="mod_embed_images_image"
         >

    
      

      

      

      

      

      

      <noscript>
      <div>
    

    <a href="http://www.hqew.net/files/Images/Article/Circuit_Diagram/colpitts-crystal-oscillator-circuit.gif">
        <img src="https://reprap.org/forum/addon.php?340,module=embed_images,url=http%3A%2F%2Fwww.hqew.net%2Ffiles%2FImages%2FArticle%2FCircuit_Diagram%2Fcolpitts-crystal-oscillator-circuit.gif"
             
             
             id="image_1d0e47f60fefd4b8ea3e5368a79d3dcb"
             alt="colpitts-crystal-oscillator-circuit.gif"
             title="colpitts-crystal-oscillator-circuit.gif"/>
    </a>

    
      </div>
      </noscript>
    

    </div>

    <div class="mod_embed_images_info " id="info_1d0e47f60fefd4b8ea3e5368a79d3dcb"
      >
      <a id="link_1d0e47f60fefd4b8ea3e5368a79d3dcb" href="http://www.hqew.net/files/Images/Article/Circuit_Diagram/colpitts-crystal-oscillator-circuit.gif">colpitts-crystal-oscillator-circuit.gif</a>
    </div>

  

 </div>


<script type="text/javascript">
mod_embed_images_loadimage('1d0e47f60fefd4b8ea3e5368a79d3dcb', 'https://reprap.org/forum/addon.php?340,module=embed_images,url=http%3A%2F%2Fwww.hqew.net%2Ffiles%2FImages%2FArticle%2FCircuit_Diagram%2Fcolpitts-crystal-oscillator-circuit.gif', 'http://www.hqew.net/files/Images/Article/Circuit_Diagram/colpitts-crystal-oscillator-circuit.gif', 'https://reprap.org/forum/addon.php?340,module=embed_images,check_scaling=1,url=http%3A%2F%2Fwww.hqew.net%2Ffiles%2FImages%2FArticle%2FCircuit_Diagram%2Fcolpitts-crystal-oscillator-circuit.gif', '', 316963, 800, 400, 'Loading image ...', false);
</script>
. You might need to add an inductor in series with R3 for best results, and then probably a capacitor in parallel with R3. Even then it may well produce less voltage than your original circuit; but for producing an input to a frequency counter, it should be OK.<br/>]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Thu, 27 Feb 2014 10:22:50 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316921#msg-316921</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316921#msg-316921</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>dc42</strong><br />
Radian, did you attempt to measure the change in oscillation frequency as the probe moves towards the bed? It occurred to me that this may be another way of height detection. I was thinking of trying a one-transistor Colpitts oscillator (operating at the parallel resonant frequency of the transducer, rather than the series resonance that we are both using at present) and then frequency-counting in a microcontroller.</div></blockquote>
<br />
Yes the frequency does shift slightly if range is the only variable involved. The best shot at a Colpitts I've managed to build that works isn't any improvement over the series resonant feedback circuit above. The voltage swing isn't as big (~4V) and it requires two inductors (the one in the collector needs to be pretty big for this low frequency). Frequency-wise I don't think there's much in it but I'm currently modifying my rig to better compare the two.<br />
<br />
[attachment 27557 cp_cct.jpg]<br />
<br />
If some of the component values look a bit odd, many of the calculated values didn't work and it took some fiddling to get this one up and running. I personally think Colpitts is better reserved for RF use unless you can spot any of my deliberate &gt;cough&lt; mistakes (For instance, the Ultrasonic transducer is itself a combination of series and parallel capacitance and inductance so it's a bit of an odd thing to jam in the feedback divider).]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Thu, 27 Feb 2014 09:17:19 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316444#msg-316444</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316444#msg-316444</link>
            <description><![CDATA[ I am applying corrections to the ultrasonic height calibration based on the bed temperature reading. This isn't ideal because the temperature at the top of the glass lags the temperature at the thermistor, but seems to be good enough. I may add a minute or so of dwell time in setbed.g between getting the bed up to temperature and z-probing.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Wed, 26 Feb 2014 10:56:01 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316439#msg-316439</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316439#msg-316439</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>jy_oc_hx</strong><br />
<blockquote class="bbcode"><div><small>Quote<br /></small><strong>dmould</strong><br />
I wonder whether you could use the extruder thermistor reading (with the hotend cold) to aid in applying temperature compensation to the ultrasonic reading?  I have noticed that if a cold nozzle is moved over a hot bed (e.g. to manually zero the Z height), the hotend temperature reading rapidly increases as the extruder is heated by the bed.  </div></blockquote>
<br />
In theory this is a vey good suggestion but i think i have read in another thread, that i can't find at the minute, that the hot end temp sensor is designed for the top end readings and the lower range of readings it gives can fluctuate and vary quite dramatically.  If i come across the thread again i'll update this with a link.  But if i am wrong please correct me.</div></blockquote>
<br />
It is inaccurate at the low end, but as far as I can see it is consistent (which is all we need as the inaccuracy can be corrected).  I should think that an accuracy of +/- 5 degrees would be more than sufficient for this purpose.<br />
<br />
Dave<br />
(#106)]]></description>
            <dc:creator>dmould</dc:creator>
            <category>Ormerod</category>
            <pubDate>Wed, 26 Feb 2014 10:41:24 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316417#msg-316417</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316417#msg-316417</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>dmould</strong><br />
I wonder whether you could use the extruder thermistor reading (with the hotend cold) to aid in applying temperature compensation to the ultrasonic reading?  I have noticed that if a cold nozzle is moved over a hot bed (e.g. to manually zero the Z height), the hotend temperature reading rapidly increases as the extruder is heated by the bed.  </div></blockquote>
<br />
In theory this is a vey good suggestion but i think i have read in another thread, that i can't find at the minute, that the hot end temp sensor is designed for the top end readings and the lower range of readings it gives can fluctuate and vary quite dramatically.  If i come across the thread again i'll update this with a link.  But if i am wrong please correct me.]]></description>
            <dc:creator>jy_oc_hx</dc:creator>
            <category>Ormerod</category>
            <pubDate>Wed, 26 Feb 2014 09:49:07 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316414#msg-316414</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316414#msg-316414</link>
            <description><![CDATA[ I wonder whether you could use the extruder thermistor reading (with the hotend cold) to aid in applying temperature compensation to the ultrasonic reading?  I have noticed that if a cold nozzle is moved over a hot bed (e.g. to manually zero the Z height), the hotend temperature reading rapidly increases as the extruder is heated by the bed.  Or perhaps use a figure derived from both the bed and hotend temperature readings.  Sufficient accuracy might be achieved by empirically finding the correction figures for various temperatures and doing a table lookup in software.<br />
<br />
Another method might be to do the height measurement only when the bed is cold, and then applying a correction that is dependent upon the bed temperature that is set - I should think that the difference in Z height between a bed at room temperature and the same bed after heating to a particular temperature will be constant.  Not that there is a great deal of difference IME.  If I zero the Z height with a cold bed, the nozzle will be about 0.1mm too low after the bed is at 110 degrees.  If I wait till the bed has reached about 80 degrees before zeroing the Z axis however, it is still good enough to use when the bed has reached its print temperature of 110, so I should think that a few fixed correction factors for 2 or 3 temperature ranges would be sufficient.<br />
<br />
Dave<br />
(#106)]]></description>
            <dc:creator>dmould</dc:creator>
            <category>Ormerod</category>
            <pubDate>Wed, 26 Feb 2014 09:45:48 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316310#msg-316310</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316310#msg-316310</link>
            <description><![CDATA[ Radian, did you attempt to measure the change in oscillation frequency as the probe moves towards the bed? It occurred to me that this may be another way of height detection. I was thinking of trying a one-transistor Colpitts oscillator (operating at the parallel resonant frequency of the transducer, rather than the series resonance that we are both using at present) and then frequency-counting in a microcontroller.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Wed, 26 Feb 2014 05:14:14 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316139#msg-316139</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316139#msg-316139</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>Radian</strong><br />
But can you clarify for me what you mean about the threshold? Do you mean that the threshold value set by G31 should be obtained by recording the difference between max. and min readings found experimentally?</div></blockquote>
<br />
In z-probe mode 3, the primary reported G31 value <b>is</b> the difference between current and minimum raw sensor readings. The current sensor reading and minimum seen are reported as additional values (just as the peak reading for the modulated IR sensor was reported as an additional value).<br />
<br />
I've enabled temperature parameters even for the unmodulated IR sensor setting (M558 P1), so you can use that if it suits you better.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Tue, 25 Feb 2014 18:00:01 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,316117#msg-316117</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,316117#msg-316117</link>
            <description><![CDATA[ <blockquote class="bbcode"><div><small>Quote<br /></small><strong>dc42</strong><br />
How temperature-stable is the reading you get from it?</div></blockquote>
<br />
Unfortunately I haven't had the time to built it on to a circuit board yet - it's still on the breadboard!<br />
<br />
I was just reading your new firmware topic - the Ultrasound options sound good, can't wait to try them out. But can you clarify for me what you mean about the threshold? Do you mean that the threshold value set by G31 should be obtained by recording the difference between max. and min readings found experimentally? Normally I would just find the maximum and set G31 a little bit below it (usually corresponding to the nearest round number of mm).<br />
<br />
<i>BTW, I've put the lid back on my venerable RS frequency counter now. It was 30 years old last year, and lately I've had to take off the lid and blow some hot air inside to get it going. Today I decided to find out why and it turned out a leaky battery had contaminated the underside of the PCB. Incredibly, this had oxidised away some of the solder joints so some components were lose. The affected solder wouldn't re-tin even with copious amounts of flux. I had to wind the iron up to 300C and heat the old solder while removing it with a fine wire brush. Anyway, that's fixed it properly now.</i>]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Tue, 25 Feb 2014 17:15:40 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,315963#msg-315963</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,315963#msg-315963</link>
            <description><![CDATA[ Radian, that looks quite a nice circuit for those not wanting to use a microprocessor. Looks like the frequency change is about 1% over the 50C range you measured. How temperature-stable is the reading you get from it?<br />
<br />
You might like to try that circuit with the ultrasonic sensor option (M558 P3) in my 57p-dc42 firmware. To improve discrimination between the first and second peaks, and to make my sensor less dependent on temperature, it tracks the minimum value returned from the sensor since the start of the homing process, then looks for the difference between the current value and the minimum so far to reach the threshold value you set with the G31 command. It also allows you to specify a calibration temperature and temperature coefficient, by adding T and C parameters to the G31 command.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Tue, 25 Feb 2014 12:40:33 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,315946#msg-315946</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,315946#msg-315946</link>
            <description><![CDATA[ I set up a rig to see if the resonant frequency varies with temperature and it certainly does appear to. Firstly, here's the complete circuit I made to drive the ultrasonic transducer:<br />
<br />
[attachment 27468 UScct.jpg]<br />
<br />
This oscillator circuit tracks the resonant frequency, producing around 8V pk. across the transducer. Zener D2 subtracts a constant from the peak to get within the A/D range. D3, R3, C3 hold the peak for sampling by the Duet. Note that the temperature coefs. of D2 &amp; D3 cancel each other out quite nicely. This circuit does have an inductor which seems to be most people's least favorite component but it does a great job of increasing the drive voltage to the transducer and hence gives a bigger voltage difference between the first two constructive peaks - which is what I'm using as a direct substitute for the standard IR signal - so the bigger the swing the better.<br />
<br />
To separate the effect of heating around the transducer from the heating of the drive circuit for this test I put the sensor on the end of some wires and mounted it on a Meccano platform simulating the heated bed<br />
<br />
[attachment 27465 UStest.jpg]<br />
<br />
The sensor is held above the bed at a fixed height corresponding to the range at which the maximum constructive return occurs. The frequency counter then records the resonant frequency for a range of temperatures obtained by heating the metal plate with a hot air gun from below. I found it very important to prevent any air movement while letting the plate cool from around 100deg. down to room temperature. The air temperature near the face of the transducer (always close to half the bed temp.) was measured with a thermocouple and these are the frequencies vs. temperatures I recorded:<br />
<br />
[attachment 27467 FvsT.jpg]<br />
<br />
BTW. anyone is welcome to build the circuit above, which has the advantage of not needing any microprocessor firmware! The +3.3V, ground and output connections are identical to those found on the original IR board.]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Tue, 25 Feb 2014 12:16:48 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,315096#msg-315096</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,315096#msg-315096</link>
            <description><![CDATA[ With a bit more work, I now have a circuit and software that homes accurately to a height that varies with temperature as expected due to the variation on the speed of sound. I think I was wrong about the resonant frequency varying with temperature, what I think is varying is the Q-factor.<br />
<br />
The height variation can be compensated for in software. The expected variation is a little over 7.575um/K, or about 0.1mm per 13 degC. Unfortunately, the air temperature above the glass takes a few minutes to catch up with the bed thermistor temperature. So for accurate results, it will be necessary to hold the bed temperature steady for a few minutes before homing.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Sun, 23 Feb 2014 17:30:01 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,315072#msg-315072</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,315072#msg-315072</link>
            <description><![CDATA[ Interesting, my pesky +ve homing offset was proportional to temperate as well.<br />
<br />
I'm currently working with a series resonant oscillator circuit driving the transducer - my thinking being that forcing it to operate at a fixed frequency when it's resonant frequency varies so much with temperature and range doesn't make too much sense. Once it's free to resonate at whatever frequency environmental conditions dictate, extra information becomes available for interpretation. Obviously we now have resonant frequency, but the effects of temperature also shift this around - although to a lesser degree than range. Amplitude remains available for proximity but is now  much better linearised against operating temperature. What's new is pulse width which also varies with proximity. So far I've only played around with a circuit on breadboard, next I will have to get it onto Ormorod and tabulate some readings.<br />
<br />
The problem I see here is that this is a rather analogue solution - albeit a simple one (two transistors so far) yet the analogue sampling using the Duet PCB is shot through with noise. I guess this might be time to disable the on-board switcher and run 5V from the ATX.]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Sun, 23 Feb 2014 16:57:21 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,314677#msg-314677</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,314677#msg-314677</link>
            <description><![CDATA[ I previously reported that the transducer signal has a large dependency on temperature. With some software adjustments to the probing procedure to look at differences rather than absolute values, I have found a way to get homing reproducible to about 0.05mm over the range 30 to 75C. There is a tendency to home slightly too high at higher temperatures. In order to allow this to be corrected, I'm considering adding a provision in the G31 command to specify a temperature at which the calibration was done and a temperature coefficient.<br />
<br />
Of course this is using just one transducer. I will need to test it with several instances of the transducer before I am sure that this works. I expect the sensor module will need a mechanism to adjust the drive frequency to suit the particular transducer, since these transducers have quite a wide tolerance on the centre frequency.]]></description>
            <dc:creator>dc42</dc:creator>
            <category>Ormerod</category>
            <pubDate>Sat, 22 Feb 2014 18:55:45 -0500</pubDate>
        </item>
        <item>
            <guid>https://reprap.org/forum/read.php?340,310360,312701#msg-312701</guid>
            <title>Re: Ultrasonic Z-height sensing?</title>
            <link>https://reprap.org/forum/read.php?340,310360,312701#msg-312701</link>
            <description><![CDATA[ Good progress all round then :-) I <i>do</i> like this method of Z probing, mine's never been so reliable! Oddly I haven't found it being discussed for this particular application anywhere else, yet it seems ideal, and none too expensive.<br />
<br />
I bought-in some more Ultrasound devices today including transceivers (optimized for both TX &amp; RX) and some 25kHz modules - advantage: bigger window of height to work within, disadvantage: more potential audio interference.<br />
<br />
I'm also playing around with self-oscillating drivers that naturally track the changing resonant frequency, in the hope that simply measuring frequency is all that's needed to infer height (maybe too hopeful).]]></description>
            <dc:creator>Radian</dc:creator>
            <category>Ormerod</category>
            <pubDate>Tue, 18 Feb 2014 16:02:06 -0500</pubDate>
        </item>
    </channel>
</rss>
