Welcome! Log In Create A New Profile

Advanced

Capacitive Z-height sensing

Posted by Radian 
Re: Capacitive Z-height sensing
March 15, 2014 10:22AM
Hi dc42, I was hoping you could accommodate cap. sensing on your board. It's certainly working well for me. I've even got it to light the status LED I added when the nozzle is at Z=0. The calibration process provides for this as the maximum should be set when the nozzle is fully homed and the sensitivity is such that this position can be discriminated quite well. It provides a bit of an eye-opener on the expansion of the bed as well. It may be a bit too confusing, as the indication is only valid when the bed is at the same temperature as it was when the calibration was performed. Because the bed lifts when hot (I've seen as much as 0.5mm rise) I'm doing the calibration when cold. This is the cap. sense min/max calibration of course, not G31.


RS Components Reprap Ormerod No. 481
Re: Capacitive Z-height sensing
March 15, 2014 04:58PM
Quote
Radian
...Because the bed lifts when hot (I've seen as much as 0.5mm rise)..

with all due respect, I seriously doubt that, I see, 0.2mm tops and I still doubt my x-axis on that one, some evil forces most be at work me think...

Erik
Re: Capacitive Z-height sensing
March 16, 2014 07:11AM
Quote
ormerod168
Quote
Radian
...Because the bed lifts when hot (I've seen as much as 0.5mm rise)..

with all due respect, I seriously doubt that, I see, 0.2mm tops and I still doubt my x-axis on that one, some evil forces most be at work me think...

Erik

Thanks Erik, I was very surprised myself - but knowing how unstable the MDF bed was it didn't prompt me to go looking for another cause. So on the basis of your expectation I just checked it carefully again. Without any sensor electronics fitted on the X carriage and measuring by manual zeroing with the bed at 100c, after cooling to 20c I can just get a 0.25mm feeler gauge in the gap. So yes, other dark forces must have been at work. I have a hunch this may have been the RJ11 ICSP lead connecting the PIC chip to my ICD3 when the sensor was fitted on the carriage. I didn't realise until now how little force it takes to deflect the X arm so I was plugging/unplugging all the time without considering its mass.

I just found another source of noise - the blinking of my on-board LED capacitively couples with the sensor plate even though the wiring is minimal. The simple fix is to synchronise the flash transitions with the measurement cycle.


RS Components Reprap Ormerod No. 481
Re: Capacitive Z-height sensing
March 20, 2014 07:35AM
I've put a short video showing the calibration and operation of the capacitive Z-probe on Vimeo:

Capacitive Z-height sensing

My conclusion is that out of all the technologies considered, capacitive sensing offers the best non-contact solution both in terms of cost and performance.

To summarise my own opinions on the alternative technologies tried so far: IR sensing is limited by ambient lighting conditions and variability in the reflective nature of the target surface. Ultrasound is too vulnerable to air movement at any temperature above ambient. Force Sensing Resistive techniques are limited by the maximum operating temperature of the FSR devices and a non-contact solution is preferable to a mechanical one.

Where to go from here is the next question. With very few additional components the 12F1822 PIC (SO8) has enough resources to do the job. It could be put on a split PCB - a vertical board for the PIC and other parts, and a horizontal board acting as the sensor (approx. 2cm square). A 14-pin 16F1823 could be used to add a few extra features as per dc42's hot-end "all in one". But I'm not sure what the politics are here. Either way, I'm more than happy to share the design with anyone that would like to reproduce this.


RS Components Reprap Ormerod No. 481
Re: Capacitive Z-height sensing
March 20, 2014 08:13AM
Looks great! I'm glad it works so well. Will have to try it with a STM32 smiling smiley

regards
Andy


Ormerod #318
www.zoomworks.org - Free and Open Source Stuff smiling smiley
Re: Capacitive Z-height sensing
March 20, 2014 08:50AM
Radian, have you any thoughts on how to join the two boards together? I've been looking at adapting my design for capacitive sensing, and this is an issue that I have yet to resolve to my satisfaction. Somehow the boards (or one board plus a small copper sheet) need to be rigidly and accurately joined at 90 degrees. I had a browse through board-to-board connectors on the Farnell site, but I didn't find anything suitable. I've considered soldering the boards or board+sheet together on a hotplate, but some sort of jig would be needed to hold them at right angles.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Capacitive Z-height sensing
March 20, 2014 09:14AM
How about 10 * 10 mm aluminum angle to join. You can get it in meter length in B&Q. Or get a larger size and use it as the plate maybe! (They do steel and maybe brass too)

EDIT : and plastic. Box sections etc. Various to choose

regards
Andy

Edited 1 time(s). Last edit at 03/20/2014 09:15AM by kwikius.


Ormerod #318
www.zoomworks.org - Free and Open Source Stuff smiling smiley
Re: Capacitive Z-height sensing
March 20, 2014 09:53AM
The aim is to minimise the surface area of the electrical connection from sensor to PCB to minimise stray capacitance (unwanted coupling) I think this pretty much rules out everything except a thin wire. Termination would be a doddle if soldering skills were available but I think mechanical termination would add too much unwanted surface.

If the X carriage base is reprinted to include a 2cm square base that would be planar with the bed some of this adhesive backed copper tape could be stuck to it (if the sticky could withstand the temperature there). In this case a slender extension could be cut from the strip and brought up the edge to meet the PCB - maybe even just press contact to the back of the vertical PCB?

[www.ebay.co.uk]

If it didn't work out, it could always be used to keep Slugs from invading the bed!


RS Components Reprap Ormerod No. 481
Re: Capacitive Z-height sensing
March 20, 2014 10:44AM
Just my 0.02: I think soldering one wire should be ok for almost everybody operating a reprap
Re: Capacitive Z-height sensing
March 20, 2014 02:28PM
Quote
auser
Just my 0.02: I think soldering one wire should be ok for almost everybody operating a reprap

I know, it's very tempting to think so but it's just so tantalizingly close to being a plug & play fit that conforms to the skill set needed to assemble the standard Ormorod kit. I wonder, do any other RepRap kits require soldering work?

The following plot may be of interest - it's a set of Z-probe readings taken over a 10mm grid centered at X=100mm, Y=100mm and Z=1mm. The actual bed over this area deviates by +/- 0.2mm in Y and +/-0.1 in X. I think it gives a good idea of how sensitive the probe can be:



The slightly odd thing is that the A/D conversion in the Duet is now less noisy than it was, with only 3 or 4 counts worth of dither. This is using firmware version 0.57r-dc42 throughout the development of the capacitive sensor. I can't pin down any other variables that could account for cleaner readings other than I've gone back to a isolated heat spreader. I did find earlier that it gave better results when grounded but after dropping the frequency of the triangle wave generated by the CSM, it now makes no discernible difference. That's welcome news as it's not so easy as it sounds joining the aluminum to 0V. One side of the heated bed is switched to ground so that's no good, the other is permanently at 12V so that's asking for trouble! The bed thermistor has a VSSA connection but I would not be too keen to join that to the bed as it would expose a particularly sensitive node on the Duet hardware. Fortunately it now looks as though it can be left floating.


RS Components Reprap Ormerod No. 481
Re: Capacitive Z-height sensing
March 20, 2014 04:06PM
Quote
Radian
I wonder, do any other RepRap kits require soldering work?
I would think so (at least form a quick check of the top threee results form https://www.google.com/search?q=skills%20reprap%20build (2 out of 3 mention soldering)
Re: Capacitive Z-height sensing
March 20, 2014 04:29PM
OK, the majority of Ormerod kits won't need soldering doing, but looking at the skill set on this forum then I personally would not be worried to solder and the target market for this sensor are people on this very forum atleast.
Re: Capacitive Z-height sensing
March 20, 2014 04:34PM
I soldered those damn fiddly connectors onto the bed thermistor - far easier than trying to crimp without crimps.

I agree that most here would soldering ability.


Another RS Ormerod Mk1 meets the world smiling smiley

Retired now but I used to make....
CNC Machined Mk1 aluminium bed support plates for the Ormerod
CNC machined X-plates and ribs for Mk1 & Mk2 Ormerods
CNC machined bed support arms for the Mk2 Ormerod.
Dual Hot-End heatsink blocks.
Re: Capacitive Z-height sensing
March 20, 2014 06:22PM
Quote
Davek0974
I soldered those damn fiddly connectors onto the bed thermistor - far easier than trying to crimp without crimps.

I agree that most here would soldering ability.

I wish I could unsolder, turn and solder these two members of the resistance so I could print without the PC connected but I know I can't



Erik
Re: Capacitive Z-height sensing
March 20, 2014 07:05PM
You would need a finer soldering iron bit than that one to remove and replace those resistors, and either a headband magnifier or a pair of strong reading glasses, and fine-tipped tweezers. I normally throw SMD components away after desoldering them, so I suggest new resistors. If you had the right soldering equipment, then I could put a couple of resistors in with your Ormerod sensor board order. But it's simpler for you to return the board to RepRapPro for a warranty replacement.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Capacitive Z-height sensing
March 20, 2014 07:27PM
Also you can connect the 5V stdby power through to the external +5V connection on the Duet and then use J10 to pass that through rather than J9. There is a 3way space for a pin header just below the main 12V connector to take the external 5V in. That allows it to work without USB power which is prone to being low voltage anyway by the time it has suffered drop in the cable plus passing through a diode. That is what I did initially with the same Duet problem and I have stuck with it even after my Duet was replaced as it is drawing just a bit more power form the other rails in the PSU rather than the +12V. It also gives a slightly cleaner 5V supply to the Duet compared to the on-board regulator.
Re: Capacitive Z-height sensing
March 21, 2014 06:03AM
Quote
dc42
...then I could put a couple of resistors in with your Ormerod sensor board order..

Very kind of you, thank you, but if there is no downside to bobtidey's solution I think I will do just that
..and I can't send back, can't wait for a warranty replacement

Erik
Re: Capacitive Z-height sensing
March 21, 2014 06:45AM
Quote
ormerod168
I wish I could unsolder, turn and solder these two members of the resistance so I could print without the PC connected but I know I can't

Hi Erik, I started up a new topic about soldering here: [forums.reprap.org] I hope it might be of help.


RS Components Reprap Ormerod No. 481
Re: Capacitive Z-height sensing
March 21, 2014 10:15AM
Quote
ormerod168
but if there is no downside to bobtidey's solution I think I will do just that
..and I can't send back, can't wait for a warranty replacement

Erik

The easiest, neatest way to do the J10 method if using the ATX distribution board is to use the 3 way header on that as the source of 5V stby. So you,

1) Add 3 way jumper to Duet which has provision for this.

2) Make up a 2 wire cable with 3 way header socket at each end.

3) At the distribution board end wire the 0V (black) to 2 of the sockets (end+centre) and 5V (red) to the other end.

4) At the Duet end wire the 0V to one end of the 3 way and 5V to the other end.

5) Plug into distribution board in place of the current PS-on jumper. The 2 sockets shorted together go in place of the existing power on jumper.

6) Power on and check that 5V is right and correct polarity on the Duet end of the cable.

7) Power off, Add Jumper J10, remove J9.

8) Plug in Duet end of 3 way - making sure polarity is right

I ran like with no problems for several weeks. I still effectively run like this but now I have got rid of the mess of ATX wiring, the distribution board and improved the stability of the PSU. The 5V comes straight out of the PSU to the same Duet header.
Re: Capacitive Z-height sensing
March 21, 2014 01:47PM
Quote
ormerod168
Quote
dc42
...then I could put a couple of resistors in with your Ormerod sensor board order..

Very kind of you, thank you, but if there is no downside to bobtidey's solution I think I will do just that
..and I can't send back, can't wait for a warranty replacement

Erik

If you ask RRP nicely, I suspect they will send you a replacement board and let you delay returning your old board until you receive the new one.

Dave
(#106)
Re: Capacitive Z-height sensing
March 30, 2014 05:00PM
In the light of Radian's excellent work on capacitive sensing, I've been looking at adapting my hot end board to support this. I've knocked up a prototype by hacking one of my existing boards:



One of the problems is that the LEDs on the board no longer illuminate the area under the nozzle properly, because the sense plate gets in the way. I've considered a few alternatives:

- Install a piece of LED strip just above the holes in the fan duct (as some users have already done). This is more hassle than having LEDs on the board, it won't work with Matt's one-piece duct, and I have some doubts about how long the centre LED will last because it would be so close to the hot aluminium block.

- Install another board with the LEDs on, on the opposite side of the heatsink duct. More hassle again, and the cartridge heater wires get in the way..

- Use a modified x-carriage and put the LEDs on the underside of it. More hassle again, also needs another connector so that the hot end can be removed.

- Drill holes in the sense plate so that light can shine through from at least one LED. Reduces sensitivity of the sense plate, and the illumination will still be less effective than on the IR/ultrasonic sensor board.

- Fibre-optic light guide to carry the light from an LED somewhere on the board to a point close to the nozzle. Not sure how easy this would be or what it would cost.

Does anyone have any other suggestions, or any experience of using fibre optics for illumination?

Edited 1 time(s). Last edit at 03/30/2014 06:40PM by dc42.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].

Re: Capacitive Z-height sensing
March 30, 2014 06:25PM
For signaling you can use Light pipes/giudes (I can not say if the efficiency is to low for illumination), if any of the standard fit it is worth trying, making a custom not so (flexibles does exist)
examples are, this: [uk.rs-online.com]
and this: [uk.rs-online.com]
Looking at ethe pictures of kit 5 (http://forums.reprap.org/read.php?340,310184,page=6) it appears the LED go out sideways, how it that working for illuminating the plane/part (ore is just intended to illuminate the extrusion) ?
LEDs have long legs,can we bend them ?
Re: Capacitive Z-height sensing
March 30, 2014 06:49PM
Quote
SlinBin
Looking at ethe pictures of kit 5 (http://forums.reprap.org/read.php?340,310184,page=6) it appears the LED go out sideways, how it that working for illuminating the plane/part (ore is just intended to illuminate the extrusion) ?
LEDs have long legs,can we bend them ?

The LEDs I supply are bright, wide-angle ones from Cree, so they illuminate the bed area under the nozzle quite well even though they are not in the ideal place or pointing the in the ideal direction. You can bend the legs if you want to, but if you choose to use the one-piece duct, then they need to be very close to the board to clear the fan outlet duct.

I wondered about putting SMD LEDs in the grooves between the outlets on the original fan duct, but I haven't worked out a good way of attaching them or connecting to them.

Thanks for the links to light pipes.



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Capacitive Z-height sensing
March 31, 2014 04:53AM
Glad to see you working with the capacitive sensor dc42. As for the illumination issue, could you extend one edge of the sensor laminate a little to accommodate the thrid SM LED? It would shine straight down and could plug into 0.1" header in the through-hole positions on the main board. The clearance would be reduced by the depth of the device but you can get some very slim LED's now.

Other relevant tricks might be to mount an inverted SM LED on top side of the board to shine down through a drill hole; it's also possible to mount a SM device flush with the surface of the laminate by solder-bridging to lands on the back. A slot at the edge of the laminate would do if the board is routed - plated through pads either side of the hole or slot would make it easy to solder.


RS Components Reprap Ormerod No. 481
Re: Capacitive Z-height sensing
May 29, 2014 04:08PM
I did some more work on the capacitive sensor. I re-hacked the board to avoid the long PCB traces attached to the sensing terminals of the mcu, and I got rid of the long blue wire (see photo 4 posts back) which I though might move a little with temperature variation and change the stray capacitance.

The results were dramatic. I had to change the firmware to reduce the sensitivity by a factor of 4, and even then it was still about twice as sensitive as the original, indicating that the stray capacitance is about 1/8 of the original. The temperature sensitivity is also much reduced, although not entirely eliminated I think. However, the reading is still a little noisy. I suspect it is picking up EMI from the Duet board and the mains.

Although I can see that this is a viable method of height sensing, I think it still has some minor disadvantages. When more than one glass plate is used, all the plates need to have the same thickness to within about 0.05mm. The aluminium heat spreader needs to be in good contact with the glass across its whole surface, since any gap between it and the glass will affect the reading. And I suspect that any contamination on the surface of the glass will affect the reading, because only a small amount of conductivity will increase the effective capacitance (even the adhesive on the Kapton tape may have an effect).

So for now I'm concentrating on differential IR sensing, which is working well for me (see separate thread).



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Sorry, only registered users may post in this forum.

Click here to login