STM32 Offers Performance Gains For DIY Oscilloscope

There’s no shortage of cheap digital oscilloscopes available today from the usual online retailers, but that doesn’t mean the appeal of building your own has gone away — especially when we have access to powerful microcontrollers that make it easier than ever to spin up custom gear. [mircemk] is using one of those microcontrollers to build an improved, pocket-sized oscilloscope.

The microcontroller he’s chosen is the STM32F103C8T6, part of the 32-bit STM family which has tremendous performance compared to common 8-bit microcontrollers for only a marginally increased cost. Paired with a small 3-inch TFT color display, it has enough functions to cover plenty of use cases, capable of measuring both AC and DC signals, freezing a signal for analysis, and operating at an impressive 500 kHz at a cost of only around $15. The display also outputs a fairly comprehensive analysis of the incoming signal as well, with the small scope capable of measuring up to 6.6 V on its input.

This isn’t [mircemk]’s first oscilloscope, either. His previous versions have used Arduinos, generally only running around 50 kHz. With the STM32 microcontroller the sampling frequency is an order of magnitude higher at 500 kHz. While that’s not going to beat the latest four-channel scope from Tektronix or Rigol, it’s not bad for the form factor and cost and would be an effective scope in plenty of applications. If all you have on hand is an 8-bit microcontroller, though, we have seen some interesting scopes built with them in the past.

Full Self-Driving, On A Budget

Self-driving is currently the Holy Grail in the automotive world, with a number of companies racing to build general-purpose autonomous vehicles that can get from point A to point B with no user input. While no one has brought one to market yet, at least one has promised this feature and had customers pay for it, but continually moved the goalposts for delivery due to how challenging this problem turns out to be. But it doesn’t need to be that hard or expensive to solve, at least in some situations.

The situation in question is driving on a single stretch of highway, and only focuses on steering, so it doesn’t handle the accelerator or brake pedal input. The highway is driven normally, using a webcam to take images of the route and an Arduino to capture data about the steering angle. The idea here is that with enough training the Arduino could eventually steer the car. But first some math needs to happen on the training data since the steering wheel is almost always not turning the car, so the Arduino knows that actual steering events aren’t just statistical anomalies. After the training, the system does a surprisingly good job at “driving” based on this data, and does it on a budget not much larger than laptop, microcontroller, and webcam.

Admittedly, this project was a proof-of-concept to investigate machine learning, neural networks, and other statistical algorithms used in these sorts of systems, and doesn’t actually drive any cars on any roadways. Even the creator says he wouldn’t trust it himself, but that he was pleasantly surprised by the results of such a simple system. It could also be expanded out to handle brake and accelerator pedals with separate neural networks as well. It’s not our first budget-friendly self-driving system, either. This one makes it happen with the enormous computing resources of a single Android smartphone.

Continue reading “Full Self-Driving, On A Budget”

Low-Cost Electret Microphone Preamplifiers

Before the invention of microelectromechanical system (MEMS) microphones, almost all microphones in cell phones and other electronics were a type of condenser microphone called the electret microphone. The fact that this type of microphone is cheap and easy enough to place into consumer electronics doesn’t mean they’re all low quality, though. Electret microphones can have a number of qualities that make them desirable for use recording speech or music, so if you have a struggling artist friend like [fvfilippetti] has who needs an inexpensive way to bring one to life, take a look at this electret microphone pre-amp.

The main goal of the project is to enhance the performance of these microphones specifically in high sound pressure level (SPL) scenarios. In these situations issues of saturation and distortion often occur. The preampl design incorporates feedback loops and an AD797 opamp to reduce distortion, increase gain, and maintain low noise levels. It also includes an output voltage limiter using diodes to protect against input overload and can adjust gain. The circuit’s topology is designed to minimize distortion, particularly in these high SPL situations.

Real-world testing of the preamp confirms its ability to handle high SPL and deliver low distortion, making it a cost-effective solution for improving the performance of electret microphones like these. If you want to go even deeper into the weeds of designing and building electret microphones and their supporting circuitry, take a look at this build which discusses some other design considerations for these types of devices.

Re-imagining The Water Supply

Getting freshwater supplied across cities and towns in a reliable and safe way is no simple task. Not only is a natural freshwater reservoir or other supply needed, but making sure the water is safe to drink and then shipping it out over a dense network of pumps and pipes can cost a surprising amount of time and money. It also hinges on a reliable power grid, which is something Texas resident [Suburban Biology] doesn’t have. But since fresh water literally falls out of the sky for free, he decided to take this matter into his own hands.

The main strategy with a system like this is to keep the rainwater as clean as possible before storage so that expensive treatment systems are less necessary. That means no asphalt shingles, a way to divert the first bit of rain that washes dust and other contaminants off the roof away, and a safe tank. This install uses a 30,000 gallon tank placed above ground for storage, but that’s not the only thing that goes into a big rainwater catchment system like this. A system of PVC pipes are needed both for sending rainwater from the roofs of the buildings into the tank and for pumping it into the home for use. With all of that in place it’s both a hedge against climate change, unstable electric grids, and even separates the user from the local aquifer which may or may not have its own major issues depending on where you live.

While Texas legally protects the rights of citizens to collect and store rainwater, the same isn’t true for all areas. For example, Colorado only just passed a law allowing the collection and storage of a meager 110 gallons of rainwater and forbade it entirely beforehand. There are some other considerations for a project like this too, largely that above-ground systems generally won’t work in cold climates. On the other hand, large systems like these are really only needed where rainfall is infrequent; in more tropical areas like south Florida a much smaller storage system can be used

Continue reading “Re-imagining The Water Supply”

Hackaday Prize 2023: AC Measurements Made Easy

When working on simple DC systems, a small low-cost multimeter from the hardware store will get the job done well enough. Often they have the capability for measuring AC, but this is where cheap meters can get tripped up. Unless the waveform is a perfect sinusoid at a specific frequency, their simple algorithms won’t be able to give accurate readings like a high-quality meter will. [hesam.moshiri] took this as a design challenge, though, and built an AC multimeter to take into account some of the edge cases that come up when working with AC circuits, especially when dealing with inductive loads.

The small meter, an upgrade from a previous Arduino version that is now based on the ESP32, is capable of assessing root mean square (RMS) voltage, RMS current, active power, power factor, and energy consumption after first being calibrated using the included push buttons. Readings are given via a small OLED screen and have an accuracy rate of 0.5% or better. The board also includes modern design considerations such as galvanic isolation between the measurement side of the meter and the user interface side, each with its own isolated power supply.  The schematics and bill-of-materials are also available for anyone looking to recreate or build on this design.

With the project built on an easily-accessible platform like the ESP32, it would be possible to use this as a base to measure other types of signals as well. Square and triangle waves, as well as signals with a large amount of harmonics or with varying frequencies, all need different measurement techniques in order to get accurate readings. Take a look at this classic multimeter to see what that entails.

Continue reading “Hackaday Prize 2023: AC Measurements Made Easy”

Error-Correcting RAM On The Desktop

When running a server, especially one with mission-critical applications, it’s common practice to use error-correcting code (ECC) memory. As the name suggests, it uses an error-correcting algorithm to continually check for and fix certain errors in memory. We don’t often see these memory modules on the desktop for plenty of reasons, among which are increased cost and overhead and decreased performance for only marginal gains, but if your data is of upmost importance even when working on a desktop machine, it is possible to get these modules up and running in certain modern AMD computers.

Specifically, this feature was available on AMD Ryzen CPUs, but since the 7000 series with the AM5 socket launched, the feature wasn’t officially supported anymore. [Rain] decided to upgrade their computer anyway, but there were some rumors floating around the Internet that this feature might still be functional. An upgrade to the new motherboard’s UEFI was required, as well as some tweaks to the Linux kernel to make sure there was support for these memory modules. After probing the system’s behavior, it is verified that the ECC RAM is working and properly reporting errors to the operating system.

Reporting to the OS and enabling the correct modules is one thing, actually correcting an error was another. It turns out that introducing errors manually and letting the memory correct them is possible as well, and [Rain] was able to perform this check during this process as well. While ECC RAM may be considered overkill for most desktop users, it offers valuable data integrity for professional or work-related tasks. Just don’t use it for your Super Mario 64 speedruns.

Antennas Can Be A Total Mystery

The real action in the world of ham radio is generally in the high frequency bands. Despite the name, these are relatively low-frequency bands by modern standards and the antenna sizes can get a little extreme. After all, not everyone can put up an 80-meter dipole, but ham radio operators have come up with a number of interesting ways of getting on the air anyway. The only problem is that a lot of these antennas don’t seem as though they should work half as well as they do, and [MIKROWAVE1] takes a look back on some of the more exotic radiators.

He does note that for a new ham radio operator it’s best to keep it simple, beginning work with a dipole, but there are still a number of options to keep the size down. A few examples are given using helically-wound vertical antennas or antennas with tuned sections of coaxial cable. From there the more esoteric antennas are explored, such as underground antennas, complex loops and other ways of making a long wire fit in a small space, and even simpler designs like throwing a weight with a piece of wire attached out the window of an apartment building.

While antenna theory is certainly a good start for building antennas, a lot of the design of antennas strays into artistry and even folklore as various hams will have successes with certain types and others won’t. It’s not a one-size-fits-all situation so the important thing is to keep experimenting and try anything that comes to mind as long as it helps get on the air. A good starting point is [Dan Maloney]’s $50 Ham Guide series, and one piece specifically dealing with HF antennas.

Continue reading “Antennas Can Be A Total Mystery”