Linux Fu: Easy Widgets

Here’s a scenario. You have a microcontroller that reads a number of items — temperatures, pressures, whatever — and you want to have a display for your Linux desktop that sits on the panel and shows you the status. If you click on it, you get expanded status and can even issue some commands. Most desktops support the notion of widgets, but developing them is a real pain, right? And even if you develop one for KDE, what about the people using Gnome?

Turns out there is an easy answer and it was apparently inspired by, of all things, a tool from the Mac world. That tool was called BitBar (now XBar). That program places a widget on your menu bar that can display anything you want. You can write any kind of program you like — shell script, C, whatever. The output printed from the program controls what appears on the widget using a simple markup-like language.

That’s fine for the Mac, but what about Linux? If you use Gnome, there is a very similar project called Argos. It is largely compatible with XBar, although there are a few things that it adds that are specific to it. If you use KDE (like I do) then you’ll want Kargos, which is more or less a port of Argos and adds a few things of its own.

Good News, Bad News

The good news is that, in theory, you could write a script that would run under all three systems. The bad news is that each has its own differences and quirks. Obviously, too, if you use a complied program that could pose a problem on the Mac unless you recompile.

Continue reading “Linux Fu: Easy Widgets”

assorted bulk materials

Bulk Material — What IS This Stuff, Anyway?

I hope last week’s introduction to bulk material handling got you all thinking up amazing hacks, and we’ll soon be reporting on DIY Cap’n Crunch Robots galore. This week we’ll look at how to measure particle sizes, separate particles, and even grind them up when you need to.

Measuring Material Properties

Last week we talked about cohesive strength. Bulk material behaves somewhere between a solid and a liquid — if you’ve done your homework, it flows down the funnel just fine. But if you haven’t, it sticks together and holds up the rest of the material. Cohesive strength is the measure of how much weight the material at the bottom of the funnel can hold up.

You can get a rough measurement by packing material in a box with a square hole at the bottom. One side of the hole should have a retractable slide. Slowly withdraw the slide, making the hole rectangular. Material will bridge over, and then at some point a larger chunk will fall out. This is about the size of the minimum opening that will not arch, and a practical measure of the material’s cohesive strength.

box with adjustable hole in bottom to measure cohesive strength
Image capture from The Million Dollar Rathole (video).

Many materials cohere better when wet. Dry a sample in a microwave to determine the percent moisture by weighing it before and after.

Cohesive strength is closely allied to shear strength. If you want to measure shear strength, cut two 1 cm wide rings of 5 cm diameter PVC pipe, stack them, pack with material, put a disk atop the material and load it,  then drag the top ring off the bottom with a spring scale. The force per unit area is the shear strength at that pressure. If it starts packing you’ll see it in the curve.

Packing factor is another useful measurement. Gently shake material to fill a rigid container and weigh it. Now empty the container and refill, packing the material as hard as you can with a length of 1” dowel. Reweigh, and the ratio of the two weights tells you how well the material packs.

Real bulk material is almost always made up of particles of varying sizes, shapes, and compositions. Dirt is particles of different kinds of mineral and organic matter varying from outright rocks to sub micron clay particles. If you’re having problems, getting a graph of material size distribution can be helpful.

For particles above about 75 μM, you can measure the sizes with sieves. If you want to be fancy, they sell nice sets of metal sieves with wire mesh in the bottom. Screen assortments are cheaper. Below 75 μM, you have to use a hydrometer. This is messy and takes a while, but does work.

The idea is to mix the material with soapy water and then use a hydrometer from the auto parts store to measure the density. The particles fall out by Stokes law, big ones first. Stokes law is just that the drag force on a sphere is proportional to the square of the radius. Mass will go up as cube of the radius, so large particles fall faster than small ones. As they fall out, the density of the fluid decreases. This page describes how to do it, and this page has a handy calculator for interpreting the results.

Grinding

You can also change the size of particles in your mix. If particles are too large, they can be crushed or ground. You can separate by size and only grind some of the sizes or discard some of the material. There’s a whole science to grinding. The finer you grind, the harder it gets to grind. Cosmetics and pharmaceutical companies are full of grinding experts.

In general, there are three ways to make something smaller – crush it, cut it, or hit it.

Crushing is straightforward. Use rollers or jaws, a rolling pin or a rock crusher. Don’t overlook the vise. A jaw crusher only crushes particles larger than the jaw space, useful to make a certain size. Rock crushers have a complex motion (video) that should nonetheless be easily imitated by a hacker project. Amateur/hobby gold prospectors have an accessible community.

Crushing action in rollers only works until the particle is small enough that the surface of the roller deforms instead of the particle. Stones have been used to crush grain into flour for most of history.

Oldies Marketplace – Meat Grinder by amiefedora. CC BY-ND 2.0

Cutting is best for soft things, like gummy worms, and tough things (video.). Make sure the cut material has an easy path out. Think of an old fashioned kitchen meat grinder. .

If you want small particles, you need an impact grinder. A coffee mill or blender works by striking the particle with a fast moving impactor. This can be a blade – useful if the material first needs to be cut up, as in a coffee mill – or blunt. Many industrial mills use two pivoting weights on a shaft, and this unit just uses chains (video).

Another impact mill is the ball mill. Rotate a drum on it’s side with steel balls and the material. The balls travel up the side, then fall back down, striking the material.

All these work by fracturing the material. What if you’re trying to powder something that doesn’t fracture, say rubber O rings? For that, there’s cryogenic grinding.

Many rubbery materials are really glasses — materials that are a gloppy liquid at a higher temperature, often brittle at a cool temperature, and soft in-between. The glass you’re probably thinking of is a brittle, breakable material at room temperature, but at high temperature is a liquid. The transition point is the ‘glass transition temperature’.

So what about our O rings? If they’re natural rubber their transition point is about -70° C. Below that temperature they’re brittle and can be ground up. Unfortunately,  grinding is going to put heat back in. So consider grinding slowly – some labs grind biological materials like skin samples with a special mortar and pestle cooled beforehand with liquid nitrogen. Just be sure everything in contact with the material has been cooled, and use a thick walled container with lots of thermal mass.

Separating Wheat From Chaff

Sometimes you have a mix and need to separate it. Your roommate dumped all the gummy bears and all those weird ginger candies into a bowl or whatever. Last week we introduced particle segregation as a bad thing. But when you want to un-mix a mixture, it can be a good thing. Any of the techniques from last week can be an aid.

Sieves and screens work to separate by size. They clog unless the material keeps moving over them. One simple way to do this is to flow the material over sieves on a slanted board, finest sieve first. Another is to mechanically shake the screen. Paper filters are just fine screens, and do clog.

A trommel is a slowly turning cylinder with walls of different sized screens along it’s length. Material is fed into the fine screen end and slowly moves towards the other.

Stokes law provides another way to separate materials as we saw above. Make an upward air draft in a vertical pipe. Deliver the material into the pipe part way up. Materials with more drag than weight will go up, larger materials will go down. You can use the air speed to control the size of particle. An industrial machine called an air classifier does this with higher velocity air blowing material into the rim of a spinning set of blades.

It could be the air (or another gas) you want to remove. There are a couple ways to do it. The first is the cyclone familiar to wood shops. The second is even simpler – inject the air/material mix into the top of a tall, slender container with a tube that extends about halfway into the container. Let the air out from an outlet pipe in the roof. The air flow expands, slows down, and the material falls out.

You can just blow the material sideways – the age old system of threshing wheat works this way. Wheat comes from the plant with a husk, you beat it with a flail to loosen the husk, giving you wheat grains and chaff mixed. Put the mix on a blanket and have four peasants toss it repeatedly. The chaff blows away in the wind.

gummy colas and skittles in a baking sheet
Inertial Separation

A very sensitive separation technique is inertial separation. Here’s a mix of gummy colas and jelly beans. We separated them by tilting and gently shaking the sheet. A material moves on a sheet by staying in place until the acceleration is more than some critical value. Then it rolls or slides.

If your material is dirt or such, run a magnet through it. There’s iron ore and bits of human generated iron in a lot of soil. It can get into motors and such. If you need it out run the material past magnets. An eddy current separator uses AC magnetic effects to do the same with nonferrous metals.

You can also segregate materials by dissolving them. A mixture of table salt and white sand would seem impossible, but if you stir it into water, then decant and boil off the water, the salt and sand can be recovered separately. But we think we’re veering into chemistry now, and we should stop.

Next time we’ll finish up by looking at controlling movement: building gates and contraptions that move your bulk material without clogging up.

Retrotechtacular: Clay Pipe The Hard Way

Troll YouTube long enough and chances are good that you’ll come across all kinds of videos of the “How It’s Made” genre. And buried in with the frying pans and treadmills and dental floss manufacturers, there no doubt will be deep dives on how pipe is made. Methods will vary by material, but copper, PVC, cast iron, or even concrete, what the pipe factories will all have in common is the high degree of automation they employ. With a commodity item like pipe, it’s hard to differentiate yourself from another manufacturer on features, so price is about the only way to compete. That means cutting costs to the bone, and that means getting rid of as many employees as possible.

Such was not always the case, of course, as this look at how Irish Stoneware & Fireclays Ltd. made clay pipe, drain tiles, and chimney flues back in the 1980s shows. The amount of handwork involved in making a single, simple piece of clay pipe is astonishing, as is the number of hands employed at the various tasks. The factory was located in Carrickmacross, County Monaghan, Ireland, near an outcropping of shale that forms the raw material for its products. Quarrying the shale and milling it into clay were among the few mechanized steps in the process; although the extrusion of the pipe itself was also mechanized, the machines required teams of workers to load and unload them.

Continue reading “Retrotechtacular: Clay Pipe The Hard Way”

Junk I Bought: My PSU Just Won’t Do

I have an Acer monitor that I’ve owned for around 15 years, and thanks to my having paid extra at the time for the model sporting a DVI socket for HDMI compatibility it still finds a place as one of my desktop monitors. It has a power brick that supplies it with 1 2V at 4.5 A, and over the years this has developed an annoying whine. Something’s loose in the magnetics, and I really should replace it. So off to AliExpress I went, and dropped in an order for a 12 V, 5 A power brick.

It’s No Heavyweight

A PSU brick, marked as 12V 5A
So far so good…

These units are pretty standard, a box about 130 mm by 60 mm with an IEC socket at one end and a trailing cable at the other for the low voltage. I’ve had enough of them pass through my hands over the years to know what to expect, so I was dismayed to find when I received my PSU that it was suspiciously light. 86 g compared to the around 250 g I’d expect, so I began to smell a rat. Time for a teardown, and a descent into the world of small switch-mode mains power supplies.

Normally it should be easier to break into Fort Knox than to crack open a mains power supply, because for safety they are ultrasonic welded together. The few times I’ve done it have required some Dremel time and a bit of swearing, so when this case turned out to open fairly easily by levering with a screwdriver it was evident this wasn’t a high-quality item. Sure enough my suspicions were confirmed, for there inside was a much smaller board. It’s clear this isn’t a 5 A power supply, so just what have I received? Continue reading “Junk I Bought: My PSU Just Won’t Do”

Hackaday Links Column Banner

Hackaday Links: May 29, 2022

It looks like the ongoing semiconductor shortage isn’t getting any better, and if the recent spate of computer thefts from semi trucks is any indication, it’s only going to get worse. Thieves seem to be targeting the Freightliner Cascadia, probably the most popular heavy freight truck on the road in North America today, with “smash and grab” thefts targeting the CPC4, or Common Powertrain Control module. These modules are sitting ducks — they’re easy to locate and remove, the chip shortage has made legit modules nearly unobtanium from dealers, and the truck won’t run without them. That’s driven the black market price for a CPC up to $8,000 or more, making them a tempting target. And it’s not only individual trucks parked in truck stop lots that are being hit; gangs are breaking into trucking company lots and bricking dozens of trucks in short order. So the supply chain problem which started the semiconductor shortage caused the module shortage, which drives the thieves to steal modules and take trucks off the road, which only worsens the supply chain shortage that started the whole thing. Nice positive feedback loop.

Continue reading “Hackaday Links: May 29, 2022”

The Box: Think Outside Of It

There’s no single recipe for creativity, as far as I know. But this week on the Podcast, Tom Nardi and I were talking about a number of hacks that were particularly inventive, out-of-the-box, or just simply “how did they think of that?”. One possible route to something new is learning from other disciplines.

We were talking about an inspiring video about 3D printing fabrics. At the moment, the design world is going crazy for all things 3DP, so it’s no surprise to see someone with a design background asking herself how to make stuff that comes off the 3D printer more flexible, and fit her needs a little bit better. But what if those of us on the building-purely-functional side of things took what the fabric folks learned and applied it to our work? You’d get something like this hybrid approach to folding mechanisms, or this approach to remove supports from your prints.

I’m continually surprised by how much the home-gamer can learn from industry, and this week was also no exception. [Anne Ogborn]’s piece on handling bulk material draws mostly on the hard work of engineers who are worried about properly emptying gigantic grain silos or feeding tons of screws into small boxes to ship out to customers. But the same physics are at work when you’re designing an automatic dry cat food dispenser for your next vacation, just on a smaller scale.

How about you? What things have you learned from other disciplines, possibly entirely unrelated ones, that have helped you with your hacking?

Vintage Pro Audio Hack Chat Gets In The Groove

Despite the fact that we’ve been doing them for years now, it’s still hard to predict how a Hack Chat will go. There’s no question it will be an hour of interesting discussion of course, that much is a given. But the dynamics of the conversation can range from a rigid Q&A, which isn’t exactly unexpected when you’ve only got a limited amount of time with a subject matter expert, to a freewheeling hangout with a group of people who all happen to be interested in the same thing.

This week’s Vintage Pro Audio Hack Chat with Frank Olson definitely took the latter approach. The allotted hour flew by in a blink, with so many anecdotes and ideas flying back and forth that at times it was tricky to follow. But no worries, with the Chat transcript to pore over, we can make sure none of that accrued first-hand knowledge goes to waste.

So what did we learn during this Chat? Well, it probably won’t come as much of a surprise to find that those who have an opinion on audio gear tend to have a strong opinion on it. Folks were painting with some fairly broad brushes, with particular manufacturers and even whole fields of technology receiving a bit of good-natured ribbing. If your favorite brand or piece of gear gets a specific shout-out, try not to take it too personally — at the end of the day, most in the Chat seemed to agree that sound is so subjective that the right choice is more often than not whatever sounds best to you at the moment.

Which leads directly into Frank’s work with custom microphones. As a musician he knew the sound he was looking for better than anyone, so rather than spend the money on big-name gear, he prefers to build it himself. But the real hook here is their unique construction, with pieces that reimagine design concepts from mid-century commercial equipment using unexpected materials such as thin pieces of walnut cut with a vinyl cutter. Frank explains that the structure of the microphone isn’t as critical these days thanks to the availability of powerful neodymium magnets, which gives the builder more freedom in terms of materials and tools. He says the goal is to inspire others to try building gear from what’s available to them rather than assuming it won’t work because it’s unconventional.

We appreciate Frank, and everyone else, stopping by this week for such a lively and friendly discussion. Let’s be honest, a Chat specifically for folks who want to discuss concepts as personal and nebulous as how they perceive the warmth of sound could have gotten a little heated. But the fact that everyone was able to express their opinions or ask for advice constructively is a real credit to the community.


The Hack Chat is a weekly online chat session hosted by leading experts from all corners of the hardware hacking universe. It’s a great way for hackers connect in a fun and informal way, but if you can’t make it live, these overview posts as well as the transcripts posted to Hackaday.io make sure you don’t miss out.