 The Great Search brought to you by Digikey and Adafruit. Every single week, Lady Adafruit shows you, using your powers of engineering to help you, yes, you find things on digikey.com. Thank you so much, Digikey, for making this segment possible. Lady Adafruit, what's on the Great Search this week? Okay. So we were talking about earlier in the show, the driver that I wrote for the VCNL 4020, which is a proximity and ambient light sensor with a, you actually see here, let me just really zoom in, there's an IR emitter here. This is like a little IR, ooh, thank you, IR emitter. And then this is a reflectance detector. And so this chip has a pulse of infrared light that goes out, hits something, bounces back, and then the amount of light that is reflected back is measured by this chip, and you can read it over I squared C. Maybe if you go to the overhead, this might, you can see, I have a little demo code running here that pulses, that's it doing a measurement. So every time you see that pulse, it's a measurement from that IR LED. Okay, so you can go back to the computer. I thought it would be fun to check it off. And these are really great for doing distance measurement. And it kind of reminded me that, you know, one of the first sensors that I ever used as like a youngling engineer was one of these sharp GP2Y0A21SYKAZUF. This is like a classic early, I think it's like a late 80s design sensor, very simple. You don't even know if, I mean, it has a chip in it somewhere, I guess, but you know, it's very, it's clearly quite old. And what this does is it has an emitter LED, I think this one, I mean, this one, and it sends out again infrared through this five millimeter LED and then the light bounces back and then you get an analog voltage output. So power, red, three to five volts, ground, I mean, it's just five volts, ground black, and then the analog signal back is white. And this was like a very popular sensor. It's pretty expensive and it's not used as often, but in the beginning when you didn't even have a microcontroller, like you could hook this up to a comparator. And so when the analog voltage went above or below a certain value, you could detect, oh, somebody is within this distance or you could change the brightness by having the analog voltage feed into some other, you know, like current amplifier, whatever. So these were very, very popular and the VCNL4020 is kind of the next generation of that. I wanted to find a chip that could be a replacement for this. One of the nice things about this particular chip is it can go up to 80 centimeters. So it's like, you know, almost a meter. You might be saying like, oh, you know, why don't I just use TemmaFlight chips? And you can use TemmaFlight chips. We have various TOF, I will say this is not, by the way, this is not TemmaFlight. One thing you can, the reason you can tell it's not TemmaFlight is whenever you see these two lenses, it's usually infrared, not TemmaFlight. But the VL53 and VL61 family are true TemmaFlight, but they're also a little bit more expensive. They're about, you know, 15 bucks for a breakup board from us. The chip itself is like, you know, $3, $4, which is not a lot, but it is more than an infrared sensor. Infrared sensors are gonna be like on the order of a dollar. If that two bucks is important for your bill of materials and you don't need the precision, you might be happy with an infrared sensor. So let's go and dig a key. And then here is one thing you should not do. I was like, oh, I want a distance sensor. I'm gonna type in distance sensor. And what's interesting is that there's two kinds of sensors. There's distance sensors and there's proximity sensors. And they're classified differently. Of course, these are the expensive automation ones, but let's look at the, well, 6,000. The less expensive ones. Actually, let's look at the normally stocking ones so we don't get the ones that are unavailable. So these are the time of flights. They, you know, VL 53s and 61s. These sensors, and even the TMF 88s, these sensors actually will give you, I believe like actual true distance. They'll tell you like millimeter and centimeter. At least the VL series will. The TMF, I don't know. I think this is also time of flight, even though it has a lens there. I think that's just a lens for the laser. But then you've got this like that GP2Y, right? That familiar family appears here under distance. So there's proximity and there's distance. Technically, the distance sensor category should just be sensors that give you like literal distance like ultrasonic or time of flight or like calibrated infrared. But it's gonna get mixed up a little bit with the category because it also has, the category is old enough that it probably started with this GP2Y series chips. I showed you the analog output and then start getting like the digital sensors mixed in with it. But what we really want is a proximity sensor. Which is gonna be less expensive because it's not gonna give you, it doesn't give you like true millimeter output. It's gonna just tell you like, is something closer or farther, near or far as it were. So let's look at, I think it's under, we don't want industrial, we're just gonna go for simple. So proximity sensor. And let's go for active and we'll do infrared ambient light. And actually, let me go to the proximity sensors section. Okay. So these have, again, it's like, they're kind of mixed together. There is the inductive sensors and there's also, you know, piezoelectric style or like there's this infrared proximity that's like panel mounted, PIR sensors. So everything kind of got mixed in together. Just remember what we did. So I actually looked for the 4020 because I was like, okay, the 4020 is good but I want it to be a larger distance. And turned out that this was actually an ambient lighter IR sensors, which is tough. So if you're looking for these sensors, they might be split across three different categories. You might have to look in distance sensors where you saw that analog sharp distance sensor, proximity sensors, which are, seems to be more true to like either on or off, either it's there or not. And then ambient lighter IR sensors. The reason probably these sensors are in this category, the infrared SMT ones, is because they tend to not only do proximity sensor, but they also do ambient light sensing or like IR light in general, how much IR light is in the area. So let's go for active with proximity detection. And then I want I squared C output, SPI is fine too. And let's see what's available. So there's a couple of options here. So this one, for example, is ambient IR. Oh, I want surface mount. Hold on, get surface mount only. Okay. And then I'll do normally stocking. Some of these here are not, there's a mix. So the Venom 77, I happen to know this chip, it doesn't do proximity, it just does optical. But it is I squared C. So I'm not, I'm not actually sure like why it ended up coming in to proximity detection. I think it, I think it can do basic like infrared detection, but it doesn't have an emitter. You want chips like this. Like this is an AP, the APDS 9930. This actually has a couple of things. There's ambient, I think there's an RGB and it has proximity. And the 9960 also does some basic gesture recognition. And you'll see that the prices are less expensive. So you can get these for about a dollar, a lot less than you have to spend for the time of flight sensors, which are easily like three, four bucks a piece, because you have this like laser diode inside. So a lot of the VCNLs and APDS, Psylabs has a couple of chips, but they're a little bit more expensive. You know, to get more detailed into like which one of this family, you go to the Vishay website, which you'll have, you can search in more specifics for like, you know, the length that you use to search it. One fun tip is the wider apart, the LED and the detector, usually the farther the distance. So I checked out, I just actually kind of like looked at a couple of these and these are like, okay, the sensor detector, the emitter detector very close together. But I went to this one, the 4200. And what I like about this is first off, there's a lot of it in stock, 50,000 pieces. It's inexpensive, it's a dollar. And it can do up to 1.5 meters, which is kind of nice. And you can change, you know, you can do settings and stuff. And it's very simple. It's just power ground, interrupt, and then data and clock. So, you know, good for, and amazingly up to 800 milliamps pulse current. That's the trade-off. If you're doing the height, the wide distance, sorry, the large distance sensing, the IR LED has to be very powerful in order to reach and bounce off of something about a meter, meter and a half away. So this does use a very short pulse, but a very strong pulse of current. So you'll need to make sure that you have a huge ass capacitor on the board where you're using the sensor because your power supply can't necessarily supply 800 milliamps, but you know, maybe for that microsecond or less than it is, if your capacitor is like 100 or 200 microfarads, you might be able to buffer that current to get the data out and back. So this is a very interesting chip. I think this is, again, inexpensive. We'll do the job for basic distance proximity measurements. It has a very similar design style. Oh, interesting, you have to have an external transistor for it. A very similar interface for writing, for getting the data as the VCNL 4020, which is really nice. And it will get you like the output in 16 bit, light level, white LED light and proximity sensing detection. And then you can do threshold detection as well. And the drivers are, while it's a non-trivial chip, you know, there's a lot of registers, it's definitely gonna be easier than trying to write registers for the time of flight sensors, because all those VC53, sorry, not the, what's it called? Forgot the VL, the VL53 series. The drivers, you can't really write them from scratch. They are like very complicated and they have a little big state machine inside of them because there's like a little chip running the whole thing. It's not like a solid state solution. So if you're trying to like write a driver from scratch from a new platform because you can't get the time of flight sensor software for your platform or whatever, it's not ported over, it might be faster to go with an infrared sensor. So this is my pick, the VCNL 4200, lots in stock. That was a great church.