Bare-Metal STM32: Adding An Analog Touch With ADCs

An Analogue to Digital Converter (ADC) is at its core a straight-forward device: by measuring an analog voltage within a set range and converting the measured level to a digital value we can use this measurement value in our code. Through the use of embedded ADCs in microcontrollers we can address many essential use cases, ranging from measuring the setting on a potentiometer, to reading an analog output line on sensors, including the MCU’s internal temperature and voltage sensors.

The ADCs found in STM32 MCUs have a resolution between 12 to 16 bits, with the former being the most common type. An ADC can be configured to reduce this resolution, set a specific sampling speed, and set up a multi-mode configuration depending on the exact ADC peripheral. STM32 MCUs feature at least a single ADC peripheral, while some have multiple. In this article we will take a look at how to configure and use the basic features of the ADCs in STM32 MCUs, specifically the ADCs found in F0 and the ADC5_V1_1 type as found in most F3-family MCUs.

Continue reading “Bare-Metal STM32: Adding An Analog Touch With ADCs”

A GPS Frequency Standard For When The Timing Has To Be Right

A metrology geek will go to extreme lengths to ensure that their measurements are the best, their instruments the most accurate, and their calibration spot-on. There was a time when for time-and-frequency geeks this would have been a difficult job, but with the advent of GPS satellites overhead carrying super-accurate atomic clocks it’s surprisingly easy to be right on-frequency. [Land-boards] have a GPS 10 MHz clock that’s based around a set of modules.

Since many GPS modules have a 10 MHz output one might expect that this one to simply hook a socket to the module and have done, but instead it uses another of their projects, a fast edge pulse generator with the GPS output as its oscillator, as a buffer and signal conditioner. Add to that an QT Py microcontroller board to set up the GPS, and there you have a standalone 10 MHz source to rival any standard. Full details can be found on the project’s wiki, and the firmware can be found on GitHub.

Careful with your exploration of standard frequencies, for that can lead down a rabbit hole.

3D Printed Cartilage Ushers In Ear-a Of Custom Body Parts

When it comes to repairing human bodies, there’s one major difficulty: spare parts are hard to come by. It’s simply not possible to buy a knee joint or a new lung off the shelf.

At best, doctors and surgeons have made do with transplants from donors where possible. However, these are always in short supply, and come with a risk of rejection by the patient’s body.

If we could 3D print new custom body par/ts to suit the individual, it would solve a lot of problems. A new ear implant pioneered by 3DBio Therapeutics has achieved just that.

Continue reading “3D Printed Cartilage Ushers In Ear-a Of Custom Body Parts”

Reverse Engineering An Apollo-Era Module With X-Ray

The gear that helped us walk on the Moon nearly 60 years ago is still giving up its mysteries today, with some equipment from the Apollo era taking a little bit more effort to reverse engineer than others. A case in point is this radiographic reverse engineering of some Apollo test gear, pulled off by [Ken Shirriff] with help from his usual merry band of Apollo aficionados.

The item in question is a test set used for ground testing of the Up-Data Link, which received digital commands from mission controllers. Contrary to the highly integrated construction used in Apollo flight hardware, the test set, which was saved from a scrapyard, used more ad hoc construction, including cards populated by mysterious modules. The pluggable modules bear Motorola branding, and while they bear some resemblance to ICs, they’re clearly not.

[Ken] was able to do some preliminary reverse-engineering using methods we’ve seen him employ before, but ran into a dead end with his scope and meter without documentation. So the modules went under [John McMaster]’s X-ray beam for a peek inside. They discovered that the 13-pin modules are miniature analog circuits using cordwood construction, with common discrete passives stacked vertically between parallel PCBs. The module they imaged showed clear shadows of carbon composition resistors, metal-film capacitors, and some glass-body diodes. Different angles let [Ken] figure out the circuit, which appears to be part of a square wave to sine wave converter.

The bigger mystery here is why the original designer chose this method of construction. There must still be engineers out there who worked on stuff like this, so here’s hoping they chime in on this innovative method.

Shielding A Cheap RTL-SDR Stick

Even though not every Hackaday reader is likely to be a radio enthusiast, it’s a fair guess that many of you will have experimented with an RTL-SDR USB dongle by now. These super-cheap devices are intended for digital TV reception and contain an RTL2832 chip, which with the proper software, can be pushed into service as a general purpose software defined radio receiver. For around $10 USD they’re fantastic value and a lot of fun to play with, even if they’re not the best radio ever. How to improve the lackluster performance? One of the easiest and cheapest ways is simply to shield it from RF noise, which [Alan R] has done with something as mundane as a tubular fizzy orange tablet container.

This is probably one of the simpler hacks you’ll see on this site, as all it involves is making an appropriate hole in the end of the tube and shielding the whole with some aluminium foil sticky tape. But the benefits can be seen immediately in the form of reduced FM broadcast band interference, something that plagues the cheaper dongles.

Perhaps the value in this hack aside from how easy it is on a cheap dongle is that it serves to remind us some of the benefits of paying a little extra for a better quality device. If you’d like to know more about RTL-SDR improvements, it’s a topic we covered in detail back in 2019 when we looked at seven years of RTL-hackery.

Arduino Drum Platform Is Fast

Drums are an exciting instrument to learn to play, but often prohibitive if there are housemates or close neighbors involved. For that problem there are still electronic drums which can be played much more quietly, but then the problem becomes one of price. To solve at least part of that one, [Jeremy] turned to using an Arduino to build a drum module on his own, but he still had to solve yet a third problem: how to make the Arduino fast enough for the drums to sound natural.

Playing music in real life requires precise timing, so the choice of C++ as a language poses some problems as it’s not typically as fast as lower-level languages. It is much easier to work with though, and [Jeremy] explains this in great detail over a series of blog posts detailing his drum kit’s design. Some of the solutions to the software timing are made up for with the hardware on the specific Arduino he chose to use, including an even system, a speedy EEPROM, hardware timers, and an ADC that can sample at 150k samples per second.

With that being said, the hardware isn’t the only thing standing out on this build. [Jeremy] has released the source code on his GitHub page for those curious about the build, and is planning on releasing several more blog posts about the drum kit build in the near future as well. This isn’t the only path to electronic drums, though, as we’ve seen with this build which converts an analog drumset into a digital one.

Continue reading “Arduino Drum Platform Is Fast”

An Epic Tale Of Pirate Radio In Its Golden Age

With music consumption having long ago moved to a streaming model in many parts of the world, it sometimes feels as though, just like the rotary telephone dial, kids might not even know what a radio was, let alone own one. But there was a time when broadcasting pop music over the airwaves was a deeply subversive activity for Europeans at least, as the lumbering state monopoly broadcasters were challenged by illegal pirate stations carrying the cutting edge music they had failed to provide. [Ringway Manchester] has the story of one such pirate station which broadcast across the city for a few years in the 1970s, and it’s a fascinating tale indeed.

It takes the form of a series of six videos, the first of which we’ve embedded below the break. The next installment is placed as an embedded link at the end of each video, and it’s worth sitting down for the full set.

Continue reading “An Epic Tale Of Pirate Radio In Its Golden Age”