Question about distance sensor for compatibility with duet 3
-
So a few days ago I implemented a dc42 ir sensor on a gantry machine designed to make paintings with duet 3. The idea was that the machine could probe a stationary reservoir of paint with the ir sensor, detect how much paint was remaining in the reservoir, and adjust brush dipping height. This worked extremely well until I started using black paint, which was not detected, and since the sensor triggers 2-3mm above the surface height, the machine dunked the ir sensor in black paint...
Wondering if anyone has a recommendation of a sensor or method of doing this reliably.
The reservoir is only 60mm in height. It would be nice to have +- 1mm accuracy.One answer would be to use a longer range sensor like this adafruit time of flight :
https://www.adafruit.com/product/3316
This would allow me to limit the probing distance and never have the probe come near the paint,
but would require a little microcontroller to turn i2c into a probe signal (plugged into duet3 toolboard).The issue with having a float based trigger (like in a toilet) is that paint builds up on it and changes the accuracy.
Anyone have other ideas? It would be great if the sensor I used had a digital output based on a 60mm trigger height. If we can read sensors on toolboards now is there an analog device that would work? Does anything like this exist that would detect acrylic paint and water?
Cheers,
T -
@tristanryerparke If the Paint is conductive you could use current to measure it.
-
I thought of that, but unfortunately it's a good insulator.
-
Some ideas:
- You could try increase the sensitivity of the IR sensor, either in firmware or by changing the value of a resistor. The latest firmware deliberately degrades the sensitivity, to avoid false triggering when the sensor is along way above a reflective surface.
- You could try a capacitive sensor above the surface; but they are sensitive to temperature and humidity.
- What is the paint container made of? If it is glass or another nonconductive material, and not too thick, then it's easy to make a capacitive sensor, by sticking some metal foil to the outside. This won't work if the paint clings to the sides of the container.
- You can now buy inexpensive laser time-of-flight distance sensors, however I can't remember whether you can get 1mm accuracy from them, nor do I know whether they will see black paint better than the IR sensor does.
HTH David
-
Thanks for these recommendations David,
I'll give each of them a shot but I have a few questions:- You could try increase the sensitivity of the IR sensor, either in firmware or by changing the value of a resistor. The latest firmware deliberately degrades the sensitivity, to avoid false triggering when the sensor is along way above a reflective surface.
I'm hesitant to keep using the ir sensor as it got ruined by the paint and I would have to buy another and put it at the same risk... Would it work with any form of protective coating?
- You could try a capacitive sensor above the surface; but they are sensitive to temperature and humidity.
If I could find a waterproof sensor that is easy to clean, this would be great. The temperature is regulated in the space and I guess anything under 3mm accuracy would actually be fine. Any suggestions?
- You can now buy inexpensive laser time-of-flight distance sensors, however I can't remember whether you can get 1mm accuracy from them, nor do I know whether they will see black paint better than the IR sensor does.
I just borrowed one from a friend and am going to give this a try with a little Arduino to convert the signal.
Looking into the capacitive foil technique as well.
Cheers,
T -
@dc42 I just got this system working well with capacitive sensor. Thanks.