Counting frequency is one of those tasks that seems simple on the face of it, but actually has quite a bit of nuance. There are two obvious methods, of which the first is to count zero crossings for some period. If that period is one second you are done, otherwise it’s a simple enough case of doing the math. That is, if you count for half a second, multiply the result by 2, or if you count for 10 seconds, divide by 10. The other obvious method is to measure the period of a single cycle as accurately as you can. Then there’s this third method.from [WilkoL], which simultaneously counts a known reference clock alongside the frequency to be measured. You can see the result in the video, below.
The first method is easy but the lower the frequency you want to measure, the longer you have to count to get any real resolution. Also, you need the time base to be exact. For the second method, you need to be able to make a highly precise measurement. The reason [WikolL] chose the third method is that it doesn’t require a very precise time base — a moderately accurate reference oscillator will do. The instrument gets good resolution quickly at both high and low frequencies. Continue reading “Frequency Counting A Different Way”→
A lot of electronics enthusiasts gravitate to the digital side of the hobby, at least at first. It’s understandable – an Arduino, a few jumpers, and a bit of code can accomplish a lot. But in the final analysis, digital circuits are just analog circuits with the mystery abstracted away, and understanding the analog side opens up a fascinating window on the world of electronics.
Chris Gammell is well-known around hacker circles thanks to his Amp Hour Podcast with Dave Jones, his KiCad tutorials, and his general hacker chops. He’s also got a thing for the analog world, and wants to share some of the tips and tricks he’s developed over his two decades as an electrical engineer. In the next Hack Chat, we’ll be joining Chris down in the weeds to learn the ins and outs of low-level analog measurements. Join us with your questions and insights, or just come along to peel back some of the mysteries of the analog world.
Click that speech bubble to the right, and you’ll be taken directly to the Hack Chat group on Hackaday.io. You don’t have to wait until Wednesday; join whenever you want and you can see what the community is talking about.
Now, digital calipers with wired interfaces to capture the current reading are nothing new. But the good ones are expensive, and really, where’s the fun in plugging a $75 cable into a computer? So when [Max Holliday] was asked to trick out some calipers for automating data capture, he had to get creative.
[Max] found that cheap Harbor Freight digital calipers have the telltale door that covers a serial connector, making them a perfect target for hacking. A little Internet sleuthing revealed the pinout for the connector as well as some details on the serial protocol used by most digital calipers: 24-bit packets is six four-bit words. [Max] used his SAM32, a neat open-source board with both a SAMD51 and an ESP32 that can run CircuitPython. An inverting buffer interfaces the serial lines to the board, which is just the right size to mount on the back of the caliper head. It’s hard to tell how [Max] is triggering readings, but the SAM32 is mounted as a USB device and sends keystrokes directly to a spreadsheet – yes, with the ESP32 it could have been wireless, but his client specifically requested a wired setup. Taking multiple readings is easy now that the user never has to swap calipers for a pen.
[Patrick]’s digital multi-functional measurement tool packs a bunch of useful hardware into a pocket-sized form factor. There’s a Sharp IR distance sensor for non-contact measurements, a rotary wheel encoder for measuring distances along curved lines, and an MPU6050 IMU packing accelerometers and gyroscopes for measuring angles and surface levels. Control is via touch buttons, so measurements can be taken without disturbing the position of the device.
Combining a variety of useful hardware into a compact form factor, while also taking into account usability, has netted [Patrick] a handy tool. It’s not dissimilar from commercial measurement tools available online, and yet is completely built from off-the-shelf parts. Truly a handy device to have in any hacker’s toolbox!
Old school vernier calipers served engineers and machinists well for a long time — and did a perfectly good job. Digital models then came along and were easier to read. They now rule the roost, despite their thirst for batteries. Humans are naturally wired to make the least effort possible at all times. That’s why you always drive to the store that’s only a few blocks from your doorstep. In this vein, you may find a digital protractor preferable to the classic printed type.
[Nirav Jadav]’s project is a simple one but serves as a good learning experience for those getting to grips with microcontrollers. An Arduino Pro Mini serves as the brains, reading signals from an MPU6050 gyroscope. Measured angles are displayed on a small OLED screen.
To use the protractor, first the reference button must be pressed, then the device may be rotated to measure the angle. Relying on a gyroscope means that it’s likely less accurate than a printed device, particularly if it isn’t recalibrated every few measurements to account for drift.
However, like many projects to grace these pages, its value lies not in its usability, but in the journey of creation. To build such a device requires programming ability, an understanding of interfacing with external peripheral devices, as well as how to drive a graphical display. These skills are highly useful in a wide variety of projects, and they’ll serve [Nirav] well in projects to come.
Specialized tools that focus on one particular job tend to get distilled right down to their essentials and turned in an economical consumer product. One example of this is radius (or fillet) gauges: a set of curves in different sizes that one uses to measure the radius of a curved surface by trial and error. To some, such products represent solved problems. Others see opportunities for a fresh perspective, like this caliper-enabled 3D printed radius gauge by [Arne Bergkvist].
[Arne]’s 3D printed radius gauge is a simple object; a rigid attachment for a nearly ubiquitous model of digital caliper. By placing the curve to be measured between the two arms of the device and using the depth measurement of the caliper to measure distance to the curve’s surface, a simple calculation (helpfully printed on the unit itself) of radius = distance * 2.414 reveals the radius of the curve. However, this shortened calculation makes a number of assumptions and only works for [Arne]’s specific design.
Another version by [Fredrik Welander] represents a more flexible take on the same concept. His RadGauge design (pictured up top) has a few different sizes to accommodate a variety of objects, and his Git repository provides a calculator tool as well as some tips on fine tuning to allow for variations in the dimensions of the printed attachment.
3D printing has opened a lot of doors, and items like this show that the plastic doodads created aren’t always the end result in and of themselves; sometimes they are the glue that enables a tool or part to work in a different way. To help get the most out of 3D printing, check out the in-depth coverage of how to best tap 3D printed parts for fasteners, and [Roger Cheng]’s guide to using 3D printed brackets and aluminum extrusion to make just about anything.
Getting a good measurement is a matter of using the right tool for the job. A tape measure and a caliper are both useful tools, but they’re hardly interchangeable for every task. Some jobs call for a hands-off, indirect way to measure small distances, which is where this image analysis measuring technique can come in handy.
Although it appears [Saulius Lukse] purpose-built this rig, which consists of a microscopic lens on a digital camera mounted to the Z-axis of a small CNC machine, we suspect that anything capable of accurately and smoothly transitioning a camera vertically could be used. The idea is simple: the height of the camera over the object to be measured is increased in fine increments, with an image acquired in OpenCV at each stop. A Laplace transformation is performed to assess the sharpness of each image, which when plotted against the frame number shows peaks where the image is most in focus. If you know the distance the lens traveled between peaks, you can estimate the height of the object. [Salius] measured a coin using this technique and it was spot on compared to a caliper. We could see this method being useful for getting an accurate vertical profile of a more complex object.