Welcome! Log In Create A New Profile

Advanced

Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?

Posted by NarimaanV 
Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
August 19, 2015 12:54PM
So I've been scouring the forums for "reviews" on different capacitive proximity sensors and found a couple mentioned, though nobody's really gone into too much detail about their experience with their sensor. As a result, I wanted to make a thread dedicated to people's experience with them to see which one I should get. If it helps, I'm using a 1/8" (3.175mm) sheet of borosilicate glass on top of a PCB heater on my Makerfarm 10" Prusa i3v running RAMPS 1.4 and a RRD Smart Controller. So far, these are the sensors I've seen mentioned:
  1. LJC18A3-H-Z/BX (Leaning most towards this one since two people have mentioned great results with its precision and repeatability, though one person mentioned driving it with an optocoupler which I'm not sure if that's required)
  2. LJC18A3-B-Z/AX (I've also heard good stuff about this one from someone)
  3. LJ12A3-4-Z/AX (Not much was mentioned about this one the than someone used it which is why I'm not currently leaning towards it)
So has anyone used any of these sensors? Or if not, what sensor has anyone used? Thanks in advance for any help! grinning smiley
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
August 21, 2015 03:29AM
Iv got a LJC18A3-H-Z/BX on order and i will let you know how i get on.

Iv been doing a bit of reading around too and most people seam to use inductive PNP sensor, which doesn't make much sense to me.
Firstly the inductive sensors don't respond to glass, and secondly you need to use a voltage divider to drop the 12V output signal so it doesn't fry your ramps.

Correct me if im wrong but the capacity NPN sensor will respond to glass, and wont need a voltage divider even when powered with 12V.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
August 21, 2015 01:50PM
From what I've read, it seems inductive sensors are very repeatable and capacitive work very well with metal as well, so most people go toward getting a metal bed because of the rigidity and because both kinds of sensors would work well with it.

I've been doing some reading on PNP vs NPN sensors to figure out the difference, and as you say, it seems with a PNP sensor, you definitely need a voltage regulator/mosfet/optoisolator/whatever because the signal output outputs the the input voltage (so if you powered it with 12V, it would spit out 12V when triggered on the signal line). However with an NPN sensor, it seems it actually pulls the signal line low to ground when triggered, so there's no danger in using it unprotected with a controller.

I'm pretty set on a LJC18A3-H-Z/BX at the moment as well unless someone can share any major issues with it, or why another one is dramatically better. Even though I don't have to, I'll probably also end up using a mosfet on it too because it never hurts and in case there's a short or something with the sensor for any reason, it should protect the controller, so I'd only be out a fried sensor instead of a fried sensor, an entire RAMPS board, possibly 5 A4988 drivers. grinning smiley

Regarding if it responds to glass, I don't know for sure to be honest. I've heard some people say it does trigger from glass, while others say it actually triggers to whatever is underneath (so the heater or the bed). Easiest way to test it I suppose is to just connect the sensor electrically but not mount it yet to the carriage, and just hold it up to the glass without anything behind/under it and see if it responds to the glass getting close or not.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
September 09, 2015 03:47PM
Its finaly arrived!

Iv wired my LJC18A3-H-Z/BX to 5V and it appears to work okay, and will detect my glass bed from about 2mm with the sensitivity turned right up to maximum.

Iv also tried using it with a 9V battery and its a lot more sensitive.

Will post again when i get it installed on the printer.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
September 09, 2015 04:03PM
Quote
Andy1989
Its finaly arrived!

Iv wired my LJC18A3-H-Z/BX to 5V and it appears to work okay, and will detect my glass bed from about 2mm with the sensitivity turned right up to maximum.

Iv also tried using it with a 9V battery and its a lot more sensitive.

Will post again when i get it installed on the printer.


That's great to hear! Though that sensor (as well as a lot of similar ones) seems to be rated to run from 6-36V so 5V probably won't be stable (I'm actually surprised it even worked). Also did you try it with just the glass or with the glass and the bed attached together?
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
September 11, 2015 12:05PM
Good shout with just trying it with glass!

With 5V it doesn't respond to glass, so it must be picking up my silicone heated bed.

With 9V it does respond to glass, so assume when i get it wired to 12V it will do too.

Also iv measured the voltage on the signal wire when powered with 9V and when triggered its 0V as expected. But when its not triggered is 7.5V.

Guess I will need a voltage divider or something after all!

Im not that clued up on electronics, can anyone suggest anything that might be better than a voltage divider?
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
September 11, 2015 12:30PM
Mosfet
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
September 11, 2015 12:36PM
Yeah that's what I'm planning on using when mine comes in a month (hopefully).
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
September 14, 2015 03:43PM
After a bit more research and some tests with a old arduino im glad to confirm that you can just plug the sensor straight into 12v, ground, and directly into the z min signal pin.

I think the reading of 7v mentioned previously was because the sensor signal was floating, ie not connected to anything. Whereas when its connected to my Rumba board its pulled up to 5v by the internal pull up resistor.
Maybe someone with a little more knowledge of electronics can explain a little better?

So if these NPN capacitive sensors can detect glass, and can be plugged straight into a ramps or whatever you are using with no additional electronics, why do most people seam to use inductive PNP sensors?

The only possible explanation i can think of is they only seam to be available in china so take weeks to arrive!
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
September 14, 2015 03:50PM
I think people use the inductive sensors for the advantages of a metal bed as well as opposed to just inductive vs capacitive. And if you already have a metal bed, I'd imagine inductive is probably better to go for than capacitive (don't know for sure, but I think capacitive is slightly open to interference by other stuff near the sensor where as inductive mainly pics up only metallic surfaces).

As for NPN vs PNP, I don't know exactly why they go for PNP, I think it might have to do with Printrbot's inductive sensor being infamous for being reliable and it happens to be a PNP sensor, so people might go for that over others because there are lots of reviews saying good things about it.

Edited 1 time(s). Last edit at 09/14/2015 03:50PM by NarimaanV.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 02, 2015 05:15PM
Picked up one of these sensors,LJC18A3-H-Z/BX, took a week to get from China to California. I hooked it up straight to my RAMPS with no issues, signal lead to the Z MIN and +/- to the header right under the X axis stepper driver. So far it has been repeatable and setup was a breeze.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 02, 2015 05:49PM
zerodameaon, How much variation there is between measurements? If you use G29 and then use it again, how much do the measure values change between the first and second G29?
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 03:27AM
Here are 3 G29s in a row, I am not quite sure just how far these are off.

00:24:45.626 : G29 Auto Bed Leveling
00:25:26.894 : Eqn coefficients: a: -0.00526852 b: -0.00012500 d: 0.47877311
00:25:26.894 : planeNormal x: 0.005269 y: 0.000125 z: 1.000000
00:25:26.898 :
00:25:26.898 : Bed Level Correction Matrix:
00:25:26.898 : +0.999986 +0.000000 -0.005268
00:25:26.902 : -0.000001 +1.000000 -0.000125
00:25:26.902 : +0.005268 +0.000125 +0.999986

00:25:32.968 : G29 Auto Bed Leveling
00:26:16.067 : Eqn coefficients: a: -0.00535648 b: -0.00101250 d: 0.01553930
00:26:16.067 : planeNormal x: 0.005356 y: 0.001012 z: 1.000000
00:26:16.071 :
00:26:16.071 : Bed Level Correction Matrix:
00:26:16.075 : +0.999986 +0.000000 -0.005356
00:26:16.075 : -0.000005 +0.999999 -0.001012
00:26:16.075 : +0.005356 +0.001012 +0.999985

00:26:32.682 : G29 Auto Bed Leveling
00:27:15.867 : Eqn coefficients: a: -0.00509259 b: -0.00103333 d: -0.14671764
00:27:15.867 : planeNormal x: 0.005093 y: 0.001033 z: 1.000000
00:27:15.871 :
00:27:15.871 : Bed Level Correction Matrix:
00:27:15.871 : +0.999987 +0.000000 -0.005093
00:27:15.875 : -0.000005 +0.999999 -0.001033
00:27:15.875 : +0.005093 +0.001033 +0.999987
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 03:46AM
Those figures look very consistent, but a more important test will be to see how consistent the trigger heights are from one day to another, or even from morning to afternoon. In particular, capacitive sensors are sometimes affected by changes in temperature and humidity.

Edited 1 time(s). Last edit at 10/03/2015 07:19AM 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: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 04:12AM
You also have to factor in the fact that thing is a box frame Prusa I3 built by me when I had no clue what I was doing. That alone really does not help things, though one of these days it will be either upgraded to a Vslot setup or the x and z axis will ditch the smooth rods in favor of a vslot setup.

I will run this same three G29 test tomorrow after a few prints and post back.

Edited 1 time(s). Last edit at 10/03/2015 04:15AM by zerodameaon.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 10:41AM
zerodameaon, instead of multiple G29s, it might just be easier to run a M48 which is the repeatability test for the z-probe in Marlin. It does essentially the same thing except all in one command. Thanks so far for the tests, I'm glad to know the proximity sensor you have lives up to its reputation (I have that was well but haven't had time to test it yet).

Also curious, what kind of bed are you using? Are you using glass on your bed by chance?
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 04:27PM
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 04:59PM
Quote
munchit1
https://www.youtube.com/watch?v=EcGFLwj0pnA

Yeah that's a pretty helpful video. It's essentially the same process except with different sensor types (inductive sensors in the video vs capacitive sensors mentioned here). Even the explanation of making a voltage divider is a pretty nice touch.

Won't lie, if I had a metal bed, I would go for an inductive sensor (minimal possible interference when it only measures certain metals), but because my current setup is PCB heater and glass, my options are limited to either a physical switch attached to a servo or sled (which having the switch move creates room for error) or a capacitive proximity sensor, which is why I'm trying the latter.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 05:16PM
Or use an IR sensor, as sold by dc42.

I use one on my Prusa to print onto glass - the only extra that's sometimes needed is a sheet of black paper or card under the glass to minimise false reflections. It works well.

Edited 1 time(s). Last edit at 10/03/2015 05:17PM by David J.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 05:18PM
Quote
David J
Or use an IR sensor, as sold by dc42.

I use one on my Prusa to print onto glass - the only extra that's sometimes needed is a sheet of black paper or card under the glass to minimise false reflections. It works well.

Yeah I may give that a try if the two capacitive probes I have don't pan out so well in my setup.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 05:24PM
Quote
NarimaanV
...but because my current setup is PCB heater and glass, my options are limited to either a physical switch attached to a servo or sled (which having the switch move creates room for error) or a capacitive proximity sensor, which is why I'm trying the latter.

You have more options than that, including infrared. See [miscsolutions.wordpress.com]. This is the sensor that E3D has chosen for their BigBox 3D printer. [Full disclosure: mentioned my own stuff.]



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: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 05:33PM
Quote
dc42
Quote
NarimaanV
...but because my current setup is PCB heater and glass, my options are limited to either a physical switch attached to a servo or sled (which having the switch move creates room for error) or a capacitive proximity sensor, which is why I'm trying the latter.

You have more options than that, including infrared. See [miscsolutions.wordpress.com]. This is the sensor that E3D has chosen for their BigBox 3D printer. [Full disclosure: mentioned my own stuff.]

Yeah it seems like a pretty impressive sensor. That is also one of my options if my current sensors don't seem repeatable enough.

EDIT: Sorry, and correct me if this is a mistake, but isn't E3D using a conventional mechanical switch on a servo? Extreme Auto-Levelling with the Bigbox 3DP

Edited 1 time(s). Last edit at 10/03/2015 05:43PM by NarimaanV.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 06:05PM
Ran that M48 as requested. Here are the results at 3pm and it's roughly 80 degrees in the house with the bed at 90*. I will update this as the house cools down.

15:03:36.607 : Mean: -9.245626
15:03:36.607 : Standard Deviation: 0.002183
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 06:08PM
Quote
zerodameaon
Ran that M48 as requested. Here are the results at 3pm and it's roughly 80 degrees in the house with the bed at 90*. I will update this as the house cools down.

15:03:36.607 : Mean: -9.245626
15:03:36.607 : Standard Deviation: 0.002183

Not 100% what the Mean means in the context of the test but wow that standard deviation is so small, very impressive! And appreciate taking the time to run these tests!! grinning smiley
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 06:29PM
Quote
NarimaanV
EDIT: Sorry, and correct me if this is a mistake, but isn't E3D using a conventional mechanical switch on a servo? Extreme Auto-Levelling with the Bigbox 3DP

They were going to include the servo deployed switch as standard and offer my differential IR sensor as part of the sensor upgrade package, but they recently informed me that they will include the IR sensor as standard.



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: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 03, 2015 07:24PM
Quote
dc42
Quote
NarimaanV
EDIT: Sorry, and correct me if this is a mistake, but isn't E3D using a conventional mechanical switch on a servo? Extreme Auto-Levelling with the Bigbox 3DP

They were going to include the servo deployed switch as standard and offer my differential IR sensor as part of the sensor upgrade package, but they recently informed me that they will include the IR sensor as standard.
Ahhh I see, very nice thumbs up
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 04, 2015 07:39AM
After using an inductive sensor with an aluminium plate for a bit I really wanted to go back to glass. Accidentally ordered a higher range (but still inductive) sensor. Waiting for LJC18A3-H-Z/BX to be delivered by Amazon today. Do I understand correctly that I can wire this directly in to 12v with no voltage divider on the i/o wire going to the RAMPS board (using a two resistor divider with my current inductive sensor)?
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 04, 2015 09:37AM
Quote
JBFUK
After using an inductive sensor with an aluminium plate for a bit I really wanted to go back to glass. Accidentally ordered a higher range (but still inductive) sensor. Waiting for LJC18A3-H-Z/BX to be delivered by Amazon today. Do I understand correctly that I can wire this directly in to 12v with no voltage divider on the i/o wire going to the RAMPS board (using a two resistor divider with my current inductive sensor)?

So there's some tricky business there. Theoretically, no, you shouldn't need any. The sensor's output drops from floating to ground. To prevent the floating, you could theoretically have the output tied via a pullup resistor to 5V, but me still learning electronics, I don't know if it has any negative consequences to have the sensor wired to 12V for power and the output wired to 5V via pullup. Could be absolutely fine, but again, I don't know for sure, maybe someone who does can clarify this.

But in case it's bad to wire the output to 5V via pullup and instead better to wire it to the same supply voltage of 12V, then you should have some protection like a voltage regulator, mosfet, optoisolator, etc., on there.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 04, 2015 09:43AM
Quote
NarimaanV
Quote
JBFUK
After using an inductive sensor with an aluminium plate for a bit I really wanted to go back to glass. Accidentally ordered a higher range (but still inductive) sensor. Waiting for LJC18A3-H-Z/BX to be delivered by Amazon today. Do I understand correctly that I can wire this directly in to 12v with no voltage divider on the i/o wire going to the RAMPS board (using a two resistor divider with my current inductive sensor)?

So there's some tricky business there. Theoretically, no, you shouldn't need any. The sensor's output drops from floating to ground. To prevent the floating, you could theoretically have the output tied via a pullup resistor to 5V, but me still learning electronics, I don't know if it has any negative consequences to have the sensor wired to 12V for power and the output wired to 5V via pullup. Could be absolutely fine, but again, I don't know for sure, maybe someone who does can clarify this.

But in case it's bad to wire the output to 5V via pullup and instead better to wire it to the same supply voltage of 12V, then you should have some protection like a voltage regulator, mosfet, optoisolator, etc., on there.

If the output of the sensor is floating when not triggered and tied to ground when triggered, you could tie the output directly to the input pin using a pull-up resistor connected to the voltage required for the input pin (proabably 5v, but could be 3.3v). If using an Arduino based controller, you can enable the internal pull-up resistor and not have to connect an external one.
Re: Best Capacitive Proximity Sensor for Glass Sheet on PCB Heater?
October 04, 2015 09:50AM
NPN


PNP

Sorry, only registered users may post in this forum.

Click here to login