CH32 RISC-V MCUs Get Official Arduino Support

Like many of you, we’ve been keeping a close eye on the CH32 family of RISC-V microcontrollers from WCH Electronics. You can get the CH32V003, featuring 2 kB RAM and 16 kB of flash for under fifteen cents, and the higher-end models include impressive features like onboard Ethernet. But while the hardware is definitely interesting, the software side of things has been a little rocky compared to what we’ve come to expect from modern MCUs.

Things should start looking up a bit though with the release of an Arduino core for the CH32 direct from WCH themselves. It’s been tested on Windows, Linux, and Mac, and supports the CH32V00x, CH32V10x, CH32V20x, CH32V30x, and CH32X035 chips. Getting it installed is as easy as adding the URL to the Arduino IDE’s Boards Manager interface, though as the video below shows, running it on Linux does require an extra step or two.

So far, we’ve seen several projects, like this temperature sensor or this holiday gizmo that use [cnlohr]’s open-source toolchain. But there’s no question that plenty of hobbyists out there feel more comfortable in the Arduino environment, and if those folks are now able to pick up a CH32 and do something cool, that means more people jumping on board, more libraries developed, more demo code written…you get the idea.

Just like the ESP8266’s popularity exploded when it was added to the Arduino IDE, we’ve got high hopes for the CH32 family in the coming months.

Continue reading “CH32 RISC-V MCUs Get Official Arduino Support”

A High-End Studio Multiplexer Surrenders To An Arduino

The equipment used in professional radio and TV studios is both extremely high quality and very expensive indeed, and thus out of the reach of an experimenter. Happily as studios are refurbished there’s a steady supply of second-hand equipment which can be surprisingly cheap, but as [Nathan] found out with a Quartz audio router, comes with no control software. What’s to be done with what’s essentially a piece of junk? Remove its brain and replace it with one that can be controlled, of course!

On the PCB alongside a bank of switch matrices is an FPGA which does the heavy lifting. That’s “heavy” in a limited sense, because all it does is handle the chip select lines for the matrices and write data to their registers. This is a task that can be handled by a microcontroller, so in goes an Arduino Nano, which along with a few other board modifications delivers a serial-controlled studio router.

The interesting part for us in this project comes from a look at the date codes on the board, they’re from the early 2000s. This is (roughly) contemporary with the ATmega chip on the Arduino, so we’re curious as to why the designers saw fit to use an FPGA when the microcontrollers of the day were clearly up to the task for much less outlay. We suspect a touch of millennium-era price inflation, but we can’t be sure.

Meanwhile, old broadcast kit has featured here before.

VU Meter Built With Neat Graphical VFD Display

VFD displays are beloved for their eerie glow that sits somewhere just off what you’d call blue. [mircemk] used one of these displays to create an old-school VU meter that looks straight out of a 1970s laboratory. 

The build uses an Arduino Nano as the brains of the operation, which uses its analog inputs to process incoming audio into decibel levels for display on a VU meter. It’s then charged with driving a GP1287 VFD display. Unlike some VFDs that have preset segments that can be illuminated or switched off, this is a fully graphical dot matrix display that can be driven as desired. Thus, when it’s not acting as a bar graph VU meter, it can also emulate old-school moving-needle meters. Though, it bears noting, the slow updates the Arduino makes to the display means it’s kind of like those dodgy skeumorphic music apps of the 16-bit era; i.e. it’s quite visually jerky.

Overall, it’s a neat project that demonstrates how to work with audio, microcontrollers, and displays all in one. We’ve featured other projects from [mircemk] before, too, almost all of which appear in the same blue and grey project boxes. Video after the break.

Continue reading “VU Meter Built With Neat Graphical VFD Display”

Arduino Measures Remaining Battery Power With Zero Components, No I/O Pin

[Trent M. Wyatt]’s CPUVolt library provides a fast way to measure voltage using no external components, and no I/O pin. It only applies to certain microcontrollers, but he provides example Arduino code showing how handy this can be for battery-powered projects.

The usual way to measure VCC is simple, but has shortcomings.

The classical way to measure a system’s voltage is to connect one of your MCU’s ADC pins to a voltage divider made from a couple resistors. A simple calculation yields a reading of the system’s voltage, but this approach has two disadvantages: one is that it constantly consumes power, and the other is that it ties up a pin that you might want to use for something else.

There are ways to mitigate these issues, but it would be best to avoid them entirely. Microchip application note 2447 describes a method of doing exactly that, and that’s precisely what [Trent]’s Arduino library implements.

What happens in this method is one selects Vbg (a fixed internal voltage reference that is temperature-independent) as Vin, and selects Vcc as the ADC’s voltage reference. This is essentially backwards from how the ADC is normally used, but it requires no external hookup and is only a bit of calculation away from determining Vcc in millivolts. There is some non-linearity in the results, but for the purposes of measuring battery power in a system or deciding when to send a “low battery” signal, it’s an attractive solution.

Being an Arduino library, CPUVolt makes this idea very easy to use, but the concept and method is actually something we have seen before. If you’re interested in the low-level details, then check out our earlier coverage which goes into some detail on exactly what is going on, using an ATtiny84.

Arduino Auto-Glockenspiel Looks Proper In Copper

What is it about solenoids that makes people want to make music with them? Whatever it is, we hope that solenoids never stop inspiring people to make instruments like [CamsLab]’s copper pipe auto-glockenspiel.

At first, [CamsLab] thought of striking glasses of water, but didn’t like the temporary vibe of a setup like that. They also considered striking piano keys, but thought better of it when considering the extra clicking sound that the solenoids would make, plus it seemed needlessly complicated to execute. So [CamsLab] settled on copper pipes.

That in itself was a challenge as [CamsLab] had to figure out just the right lengths to cut each pipe in order to produce the desired pitch. Fortunately, they started with a modest 15-pipe glockenspiel as a proof of concept. However, the most challenging aspect of this project was figuring out how to mount the pipes so that they are close enough to the solenoids but not too close, and weren’t going to move over time. [CamsLab] settled on fishing line to suspend them with a 3D-printed frame mounted on extruded aluminium. The end result looks and sounds great, as you can hear in the video after the break.

Of course, there’s more than one way to auto-glockenspiel. You could always use servos.

Continue reading “Arduino Auto-Glockenspiel Looks Proper In Copper”

1D LED PONG, Arduino-Style

Maybe it’s just us, but isn’t it kind of amazing that in a world of pretty darn realistic games, PONG is still thrilling to play? This 1D implementation by [newsonator] is about as exciting as it gets.

It works like you’d probably expect — the light moves back and forth between the two players. Keep it in the green and you have a nice, gentle volley going. Let it hit your red LED and you’ve lost a point. But if you can push your button while your yellow LED is lit, the light speeds up tremendously until the next button press in the green.

Our only wish is that subsequent yellow-light button presses would make it speed up even more. But there are really just the two speeds with the current programming.

Inside the cool laser-cut box is an Arduino Uno and a 9V battery, plus a current-limiting resistor and the all-important buzzer. We like how [newsonator] wired up the LEDs to the Arduino by soldering them to a row of header pins and sticking that into the Arduino so it can be used in other projects down the line. We also like how [newsonator] shoved a couple of dowels through the box to ultimately support the two buttons.

Check out the intro video after the break for the overall details. The build is done over a few different short videos which follow.

Although this is pretty small, it isn’t quite the minimum viable.

Continue reading “1D LED PONG, Arduino-Style”

Festive PCB Gives The Gift Of Hacking

‘Tis the season for gift giving, and what better to give than a newfound love for hacking, soldering, and blinkenlights? In order to spread cheer and education at the local hackerspace, [Tom Goff] created this festive tree circuit board that can either sit in a stand to be admired, or worn as jewelry. The resistors are even designed to look like candy canes hanging from the boughs.

The brains of this festive little tree is an ATmega328P, which you probably recognize as the microcontroller that powers the Arduino Uno. Although this circuit has none of the extra bits you’d find on an Uno, not even a crystal oscillator, it can still be programmed with Arduino and use the 8 MHz internal clock.

[Tom] has provided good, thorough instructions, especially for the sticky bit of setting up the IDE to program using the 8 MHz internal clock. So even if you’re nowhere near Norwich Hackerspace, you can join in the fun. Be sure to check out the video after the break, wherein [Tom] walks through designing the PCB using Inkscape and Fritzing.

Want to whip up a little something for the hackerspace wall? Check out this Sierpinski Christmas tree.

Continue reading “Festive PCB Gives The Gift Of Hacking”