This may not have worked (reliably) even if I’d had the pin ordering correct

Categories
Contrivances HerpDerp Mucking About With Things The Diary of Lupin Pooter
Photographic record of my attempt to connect to an SCD41 sensor without soldering or cobbling together some sort of jig with pogo pins.
Here’s a zoomed-in image of my attempt to connect to an SCD41 sensor without soldering wires onto it or cobbling together some sort of jig with pogo pins.

I recently got some SCD41 sensors. They report CO2 level in PPM as well as temperature and humidity. They’re also surface-mount, of the LGA variety and small — approximately a centimeter square, with millimeter-wide solder pads separated by half-millimeter gaps. I’m not yet terribly skilled at SMD soldering and wanted to try getting readings without soldering wires to it or having to attempt to build a jig — which would’ve employed teeny (the plunger faces would need to be ≤ 1mm wide) pogo pins, driven through multiple, small holes drilled as-nearly-vertically-as-possible, close to one another, through a chunk of plastic.

The SCD41 shown in my low-effort mounting plate, with wires run through staggered-positioned holes for strain relief.
The SCD41 shown in my low-effort mounting plate, with wires run through staggered-positioned holes for strain relief.

I roughly cut a rectangular piece of white plastic (*checks notes* seems to be POM aka Delrin), marked the edges of the top of the metal can protecting the various sensors that make up the SCD41, drilled holes around the inside edges of the shape, and then ground out the interior and smoothed the edges with mini burrs in my Bosch 18V Dremel-alike. For minimum-viable strain relief, I drilled 1.5mm holes for the wires I hoped to connect to the six non-DNC pads (four on one side and two on the other): two for I2C comms and the two pairs of VCC (aka VCC) and GND pads.

Had I, for example, checked the GND pad on one side for continuity with the GND pad on the other, many sighs, a lot of hrms and much consternation might have been averted. My spatial reasoning hadn’t been up to snuff and I’d misperceived the pinout diagram in the datasheet, which showed and labeled the solder pads Superman-X-ray-vision-style, from the top down (through the can, sensors, and PCB). Where my black (GND) wires are coming in from the left and right to the top pads in these photos, they should’ve been contacting the bottom pads on each side, with the red wires on the second-from-bottom pads, the green wire should have been touching the topmost pad on the left, and the blue wire ought to have been in contact with the pad below that. In other words, my wire positions should have been flipped around a horizontal axis.

What you'd see if you popped the can off the top of the sensor.
This is what you would see if either insatiable curiosity or red-hot frustration overpowered your aversion to sacrificing an expensive sensor package and you forcibly removed the metal can that tops an SCD41. I had two of them but now have one that, sort of (read to the end for the exciting conclusion) works and this one. Anyway, the thingie component marked SH40 is a Sensirion SHT40 humidity and temperature sensor. The other bits are parts of the carbon-dioxide-sensing apparatus. The silver square-ish thing at upper-right looks like another can shielding other components, but I haven’t yet tried to wrench it off the PCB.

When I did finally realize my error, I removed the tape, repositioned the wires, retaped them in place, and managed to get a demo script included with Sensirion’s Arduino library for the SCD4x line to report the sensor’s serial number. Success! At last! But no sensor readings, just an error message: Error trying to execute readMeasurement(): Not enough data received.

I opened the script (exampleUsage.ino) in an editor, and copied and pasted the Serial.print statements that reported sensor values into the if (error) {} block, beneath the line that printed the error message, saved, and loaded the modified script onto the Arduino Nano clone I was using. After each error message, it kicked out a new line: Co2: 57095 Temperature: 0.00 Humidity: 48.40. There was no temperature value and, if the carbon dioxide level in my little home office had really been that high (57095 PPM, almost 60k PPM), I ought to have been dead or in a coma. Moreover, while one would expect some “chatter” in the readings, little changes up and down in the values being reported, both the CO2 and humidity values were constant.

A different angle of part of the inside of the sensor, tilted to catch the light from a different angle.
The brass-colored rectangular thing with the QR code etched or printed onto it and labeled [circle] 102 ANC is a MEMS microphone and plays a crucial role in the sensor’s CO2-level-measuring scheme. ANC is an acronym for “active noise cancelling”.

Failing to use my ol’ noggin to its fullest, I punted and hoped the wacky readings were the result of poor contact between one or more of the wires and the pads on the sensor, peeled off all of the tape again, cut and stripped the ends off of new lengths of wire and ever-so-painstakingly soldered them to their respective pads. Since I was already there, I attached wires to each of the larger square pads in the center of the sensor’s PCB base. They’re all GNDs, all continuous with the GND pads on the edges, and I’ve since found that connecting those four pads (or not) doesn’t noticeably change the values reported by the sensor.

With the wires firmly attached to the sensor, I plugged their free ends back into the same holes they’d been stuck into on the breadboard I’d been using. The readings were… the same.

From the product line info page on Mouser.com, here's a simplified explanation of how the sensor measures carbon dioxide levels using an infrared emitter and a microphone.
From the SCD41 devkit info page on Mouser.com, here’s a simplified explanation of how an itty bittle wittle sensor measures carbon dioxide levels using an infrared emitter and a microphone.

Only then did it occur to me that, while I’d read in the sensor’s datasheet that the SCD41 and SCD40 could both be run on anywhere from 2.4V up to 5.5V, I hadn’t checked to see how much current they needed at a given voltage. Nor had I checked exactly how much current the 3.3V-out pin on my Cloneduino Nano could provide (reportedly no more than 50mA, likely less than the sensor required at that voltage). Switching the jumper that supplied juice from the Nano to the V+ rail on my breadboard to the Nano’s 5V-out pin and pressing its restart button, yielded the sort of result I’d been chasing: something like Co2: 1173 Temperature: 24.45 Humidity: 42.70, followed at five-second intervals by a very-slightly-different set of values.

Spoiler: Yes, the CO2 reading is high and almost certainly incorrect. If a larger Sensirion CO2 sensor (the SCD30 I’ve run simultaneously in the same small, sealed-to-keep-the-cold-air-in air-conditioned space is to be believed… incorrect by ~400-500 PPM.