Know The Load With This Simple Microcontroller CPU Meter

How do you tell how much load is on a CPU? On a desktop or laptop, the OS usually has some kind of gadget to display the basics. On a microcontroller, though, you’ll have to roll your own CPU load meter with a few parts, some code, and a voltmeter.

We like [Dave Marples]’s simple approach to quantifying something as complex as CPU load. His technique relies on the fact that most embedded controllers are just looping endlessly waiting for something to do. By strategically placing commands that latch an output on while the CPU is busy and then turn it off again when idle, a PWM signal with a duty cycle proportional to the CPU load is created. A voltage divider then scales the maximum output to 1.0 volt, and a capacitor smooths out the signal so the load is represented by a value between 0 and 1 volt. How you display the load is your own choice; [Dave] just used a voltmeter, but anything from an LED strip to some kind of audio feedback would work too.

Still just looking for a load meter for your desktop? Take your pick: an LED matrixold-time meters, or even Dekatrons.

3D Printing Flexible Surfaces Out Of Non-Flexible Material

Here’s some interesting work shared by [Ben Kromhout] and [Lukas Lambrichts] on making flexible 3D prints, but not by using flexible filament. After seeing a project where a sheet of plywood was rendered pliable by cutting a pattern out of it – essentially turning the material into a giant kerf bend – they got interested in whether one could 3D print such a thing directly.

Inspiration for the project was this laser-cut plywood.

The original project used plywood and a laser cutter and went through many iterations before settling on a rectangular spiral pattern. The results were striking, but the details regarding why the chosen pattern was best were unclear. [Ben] and [Lukas] were interested not just in whether a 3D printer could be used to get a similar result, but also wanted to find out what factors separated success from failure when doing so.

After converting the original project’s rectangular spiral pattern into a 3D model, a quick proof-of-concept showed that three things influenced the flexibility of the end result: the scale of the pattern, the size of the open spaces, and the thickness of the print itself. Early results indicated that the size of the open spaces between the solid elements of the pattern was one of the most important factors; the larger the spacing the better the flexibility. A smaller and denser pattern also helps flexibility, but when 3D printing there is a limit to how small features can be made. If the scale of the pattern is reduced too much, open spaces tend to bridge which is counter-productive.

Kerf bending with laser-cut materials gets some clever results, and it’s interesting to see evidence that the method could cross over to 3D printing, at least in concept.

Electric LEGO Longboard Now Complete With Epic Road Test

We recently posted about [James Bruton]’s most excellent oversized LEGO electric longboard. Well, now he has completed the project by tidying a few things and building oversized versions of classic light-up bricks to serve as headlamps and the tail light. Most importantly, he’s hitting the road with it!

He built a LEGO-looking enclosure for the battery as well, based on a 2×6 brick. The battery pack sits behind the motor with the tail light on top and holds the radio control receiver as well the twin LiPos. The head and tail lights pack 24-LED discs and are controlled by [James]’ FS-GT2B 3-channel RC transmitter. Its third channel is just a button, and he can trip that button to activate the lights with the help of a Turnigy receiver-controlled switch.

For an added touch he printed some LEGO flowers and a minifig, suitably oversized, and took the skateboard on the road. The thing has some zip! [James] kept his balance while holding the controller in one hand and a selfie stick with the other. The headlamp housings fell off, and a while later the minifig fell off. Fortunately [James] was able to snap them back into place, in proper LEGO fashion.

[James] runs XRobots and also served as a judge for the 2016 Hackaday Prize. We wrote up his Star Wars builds a while back, as well as his tutorial on mixed reality filming without a green screen.

Continue reading “Electric LEGO Longboard Now Complete With Epic Road Test”

Add A Second SD Card To The Pi Zero

The Raspberry Pi Zero is a beautiful piece of hardware, fitting an entire Linux computer into a package the size of a pack of gum (don’t chew it, though). However, this size comes with limited IO options, which can be a complication for some projects. In this case, [Hugatry] wanted extra storage, and devised a smart method to add a second SD card to the Pi Zero.

The problem with the Pi Zero is that with only a single USB port, it’s difficult to add any other storage to the device without making things bulkier with hubs or other work arounds. Additionally, the main SD card can’t be removed while the Pi is running, so it makes sense to add an easy-to-use removable storage option to the Pi Zero.

It’s quite a simple hack – all that’s required to pull it off is a few resistors, an SD card connector, and some jumper wires. With everything hooked up, a small configuration change enables the operating system to recognise the new card.

Overall it’s great to see hacks that add further functionality to an already great platform. If you find it’s not powerful enough, you can always try overclocking one. 

Continue reading “Add A Second SD Card To The Pi Zero”

Bespoke Processors Might Soon Power Your Artisanal Devices

Modern microprocessors are a marvel of technological progress and engineering. At less than a dollar per unit, even the cheapest microprocessors on the market are orders of magnitude more powerful than their ancestors. The first commercially available single-chip processor, the Intel 4004, cost roughly $25 (in today’s dollars) when it was introduced in 1971.

The 4-bit 4004 clocked in at 740 kHz — paltry by today’s standards, but quite impressive at the time. However, what was remarkable about the 4004 was the way it shifted computer design architecture practically overnight. Previously, multiple chips were used for processing and were selected to just meet the needs of the application. Considering the cost of components at the time, it would have been impractical to use more than was needed.

That all changed with the new era ushered in by general purpose processors like the 4004. Suddenly it was more cost-effective to just grab a processor of the shelf than to design and manufacture a custom one – even if that processor was overpowered for the task. That trend has continued (and has been amplified) to this day. Your microwave probably only uses a fraction of its processing power, because using a $0.50 processor is cheaper than designing (and manufacturing) one tailored to the microwave’s actual needs.

Anyone who has ever worked in manufacturing, or who has dealt with manufacturers, knows this comes down to unit cost. Because companies like Texas Instruments makes millions of processors, they’re very inexpensive per unit. Mass production is the primary driving force in affordability. But, what if it didn’t have to be?

Professors [Rakesh Kumar] and [John Sartori], along with their students, are experimenting with bespoke processor designs that aim to cut out the unused portions of modern processors. They’ve found that in many applications, less than half the logic gates of the processor are actually being used. Removing these reduces the size and power consumption of the processor, and therefore the final size and power requirements of the device itself.

Of course, that question of cost comes back into play. Is a smaller and more efficient processor worth it if it ends up costing more? For most manufacturers of devices today, the answer is almost certainly no. There aren’t many times when those factors are more important than cost. But, with modern techniques for printing electronics, they think it might be feasible in the near future. Soon, we might be looking at custom processors that resemble the early days of computer design.

 

Take The Blue Pill And Go Forth

Forth has a long history of being a popular hacker language. It is simple to bootstrap. It is expressive. It can be a very powerful system. [jephthal] took the excellent Mecrisp Forth and put it on the very inexpensive STM32 “blue pill” board to create a development system that cost about $2. You can see the video below.

If you have thirty minutes, you can see just how easy it is to duplicate his feat. The blue pill board has to be programmed once using an STM32 programmer. After that, you can use most standard Forth words and also use some that can manipulate the low-level microcontroller resources.

Continue reading “Take The Blue Pill And Go Forth”

MagSafe Power Bank From Scrap

Just a few short years ago, it was possible to find scrapped lithium batteries for free, or at least for very cheap. What most people at the time didn’t realize is that a battery with multiple cells might go bad because only one cell is bad, leaving the others ready for salvaging. Now it’s not a secret anymore, but if you can manage to get your hands on some there’s a lot of options for use. [ijsf] took a step further with this hack, taking a few cells from a Panasonic battery and wrangling them into a MagSafe-capable power bank for a Mac.

The real hack wasn’t scavenging batteries, however, it was getting the MagSafe to signal the computer to use power from the battery bank to run the computer only, and not to use any of that energy for charging the computer’s internal batteries. This is achieved by disabling the center MagSafe pin, which is the computer’s communication line to the power adapter. After that, the battery bank could be programmed to behave properly (a feat in itself for lithium batteries) and the power bank was successfully put into operation.

Not only was this hack a great guide for how to repurpose cells from a “dead” battery, it’s also an unparalleled quick reference for any work that might need a MagSafe connector. Of course, if you’re going to work with these chargers, make sure that you’re using one that isn’t a cheap clone.