Pocket CO2 Sensor Doubles As SMD Proving Ground

While for some of us it’s a distant memory, every serious electronics hobbyist must at some point make the leap from working with through-hole components to Surface Mount Devices (SMD). At first glance, the diminutive components can be quite intimidating — how can you possibly work with parts that are literally smaller than a grain of rice? But of course, like anything else, with practice comes proficiency.

It’s at this silicon precipice that [Larry Bank] recently found himself. While better known on these pages for his software exploits, he recently decided to add SMD electronics to his repertoire by designing and assembling a pocket-sized CO2 monitor. While the monitor itself is a neat gadget that would be worthy of these pages on its own, what’s really compelling about this write-up is how it documents the journey from SMD skeptic to convert in a very personal way.

A fine-tipped applicator will get the solder paste where it needs to go.

At first, [Larry] admits to being put off by projects using SMD parts, assuming (not unreasonably) that it would require a significant investment in time and money. But eventually he realized that he could start small and work his way up; for less than $100 USD he was able to pick up both a hot air rework station and a hotplate, which is more than enough to get started with a wide range of SMD components. He experimented with using solder stencils, but even there, ultimately found them to be an unnecessary expense for many projects.

While the bulk of the page details the process of assembling the board, [Larry] does provide some technical details on the device itself. It’s powered by the incredibly cheap CH32V003 microcontroller — they cost him less than twenty cents each for fifty of the things — paired with the ubiquitous 128×64 SSD1306 OLED, TP4057 charge controller, and a SCD40 CO2 sensor.

Whether you want to build your own portable CO2 sensor (which judging from the video below, is quite nice), or you’re just looking for some tips on how to leave those through-hole parts in the past, [Larry] has you covered. We’re particularly eager to see more of his work with the CH32V003, which is quickly becoming a must-have in the modern hardware hacker’s arsenal.

Continue reading “Pocket CO2 Sensor Doubles As SMD Proving Ground”

The New Hotness

If there’s one good thing to be said about the chip shortage of 2020-2023 (and counting!) it’s that a number of us were forced out of our ruts, and pushed to explore parts that we never would have otherwise. Or maybe it’s just me.

Back in the old times, I used to be a die-hard Atmel AVR fan for small projects, and an STM32 fan for anything larger. And I’ll freely admit, I got stuck in my ways. The incredible abundance of dev boards in the $2 range also helped keep me lazy. I had my thing, and I was fine sticking with it, admittedly due to the low price of those little blue pills.

An IN-12B Nixie tube on a compact driver PCBAnd then came the drought, and like everyone else, my stockpile of microcontrollers started to dwindle. Replacements at $9 just weren’t an option, so I started looking around. And it’s with no small bit of shame that I’ll admit that I hadn’t been keeping up with the changes as much as I should have. Nowadays, it’s all ESP32s and RP2040s over here, and granted there’s a bit of a price bump, but the performance is there in abundance. But I can’t help feeling like I’m a few years back of the cutting edge.

So when I see work like what [CNLohr] and [Bitluni] are doing with the ultra-cheap CH32V003 microcontrollers, it makes me think that I need to start filling in gaps in my comfortable working-set of chips again. But how the heck am I supposed to keep up? And how do you? It took a global pandemic and silicon drought to force me out of my comfort zone last time. Can the simple allure of dirt-cheap chips get me out? We’ll see!

An IN-12B Nixie tube on a compact driver PCB

Modern Components Enable Cheap And Compact Nixie Driver Circuit

Nixie tubes can add some retro flair to any project, but they can also complicate your electronics quite a bit: after all, you need to generate a voltage high enough to ignite the tube and then switch that between ten separate display segments. Traditionalists may want to stick with chunky mains transformers and those unobtainium 74141 segment drivers, but modern components allow you to make things much more compact, not to mention way cheaper. [CNLohr] took this to an extreme, and used clever design tricks and his sharp online shopping skills to make an exceptionally compact Nixie driver circuit that costs less than $2.50.

That price doesn’t include the tubes themselves, but [CNLohr] nevertheless bought the cheapest Nixies he could find: a pair of IN-12B tubes that set him back just $20. He decided to generate the necessary 180 volts through a forward converter built around a $0.30 transformer and a three-cent MOSFET, controlled by software running on a CH32V003. This is one of those ultra-cheap microcontrollers that manage to squeeze a 48 MHz RISC-V core plus a bunch of peripherals into a tiny QFN package costing just 12 cents.

The existing toolchain to program these micros left a lot to be desired, so [CNLohr] wrote his own, called
ch32v003fun. He used this to implement all the control loops for the forward converter as well as PWM control of the display segments – a feature that adds a beautifully smooth turn-on and turn-off effect to the Nixie tubes. There’s still plenty of CPU capacity left to implement other features, although [CNLohr] isn’t sure what to put there yet. Turning the tubes into a clock would be an obvious choice, but the basic system is flexible enough to implement almost anything requiring a numeric display.

The compactness of this circuit is impressive, especially if you compare it to earlier solutions. There’s plenty of fun to be had with cheap-yet-powerful micros like the ch32v003, provided you can find them.

Continue reading “Modern Components Enable Cheap And Compact Nixie Driver Circuit”

A CH32V003 Toolchain — If You Can Get One To Try It On

We’re in an exciting time for cheap microcontrollers, as with both the rise of RISC-V and the split between ARM and its Chinese subsidiary, a heap of super-cheap and very capable parts are coming to market. Sometimes these cheap chips come with the catch of being difficult to program though, but for one of them the ever-dependable [CNLohr] has brought together his own open-source toolchain. The part in question is the WCH CH32V003, which is a ten-cent RISC-V part that has an impressive array of capabilities. As always though, there’s a snag, in that we’re also told that while supplies are improving this part can be hard to find. The repository is ready for when you can get them again though, and currently also contains some demo work including addressable LED driver code.

As an alternative there’s a comparable and slightly cheaper ARM-based part, the Puya PY32. It’s reckoned to be the cheapest of the flash-based microcontrollers, and like the WCH part is bearing down on the crop of one-time-programmable chips such as the famous and considerably less powerful 3-cent Padauk. This end of the market is certainly heating up a little, and from our point of view this can only mean some exciting projects ahead.