LoRA, With No Radio

A LoRa project has traditionally required a dedicated radio module, because it’s a commercially licenced protocol. But as the way it works has been progressively reverse engineered, it’s become ever more possible to produce a LoRA radio for yourself. But what about a LoRA radio without a radio at all? [CNLohr] has managed just that, by driving a microcontroller pin and relying on one of its harmonics to provide enough RF to be received by a LoRA gateway.

The video below the break goes into the process in great detail, revealing some of the tricks. Undersampling to create intentional aliasing for example allows subharmonic peaks to be produced in unexpected places. Most of the development is performed on Espressif microcontrollers, but as the code is optimised it becomes possible to use it on much more modest silicon. The dirt cheap CH32V003 RISC-V microcontroller for example can be a LoRA transmitter able to talk to a gateway at a range of hundreds of metres with the CH32 and 2.5km with the ESP32. The code can be found in this GitHub repository.

The CH32 can’t receive of course, and it relies on barfing harmonics all over the spectrum to work. But on the other hand its total RF output is so tiny that we’re guessing a filter for the LoRA band might even make it almost legal. He’s got a little way to go before beating the record though.

Continue reading “LoRA, With No Radio”

a CH32V003 Linux-bearing PCB, single-sided, hand-etched, lovely

Bring Linux To CH32V003 Through, Yes, RISC-V Emulation

Like playing around with Linux on low-power devices? You’d be hard pressed to find a better example than the [tvlad1234]’s linux-ch32v003 project. It’s not just a one-off — it’s something you could build right now, since it requires hardly any extra parts.

With help of a 8 MB PSRAM chip for RAM supplementation purposes and an SD card, plus some careful tailoring of the Linux .config parameters, you get Linux on a chip never meant to even come close to handling this much power. The five minutes it takes to boot up to a prompt is part of the experience.

As usual with [tvlad1234]’s projects, there’s a fun twist to it! Running Linux on this chip is only possible thanks to [chlohr]’s mini-rv32ima project, which, as you might remember, is a RISC-V emulator. Yes, this runs Linux by running a RISC-V emulator on a RISC-V chip. The main reason for that is because the MCU can’t map the PSRAM chip into RAM, but if you use an emulator, memory mapping is only a matter of software. Having applied a fair amount of elbow grease, [tvlad1234] brings us buildroot and mainline Linux kernel configs you can compile to play with this — as well as a single-layer-ready KiCad board project on GitHub. Yep, you could literally etch a PCB for this project from single-sided copper-clad FR4 with a bit of FeCl3.

While the CH32V003 is undoubtedly a more impressive target for Linux, the RP2040 Linux project might be more approachable in terms of having most of the parts in your parts box. At least, up until we start valuing the CH32V003 for all the cool stuff it can do!

A Very 21st Century Receiver For A Very 20th Century Band

The FM broadcast band has been with us since the middle of the 20th century, and despite many tries to unseat it, remains a decent quality way to pick up your local stations. It used to be that building an FM broadcast receiver required a bit of RF know-how, but the arrival of all-in-one receiver chips has made that part a simple enough case of including a part. That’s not to say that building a good quality FM broadcast receiver in 2024 doesn’t involve some kind of challenge though, and it’s one that [Stefan Wagner] has risen to admirably with his little unit.

Doing the RF part is an RDA5807MP single chip radio, but we’d say the center of this is the CH32V003 RISC-V microcontroller and its software. Twiddling the dial is a thing of the past, with a color display and all the computerized features you’d expect. Rounding it off in the 3D printed case is a small speaker and a Li-Po pouch cell with associated circuitry. This really is the equal of any commercially produced portable radio, and better than many.

Even with the all-in-one chips, there’s still fun in experimenting with FM the old way.

An Animated LED Fireplace Powered By The CH32V003

Once you’ve mastered the near-magical ability of turning your ideas into a piece of hardware you can hold in your hand, it’s only natural that you’ll want to spread the joy. The holidays are a perfect time to produce a custom piece of electronics for friends and family, but there’s a catch: going from making one or two of something to making dozens of them can introduce some interesting challenges. Not only will you want to cost optimize your design, but to save yourself some aggravation, you’ll likely want to simplify the assembly process.

The fifty electronic fireplaces designed by built by [Adam Anderson], [Daniel Quach], and [Johan Wheeler] are a perfect example of both concepts, and while we’re coming across it a bit late for this year’s gift exchange, we wouldn’t be surprised if these MIT-licensed beauties end up under a few more trees in 2024.

Continue reading “An Animated LED Fireplace Powered By The CH32V003”

The Small And Silly Synth Now Even Smaller (But Just As Silly)

What do you do when you’ve carved out a niche for yourself as a builder of small and useless synthesizers? Why, build an even smaller and less useful synthesizer, of course!

If you’ve been paying even a minimal amount of attention you’ll know right away that this comes to use from [mitxela], who while not playing with volumetric POV displays is often found building smaller and smaller synthesizers, including putting them in DIN plug shells. The current synth is based on his “Silly Synth,” which puts all the guts for the synth inside a USB connector. This time around, though, it’s USB-C, and rather than fitting everything inside the connector shell, the entire synth sits on a PCB that’s smaller than a tiny piezo speaker. The whole thing runs on a CH32V003 microcontroller, and aside from a few support components and the right-angle USB-C plug, not much else.

The PCB is what really shines in [mitxela]’s design, especially the routing. He’s got a 20-pin QFN chip on one side of the board and the USB plug right behind it on the other side to deal with, plus the big through-holes for the speaker and the physical connections on the plug. It’s quite a crowded design, but it gets the job done. What’s more, he panelized the design so that mass production is possible; the reason for this is revealed at the end of the video below.

Pretty much every time we see one of these “smallest synth” videos we’re convinced that we’re seeing the lower limit of what’s possible, but every time, [mitxela] goes ahead and proves us wrong. That’s fine, of course — we don’t mind being wrong about something like this.

Continue reading “The Small And Silly Synth Now Even Smaller (But Just As Silly)”

Adding Temperature Sensor Functionality To The CH32V003 MCU

As cheap as the WCH CH32V003 MCU is, its approximately $0.10 price tag looks far less attractive when you need to start adding on external ICs for missing basic features, such as temperature measurement. This is a feature that’s commonly found on even basic STM32 MCUs. Fear not though, as [eeucalyptus] shows, you can improvise a working solution by finding alternative sources that can act as a thermometer.

Plot of the temperature measurement using the improvised CH32V003 -based temperature sensor. (Credit: eeucalyptus)
Plot of the temperature measurement using the improvised CH32V003 -based temperature sensor. (Credit: eeucalyptus)

The CH32V003 is a low-end, 32-bit RISC-V-based MCU by the China-based Nanjing Qinheng Microelectronics, commonly known abbreviated as ‘WCH’, and featured on Hackaday previously. Although it features a single-core, 48 MHz CPU, its selection of peripherals is fairly basic:

So how do you create an internal temperature sensor using just this? [eeucalyptus] figured that all that’s needed is to measure the drift between two internal clocks – such as the LSI and HSI – as temperatures change and use this to calibrate a temperature graph.

Unfortunately, the LSI isn’t readily accessible, even through the Timer peripheral. This left the AWU (automatic wake-up unit) which also uses the LSI as a clock source. By letting it go to sleep and wake up after N LSI cycles, the AWU enabled indirect access to the LSI.

Internal diagram of the CH32V003 MCU. (Credit: WCH)
Internal diagram of the CH32V003 MCU. (Credit: WCH)

After calibrating against room temperature (~22 °C) and ice water (0 °C), a temperature plot was obtained, which could conceivably be somewhat accurate. As [eeucalyptus] warns, this is a kind of calibration that likely differs per MCU, and no attempt to quantify the absolute accuracy of this method has been made yet. Even so, as a crude temperature measurement, it might just be good enough.

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”