A (Mostly) 3D Printed Servo/Gear Reduction

This servo/gear reduction was assembled with almost all 3D-printed parts. Apart from a brushed 36 V DC-motor, a stainless steel shaft, and screws for holding the servo together, the only other non-printed part is the BTS7960B motor driver.

Some interesting stats about the plastic servo – its stall torque is about 55 kg/cm, reaching a peak current draw of 18 A when using a 6s LiPo battery outputting 22-24 V. The shaft rotates using two 20 mm holes and lubrication. (Ball bearings were originally in the design, but they didn’t arrive on time for the assembly.)

The holes of the gears are 6.2 mm in diameter in order to fit around the shaft, although some care is taken to sand or fill the opening depending on the quality of the 3D print.

This isn’t [Brian Brocken]’s only attempt at 3D-printing gears. He’s also built several crawling robots, a turntable, and a wind up car made entirely from acrylic. The .stl files for the project are all available online for anyone looking to make their own 3D-printed servo gears.

Posted in 2019 Hackaday Prize, 3d Printer hacks, Arduino Hacks, gear, Hackaday Prize, motor, servo | Leave a comment

Linux Fu: Python GUIs for Command Line Programs (Almost) Instantly

Not every programmer likes creating GUI code. Most hacker types don’t mind a command line interface, but very few ordinary users appreciate them. However, if you write command line programs in Python, Gooey can help. By leveraging some Python features and a common Python idiom, you can convert a command line program into a GUI with very little effort.

The idea is pretty simple. Nearly all command line Python programs use argparse to simplify picking options and arguments off the command line as well as providing some help. The Gooey decorator picks up all your options and arguments and creates a GUI for it. You can make it more complicated if you want to change specific things, but if you are happy with the defaults, there’s not much else to it.

At first, this article might seem like a Python Fu and not a Linux Fu, since — at first — we are going to focus on Python. But just stand by and you’ll see how this can do a lot of things on many operating systems, including Linux.

Hands On

We had to try it. Here’s the code from the argparse manual page, extended to live inside a main function:

import argparse def main(): parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('integers', metavar='N', type=int, nargs='+', help='an integer for the accumulator') parser.add_argument('--sum', dest='accumulate', action='store_const', const=sum, default=max, help='sum the integers (default: find the max)') args = parser.parse_args() print(args.accumulate(args.integers)) main()

You can run this at the command line (we called it iprocess.py):

python iprocess.py 4 33 2
python iprocess.py --sum 10 20 30

In the first case, the program will select and print the largest number. In the second case, it will add all the arguments together.

Creating a GUI took exactly two steps (apart from installing Gooey): First, you import Gooey at the top of the file:

from gooey import Gooey

Then add the decorator @Gooey on the line before the main definition (and, yes, it really needs to be on the line before, not on the same line):

def main():

The result looks like this:

You might want to tweak the results and you can also add validation pretty easily so some fields are required or have to contain particular types of data.

Sure That Works on Linux, But…

Python, of course, runs on many different platforms. So why is this part of Linux Fu? Because you can easily use it to launch any command line program. True, that also should work on other operating systems, but it is especially useful on Linux where there are so many command line programs.

We first saw this done on Chris Kiehl’s blog where he does a GUI — or Gooey, I suppose — for ffmpeg which has a lot of command line options. The idea is to write a simple argparse set up for the program and then tell GUI what executable to actually launch after assembling the command line.

Chris Kiehl ffmpeg GUI

Here’s Chris’ code:

from gooey import Gooey, GooeyParser @Gooey(target="ffmpeg", program_name='Frame Extraction v1.0', suppress_gooey_flag=True)
def main(): parser = GooeyParser(description="Extracting frames from a movie using FFMPEG") ffmpeg = parser.add_argument_group('Frame Extraction Util') ffmpeg.add_argument('-i', metavar='Input Movie', help='The movie for which you want to extract frames', widget='FileChooser') ffmpeg.add_argument('output', metavar='Output Image', help='Where to save the extracted frame', widget='FileSaver') ffmpeg.add_argument('-ss', metavar='Timestamp', help='Timestamp of snapshot (in seconds)') ffmpeg.add_argument('-frames:v', metavar='Timestamp', default=1, gooey_options={'visible': False}) parser.parse_args() if __name__ == '__main__': main() 

You even have the option of creating a JSON file that Gooey can read if you don’t want to write Python. The utility of this is easy to see, but I’d love to hear some concrete examples of where you think it will come in handy. If you’re already using Gooey, or plan to give it a shot after reading this article, let us know in the comments below.

Of course, not all Python GUIs are created equal. Neither are all Python graphics.

Posted in command line, gooey, gui, linux, linux hacks, python, Software Development, software hacks | Leave a comment

Hacking Diabetes Hack Chat

Join us on Wednesday, October 16 at noon Pacific for the Hacking Diabetes Hack Chat with Dana Lewis!

When your child is newly diagnosed with Type 1 diabetes (T1D), everyone is quick to point out, “It’s a great time to be a diabetic.” To some degree, that’s true; thanks to genetically engineered insulin, more frequent or even continuous glucose monitoring (CGM), and insulin infusion pumps, diabetics can now avoid many of the truly terrifying complications of a life lived with chronically elevated blood glucose, like heart disease, kidney failure, blindness, and amputations.

Despite these advances, managing T1D can be an overwhelming task. Every bite of food, every minute of exercise, and every metabolic challenge has to be factored into the calculations for how much insulin to take. Diabetics learn to “think like a pancreas,” but it’s never good enough, and the long-promised day of a true artificial pancreas always seems to remain five years in the future.

Dana Lewis is one diabetic who decided not to wait. After realizing that she could get data from her CGM, she built a system to allow friends and family to monitor her blood glucose readings remotely. With the addition of a Raspberry Pi and some predictive algorithms, she later built an open-source artificial pancreas, which she uses every day. And now she’s helping others take control of their diabetes and build their own devices through OpenAPS.org.

Join us on the Hack Chat as Dana drops by to discuss OpenAPS and her artificial pancreas. We’ll find out what her background is – spoiler alert: she wasn’t a hacker when she started this – what challenges she faced, the state of the OpenAPS project, and where she sees the artificial pancreas going.

join-hack-chatOur Hack Chats are live community events in the Hackaday.io Hack Chat group messaging. This week we’ll be sitting down on Wednesday, October 16 at 12:00 PM Pacific time. If time zones have got you down, we have a handy time zone converter.

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.

[Dana Lewis image source: GeekWire]

Posted in biohacking, cgm, continuous glucose monitor, diabetes, Hackaday Columns, insulin pump, open source, pancreas, The Hack Chat | Leave a comment

The MorningRod Wants Your Mornings Easier, Not Harder

Curtains are about as simple as household devices get, but they can be remarkably troublesome to automate. Everyone’s window treatments slightly different, which frustrates a standardized solution. [dfrenkel] has a passion for DIY and wanted his mornings flooded with sunlight for more peaceful awakenings, so the MorningRod Smart Curtain Rod was born.

Replacing the curtain rod with aluminum extrusion and 3D printed fixtures goes a long way towards standardizing for automation.

MorningRod’s design takes advantage of affordable hardware like aluminum extrusions and 3D printed parts to create a system that attempts to allow users to keep their existing curtains as much as possible.

The curtain rod is replaced with aluminum extrusion. MorningRod borrows ideas from CNC projects to turn the curtain rod into a kind of double-ended linear actuator, upon which the curtains are just along for the ride. An ESP32 serves as the brains while a NEMA17 stepper motor provides the brawn. The result is a motorized curtain opening and closing with a wireless interface that can be easily integrated into home automation projects.

[dfrenkel] is offering a kit, but those who would prefer to roll their own should check out the project page on Thingiverse.

Posted in 3d printed, curtains, ESP32, home automation, home hacks, NEMA17, wireless hacks | Leave a comment

Military Gliders are Making a Comeback, This Time in Unmanned Form

Sun Tzu said, “The line between disorder and order lies in logistics.” This is as true in the modern world as it was 2500 years ago, and logistics have helped win and lose many wars and battles over the centuries. To this end, Logistical Gliders Inc. is developing one-time use, unmanned delivery gliders, for the US Military.

Reminiscent of the military gliders used in WW2, the gliders are designed to be dropped from a variety of aircraft, glide for up to 70 miles and deliver supplies to troops in the field. Specifically intended to be cheap enough to be abandoned after use, the gliders are constructed from plywood, a few aluminum parts for reinforcement and injection molded wing panels. There are two versions of the glider, both with huge payloads. The LG-1K, with a payload capacity of 700 lbs/320 kg and the larger LG-2K, with a payload capacity of 1,600 lbs/725 kg. Wings are folded parallel to the fuselage during transport and then open after release with the help of gas springs. The glider can either do a belly landing in an open area or deploy a parachute from the tail at low altitude to land on the crushable nose.

Gliders like these could be used to deliver supplies after natural disasters, or to remote locations where road travel is difficult or impossible while reducing the flight time required for conventional aircraft. Powered UAVs could even be used to carry/tow a glider to the required release point and then return much lighter and smaller, reducing the required fuel or batteries.

Drones are already used to deliver medical supplies in Rwanda and Ghana, and it’s possible to build your own autonomous unmanned glider. Check out the video after the break to see the big boys in action.

Posted in autonomous delivery, drone, drone hacks, glider, military, transportation hacks | Leave a comment

Nixie Clock Failure Analysis, [Dalibor Farný] Style

We’ve become sadly accustomed to consumer devices that seem to give up the ghost right after the warranty period expires. And even when we get “lucky” and the device fails while it’s still covered, chances are that there will be no attempt to repair it; the unit will be replaced with a new one, and the failed one will get pitched in the e-waste bin.

Not every manufacturer takes this approach, however. When premium quality is the keystone of your brand, you need to take field failures seriously. [Dalibor Farný], maker of high-end Nixie tubes and the sleek, sophisticated clocks they plug into, realizes this, and a new video goes into depth about the process he uses to diagnose issues and prevent them in the future.

One clock with a digit stuck off was traced to via failure by barrel fatigue, or the board material cracking inside the via hole and breaking the plated-through copper. This prompted a board redesign to increase the diameter of all the vias, eliminating that failure mode. Another clock had a digit stuck on, which ended up being a short to ground caused by pin misalignment; when the tube was plugged in, the pins slipped and scraped some solder off the socket and onto the ground plane of the board. That resulted in another redesign that not only fixed the problem by eliminating the ground plane on the upper side of the board, but also improved the aesthetics of the board dramatically.

As with all things [Dalibor], the video is a feast for the eyes with the warm orange glow in the polished glass and chrome tubes contrasting with the bead-blasted aluminum chassis. If you haven’t watched the “making of” video yet, you’ve got to check that out too.

Thanks for the tip, [Alex].

Posted in clock, clock hacks, failure analysis, nixie, pcb, QA, QC, quality control, repair, solder, teardown, via | Leave a comment

Prusa Unveils New Mini 3D Printer, Shakes Up The Competition

For the last couple of years, consumer desktop 3D printer choices in the under $1,000 USD range have fallen into two broad categories: everything bellow $500 USD, and the latest Prusa i3. There are plenty of respectable printers made by companies such as Monoprice and Creality to choose from on that lower end of the scale. It wasn’t a luxury everyone could justify, but if you had the budget to swing the $749 for Prusa’s i3 kit, the choice became obvious.

Of course, that was before the Prusa Mini. Available as a kit for just $349, it’s far and away the cheapest printer that Prusa Research has ever offered. But this isn’t just some rebranded hardware, and it doesn’t compromise on the ideals that have made the company’s flagship machine the de facto open source FDM printer. For less than half the cost of the i3 MK3S, you’re not only getting most of the larger printer’s best features and Prusa’s renowned customer support, but even capabilities that presumably won’t make it to the i3 line until the MK4 is released.

Josef Průša was on hand to officially unveil his latest printer at the 2019 East Coast Reprap Festival, where I got the chance to get up close and personal with the diminutive machine. While it might be awhile before we can do a full review on the Mini, it’s safe to say that this small printer is going to have a big impact on the entry-level market.

A Simplified Design

Considering the huge price drop, you might expect the Prusa Mini to have removed many of the features that made the recent entries into the i3 family so popular. But for the most part, the Mini should deliver more or less the same experience Prusa owners have come to expect.

The Prusa Mini uses a 3:1 geared Bowden extruder

That means automatic mesh bed leveling via inductive probe, a magnetic spring steel print bed (in both smooth and textured variants), near-silent operation thanks to the Trinamic stepper drivers, out of the box support in PrusaSlicer, and the self-checks and safety features that far too often are missing on lower-cost printers.

Of course, there has to be some cuts somewhere. For one, the Prusa Mini does away with the sensor (though it’s available as an option) that pauses the printer if it runs out of filament. This was one of the key upgrades made in the i3 MK3, and is undeniably a nice feature to have on long prints. But considering how few other printers even offer this capability, the fact that it doesn’t come standard on the Mini certainly doesn’t put it at a disadvantage. The fact that it’s even available as an official option and not something you have to hack together yourself is actually an improvement over other printers in this price range.

To reduce weight, the Prusa Mini also switches from a direct drive to a Bowden style extruder. Again, this is not particularly unusual at this price, and is very reminiscent of the arrangement used on the Monoprice Mini. But it will certainly be an adjustment for Prusa owners that are used to a direct drive extruder. For example, Bowden extruders tend to be somewhat more finicky and are notoriously difficult to get working with flexible filaments. Incidentally, the switch to a Bowden extruder also means the Prusa Mini is not compatible with the company’s Multi Material Upgrade (MMU).

Finally, it’s worth noting that the Prusa Mini forgoes an integrated power supply and instead uses a laptop-style “power brick”. While a somewhat unglamorous change, this isn’t likely to be a deal-breaker for anyone. But certainly something to consider when thinking of where you’ll put the machine, or when designing an enclosure for it.

Printrbot called, they want their power supplies back.

Now You’re Playing with Power

While the mechanical aspects of the Prusa Mini have been simplified compared to its larger predecessor, the electronics have gone in the opposite direction. At least in that respect, the new printer is actually quite a bit more advanced than the i3 MK3S. It stands to reason that the Mini will serve as something of a test bed for the electronics that will go into the next generation of Prusa printers, so prospective buyers would be wise to expect some growing pains.

The display is bright and easily visible from a distance.

The Mini features a completely revamped control board and accompanying user interface. The new 32-bit ARM STM32F407 equipped “Buddy” controller is vastly more powerful than the 8-bit board Prusa uses in the i3, and thanks to its onboard Ethernet and USB, can perform all the tasks you’d currently have to do with a Raspberry Pi running OctoPrint.

Or at least, it will in the future. Prusa says those more advanced features, including webcam support, are coming down the line as a software update. Speaking of which, the Buddy board is able to pull its own firmware updates down over the Internet; so no more plugging it into the computer to manually flash the latest hex file. With the DIY addition of an ESP module, it’ll even be able to do that over WiFi.

Increased computational capabilities in the controller also enable some relatively flashy graphics on the printer’s 2.8 inch LCD. Not only does the 320×240 screen look worlds better than the i3’s rather dated display during normal operation, but it allows for 3D rendered previews of the selected STL. Users will be able to visually confirm what they’re about to print, rather than having to remember the file name of a particular object.

Though for all the new capabilities of the Buddy board, there is at least one omission that long-time Prusa owners might find odd: there’s no support for SD cards. STLs are now loaded either over the network or from USB Mass Storage. Arguably this is an improvement, but still somewhat unexpected given that nearly every desktop 3D printer since the MakerBot Cupcake has had an SD slot.

A New Member of the Family

One thing made abundantly clear was that the Prusa Mini is not intended to compete with the i3 line, much less serve as a replacement for it. Josef Průša says that the i3 MK3S is still going strong, and will continue to be updated as time goes on. He also says the team is working on a new CoreXY printer codenamed “Prusa XL”, but that we’ll have to wait until next year before we see anything concrete on that one.

The Mini is envisioned as an ideal starter printer, or perhaps even as a secondary printer so you can start tackling big jobs in parallel. Prusa says its small size and integrated remote control capabilities also make it an ideal choice for print farms. Whatever people will be buying them for, at this price, we expect the Prusa Mini is going to be in high demand for the foreseeable future.

Posted in 32-bit, 3d Printer hacks, Bowden extruder, cons, East Coast RepRap Festival, ERRF 19, Octoprint, prusa, Prusa Mini, slider, stm32f407, Trinamic | Leave a comment

Not All 7-Segment Displays Are Electronic

There are a variety of means by which numbers can be displayed from an electronic circuit, and probably the most ubiquitous remains the seven-segment display. Take seven LEDs, lamps, LCDs, VFD segments or mechanical flip-dot style units in the familiar rectangular figure eight, and your microcontroller or similar can display numbers. There are a variety of different interfaces, but at most all that is needed is a level shifter and a driver.

Sometimes though we encounter a completely novel 7-segment display, and such is the case with [Fhuable]’s all mechanical single digit display. It bears a superficial resemblance to a flipdot display, but instead of a magnetic actuator, it instead uses a complex system of gears and cams to flip the segments sequentially from the turning of a small crank. It appears to be the same mechanism he’s used in his subscription counter project whose video we’ve placed below the break, and it is truly a thing of beauty. We’re not entirely certain how useful it would be as a general-purpose display in its current form, however, we can see it being adapted with relative ease. A clock might, for example, be an eye-catching project.

Most displays that make it here have some electrical components, so it’s unusual to see an entirely mechanical one. But that’s not necessarily always the case.

Thanks [Mike Horne] for the tip.

Posted in 7-segment display, flipdot, hardware, mechanical display | Leave a comment

DIY MIDI Looper Controller Looks Fantastic!

Due to pedalboard size, complicated guitar pedals sometimes reduce the number of buttons to the bare minimum. Many of these pedals are capable of being controlled with an external MIDI controller, however, and necessity being the mother of invention and all, this is a great opportunity to build something and learn some new skills at the same time. In need of a MIDI controller, Reddit user [Earthwin] built an Arduino powered one to control his Boss DD500 Looper pedal and the result is great looking.

Five 16×2 LCD screens, one for each button, show the functionality that that button currently has. They are attached (through some neat wiring) to a custom-built PCB which holds the Arduino that controls everything. The screens are mounted to an acrylic backplate which holds the screens in place while the laser-cut acrylic covers are mounted to the same plate through the chassis. The chassis is a standard Hammond aluminum box that was sanded down, primed and then filler was used to make the corners nice and smooth. Flat-top LEDs and custom 3D printed washers finish off the project.

[Earthwin] admits that this build might be overkill for the looper that he’s using, but he had fun building the controller and learning to use an Arduino. He’s already well on his way to building another, using the lessons learned in this build. If you want to build your own MIDI controller, this article should help you out. And then you’re ready to build your controller into a guitar if you want to.

[Via Reddit]

Posted in arduino, arduino nano, hardware, midi, midi controller, musical hacks | Leave a comment

Quality Sound-Proof Cans From Personal Protective Equipment

Working in a noisy office can be distracting. To combat the problem in his workplace [Rikard Anglerud] bought himself a pair of 3M ear defenders. They were good, but not quite good enough to completely extinguish the noise, so he inserted the drivers from a pair of cheap headphones and played a low-level white noise. This prototype proved effective, so he returned to the project and produced a much nicer pair that approach much more costly cans in their execution.

[Rikard’s] first set of headphones left something to be desired in the quality department. The second set followed with a pair of better-quality drivers sourced online, and more care was taken with cable routing and in their fitting. Finally some filler was used to remove the moulded 3M branding, and make them look more hi-fi than workwear.

From an audiophile perspective these cans might not approach a very high quality pair because their drivers are unlikely to be matched to the acoustic properties of their enclosures. But it sounds as though he’s achieved an adequate result despite that, and completely satisfied his need to exclude office noise.

Posted in ear defenders, earphones, headphones, home entertainment hacks | Leave a comment