A graph visualising approximation errors - the specific principle pictured is described well by the linked article

Time And Accuracy In Las ATMegas

Do you ever have to ensure that an exact amount of time passes between two tasks in your microcontroller code? Do you know what’s the difference between precision and accuracy? Today, [Jim Mack] tells us about pushing timers and interrupts to their limits when it comes to managing time, while keeping it applicable to an ever-popular ATMega328P target! Every now and then, someone decides to push the frontiers of what’s possible on a given platform, and today’s rules is coding within constraints of an Arduino environment. However, you should check [Jim]’s post out even if you use Arduino as a swearword – purely for all of the theoretical insights laid out, accompanied by hardware-accurate examples!

This will be useful to any hacker looking to implement, say, motor encoder readings, signal frequency calculations, or build a gadget processing or modifying audio in real time. To give you a sample of this article, [Jim] starts by introducing us to distinctions between precision and accuracy, and then presents us with a seemingly simple task – creating exactly 2400 interrupts a second. As much as it might look straightforward, problems quickly arise when clock crystal frequency doesn’t cleanly divide by the sampling frequency that you have to pick for your application! This is just a taste of all the examples of hidden complexity presented, and they’re accompanied with solutions you can use when you eventually encounter one of these examples in your hacker pursuits. In the end, [Jim] concludes with links to other sources you can study if you ever need to dig deeper into this topic.

Keeping our projects true to the passage of time can be an issue, and we’ve been at it for ages – calibrating your RC oscillator is a rite of passage for any ATTiny project. If you ever decide to have an interrupt peripheral help you with timing issues, we’ve gone in-depth on that topic in the past, with a three-part series describing the benefits, the drawbacks and the edgecases of interrupts. Going for a more modern target? Our piece on using interrupts with STM32 is a great path for trying out tools of the modern age.

View of a well-organized workspace in front of a window view to outdoors

How To Optimize Your Workspace: Analyze How You Work

[Jay Carlson] has shared some fantastic guidance on how to optimize one’s home workspace, and you just might want to emulate some of his layout, especially if you routinely juggle multiple projects. He makes the important point that different people have different needs, so one size does not fit all. Optimizing one’s workspace must first take into account what kind(s) of work one does, and many of his tips and tricks are pretty broadly applicable.

A rack of trays, each with a project
Looking online for these? A common industry term is “bun rack”. This one is “half-height” in size.

[Jay] works on embedded systems, and often switches between many different jobs and projects. Get your notepads ready, because there are plenty of great takeaways.

For example, to get a good top-down camera view of what’s on the workbench, he uses a camera mounted on an articulated arm (the kind that usually has a lamp attached to the end.) This makes the camera easy to deploy and easy to stow, and he can effortlessly save footage or share video with colleagues online.

Another great tip is using what most of us would call cafeteria trays and a matching rack. With each tray devoted to a different project or version of hardware, it makes switching between jobs as simple as sliding in one tray and pulling out another. It’s also a highly space-efficient way to store a lot of in-progress hardware. [Jay] gives a detailed walkthrough of his workspace and explains every decision, it’s well worth a read.

It’s always better to save space, as long as doing so doesn’t negatively impact the work itself. If you’re looking for space-saving tips, be sure to check out this tiny workshop’s space-saving hacks for more ideas.

Cables Too Long? Try Cable Management Via DIY Coiling

Annoyed by excessively-long cables? Tired of the dull drudgery and ugly results of bunching up the slack and wrapping it with a twist-tie? Suffer no longer, because the solution is to make your own coiled cables!

[Dmitry] is annoyed with long, unruly cables and shared a solution he learned from the DIY keyboards community: coil them yourself with a piece of dowel, a hair dryer, and about 10 minutes of your time. However, it’s just a wee bit more complicated than it may seem at first glance.

The process begins with wrapping a cable around a mandrel, then heating it as uniformly as possible to thermoform the jacket, but the instructional video (embedded below) says that all by itself that isn’t quite enough to yield lasting results. After heating the cable and letting it cool, the coils will be formed but it will not hold the new shape very well. The finishing touch is to “reverse” the direction of the coils, by re-wrapping it backward around the mandrel, inverting the coils upon themselves. This process is awkward to explain, but much simpler to demonstrate. This video by [DailySetupTech] explains this process around the 2:30 mark. That final step is what yields a tightly-wound, springy coil.

The nice part about using this process as a cable management technique is that it is possible to coil only a portion of a cable, leaving the exact amount of uncoiled slack required for a given application. Keep it in mind the next time some cables need managing. And if you don’t want to coil a cable but still need it out of the way, you might find this design for a DIY cable chain made from a tape measure useful.

Continue reading “Cables Too Long? Try Cable Management Via DIY Coiling”

Advanced PCB Graphics With KiCAD 6 And Inkscape

There are many, many video tutorials about designing the functional side of PCBs, giving you tips on schematic construction, and layout tips. What is a little harder to find are tutorials on the graphical aspects, covering the process from creating artworks and how you can drive the tools to get them looking good on a PCB, leveraging the silkscreen, solder and copper layers to maximum effect. [Stuart Patterson] presents his guide for Advanced PCB Graphics in KiCAD 6.0 and Inkscape, (Video, embedded below) to help you on your way to that cool looking PCB build.

Silkscreen layers in yellow, solder mask opening in red

The first step is to get your bitmap, whether you create it yourself, or download it, and trace it into a set of vectors using the Inkscape ‘trace bitmap’ tool. If you started with an SVG or similar vector shape, then you can skip that stage.

Next simply create a PCB outline shape by deleting all the details that aren’t part of the outline. A little scaling here and there to get the dimensions correct and you’re done with the first part. [Stuart] has an earlier video showing that process.

The usability improvements in KiCAD 6.0 are many, but one greatly demanded feature is the ability to group objects, just like you do in Inkscape and any other vector graphics tool for that matter. That means you can simply import that SVG outline into the Edge.Cuts PCB layer and all the curves will be nicely tied together. Next you select the details you want for the silkscreen layer, solder mask removal layers and any non-circuit copper. In Inkscape it would be wise to use the layers feature to assign the different material types to a uniquely named layer, so they can be hidden for exporting. This allows you to handle silk, mask and copper PNG exports from a single master file, in addition to any vector details for outline, slots and holes.

Once you have PNG bitmap exports for the silk, mask etc. you need to create a footprint inside a board-specific library, using the KiCAD image converter tool. It was interesting to note that you can export a new image footprint from the tool and paste it straight into the footprint editor, and tweak all the visibility details at the same time. That will save some time and effort for sure. Anyway, we hope this little tutorial from [Stuart] helps, and we will be sure to bring you plenty more in the coming months.

Need some more help with KiCAD? Checkout this tutorial, and if you want a bit more power from the tool, you need some action plugins!

Continue reading “Advanced PCB Graphics With KiCAD 6 And Inkscape”

Jet burner and close-up

$7 Tent Heater Provides Comfort On A Budget

At Hackaday’s Minnesota office, we appreciate central heat and hot coffee because the outdoor temperature is sub-zero in Celsius and Fahrenheit. Not everyone here has such amenities, and families living in tents could use heater help. If you live somewhere inhospitably cold and have the resources (time being the most crucial), please consider building and donating alcohol jet burners.

Alcohol burners like these are great for tents because if they tip over, they self-extinguish. You can fill them with 70% rubbing alcohol and they’ll heat a small space, and if running on denatured alcohol, they can be used to cook with. They won’t do you much good outdoors unless you have significant wind protection, as the tiny jet is likely to blow out. The first time you light one, you must heat the coil with a lighter or another heater to vaporize incoming fuel, then it can sustain itself by wicking fluid up from the reservoir jar. Relighting after a tip or accidental gust only takes a spark since the copper is already hot.

If you came for a hack, note how they fill the small tubes with salt funneled through a condiment cap before bending them. Sure, there are springy pipe bending tools, but who doesn’t already have salt and tape? Keeping humans warm is crucial, but heating metal takes a different approach.

Thank you for the tip, [cyberlass]

Squishy Robot Hardware Does Well Under Pressure

If your jealousy for Festo robots is festering, fret not! [mikey77] has shown us that, even without giant piggy banks, we can still construct some fantastic soft robotics projects with a 3D printer and a visit to the hardware store. To get started, simply step through the process with this 3D Printed Artificial Muscles: Erector Set project on Instructables.

In a nutshell, [mikey77] generously offers us a system for designing soft robots built around a base joint mechanism: the Omega Muscle. Fashioned after its namesake, this base unit contains an inflatable membrane that expands with pressure and works in tandem with another Omega Muscle to produce upward and downward angular movement. Each muscle also contains two endpoints to connect to a base, a gripper, or more Omega Muscles. Simply scale them as needed and stack them to produce a custom soft robot limb, or use the existing STLs to make an articulated soft gripper.

This project actually comes in two parts for robot brawns and brains. Not only does [mikey77] take us through the process for making Omega muscles, we also get a guide for building the pressure system designed to control them. Taken together, it’s a feature-complete setup for exploring your own soft robotics projects with a great starting project. Stay tuned after the break for a demo video in action. There’s no audio, but we’re sure you’ll be letting off an audibleĀ pssssh in satisfaction to follow along.

It’s not every day that we see FFF-based 3D printers making parts that need to be airtight. And [mikey77’s] success has us optimistic for seeing more air muscles in future projects down the road. In the meantime, have a look at the silicone-silicon half-breeds that we’ve previously caught pumping iron.

Continue reading “Squishy Robot Hardware Does Well Under Pressure”

iPhone pictured with a lock

Make Your Own BLE-Enabled IOS App From Scratch

Even those readers who are most skeptical of Apple products will like this Bluetooth Low Energy (BLE)-enabled iOS app tutorial from [Akio].

With everything being “connected” these days smartphone applications are of course a ubiquitous part of our existence. We’ve seen plenty of examples connecting your Bluetooth-enabled projects to an Android device, but comparatively fewer tutorials for connecting to iOS devices. This mostly has to do with Android’s much larger market share and also Android’s more open-source friendly business model. Nevertheless, if you do much IoT development either as a hobby or professionally, then you probably find yourself interacting with Apple devices more than you like to admit.

[Akio’s] app is essentially updating a chart, in real-time, with data read from an Adafruit nRF52832 Feather board. He then walks you through all the basics of creating a user interface (UI) using Apple’s Storyboard interface, a simple drag-and-drop scheme similar to something you’ve probably used in many other contexts. [Akio] shows readers how to add buttons for allowing users to interact with the app, labels for displaying data to the user, as well as walks you through Apple’s odd methodology of connecting UI elements to code using IBAction and IBOutlets. The highlight of his tutorial is showing readers how to add charts to their iOS apps which seems to take a few more steps than you might imagine.

[Akio] does a really good job detailing all the relevant functions so that readers will hopefully understand what each piece of the code is doing. And we really enjoyed him adding individual video tutorials for some of the trickier programming steps. He also readily admits that some folks may opt to develop their UI exclusively in code as opposed to the Storyboard but he argues that the Storyboard is still important for beginners and is really handy when the UI is fairly simple.

Of course, in true open-source fashion, [Akio] provides all his code on his GitHub repository so you can clone the repo and run the code yourself as well as credit some of the resources he used while making his app. Two things we really love to see. Hopefully, [Akio’s] tutorial will make connecting to iOS devices seem much less onerous than it once was.