Seven of 37 Sensor failure — Elegoo?

I recently got enthused to check out all of the sensors in my Elegoo 37 Sensor Kit (version 1) I bought 5 years ago. I suppose I should have checked them all out at the time because seven of the sensors, the ones on the red circuit boards, didn’t function at all. I’ve heard that Elegoo has a good policy of making good on bad components, but I wouldn’t consider asking them for replacements after all these years. I did buy a new (version 2) set this week and those sensors in this set do work. This is the first time I’ve received bad components from them out of many purchases.

So what was the problem? After checking the boards with a multimeter it turns out that all the components that connect to ground, but for the ground terminal of the sensor, are not connected. I’m guessing (but don’t know for sure) that the solder resist layer of the board isn’t punched through for these connections. So a bad batch of boards. It is obvious that quality control did not include powering up the boards. All seven sensors use identical circuit boards, only differing in the sensor installed and (seemingly) two of the 6 resistors on the board.

Sadly, that isn’t the end of this story. Elegoo provides the schematic for the board, which is a rarity for these things, and they are the only company that appears to do this with their 37 sensor kits. However, look at the schematic:

Elegoo provided schematic

The sensor board provides both an analog (shown here connected to A0 on the Uno) and digital (connected to D3) outputs. I’ve left out the sensor from the schematic, and all seven of these look the same. The problem is that not only is this not the real schematic but this circuit would not work. First, all of the sensors need a voltage (or current) applied and this circuit doesn’t do that. But even if it did only the digital output would work (the opamps show here are LM393 comparators). The analog output would simply lock up and always be 5v. From looking at the boards, a big clue that this isn’t the schematic is that the board has 6, not 1, resistors, 2, not 1, LEDs, and no capacitors.

After much sleuthing I found a couple of schematics that actually match the board (I also found one that didn’t, so a word of warning there!). Here’s the real schematic, again with the sensor removed. On different boards R4 varies and R5 is usually 100k.

Now we see that there is a LED indicating power is applied to the board. Also the analog output is basically connected to the sensor, which is nice, but it would be nicer if the connection was on the other side of R4. The sensitivity adjustment (the potentiometer connected as a variable resistor) is not the way I would have done it, but they didn’t ask me. Lowering the resistance reduces the sensitivity while also raising the voltage, and since the digital output is based on a comparison of the sensor voltage with a fixed voltage this is a sloppy approach at best.

The comparator provides the digital output. The LM393 has an open collector output and requires a pullup resistor, R2 here. A second comparator is used as a driver for the second LED which indicates the value of the digital output. This is nice because you can adjust the sensitivity without having to connect the board to the microcontroller. Just apply power.

The Elegoo 37 Sensor Kit Version 2 has revised instructions that now point out that the potentiometer does need to be adjusted on each module for maximum (or any) performance. This was a good move on their part. Now if they only supplied the real schematic on these.

Frankly it is a general shortcoming in this hobbyist component market in that these little boards rarely come with schematics or proper data sheets for the sensors. If you really want to use sensors in your application you need to know their characteristics and have an idea of the surrounding circuits that are needed. These kits just represent frustration for anyone who really wants to understand how they work and how to effectively use the components. Elegoo is better than most of these Chinese companies.