i use opamps for EVERYTHING, i havn't learned arduino so far and i gotta tell yall opamps are friggn magic, theyre the perfect compromise of analog and digital, take almost no current, have one hell of a supply voltage range and they never break :D
It's so simple! All you need to know is that: 1. An op amp does all it can at its output to keep its inputs at the same voltage; 2. When the + input is greater than the - input, the output swings positive and when the opposite is true, the output swings negative; and 3. No current ever flows in or out the op amp's inputs. Knowing that, you guys won't get it wrong ever again. The rest is pure maths! You love maths, don't you?! 😁 Ps: Dave Jones - from the EEVBlog - has a lovely video tutorial on the subject. Go check it out!
You could improve the optical sensor by using a microcontroller to pulse the transmitter LED really fast, thus creating a carrier frequency, and only look for that specific frequency on the receiver side of the sensor. This way you could tell the difference between ambient light and the TX LED.
@@fdavpach Thats easy to work around. You can buy the IR receivers in other frequency's like 52khz for the same price, and can choose one that is not common in tv receivers. Also the key is brightness, you can ajust the brightness of the transmitter led. You do not need to control a tv across the room, only detect if the beam is blocked over afew inches so it can be really dim and still work phenomenally well. Third option is you dont have to leave it running all the time, turn it on only when moving the conveyor belt and homing the board.
Fun to see this continuing to progress! Need to figure out some project that requires mass production of PCBs just to have an excuse to build one of these. With the IR sensor, one option is to encode a specific signal that you're looking for, so you can tell noise apart from signal.
I would look at the "VL53L0X" and "VL53L1X". Both being TOF laser-ranging modules that interface via I2C. Also priced similarly to the ultrasound breakout module. You could mount one directly to the controller card depending on how it will be positioned in the machine.
If you modulate the IR LED current in the light sensor at a high frequency and AC couple (then filter) the output of the receiver then you could make it immune to ambient light.
Basically: using the Lock-In-Amplifier principle en.wikipedia.org/wiki/Lock-in_amplifier Could just be done also by a) drive an IR LED by a 50% PWM b) sample the light sensor values at the middle of the on/off periods c) use the amplified difference between on/off sensor value
As others already have pointed out, you already have a camera mounted top down. That could be used in numerous ways. 1. Add an Aruco corner on the board and use the camera to calculate the board's position. 2. Add an addressable LED strip underneath the PCB and light one LED at a time until the light disappears. 3. Use edge detection from OpenCV to detect the border of the card. 4. Use the camera to detect an expected footprint on the PCB. Several solutions could be combined to a greater effect. Good luck. =)
Rather than using a sensor to detect the position, the pick and place machine I run boards on(Assembleon Topaz) just has the PCB run into an air cylinder and run the conveyor for a second or two longer than it thinks it needs to. Then when it PCB needs to leave the machine, it lowers the air cylinder and runs the conveyor again. Pretty cheap, easy and reliable to precisely locate a PCB. It does use laser distance sensors on other points on the conveyor for different(less positionally sensitive) purposes.
just a little idea that i tested just for a proof of concept a year ago : black plastic trash bags are transparent for thermal cameras (glass, on the other hand is opaque), thus they bloc most of visible spectrum bu are very transparent to IR wavelentghs. Just by putting one or two thicknesses of garbage bag, I decreased a lot the sensitivity to visble light of an infrared barrier I salvaged in an old printer, maybe you can use this property of a such low-end product to your benefit in terms of reliability of infrared sensors
I'd say that VL6180 might be better fit, since there is no need for long range detection www.st.com/en/imaging-and-photonics-solutions/vl6180.html#overview
Put an LED below the board, move down-looking camera above LED, and you now have a photo-interrupter which can detect the board edge independent of what it looks like.
What is the problem of using the camera to looking for the edge of the boards ? (before calibrating) Just put camera in X,Y pos. to wait for the board, while conveying let OpenCV watch... You could put a rgb Led below, if OpenCV would make a problem.not finding the edge.
Love your op amp combat segment! So fun. Personally I’d use a break beam sensor that modulates the IR to reject ambient light. Cheaper DOM smaller and a dependable digital signal out.
There are optical sensors based on reflexion wich dont send out light all the time but with a specific frequenzy wich the sensor is expecting to get back. With this princip the sensor can compensate other light sources. Because they can compare the light intensity when the led is on and of and/ore only give an output when the send out frequenzy is coming back.
In addition to the other suggestions to use a carrier frequency for the IR sensor, it's possible to get much smarter on the analog side with more op-amp magic/filtering. You can set up hysteresis to reduce noise and multiple triggering, and it's possible to build a circuit that dynamically adjusts to ambient light by only watching for fast changes in light output, with the "baseline" off reference constantly adapting to the long-term light level. This allows you to make your comparator trigger threshold much more aggressive because it's now "light level relative to current ambient light" rather than an absolute light level; this will also help with different reflectivities as you simply tune the comparator sensitivity to the "worst case" and it works equally well with more reflective boards. I built something like this to detect flashing headlights/emergency lights years ago in combination with a photodiode and some lenses/filters and it worked surprisingly well, outputting a very clean on/off signal any time the sensor's illumination level changed fast enough. Worked equally well in daytime and darkness in an outdoor but covered application. It was set up with a multiple-minute time constant for the baseline reference adjustment, so as long as your panel edge detection takes less than a minute or so you should be able to adapt to any other light level changes in the area well. That being said, this still doesn't resolve the small sensor potentially causing problems on board cut-outs, although you can likely mitigate that in software by having it scan past the "edge" of the board and seeing if it becomes visible again within a few mm (which would help with all but the largest cut-outs). The ultrasonic sensor is likely simpler, but it will take up a lot more space on the machine and will be a lot more expensive than a IR detector arrangement - maybe not critical considerations for a project like OpenPnP.
If you mount the TOF sensor to the head, you can have the head move to a specific X location so you can stop the board at the optimum location, or even at multiple locations so you can assemble pcbs that are longer than your X travel allows. You can also change the Y location so you can deal with PCBs that have cutouts that cause the board to stop in the wrong X location. Check out the iPulse M10/M20 or S10/S20; it does something similar.
The way I use IR reflection sensors is to sample with and without the TX LED on. Then I look at the difference between these two readings as my output. What this does is if there is ambient light on the sensor both readings have the common mode signal and thus the difference is cancelled out. So what the signal represents is purely the difference due to the reflection. It works great for me! Of course this relies on the two samples not having different common mode components, ie the lighting doesn't change . But that is easy to solve but just sampling the two very soon after each other. I use this solution with that exact same IR sensor to reliably sense whether the lid is on my product or not for tamper detection. Also, the lid of my product is matte black ABS, so the reflectivity isn't even very good. But with some very basic filtering and taking a few interleaved samples as I described above, it works absolutely perfectly. One more note, if you decrease the current limit resistor on the TX LED (within the maximum current rating of course) and increase resistance of the pull-up on the output. This drastically improves the sensitivity of the sensor. The sensor is marketed as having a range of a few millimeters, but I reliably use it at ~25mm.
@@ohadreu6865 very likely not. Plain plastic for example can be detected with capacitive sensors very easily. Extreme precision isn't really needed in this use case
I think that optical sensor is actually designed for detecting paper in printers, if it is like others I found when I was looking into similar sensors a while back.
Agreed, just what I was thinking. And you already have that camera built into the system, so no increase in BOM cost or complexity. It might be hard(ish) to detect the PCB panel from a single static image (different soldermasks, size of board, etc) but it should be much easier to identify exactly where the leading edge of the PCB is as it moves by comparing images from the camera before and after a set amount of belt movement?
Put an LED below the board, move down-looking camera above LED, and you now have a photo-interrupter which can detect the board edge independent of what it looks like.
On our professionnal convoyer we had on our SMT line, we had originally optical sensors, but the trouble was with the sun. I worked on a proximity sensor manufacture, we replaced the original one by customs one with red light and IR sensor, like this we avoid sun problems!
If other things don't work out take a look at the AD7745 -- its a capacitance to digital converter. Its range is around +/- 4 pF, may be possible to sense the board transit through the dielectric changes. Just a thought.
I'd have gone the beam-interruption route and watched two spots on the board feed rail on the inlet side with a small known distance between them, (say, 0.5-1cm, although I don't see why it wouldn't be possible to go smaller) and similarly two on the outlet, and with a little processing it would be trivial to know when the board was at the right spot coming into the work area (trip #1 then #2 and when #1 goes off you know it's between #1 and #2) as well as far enough out to be safely out of the way. Also, if you want to get more complicated you can do remarkably precise locating with a small camera and OpenCV. I have a project that uses two laser diodes a carefully selected distance from each other and at a carefully set angle between them, and with a camera looking at a target (a simple sheet of paper) and feeding the image into OpenCV, and some filtering and trigonometry applied to the image, I'm able to get sub-millimeter distance measurements. Just the movement from blowing air on the target paper is enough movement to detect, so I had to clamp it between clear plastic and fix the camera to it so nothing could move except for the target.
The "Sharp IR" sensors (GP2Y0A21YK0F) are essentially an IR LED with a small half angle (narrow beam) and a linear/2d optical sensor (line scan camera). It essentially uses parallax measurement to calculate distance. They're a little pricey, considering an IR beam is probably all you need. A bright IR LED and phototansistor, both with a narrow angle. If you measure the phototransistor with the led on and off, and take the difference, you can figure if the board is in place (independent of background light). Would work as a "beam" sensor with LED and PT on opposite sides of boards, or a reflectance sensor if mounted on the same side. With a bright enough LED I wouldn't expect a matte PCB soldermask to be a problem. The SFH4545 and TEFT4300 would be a good starting point.
Reflective sensors in such a setting often modulate the signal and use signal correlation to find out what comes from the sensor and what from ambient. You would need a MCU to do this as well, so the ultrasound option is so much easier to apply in your case.
Break beam optical sensor at the rail where you guide the PCB panel? If it runs trough it gets triggered. Should be much more easier and cost effective. You could then implement a couple of them to detect stations( placement, soldering station) sensor like the GP1S23
Hey! love the project. I've worked with a bunch of IR sensors you might wat to take a look at the GP2Y0D805Z0F. It seems te be pretty much everything you are looking for. Pololu makes some nice breakout boards. It uses some form if IR traiangulation insted of just the amout of light reflected, so it shouldn't be influenced by outside lightsources. And it already produces a digital output without extrenal components.
Great video, love your enthusiasm. My 0.02USD: I think you might be better off using a capacitive proximity sensor for this application. They are widely used in industry for detecting objects, for example on an automated assembly line. Inductive proximity sensors might work too, but I'm not sure. 🤷
Little tip, although technically you can use an opamp as a comparator, it's recommended you use a dedicated comparator instead. There's an interesting timing issue with saturation that occurs in opamps, but they tend to work better in this application in general really.
Flip up stop with sensor (micro switch or optical break) will give consistent stop positions. Put the axis of rotation perpendicular to the feed direction so it will move away and down when retracted.
The best part is no part... use your fiducial camera, have a specific pattern printed below the PCB pathway, when it doesn't register that pattern, the board is there.
I know with reversing sensors that if they get dirty they give false readings, so if you mount then top down you won't get dirt and dust on the sensors. Additionally, with optical sensors a shroud is often used around the sensor to prevent unwanted light triggering a false reading.
How about adding a resistor to the analog output signal such that the range is between 0 and the threshold voltage of a transistor gate? Some light sensors requires shielding from ambient light in order to operate reliably. BTW, are you Polish?
I would use a photoelectric proximity sensor or capacitive proximity sensor we use them on a few conveyors at work that look straight up to detect if a box is on the conveyor.
You can control the LED on and off and take a reading of the sensor with it on and off, subtract both measurements and you've got a reading immune to light, do this many times a second and take a moving average and you've got a decent sensor.
I honestly think the IR sensors are way more suited for this. You do NOT want a reflectance sensor though. You want a beam-break sensor. You already have a lower bound where your PCBs ride the belts, they can't go lower than that. So a sensor that either overlaps past the belts contact point, or is at the intersection of where they start/stop.
I still think you should use the camera with some edge detection algorithm and possibly a uniform background behind the PCB. No additionnal sensor required. Plus doesn't openpnp has already some form of image recognition that you could maybe use?
Trying to use a this to detect a board in machine repeatability is going to be a pain just use a stop then clamp like older PNP machines.(I think tuning this per board would get old quick and especially if you start getting into double sided boards) It would still work well for a sema interface for detecting when the board enters, exits or is in que on the conveyor.
Reuse an existing sensor... your camera! Advantages: no extra BOM, can configure the board stop location in software (per job if required!). Simply move your down looking camera to XY position and activate conveyor. Stop conveyor when board enters camera frame (eg detect a significant change in pixel values in middle zone of image ). OpenPNP then takes over with fiducial search, starting at your configured board stop position. Simples.
It would be much simpler to use The break beam light sensor. A board is there or not. It’s not going to be transparent. You just need the leading edge, whole in the board should not be an issue. And you can control the sensitivity so ambient light has less impact.
Why not use the overhead camera. If you get some coloured card to put underneath the pnp, I.e. hot pink, because no one makes hot pink pcbs. It could be as simply as taking the average colour across a column of pixels. Means no extra BOM at all. Otherwise capacitive sensors can be good too. And the hardware for a capacative sensor is built into the stm32s
I'd just go the lazy simple way and put a microswitch through the side of the conveyor rail so the edge of the board triggers it. You could use maybe five of them and select which you want based on how big the board is and where you want it to stop.
The ir light sensor was doomed from the start, the difference in reflectivity of different materials and ambient light disqualified it. Capacitive Proximity sensors have been suggested, I a sceptical as PCBs are nonconductive until you hit a trace, thus you need a ground plane or a trace as a border around the pcb. You mentioned beam breaks, those would be fantastic for precision but you need components spread out potentially getting in the way. The ultrasonic sensor is bulky but it is contained on a single board which means it will be quite easy to install under the pcb out of the way of moving parts, and your resolution of 1 mm is way more than needed. I wouldn't sweat the extra microcontroller too much, this is a complicated machine and building one small sub assembly is not a great increase in complexity.
If only you had a moveable downward looking camera that could be moved to a given spot (with a coloured marker below it) and a computer already running computer vision, the detection of the pcb position could be 100% "free" but would require some software... Oh well... I'm also one of those that think you didn't give the optical sensor much of a chance, with ambient light it needs modulation and band pass (or at least high pass) filtering. They also do come with different focus distances though I would use a setup where the beam was interrupted as most PCBs are IR opaque
I have question are you in business of doing Open Source customer project around the ESP32-A1S making it breakout board with extra stuff. I made already the schema but the next step is to much for me. I'm just a programmer.
I'd be pretty cool to see you try and implement a solution with openCV as well. Simplest way to detect the PCB that I can think of would probably be background subtraction while the PCB is moving in, which should give you a pretty great outline that you could then find the contours of.
Ultrasonic sensors accumulate dust... Better not sure it for long term... Use ir sensor one end and photo diode at other end opposite and let PCB break the light path for detection....
Maybe use a laser module with a ldr on top then if the laser is detected by ldr mean nothing is interfering and if ldr sense nothing mean there is a board there
have an led under the path of the board, position the camera over that known location and then feed the board until the led is covered. the led shouldn't be too hard to detect and light conditions will be insignificant compared to the dirtect led light
"I used an op-amp correctly!" OMG that is so relatable.
Op-Amps: Tiny black boxes full of witchcraft!
i use opamps for EVERYTHING, i havn't learned arduino so far and i gotta tell yall opamps are friggn magic, theyre the perfect compromise of analog and digital, take almost no current, have one hell of a supply voltage range and they never break :D
It's so simple! All you need to know is that:
1. An op amp does all it can at its output to keep its inputs at the same voltage;
2. When the + input is greater than the - input, the output swings positive and when the opposite is true, the output swings negative; and
3. No current ever flows in or out the op amp's inputs.
Knowing that, you guys won't get it wrong ever again. The rest is pure maths! You love maths, don't you?! 😁
Ps: Dave Jones - from the EEVBlog - has a lovely video tutorial on the subject. Go check it out!
You could improve the optical sensor by using a microcontroller to pulse the transmitter LED really fast, thus creating a carrier frequency, and only look for that specific frequency on the receiver side of the sensor. This way you could tell the difference between ambient light and the TX LED.
This. One advantage of this approach is that you can buy inexpensive 38khz IR receivers that filter out the carrier frequency.
@@andrewkieran8942 Indeed, this would simplify the code ! Though I wonder how complex it would be to do with the hardware he already has.
Just need a 555 as on some cheap sensors you can find online
@@andrewkieran8942 well that would jam all your electronics in range with IR like TVs, ACs etc
@@fdavpach Thats easy to work around. You can buy the IR receivers in other frequency's like 52khz for the same price, and can choose one that is not common in tv receivers. Also the key is brightness, you can ajust the brightness of the transmitter led. You do not need to control a tv across the room, only detect if the beam is blocked over afew inches so it can be really dim and still work phenomenally well. Third option is you dont have to leave it running all the time, turn it on only when moving the conveyor belt and homing the board.
Fun to see this continuing to progress! Need to figure out some project that requires mass production of PCBs just to have an excuse to build one of these. With the IR sensor, one option is to encode a specific signal that you're looking for, so you can tell noise apart from signal.
I would look at the "VL53L0X" and "VL53L1X". Both being TOF laser-ranging modules that interface via I2C. Also priced similarly to the ultrasound breakout module. You could mount one directly to the controller card depending on how it will be positioned in the machine.
I just recommend the same 🤣
He said no I2C though
@@KANahas He's looking at sticking a mic on there for the HC-SR04 anyway. So at that point the world's your oyster.
If you modulate the IR LED current in the light sensor at a high frequency and AC couple (then filter) the output of the receiver then you could make it immune to ambient light.
Yeah did this in uni for a project. It also allows you to filter room light away
Basically: using the Lock-In-Amplifier principle en.wikipedia.org/wiki/Lock-in_amplifier
Could just be done also by
a) drive an IR LED by a 50% PWM
b) sample the light sensor values at the middle of the on/off periods
c) use the amplified difference between on/off sensor value
@@Gentle_Chu same here, if you don't want to filter too much fire the IR LED at the smallest possible dutycycle (
As others already have pointed out, you already have a camera mounted top down. That could be used in numerous ways.
1. Add an Aruco corner on the board and use the camera to calculate the board's position.
2. Add an addressable LED strip underneath the PCB and light one LED at a time until the light disappears.
3. Use edge detection from OpenCV to detect the border of the card.
4. Use the camera to detect an expected footprint on the PCB.
Several solutions could be combined to a greater effect. Good luck. =)
Rather than using a sensor to detect the position, the pick and place machine I run boards on(Assembleon Topaz) just has the PCB run into an air cylinder and run the conveyor for a second or two longer than it thinks it needs to. Then when it PCB needs to leave the machine, it lowers the air cylinder and runs the conveyor again. Pretty cheap, easy and reliable to precisely locate a PCB. It does use laser distance sensors on other points on the conveyor for different(less positionally sensitive) purposes.
Maybe you could try with the VL53Lxx time of flight sensor?
I second this. These are tiny and robust to light levels.
just a little idea that i tested just for a proof of concept a year ago : black plastic trash bags are transparent for thermal cameras (glass, on the other hand is opaque), thus they bloc most of visible spectrum bu are very transparent to IR wavelentghs. Just by putting one or two thicknesses of garbage bag, I decreased a lot the sensitivity to visble light of an infrared barrier I salvaged in an old printer, maybe you can use this property of a such low-end product to your benefit in terms of reliability of infrared sensors
What about TOF laser sensors like VL53L0x ?
Those things are tiny and not expensive at all.
Ha I just recommended the same..
I'd say that VL6180 might be better fit, since there is no need for long range detection
www.st.com/en/imaging-and-photonics-solutions/vl6180.html#overview
Put an LED below the board, move down-looking camera above LED, and you now have a photo-interrupter which can detect the board edge independent of what it looks like.
What is the problem of using the camera to looking for the edge of the boards ? (before calibrating)
Just put camera in X,Y pos. to wait for the board, while conveying let OpenCV watch...
You could put a rgb Led below, if OpenCV would make a problem.not finding the edge.
Love your op amp combat segment! So fun. Personally I’d use a break beam sensor that modulates the IR to reject ambient light. Cheaper DOM smaller and a dependable digital signal out.
found you last week, love your energy and passion!
There are optical sensors based on reflexion wich dont send out light all the time but with a specific frequenzy wich the sensor is expecting to get back. With this princip the sensor can compensate other light sources. Because they can compare the light intensity when the led is on and of and/ore only give an output when the send out frequenzy is coming back.
In addition to the other suggestions to use a carrier frequency for the IR sensor, it's possible to get much smarter on the analog side with more op-amp magic/filtering. You can set up hysteresis to reduce noise and multiple triggering, and it's possible to build a circuit that dynamically adjusts to ambient light by only watching for fast changes in light output, with the "baseline" off reference constantly adapting to the long-term light level. This allows you to make your comparator trigger threshold much more aggressive because it's now "light level relative to current ambient light" rather than an absolute light level; this will also help with different reflectivities as you simply tune the comparator sensitivity to the "worst case" and it works equally well with more reflective boards.
I built something like this to detect flashing headlights/emergency lights years ago in combination with a photodiode and some lenses/filters and it worked surprisingly well, outputting a very clean on/off signal any time the sensor's illumination level changed fast enough. Worked equally well in daytime and darkness in an outdoor but covered application. It was set up with a multiple-minute time constant for the baseline reference adjustment, so as long as your panel edge detection takes less than a minute or so you should be able to adapt to any other light level changes in the area well.
That being said, this still doesn't resolve the small sensor potentially causing problems on board cut-outs, although you can likely mitigate that in software by having it scan past the "edge" of the board and seeing if it becomes visible again within a few mm (which would help with all but the largest cut-outs). The ultrasonic sensor is likely simpler, but it will take up a lot more space on the machine and will be a lot more expensive than a IR detector arrangement - maybe not critical considerations for a project like OpenPnP.
Probably not the first, but did you consider TOF (Time of Flight)...cheers.
I came here for this reply :P Was gonna mention Seon using them to pretty good effect :D
@@azyfloof me too....I've already mentioned them to Stephen....
Just wanted to write the same ;-)
me too.. VL53L1X TOF from ST, it is more of a point measurement though rather than the cone the ultrasonic gives you
If you mount the TOF sensor to the head, you can have the head move to a specific X location so you can stop the board at the optimum location, or even at multiple locations so you can assemble pcbs that are longer than your X travel allows. You can also change the Y location so you can deal with PCBs that have cutouts that cause the board to stop in the wrong X location. Check out the iPulse M10/M20 or S10/S20; it does something similar.
The way I use IR reflection sensors is to sample with and without the TX LED on. Then I look at the difference between these two readings as my output. What this does is if there is ambient light on the sensor both readings have the common mode signal and thus the difference is cancelled out. So what the signal represents is purely the difference due to the reflection. It works great for me! Of course this relies on the two samples not having different common mode components, ie the lighting doesn't change . But that is easy to solve but just sampling the two very soon after each other.
I use this solution with that exact same IR sensor to reliably sense whether the lid is on my product or not for tamper detection. Also, the lid of my product is matte black ABS, so the reflectivity isn't even very good. But with some very basic filtering and taking a few interleaved samples as I described above, it works absolutely perfectly.
One more note, if you decrease the current limit resistor on the TX LED (within the maximum current rating of course) and increase resistance of the pull-up on the output. This drastically improves the sensitivity of the sensor. The sensor is marketed as having a range of a few millimeters, but I reliably use it at ~25mm.
Capacitive Proximity switch is sad to be left out 😔
Those were the first things I thought about too
Probably big difference if the PCB has a ground plane or not, isn't it?
@@ohadreu6865 very likely not. Plain plastic for example can be detected with capacitive sensors very easily. Extreme precision isn't really needed in this use case
I think that optical sensor is actually designed for detecting paper in printers, if it is like others I found when I was looking into similar sensors a while back.
I would think your down-looking camera would be able to detect the board edge.
Agreed, just what I was thinking. And you already have that camera built into the system, so no increase in BOM cost or complexity. It might be hard(ish) to detect the PCB panel from a single static image (different soldermasks, size of board, etc) but it should be much easier to identify exactly where the leading edge of the PCB is as it moves by comparing images from the camera before and after a set amount of belt movement?
Put an LED below the board, move down-looking camera above LED, and you now have a photo-interrupter which can detect the board edge independent of what it looks like.
Most likely the camera is in another subsystem then the conveyor belt, thus cannot be easily be used for this purpose from a software side
On our professionnal convoyer we had on our SMT line, we had originally optical sensors, but the trouble was with the sun. I worked on a proximity sensor manufacture, we replaced the original one by customs one with red light and IR sensor, like this we avoid sun problems!
Man, i loved the edits on this video. For some reason it kind of hyped up the "next part" of the video. Good work!
If other things don't work out take a look at the AD7745 -- its a capacitance to digital converter. Its range is around +/- 4 pF, may be possible to sense the board transit through the dielectric changes. Just a thought.
I loved the shot at 8:26
Have you looked at the ST VL53L1X or L0X? It’s a very stable IR laser based distance sensor. I’ve got some I can send you
Love the use of Soylent boxes for project storage. I do the same thing!
Stephen this was shot beautifully and I loved it
What about a time to flight range sensor? Those are very reliable.
Agreed - board distance is small enough not to be a problem
I'd have gone the beam-interruption route and watched two spots on the board feed rail on the inlet side with a small known distance between them, (say, 0.5-1cm, although I don't see why it wouldn't be possible to go smaller) and similarly two on the outlet, and with a little processing it would be trivial to know when the board was at the right spot coming into the work area (trip #1 then #2 and when #1 goes off you know it's between #1 and #2) as well as far enough out to be safely out of the way.
Also, if you want to get more complicated you can do remarkably precise locating with a small camera and OpenCV. I have a project that uses two laser diodes a carefully selected distance from each other and at a carefully set angle between them, and with a camera looking at a target (a simple sheet of paper) and feeding the image into OpenCV, and some filtering and trigonometry applied to the image, I'm able to get sub-millimeter distance measurements. Just the movement from blowing air on the target paper is enough movement to detect, so I had to clamp it between clear plastic and fix the camera to it so nothing could move except for the target.
The "Sharp IR" sensors (GP2Y0A21YK0F) are essentially an IR LED with a small half angle (narrow beam) and a linear/2d optical sensor (line scan camera). It essentially uses parallax measurement to calculate distance. They're a little pricey, considering an IR beam is probably all you need. A bright IR LED and phototansistor, both with a narrow angle. If you measure the phototransistor with the led on and off, and take the difference, you can figure if the board is in place (independent of background light). Would work as a "beam" sensor with LED and PT on opposite sides of boards, or a reflectance sensor if mounted on the same side. With a bright enough LED I wouldn't expect a matte PCB soldermask to be a problem. The SFH4545 and TEFT4300 would be a good starting point.
Reflective sensors in such a setting often modulate the signal and use signal correlation to find out what comes from the sensor and what from ambient. You would need a MCU to do this as well, so the ultrasound option is so much easier to apply in your case.
Personally i love seeing you struggle with op-amps. I have never had any troubles with them and to me they are very understandable :)
This reads as a thinly veiled insult.
@@yoctoflop it was never meant as an insult. I love his videos :)
Daym that was some quality editing
Break beam optical sensor at the rail where you guide the PCB panel? If it runs trough it gets triggered. Should be much more easier and cost effective. You could then implement a couple of them to detect stations( placement, soldering station) sensor like the GP1S23
How only 5k views!? These are unreal videography and composition skills. Loved the resistor toss-up, I feel your pain.
can't you use the camera on the nozzle to detect the edge of the board, when it rolls into frame, through computer vision?
Super cool channel! Thank's for sharing every details about your pnp project!
Sending good vibes from france, have a nice day!
Hey! love the project. I've worked with a bunch of IR sensors you might wat to take a look at the GP2Y0D805Z0F. It seems te be pretty much everything you are looking for. Pololu makes some nice breakout boards. It uses some form if IR traiangulation insted of just the amout of light reflected, so it shouldn't be influenced by outside lightsources. And it already produces a digital output without extrenal components.
Since there is already a camera for placing components, why not use it to detect PCBs?
my samsung pick and place uses ones like 1:52, it has dark covers over the work area though and does get confused if a hole suddenly aligns perfectly.
could you not edge detect with the face down camera to find the leading edge of the boards?
I dont know whether anyone mentioned this but you can use VL53L0X or time of flight sensor. Very easy to use and can be directly pugged into i2C bus.
Great video, love your enthusiasm. My 0.02USD: I think you might be better off using a capacitive proximity sensor for this application. They are widely used in industry for detecting objects, for example on an automated assembly line.
Inductive proximity sensors might work too, but I'm not sure. 🤷
I love your work dude!!
Little tip, although technically you can use an opamp as a comparator, it's recommended you use a dedicated comparator instead. There's an interesting timing issue with saturation that occurs in opamps, but they tend to work better in this application in general really.
I wonder if an inductive sensor can be used. Similar to one for the Z axis on the Creality CR10s Pro V1.
Flip up stop with sensor (micro switch or optical break) will give consistent stop positions. Put the axis of rotation perpendicular to the feed direction so it will move away and down when retracted.
why not just flip a limit switch upside down? maybe a lil spring mount or something for different board sizes
or even crazier idea, two limit switched that sandwich the board :o
The best part is no part... use your fiducial camera, have a specific pattern printed below the PCB pathway, when it doesn't register that pattern, the board is there.
If you go the ultrasonic route, you could use an attiny ic to make the relative footprint of the sensor far smaller.
I know with reversing sensors that if they get dirty they give false readings, so if you mount then top down you won't get dirt and dust on the sensors. Additionally, with optical sensors a shroud is often used around the sensor to prevent unwanted light triggering a false reading.
How about adding a resistor to the analog output signal such that the range is between 0 and the threshold voltage of a transistor gate? Some light sensors requires shielding from ambient light in order to operate reliably. BTW, are you Polish?
inductive or capacitive sense could be interesting ideas, they come as modules that screw in and have simple outputs. ultrasonic seems useable tho
There is an ultrasonic sensor which outputs is analog, you can check the dfrobot site. Great video!
Could you use the camera to detect the position?
If the board will always ride on the rail, just put an optical (obstruction) sensor there. Direct digital output, and ambient light "immune".
Great content, love the story shifts 8-)
I would use a photoelectric proximity sensor or capacitive proximity sensor we use them on a few conveyors at work that look straight up to detect if a box is on the conveyor.
Capacitive limit switches should work perfectly in this case they come as PNP or NPN output and most models can be fine tuned with a trim pot
You can control the LED on and off and take a reading of the sensor with it on and off, subtract both measurements and you've got a reading immune to light, do this many times a second and take a moving average and you've got a decent sensor.
I honestly think the IR sensors are way more suited for this. You do NOT want a reflectance sensor though. You want a beam-break sensor. You already have a lower bound where your PCBs ride the belts, they can't go lower than that. So a sensor that either overlaps past the belts contact point, or is at the intersection of where they start/stop.
I still think you should use the camera with some edge detection algorithm and possibly a uniform background behind the PCB. No additionnal sensor required. Plus doesn't openpnp has already some form of image recognition that you could maybe use?
have you considered time of flight sensors (much like the sonar, but much smaller / easier to mount)
Trying to use a this to detect a board in machine repeatability is going to be a pain just use a stop then clamp like older PNP machines.(I think tuning this per board would get old quick and especially if you start getting into double sided boards) It would still work well for a sema interface for detecting when the board enters, exits or is in que on the conveyor.
Makes me wonder if using an attiny microcontroller would work for your sensor
Reuse an existing sensor... your camera! Advantages: no extra BOM, can configure the board stop location in software (per job if required!). Simply move your down looking camera to XY position and activate conveyor. Stop conveyor when board enters camera frame (eg detect a significant change in pixel values in middle zone of image ). OpenPNP then takes over with fiducial search, starting at your configured board stop position. Simples.
I think a capacitive proximity sensor would be good to use here. Saves you the additional microcontroller.
It would be much simpler to use The break beam light sensor. A board is there or not. It’s not going to be transparent. You just need the leading edge, whole in the board should not be an issue. And you can control the sensitivity so ambient light has less impact.
Why not use the overhead camera. If you get some coloured card to put underneath the pnp, I.e. hot pink, because no one makes hot pink pcbs. It could be as simply as taking the average colour across a column of pixels. Means no extra BOM at all.
Otherwise capacitive sensors can be good too. And the hardware for a capacative sensor is built into the stm32s
How about ToF sensor?
I'd just go the lazy simple way and put a microswitch through the side of the conveyor rail so the edge of the board triggers it. You could use maybe five of them and select which you want based on how big the board is and where you want it to stop.
I ordered one . Can you print the parts before it shows up ?
As an alternative, a panasonic GP2Y0A21YK0F would also probably work well or a VL6180x but the last one is probably overkill for this application
You could also use one of these "IR Infrared Obstacle Avoidance Sensor"
Where do you buy your components
So, how does your opamp comparator differ from a Schmitt Trigger?
i use a capacitive probe for auto bed leveling my glas bed 3d printer. works a treat... give it a try. its reliable, cheap and readily available.
Why dont u Try light barrieres from SICK? I have really good experience with them. They also make light switches with laser or normal leds
A laser sensor would be more accurate. Tx onn one side of the board and Rx on opposite. Modulate it with a AC for better performance.
The ir light sensor was doomed from the start, the difference in reflectivity of different materials and ambient light disqualified it. Capacitive Proximity sensors have been suggested, I a sceptical as PCBs are nonconductive until you hit a trace, thus you need a ground plane or a trace as a border around the pcb. You mentioned beam breaks, those would be fantastic for precision but you need components spread out potentially getting in the way.
The ultrasonic sensor is bulky but it is contained on a single board which means it will be quite easy to install under the pcb out of the way of moving parts, and your resolution of 1 mm is way more than needed. I wouldn't sweat the extra microcontroller too much, this is a complicated machine and building one small sub assembly is not a great increase in complexity.
What about inductive - as used by 3d printers for Z probing?
If having a limit switch pushing up on the board is bad. mount it above instead so it pushes down..
how about a switch from the side of the board, that pops out when the board has passed?
If only you had a moveable downward looking camera that could be moved to a given spot (with a coloured marker below it) and a computer already running computer vision, the detection of the pcb position could be 100% "free" but would require some software... Oh well...
I'm also one of those that think you didn't give the optical sensor much of a chance, with ambient light it needs modulation and band pass (or at least high pass) filtering. They also do come with different focus distances though I would use a setup where the beam was interrupted as most PCBs are IR opaque
How were you viewing the live feedback on your computer screen? Looked like you were using the arduino..
You should look into MaxBotix Ultrasonic sensors. They might have something that you are looking for
I have question are you in business of doing Open Source customer project around the ESP32-A1S making it breakout board with extra stuff. I made already the schema but the next step is to much for me. I'm just a programmer.
VL53L0X you can get one for about 2 dollars on Ali or Amazon and get submilimeter acuracy in prety much all lighting conditions.
I'd be pretty cool to see you try and implement a solution with openCV as well. Simplest way to detect the PCB that I can think of would probably be background subtraction while the PCB is moving in, which should give you a pretty great outline that you could then find the contours of.
Ultrasonic sensors accumulate dust... Better not sure it for long term... Use ir sensor one end and photo diode at other end opposite and let PCB break the light path for detection....
Cool shirt! I use gather every day :) Where did you get it?
Pretty sure an optical limit switch similar to those used in 3d printers would as well...
Why not use a distance sensor??
Maybe use a laser module with a ldr on top then if the laser is detected by ldr mean nothing is interfering and if ldr sense nothing mean there is a board there
why not inductive sensors ? can't it detect the copper on the pcb?
Only if the edge of the pcb has copper in it (the antenna side of a pcb may have a large area without copper)
have an led under the path of the board, position the camera over that known location and then feed the board until the led is covered. the led shouldn't be too hard to detect and light conditions will be insignificant compared to the dirtect led light
I don't know shit but it would be interesting to use computer vision to do this with the camera on the manipulator head.
Hahah first lol. I have been eagerly waiting for this :)
i have an idea to use hcsr04 without microcontroller, it can give digital and analog both output.😁✌️also its super cheap.