Welcome! Log In Create A New Profile

Advanced

Differential IR sensor preliminary results

Posted by dc42 
Differential IR sensor preliminary results
May 26, 2014 05:23PM
I got my prototype differential modulated IR sensor working today!



It uses two modulated IR LEDs (the pink components in the photo) and a single IR phototransistor (the black component at the bottom right). There is a horizontal offset between the two LEDs so that they give maximum phototransistor response at slightly different heights. The firmware on the on-board microcontroller looks for the point where the signal strengths crossover, treats that as a trigger point, and changes the output between low and high. To calibrate it, you just identify the height of that trigger point, and enter that as the z-value in the G31 command.

It's working very well on both plain glass and Kapton-covered glass. No need for white paper or tape, and you can use it anywhere on the bed. So I home the z-axis in the middle of the bed.

Currently the calibration point moves by 0.05mm when switching between plain glass and Kapton-covered glass. I'm going to make a few changes to try to eliminate this, because I would like the calibration point to be independent of surface. I still need to check its performance on a bed painted with solvent pipe cement, and verify that it's not temperature sensitive.



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

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

Re: Differential IR sensor preliminary results
May 26, 2014 05:50PM
Seems pretty neat, looking forward to the upgrade. At roughly what height over the bed does it trigger?
Re: Differential IR sensor preliminary results
May 27, 2014 02:06AM
Quote
dc42
..Currently the calibration point moves by 0.05mm when switching between plain glass and Kapton-covered glass...

the Kapton tape (delivered with the printer) measures exactly 0.05mm ...

Erik
Re: Differential IR sensor preliminary results
May 27, 2014 05:07AM
I would like to pre-order one!
Re: Differential IR sensor preliminary results
May 27, 2014 06:39AM
Quote
auser
I would like to pre-order one!

Thanks, that was quick! I'll be offering a special kit for users who already have my earlier kit 3/4/5 boards, and therefore don't need the shells or crimp pins. As you may have guessed, it uses the same connectors and mounting holes as those kits do.

I'm wondering whether to add a red LED to indicate when the hot end heater is on (thanks Kim for the idea). Is that a feature that users would like? The LED would most likely be where the fan connector is now but on the SMD side of the board.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 27, 2014 06:45AM
Quote
jstck
Seems pretty neat, looking forward to the upgrade. At roughly what height over the bed does it trigger?

Currently at a nozzle height of 0.85mm over glass and 0.90mm over Kapton. The board is currently off the machine, so I can't measure the height of the board edge above the nozzle at the moment.

Quote

the Kapton tape (delivered with the printer) measures exactly 0.05mm

During testing I had the nozzle over the Kapton as well as the sensor, so the Kapton thickness doesn't enter into it, unless the Kapton is compressing significantly when the nozzle touches it.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 27, 2014 07:11AM
Sign me up for a pre-order (previous-kit upgrade) as well! winking smiley

Quote
dc42
I'm wondering whether to add a red LED to indicate when the hot end heater is on (thanks Kim for the idea). Is that a feature that users would like? The LED would most likely be where the fan connector is now but on the SMD side of the board.

A led to indicate hotend heater running is certainly useful (I got one soldered on to my board, just in series with a resistor over the back of the heater connector), and it would be a useful addition. The one on the Duet is pretty difficult to see.


Quote
dc42
Quote
jstck
Seems pretty neat, looking forward to the upgrade. At roughly what height over the bed does it trigger?

Currently at a nozzle height of 0.85mm over glass and 0.90mm over Kapton. The board is currently off the machine, so I can't measure the height of the board edge above the nozzle at the moment.

Oh, at least still enough height to get decent clearance between sensor and bed/print when printing.
Re: Differential IR sensor preliminary results
May 27, 2014 07:54AM
Hi David,
From what you have posted so far, this system seems to be working well and might solve all of our problems for Z zero and bed compensation.
Did you give any more thought to mapping the bed at more points that just the corners?, Could this compensate for glass that is domed at the centre?
The addition of a red led as an indicator for the hot end heater being on or off is a good idea.
Please put me down for one of your kits.
Thanks
Paul


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: Differential IR sensor preliminary results
May 27, 2014 08:18AM
Quote
appjaws1
..Did you give any more thought to mapping the bed at more points that just the corners?, Could this compensate for glass that is domed at the centre?..

Glass is supposed to be flat, if not, buy new one - yes it may walk a bit from the heat loss of the surface, my measurements 0.03mm from 22.3 to 89,7 degrees C, so no biggie, just add 0.03mm to first layer

"The heat will make the glass bulge"
[forums.reprap.org]

Erik
Re: Differential IR sensor preliminary results
May 27, 2014 09:39AM
I think you sometimes use solvent cement or ABS solution on glass, David? If so, I'd be interested whether the probe works consistently for that surface as well. As the surface is not in that case smooth and flat, I fear it will not be a solution I can use.

Dave
(#106)
Re: Differential IR sensor preliminary results
May 27, 2014 10:56AM
I just made some adjustments and did some more tests. It works fine on solvent cement. I now have it giving the same trigger height (0.50mm) within 0.05mm whether the bed is plain glass, Kapton, or solvent cement. White PVC tape causes it to trigger about 0.5mm too high, and I don't know why. Perhaps there is a contribution from reflections from the aluminium under the glass or the bottom of the glass, and white PVC tape is the only surface I have tested that blocks that. The trigger height doesn't change significantly between bed temperatures of 20C and 75C. The edge of the board is 1.5mm above the nozzle, so there is 2mm between the bed and the board when it triggers.

Edited 1 time(s). Last edit at 05/27/2014 10:59AM by dc42.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 27, 2014 11:50AM
I found this device quite promising for the same functionality you are trying to accomplish
It can be very accurate within 100mm or 10 cm with feature ambient IR light compensation.
You may look at the data-sheet here [www.es.co.th]




Re: Differential IR sensor preliminary results
May 27, 2014 11:51AM
Quote
dc42
Perhaps there is a contribution from reflections from the aluminium under the glass or the bottom of the glass,

Any thoughts on whether this would be affected by builds that have abandoned the aluminium under the glass so that the surface under the glass is the heater PCB?
Re: Differential IR sensor preliminary results
May 27, 2014 12:47PM
Quote
Chaisaeng
I found this device quite promising for the same functionality you are trying to accomplish
It can be very accurate within 100mm or 10 cm with feature ambient IR light compensation.
You may look at the data-sheet here [www.es.co.th]

Nice looking chip, but looks like it would be very sensitive to the reflectivity of the surface. My sensor uses 2 IR LEDs offset from each other so as to give maximum signals to the phototransistor at different angles. That device doesn't do anything similar, it basically uses one of the photodiodes to compensate for ambient light, which I do another way (i.e. modulation).

Quote

Any thoughts on whether this would be affected by builds that have abandoned the aluminium under the glass so that the surface under the glass is the heater PCB?

I just tried it with a black bin liner between the glass and the heat spreader. There was no significant difference in performance. I designed the geometry to try to make it insensitive to reflections off the back of the glass, and it looks like I succeeded. But I still don't know why white tape causes it to trigger at a greater height than other surfaces do. [I just thought of a reason: the firmware sets the output high if it detects that the phototransistor is saturating. Maybe that is happening - in which case, I can adjust a resistor value.]

Now I need to wait for a sunny day to see how much sunlight the sensor can handle.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 27, 2014 01:11PM
That is really great! Well done! I'd be interested in buying when you're all done.
Re: Differential IR sensor preliminary results
May 27, 2014 01:18PM
Quote
dc42
I just made some adjustments and did some more tests. It works fine on solvent cement. I now have it giving the same trigger height (0.50mm) within 0.05mm whether the bed is plain glass, Kapton, or solvent cement. White PVC tape causes it to trigger about 0.5mm too high, and I don't know why. Perhaps there is a contribution from reflections from the aluminium under the glass or the bottom of the glass, and white PVC tape is the only surface I have tested that blocks that. The trigger height doesn't change significantly between bed temperatures of 20C and 75C. The edge of the board is 1.5mm above the nozzle, so there is 2mm between the bed and the board when it triggers.

In that case I would be very interested in trying it if and when you have boards to sell.

As a silly question, the height difference you found with PVC tape is not due to the thickness of the tape itself is it?

Dave
(#106)
Re: Differential IR sensor preliminary results
May 28, 2014 09:56AM
I'm going to revise the PCB layout for the production version of the board soon, so I need to choose the LED that shows the heater power. Simplest to fit would be a SMD LED on the SMD side of the board (facing the z-axis), but that won't be easy to see from the front of the machine. So I'm thinking of using a through-hole LED on the front of the board instead, in the place where the fan connector is on my other boards, and move the fan connector right a little to where the ultrasonic connector used to be. Or maybe I should make the whole board a little taller so that I can put the LED above all the connectors. Do any of my potential customers for this board have any preferences?

Also, what colour should the LED be? I'm thinking amber or yellow.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 28, 2014 12:13PM
would it be possible to use the smd and modify the fan duct (or whichever part the board is mounted to) to act as a lightguide or diffusor? Sorry I'm on the run hard to check right now.
Re: Differential IR sensor preliminary results
May 28, 2014 01:41PM
Quote
auser
would it be possible to use the smd and modify the fan duct (or whichever part the board is mounted to) to act as a lightguide or diffusor? Sorry I'm on the run hard to check right now.

That's an interesting idea. However... my board is designed to be mounted on the z-axis side of the heatsink duct, with the through-hole components on the side away from the z-axis. The SMD components are on the side facing the z-axis, which keeps them clear of the through-hole components and the heatsink duct, so that you don't need to make room around the mounting points on the heatsink duct to clear any components. This means that a SMD LED on the same side as the other SMD components is on the wrong side to use the duct as a diffuser.

I don't want to put SMD components on both sides of the board because I'm not equipped to do that sort of assembly easily. I guess it would be possible to move all the SMD components to the other side of the board, but then I would have to specify clearances around the mounting points, and the fan duct would need to be modified again.

Currently I'm favouring making the board about 6mm higher and fitting a wide-angle through-hole LED just above the 8-pin connector. It would also mean that anyone who doesn't like the colour of LED I supply with the kit can substitute their own.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 28, 2014 03:04PM
Through-hole would probably be the easiest. I have successfully mounted a surface mount LED upside down, with its light shining through a hole drilled between its pads. One of the various designs of light-guide might be suitable and there is also the possibility of using a length of optic fibre to provide an indicator remote from the position of the LED (which may appeal due to its novelty and the fact it will not be blocked whatever modifications the user has made in that area).

Dave
(#106)
Re: Differential IR sensor preliminary results
May 28, 2014 03:46PM
My take - do what you find easiest, color of the led, can adapt to anything but pink

Erik
Re: Differential IR sensor preliminary results
May 28, 2014 06:22PM
Finally something new again David! Sign me up for a pre order please grinning smiley!

Edit: Any chance of adding a potentiometer to dim the leds as well? Apparently the CREE leds get too glaring when viewed from certain spots.

Edited 1 time(s). Last edit at 05/28/2014 06:36PM by Prefinity.
Re: Differential IR sensor preliminary results
May 28, 2014 06:31PM
I think red would be the most appropriate and would agree that it would be best to utilise the simplest method of fitting through-hole above the connectors.

I also run my ormerod without the heat spreader so have glass on top of the heater panel, Do you foresee any problems with this arrangement and your new sensor system?


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: Differential IR sensor preliminary results
May 28, 2014 08:11PM
I've now re-laid out the board. I've made it 6mm higher and added a square wide-angle through-hole LED in the middle of the board just above the connectors. I'm feeding it from a small bridge rectifier so that the heater polarity doesn't matter. The only disadvantage I can see with this arrangement is that it might not be compatible with some of the designs for modified z-extrusion top caps I have seen that also cover the threaded rod, since the board could hit that cover a few mm before the head reaches the top of the z-travel. I've shaved a corner off the top of the board to reduce the likelihood of that happening, but if it's still a problem then a simple solution would be to make the cover a few mm thinner than the part that covers the z-extrusion.

I'm planning to use an amber LED. There is already a red one on the heated bed, and I think it would be beneficial to use a different colour.

I've added an alternative mode that can be selected when there is a 4th wire running back to the Duet. In this mode, it works as a simple modulated IR sensor. I've done this because if you use the differential sensor for x-homing, then the height of the homing tab is quite critical. It's less critical in the alternate mode.

appjaws, not using the heat spreader should make no difference, see [forums.reprap.org].

Prefinity, the constant current LED driver chip I am using supports increasing the current above 20mA, but not reducing it. In principle the brightness could be controlled from the microcontroller using PWM, but this would need an extra driver transistor as well as the pot. And there isn't really room for a pot, except for a small SMD trimmer, which would be difficult to adjust and risk a short. I agree that the LEDs are very bright if you look at them directly, but I don't find it a problem. Perhaps you are using a different heatsink duct that doesn't shield the LEDs from direct view as well as the standard one? If you want to dim the LEDs permanently, you could add 1K resistor in parallel with the LED chain, which would be quite easy to do. A 1K resistor would halve the current to about 10mA, and a 680 ohm resistor would reduce it to about 5mA.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 28, 2014 11:05PM
David, I have limited electronics and diagram reading experience and can't figure out which pins exactly to solder the resistor to, could you kindly go into detail? Well, my fan duct shields it from view if i had it in a normal position but the height i place the printer at is just a little awkward and the beam gets thru. Its only the lowest led by the way, the other two are splendid. Any ETA on the new board for ordering? I'm always eager to try your tweaks!

Matt.
Re: Differential IR sensor preliminary results
May 29, 2014 03:03AM
Matt, if it's just the lowest led that's a problem, then you could solder a wire link across its pins on the SMD side of the board, which will turn it off. This is OK to do because the leds are driven from a constant current source.

EDIT: if you don't want to turn it off completely, then instead of a wire link, try soldering a resistor across the pins of the lowest led to dim just that one. 220 ohms should be about right.

On the new board, I had to move the lowest led higher up because the sensor parts take up more room. So it should no longer be a problem.

Edited 1 time(s). Last edit at 05/29/2014 03:21AM by dc42.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 30, 2014 10:33AM
Two updates:

1. I've started a new thread with more details of the new board (including prices), and inviting Ormerod owners to pre-order it. See [forums.reprap.org].

2. Would it be useful to have a red SMD LED on the board that lights when the sensor is triggered? Being on the SMD side of the board, it wouldn't be especially easy to see, but it might make setting up the sensor easier - especially for those who use Pronterface and don't have a continuous G31 readout.



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

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: Differential IR sensor preliminary results
May 30, 2014 12:38PM
Yes please, a great ides.


appjaws - Core XYUV Duet Ethernet Duex5
firmware 3.1.1 Web Interface 3.1.1
Ormerod 1-converted to laser engraver, Duet wifi
OpenSCAD version 2020.07
slic3r-1.3.0, Simplify3D 4.1.2, Cura-4.4.1
Re: Differential IR sensor preliminary results
May 30, 2014 12:43PM
Quote
dc42
...it wouldn't be especially easy to see, but it might make setting up the sensor easier - especially for those who use Pronterface and don't have a continuous G31 readout.

Yes I would find that useful

Erik
Sorry, only registered users may post in this forum.

Click here to login