ECG Project With All The Messy Safety Details

We’ve seen a number of heart rate monitoring projects on Hackaday, but [Peter’s] electrocardiography (ECG) Instructable really caught out attention.

If you’ve followed Hackaday for any period of time, you’re probably already somewhat familiar with the hardware needed to record the ECG. First, you need a high input impedance instrumentation amplifier to pick up the millivolt signal from electrical leads carefully placed on the willing subject’s body. To accomplish this, he used an AD8232 single-lead ECG module (we’ve actually seen this part used to make a soundcard-based ECG). This chip has a built-in instrumentation amplifier as well as an optional secondary amplifier for additional gain and low-pass filtering. The ECG signal is riddled with noise from mains that can be partially attenuated with a simple low-pass filter. Then, [Peter] uses an Arduino Nano to sample the output of the AD8232, implement a digital notch filter for added mains noise reduction, and display the output on a 2.8″ TFT display.

Other than the circuit itself, two things about his project really caught our attention. [Peter] walks the reader through all the different safety considerations for a commercial ECG device and applies these principles to his simple DIY setup to ensure his own safety. As [Peter] put it, professional medical electronics should follow IEC 60601. It’s a pretty bulky document, but the main tenets quoted from [Peter’s] write-up are:

  1. limiting how much current can pass through the patient
  2. how much current can I pass through the patient?
  3. what electrical isolation is required?
  4. what happens if a “component” fails?
  5. how much electromagnetic interference can I produce?
  6. what about a defibrillator?

[Peter] mentions that his circuit itself does not fully conform to the standard (though he makes some honest attempts), but lays out a crude plan for doing so. These include using high-valued input resistors for the connections to the electrodes and also adding a few protection diodes to the electrode inputs so that the device can withstand a defibrillator. And of course, two simple strategies you always want to follow are using battery power and placing the device in a properly shielded enclosure.

[Peter] also does a great job breaking down the electrophysiology of the heart and relates it to terms maybe a bit more familiar to non-medical professionals. Understanding the human heart might be a little less intimidating if we relate the heart to a simple voltage source like a battery or maybe even a function generator. You can imagine the ions in our cells as charger carriers that generate electrical potential energy and nerve fibers as electrical wires along which electrical pulses travel through the body.

Honestly, [Peter] has a wealth of information and tools presented in his project that are sure to help you in your next build. You might also find his ECG simulator code really handy and his low-memory display driver code helpful as well. Cool project, [Peter]!

Measuring ECG is something that is near and dear to my heart (sorry, couldn’t resist). Two of my own projects that were featured on Hackaday before I became a writer here include a biomedical sensor suite in Arduino shield form factor, and a simple ECG built around an AD623 instrumentation amplifier.

An Arduino With A Floppy Drive

For many of us the passing of the floppy disk is unlamented, but there remains a corps of experimenters for whom the classic removable storage format still holds some fascination. The interface for a floppy drive might have required some complexity back in the days of 8-bit microcomputers, but even for today’s less accomplished microcontrollers it’s a surprisingly straightforward hardware prospect. [David Hansel] shows us this in style, with a floppy interface, software library, and even a rudimentary DOS, for the humble Arduino Uno.

The library provides functions to allow low level work with floppy disks, to read them sector by sector. In addition it incorporates the FatFS library for MS-DOS FAT file-level access, and finally the ArduDOS environment which allows browsing of files on a floppy. The pictures show a 3.5″ drive, but it also supports 5.25″ units and both DD and HD drives. We can see that it will be extremely useful to anyone working with retrocomputer software who is trying to retrieve old disks, and we look forward to seeing it incorporated in some retrocomputer projects.

Of course, Arduino owners needn’t have all the fun when it comes to floppy disks, the Raspberry Pi gets a look-in too.

A $50 CNC

In theory, there’s isn’t much to building a CNC machine. Hook a bit to a motor and move the motor around with some lead screws and stepper motors. Easy. But, of course, the devil is in the details. [DAZ] made a nice-looking and inexpensive rig that probably isn’t the most precise CNC in the world, but it looks like it does a good enough job and he claims he spent about $50 on it. The video below shows some of the work it has done, and it doesn’t look bad.

This isn’t a rainy afternoon project. You’ll need to cut some wood and 3D print many parts. The drives use M8 threaded rod. Electronics is just an Arduino running standard software.

The steppers looked pretty light duty, and we wondered if it would have been worthwhile to trade them out for beefier ones instead of modifying the ones used for bipolar operation. Still, the results did look good for $50. The 775 spindle is another place you could probably spend a little more and get something better. Non-printed linear rails, and a better screw? The point is that you’ve got a basis to build from.

Continue reading “A $50 CNC”

Pneumatic Can Crusher Awaits Your Command

A powerful robot awaiting for a verbal command to crush its foes might sound like something from a science fiction film, but now it’s a permanent fixture of the [Making Stuff] garage.  (Video, embedded below.) Thankfully this robot’s sworn enemy are aluminum cans, and the person controlling it with their voice isn’t a maniacal scientist, just a guy who’s serious about recycling. Well, we hope so anyway.

The star of the show is a heavy duty wall-mounted can crusher that [Making Stuff] built from some scrap steel and a pneumatic cylinder hooked up to the garage’s compressed air system. A solenoid operated valve allows an Arduino with attached ESP-01 to extend the cylinder whenever the appropriate command comes over the network. In this case, the goal was to tie the crusher into Google Assistant so a can would get smallified whenever one of Google’s listening devices heard the trigger phrase.

Note the ejector air line.

Obviously, those who’d rather keep Big Data out of their recycling bin don’t have to go down the same path. But that being said, having to give a specific voice command to activate the machine does provide a certain level of operational safety. At least compared to trusting some eBay sensor to tell the difference between an aluminum can and a fleshy appendage.

After crushing a few cans with his new toy, [Making Stuff] noticed a fairly troubling flaw in the design. Each time a can was crushed he had to reach into the maw of the machine to push its little flattened carcass out of the way. In other words, he was one bad line of code away from having one good hand.

The solution ended up being a new hose that runs from the exhaust port of the valve to the crushing chamber: once the cylinder retracts, the air exiting the valve pushes the crushed can out the rear of the machine and into a waiting pail underneath. Very slick.

Even if you’re not interested in the voice control aspect, this is a great design to base your own can crusher on. While it’s always a treat when a fully automatic crusher comes our way, we’ll admit the challenges of getting one to work reliably probably aren’t worth the hassle.

Continue reading “Pneumatic Can Crusher Awaits Your Command”

Ooohhh, That Smell: Arduino Monitors Air Quality

According to [Dr. Tom Lehrer’s] song Pollution, “Wear a gas mask and a veil. Then you can breathe, long as you don’t inhale!” While the air quality in most of the world hasn’t gotten that bad, there is a lot of concern about long-term exposure to particulates in the air causing health problems. [Ashish Choudhary] married an Arduino with a display and a pollution sensor to give readings of the PM2.5 and PM10 levels in the air.

The sensor uses a laser diode and a photodiode to detect and count particles, while a fan moves air through the system. If you aren’t up on pollution metrics, PM2.5 is a count of very fine particles (under 2.5 microns) and PM10 is a count of particles for 10 microns. You can find a datasheet for the device online.

Continue reading “Ooohhh, That Smell: Arduino Monitors Air Quality”

Auto Ball Launcher Will Be Your Dog’s New Best Friend

If there’s one bright spot on the blight that is this pandemic, it’s got to be all the extra time we’re spending with our pets. Dogs especially love that we’re home all the time and want to spend it playing, but sometimes you need to get stuff done. Why not head outside with your laptop and keep the dog happy with an automatic ball launcher?

This is a work in progress, and [Connor] plans to publish a BOM and the STL files once it’s all finished. For now, it’s a working prototype that shoots a ball into the air and about 25 feet away, from the looks of it. Far enough to be fun, but not so far that it goes over the fence.

All [Connor] has to do is drop the ball in the top, which you know is going to lead to training the dog to do it himself. A proximity sensor detects the ball and starts up a pair of 540 R/C motors, then a servo drops the ball down the internal chute. The motors spit the ball out with great force with a pair of profiled, 3D-printed wheels that are controlled by a Turnigy ESC and an Arduino Nano.

In the future, [Connor] plans to print a cover for the electronics and enlarge the funnel so it’s easier for the dog to drop in the ball. Check out the brief demo and build video after the break.

All dogs should be able to get in a good game of fetch as often as they want, even if they happen to be blind.

Continue reading “Auto Ball Launcher Will Be Your Dog’s New Best Friend”

Battery Analyzer Puts Alkaline Cells To The Test

We know, we know. Generally speaking, you should try and switch your household devices over to rechargeable cells rather than using disposable alkaline batteries. But while they might seem increasingly quaint in the lithium-ion era, features such as a long shelf life make it worth keeping a pack of disposables around. So which ones should you buy? That’s what [Moragor] wanted to find out with his personal battery analyzer.

Designed as a shield for the Arduino Mega 2560, the analyzer combines a small programmable electronic load with a INA219 current sensor, OLED display, and SD card reader. The user selects the cutoff voltage and discharge rate before the test begins, and once it’s running, data is collected every second and saved to the SD card for later analysis. Once the battery voltage reaches the predetermined value, the test is over and you’re ready to put a new cell through its paces.

After testing 27 different brands of batteries, [Moragor] tabulated all the data and produced some helpful charts to illustrate the results. With few exceptions, the performance level for most of the batteries was remarkably similar. If anything, the test seemed to show that higher tier batteries from companies like Duracell and Energizer actually performed slightly worse than the mid-range offerings. Perhaps the biggest surprise is that, when the per-cell cost was factored in, the local cheapo batteries provided a better value than anything else in the test.

While the selection of battery brands may be different from where you live, the data [Moragor] collected is still a fascinating even if you don’t recognize some of the names on the chart. Of particular note is the confirmation that lithium batteries handily outperformed any of the Alkaline cells tested when it came to high-drain applications. We’d still rather they came in rechargeable form, but at least it’s a step in the right direction.