STM32 Draws On Scope

Drawing on an oscilloscope’s XY mode isn’t a new idea. However, if you’ve ever wanted to give it a go, you’d be hard-pressed to find more information than the nearly hour-and-a-half video about the topic from [Low Byte Productions]. You can check out the video below.

If you prefer to jump straight into the code, there’s a GitHub page. While the code is specific to the STM32, you can apply the ideas to anything.

Continue reading “STM32 Draws On Scope”

Inside A Fake LM358

[IMSAI Guy] got some fake LM358 op-amps. Uncharacteristically, these chips actually performed well even though they didn’t act like LM358s. [IMSAI Guy] did a video about the fake chips and someone who saw it offered to analyze the part compared to a real LM358 to see what was going on. You can see it too in the video below.

A visual inspection made it obvious that the chip was probably a fake. X-ray analysis was a little less obvious but still showed poor quality and different internals. But the fun was when they actually decapsulated the part.

Continue reading “Inside A Fake LM358”

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.

Simple STM32 Frequency Meter Handles Up To 30MHz With Ease

[mircemk] had previously built a frequency counter using an Arduino, with a useful range up to 6 MHz. Now, they’ve implemented a new design on a far more powerful STM32 chip that boosts the measurement range up to a full 30 MHz. That makes it a perfect tool for working with radios in the HF range.

The project is relatively simple to construct, with an STM32F103C6 or C8 development board used as the brains of the operation. It’s paired with old-school LED 7-segment displays for showing the measured frequency. Just one capacitor is used as input circuitry for the microcontroller, which can accept signals from 0.5 to 3V in amplitude. [mircemk] notes that the circuit would be more versatile with a more advanced input circuit to allow it to work with a wider range of signals.

It’s probably not the most accurate frequency counter out there, and you’d probably want to calibrate it using a known-good frequency source once you’ve built it. Regardless, it’s a cheap way to get one on your desk, and a great way to learn about measuring and working with time-varying signals. You might like to take a look at the earlier build from [mircemk] for further inspiration. Video after the break.

Continue reading “Simple STM32 Frequency Meter Handles Up To 30MHz With Ease”

An LM386 Oscillator Thanks To Tungsten Under Glass

Once ubiquitous, the incandescent light bulb has become something of a lucerna non grata lately. Banned from home lighting, long gone from flashlights, and laughed out of existence by automotive engineers, you have to go a long way these days to find something that still uses a tungsten filament.

Strangely enough, this lamp-stabilized LM386 Wien bridge oscillator is one place where an incandescent bulb makes an appearance. The Wien bridge itself goes back to the 1890s when it was developed for impedance measurements, and its use in the feedback circuits of vacuum tube oscillators dates back to the 1930s. The incandescent bulb is used in the negative feedback path as an automatic gain control; the tungsten filament’s initial low resistance makes for high gain to kick off oscillation, after which it heats up and lowers the resistance to stabilize the oscillation.

For [Grug Huler], this was one of those “just for funsies” projects stemming from a data sheet example circuit showing a bulb-stabilized LM386 audio oscillator. He actually found it difficult to source the specified lamp — there’s that anti-tungsten bias again — but still managed to cobble together a working audio oscillator. The first pass actually came in pretty close to spec — 1.18 kHz compared to the predicted 1.07 kHz — and the scope showed a very nice-looking sine wave. We were honestly a bit surprised that the FFT analysis showed as many harmonics as it did, but all things considered, the oscillator performed pretty well, especially after a little more tweaking. And no, the light bulb never actually lights up.

Thanks to [Grug] for going down this particular rabbit hole and sharing what he learned. We love builds like this that unearth seemingly obsolete circuits and bring them back to life with modern components. OK, calling the LM386 a modern component might be stretching things a bit, but it is [Elliot]’s favorite chip for a reason.

Continue reading “An LM386 Oscillator Thanks To Tungsten Under Glass”

STM32 Oscilloscope Uses All The Features

[jgpeiro] is no slouch when it comes to building small, affordable oscilloscopes out of common microcontrollers. His most recent, based on an RP2040 with two channels that ran at 100 MSps, put it on the order of plenty of commercially-available oscilloscopes at this sample rate but at a fraction of the price. He wanted to improve on the design though, making a smaller unit with a greatly reduced bill-of-materials and with a more streamlined design, so he came up with this STM32-based oscilloscope.

The goal of this project was to base as many of the functions around the built-in capabilities of the STM32 as possible, so in addition to the four input channels and two output channels running at 1 MHz, the microcontroller also drives a TFT display which has been limited to 20 frames per second to save processor power for other tasks. The microcontroller also has a number of built-in operational amplifiers which are used as programmable gain amplifiers, further reducing the amount of support circuitry needed on the PCB while at the same time greatly improving the scope’s capabilities.

In fact, the only parts of consequence outside of the STM32, the power supply, and the screen are the inclusion of two operational amplifiers included to protect the input channels from overvoltage events. It’s an impressive build in a small form factor, and we’d say the design goal of keeping the parts count low has been met as well. If you do need something a little faster though, his RP2040-based oscilloscope is definitely worth checking out.

Continue reading “STM32 Oscilloscope Uses All The Features”

Blinkenlights To Bootloader: A Guide To STM32 Development

While things like the Arduino platform certainly opened up the gates of microcontroller programming to a much wider audience, it can also be limiting in some ways. The Arduino IDE, for example, abstracts away plenty of the underlying machinations of the hardware, and the vast amount of libraries can contribute to this effect as well. It’s not a problem if you just need a project to get up and running, in fact, that’s one of its greatest strengths. But for understanding the underlying hardware we’d recommend taking a look at something like this video series on the STM32 platform.

The series comes to us from [Francis Stokes] of Low Byte Productions who has produced eighteen videos for working with the STM32 Cortex-M4 microcontroller. The videos start by getting a developer environment up and blinking LEDs, and then move on to using peripherals for more complex tasks. The project then moves on to more advanced topics and divides into two parts, the development of an application and also a bootloader. The bootloader begins relatively simply, and then goes on to get more and more features built into it. It eventually can validate and update firmware, and includes cryptographic signing (although [Francis] notes that you probably shouldn’t use this feature for production).

One of the primary goals for [Francis], apart from the actual coding and development, was to liven up a subject matter that is often seen as dry, which we think was accomplished quite well. A number of future videos are planned as well. But, if you’re not convinced that the STM32 platform is the correct choice for you, we did publish a feature a while back outlining a few other choices that might provide some other options to consider.

Continue reading “Blinkenlights To Bootloader: A Guide To STM32 Development”