Custom Printed Knobs In Just A Few Lines Of Code

While not everyone is necessarily onboard for the CAD-via-code principle behind OpenSCAD, there’s no denying the software lends itself particularly well to parametric designs. Using a few choice variables, it’s possible to make a model in OpenSCAD that can be easily tweaked by other users — even if they have zero prior experience with CAD.

Take for example this parametric-knob-maker written by [aminGhafoory]. The code clocks in at less than 100 lines, but if you’re looking to spin up your own version, all you really need to pay attention to are the clearly labeled variables up at the top. Just plug in your desired diameter and height, fiddle around a bit with the values that get fed into the grip generating function, and hit F7 to export it to an STL ready for printing.

Now admittedly, all the knobs generated with this code will look more or less the same. But that’s the beauty of open source, should you want to print out some wild looking knobs, you can at least use this code as a basis to build on. With the core functionality in place, you just need to concern yourself with writing a new function to generate a grip texture more to your liking.

Of course, if you want to make your OpenSCAD designs even easier for others to modify, you’ll want to look into its impressive customizer capability which replaces manually edited variables with friendly sliders and text input boxes. Projects like the Ultimate Box Maker we looked at back in 2018 are an excellent example of how powerful OpenSCAD can be if you give your design the proper forethought.

3D Printed Magnetic Switches Promise Truly Custom Keyboards

While most people are happy to type away at whatever keyboard their machine came with, for the keyboard enthusiast, there’s no stone to be left unturned in the quest for the perfect key switch mechanism. Enter [Riskable], with an innovative design for a 3D printed mechanism that delivers near-infinite adjustment without the use of springs or metallic contacts.

The switching itself is performed by a Hall effect sensor, the specifics of which are detailed in a second repository. The primary project simply represents the printed components and magnets which make up the switch mechanism. Each switch uses three 4 x 2 mm magnets, a static one mounted on the switch housing and two on the switch’s moving slider. One is mounted below the static magnet oriented to attract it, while the other is above and repels it.

With this arrangement the lower magnet provides the required tactility, while the upper one’s repulsive force replaces the spring used in a traditional mechanism. [Riskable] calls it the magnetic separation contactless key switch, but we think “revolutionary” has a nicer ring to it.

The part which makes this extra-special is that it’s a fully parametric OpenSCAD model in which the separation of the magnets is customisable, so the builder has full control of both the tactility and return force of the keys. There’s a video review we’ve posted below that demonstrates this with a test keypad showing a range of tactility settings.

We have a resident keyboard expert here at Hackaday in the shape of our colleague [Kristina Panos], whose Keebin’ With Kristina series has introduced us to all that is interesting in the world of textual input. She plans on taking a keyboard made of these clever switches on a test drive, once she’s extruded the prerequisite number of little fiddly bits.

Continue reading “3D Printed Magnetic Switches Promise Truly Custom Keyboards”

Illustrated Kristina with an IBM Model M keyboard floating between her hands.

Keebin’ With Kristina: The One Where Shift Happens

It’s been an exciting few weeks for me personally on the clacking front. I got a couple of new-to-me keyboards including my first one with ALPS switches, an old TI/99A keyboard with Futaba MD switches, and a couple of what are supposed to be the original Cherry switches (oh man they clack so nicely!) But enough about my keyboard-related fortuitousness, and on to the hacks and clacks!

Putting My Pedals to the Metal

Kinesis Savant Elite triple foot pedal. It's a keyboard for your feet!I picked up this Kinesis Savant Elite triple foot pedal from Goodwill. It works fine, but I don’t like the way it’s programmed — left arrow, right arrow, and right mouse click. I found the manual and the driver on the Kinesis website easily enough, but I soon learned that you need a 32-bit computer to program it. Period. See, Kinesis never wrote an updated driver for the original Savant Elite pedal, they just came out with a new one and people had to fork over another $200 or figure something else out.

I’m fresh out of 32-bit computers, so I tried running the program in XP-compatibility mode like the manual says, but it just doesn’t work. Oh, and the manual says you can brick it if you don’t do things correctly, so that’s pretty weird and scary. It was about this time that I started to realize how easy it would be to open it up and just replace the controller with something much more modern. Once I got inside, I saw that all three switches use JST plugs and right angle header. Then I though hey, why not just re-use this set-up? I might have to make a new board, but it how awesome would it be to plug these pedals’ JSTs into my own board?

Continue reading “Keebin’ With Kristina: The One Where Shift Happens”

New Video Series: Designing With Complex Geometry

Whether it’s a 3D printed robot chassis or a stained glass window, looking at a completed object and trying to understand how it was designed and put together can be intimidating. But upon closer examination, you can often identify the repeating shapes and substructures that were combined to create the final piece. Soon you might find that the design that seemed incredibly intricate when taken as a whole is actually an amalgamation of simple geometric elements.

This skill, the ability to see an object for its principle components, is just as important for designing new objects as it is for understanding existing ones. As James McBennett explains in his HackadayU course Designing with Complex Geometry, if you want to master computer-aided design (CAD) and start creating your own intricate designs, you’d do well to start with a toolbox of relatively straightforward geometric primitives that you can quickly modify and reuse. With time, your bag of tricks will be overflowing with parametric structures that can be reshaped on the fly to fit into whatever you’re currently working on.

His tool of choice is Grasshopper, a visual programming language that’s part of Rhino. Designs are created using an interface reminiscent of Node-RED or even GNU Radio, with each interconnected block representing a primitive shape or function that can be configured through static variables, interactive sliders, conditional operations, and even mathematical expressions. By linking these modules together complex structures can be generated and manipulated programmatically, greatly reducing the time and effort required compared to a manual approach.

As with many powerful tools, there’s certainly a learning curve for Grasshopper. But over the course of this five part series, James does a great job of breaking things down into easily digestible pieces that build onto each other. By the final class you’ll be dealing with physics and pushing your designs into the third dimension, producing elaborate designs with almost biological qualities.

Of course, Rhino isn’t for everyone. The $995 program is closed source and officially only runs on Windows and Mac OS. But the modular design concepts that James introduces, as well as the technique of looking at large complex objects as a collection of substructures, can be applied to other parametric CAD packages such as FreeCAD and OpenSCAD.

Designing with Complex Geometry is just one of the incredible courses offered through HackadayU, our pay-as-you-wish grad school for hardware hackers. From drones to quantum computing, the current list of courses has something for everyone.

Continue reading “New Video Series: Designing With Complex Geometry”

SOL75 Uses AI To Design Standard Mechanical Parts

[Francesco] developed a parametric design tool called SOL75 which aims to take the drudgery out of designing the basic mechanical parts used in projects. He knows how to design things like gears, pulleys, belts, brackets, enclosures, etc., but finds it repetitive and boring. He would rather spend his time on the interesting and challenging portions of his project instead.

The goal of SOL75 is to produce OpenSCAD and STL files of a part based on user requirements. These parameters go beyond the simple dimensional and include performance characteristics such as peak stress, rigidity, maximum temperature, etc. The program uses OpenSCAD to generate the geometries and a core module to evaluate candidate designs. In an attempt to overcome the curse of dimensionality, [Francesco] has trained an AI oracle to quickly accept or reject candidate solutions.

In the realm of parametric design aids, you have projects like NopSCADlib which dimensionally parameterize a large collection of common objects by numbers alone ( a 100 cm long, 6.35 mm diameter brass tube with 1.22 mm wall thickness ) or industry standard specifications ( a 10 mm long M3 socket head cap screw ). This approach doesn’t take into account whether the object will hold up in your application nor does it consider any 3D printing issues. At the other extreme, there are the generative design and optimization tools found in professional packages like Fusion 360 and SolidWorks which can make organic-looking items that are optimized precisely for the specified conditions.

SOL75 seems to fall in the middle, combine characteristics of both approaches. It gives you the freedom to select dimensional parameters and performance requirements, yet bounds the solution space by only offering objects that have been prepared ahead of time by domain experts — if you ask for an L-bracket, you’ll get an L-bracket and not something that looks like a spider web or frog leg.

Once you compile the design, SOL75 generates the OpenSCAD and/or STL files and a bill of materials. But wait — there’s more– it also makes a thorough design handbook documenting the part in great detail, including the various design considerations and notes on printing. Here is a demonstration link for an electronics enclosure which is pretty interesting. There is also an example of using SOL75 to make a glider, which you can read about on the Hackaday.io project page.

For now, [Francesco] has only made SOL75 available in a register-by-email online Beta version, as he’s still undecided on what form the final version will be. Do you have any success (or failure) stories regarding generative designs? Let us know in the comments below.

Hyper Links And Hyperfunctional Text CAD

Strong opinions exist on both sides about OpenSCAD. The lightweight program takes megabytes of space, not gigabytes, so many people have a copy, even if they’ve never written a shape. Some people adore the text-only modeling language, and some people abhor the minimal function list. [Johnathon ‘Zalo’ Selstad] appreciates the idea but wants to see something more robust, and he wants to see it in your browser. His project CascadeStudio has a GitHub repo and a live link so you can start tinkering in a new window straight away.

Continue reading “Hyper Links And Hyperfunctional Text CAD”

Mastering OpenSCAD Workflow

As you may have noticed in our coverage, we’re big fans of OpenSCAD around these parts. The fact that several of the Hackaday writers organically found and started using the parametric CAD package on their own is not only a testament to our carefully cultivated hive mind but also to the type of people it appeals to. Hackers love it because it allows you to model physical objects as if you were writing software: models are expressed in code, and its plain text source files can be managed with tools like git and make. If you’re a real Pinball Wizard you could design objects and export them to STL without ever using a graphical interface.

But as you might expect, with such power comes a considerable learning curve. OpenSCAD devotee [Uri Shaked] recently wrote in to share with us his workflow for designing complex interacting mechanisms, which serves as an excellent primer to the world of parametric design. From animating your models to recreating the “vitamins” of your build, his post contains plenty of tips that can help both new and veteran OpenSCAD users alike.

Perhaps the biggest takeaway from his post is that you should be thinking of your projects as a whole, rather than as individual models. [Uri] recalls his early attempts at designing mechanisms: designing each component individually, printing it out, and only then finding out if it fits together with the other pieces. This method of trial and error is probably familiar to anyone who’s designed their own 3D printed parts — but it’s slow and wastes materials. The alternative, as he explains it, is to design all of the pieces at the same time and “assemble” them virtually. This will allow you to check clearances and fitment without dedicating the time and materials to test it in the real world.

In fact, as [Uri] explains, you’re better off spending your time bringing real-world parts into OpenSCAD. By carefully measuring the hardware components you want to interact with (servos, gears, switches, etc), you can create facsimiles of them to use as a reference in your OpenSCAD project. As time goes on, you can build up your own library of drop-in reference models which will accelerate future designs.

He also spends a little time talking about something that doesn’t seem to be terribly well known even among the OpenSCAD converts: you don’t have to use the built-in editor if you don’t want to. Since OpenSCAD source code files are plain text, you can write them in whatever editor you like. The OpenSCAD model viewer even has an option specifically for this scenario, which will cause it to update the rendered preview as soon as it detects the source has been updated. For [Uri] this means he can create his designs in Visual Studio Code with a constantly updating preview in another window.

If you’re looking for examples of what the parametric capabilities of OpenSCAD can do for you, we’ve got no shortage of excellent examples. From creating customized computer cases to saving time by using mathematically derived components. Our very own [Elliot Williams] even has a write up about that most glorious of OpenSCAD commands: hull().