EC Hacking: Your Laptop Has A Microcontroller

Recently, I stumbled upon a cool write-up by [DHowett], about reprogramming a Framework laptop’s Embedded Controller (EC). He shows us how to reuse the Caps Lock LED, instead making it indicate the F1-F12 key layer state – also known as “Fn lock”, AKA, “Does your F1 key currently work as F1, or does it regulate volume”. He walks us through adding custom code to your laptop’s EC firmware and integrate it properly into the various routines the EC runs.

The EC that the Framework uses is a MEC1521 chip from Microchip, and earlier this year, they open-sourced the firmware for it. Now, there’s a repository of microcontroller code that you can compile yourself, and flash your Framework laptop’s motherboard with. In a comment section of HackerNews, a Framework representative has speculated that you could add GPIOs to a Framework motherboard through EC firmware hacking.

Wait… Microcontroller code? GPIOs? This brings us to the question – what is the EC, really? To start with, it’s just a microcontroller. You can find an EC in every x86 computer, including laptops, managing your computer’s lower-level functions like power management, keyboard, touchpad, battery and a slew of other things. In Apple land, you might know them as SMC, but their function is the same.

Why have we not been reprogramming our ECs all this time? That’s a warranted question, too, and I will tell you all about it.

Continue reading “EC Hacking: Your Laptop Has A Microcontroller”

The Origin Of The Fresnel Lens

If you are a Hackaday reader, you probably know what a Fresnel lens is. You find them in everything from overhead projectors to VR headsets. While it seems commonplace now, the Fresnel lens was an important invention for its day because it revolutionized maritime navigation and, according to a post over at IEEE Spectrum, that was the driving force behind its invention. In fact, the lens has been called “the invention that saved a million ships“.

The problem stems from issues in navigation. Navigating by the sun and the stars is fine, but not workable when you have heavy cloud cover, or other reasons you can’t see them. A lighthouse often marked an important point that you either wanted to navigate towards or, sometimes, away from.  Sure, today, we have GPS, but for a long time, a lighthouse was your best bet.

Continue reading “The Origin Of The Fresnel Lens”

3D-Printed Power Loom Shows How Complex Weaving Really Is

The seemingly humble flying-shuttle loom, originally built to make the weaving of wide cloth faster and easier, stood at the threshold between the largely handcrafted world of the past and the automated world that followed. And judging by how much work went into this miniature 3D-printed power loom, not to mention how fussy it is, it’s a wonder that we’re not all still wearing homespun cloth.

Dealing with the warp and the weft of it all isn’t easy, as [Fraens] discovered with this build. The main idea with weaving is to raise alternate warp threads, which run with the length of the fabric, to create a virtual space, called the shed, through which a shuttle carrying the weft thread is passed. The weft thread is then pressed in place by a comb-like device called the reed, the heddles carrying the warp threads shift position, and the process is repeated.

[Fraens]’ version of the flying-shuttle loom is built mostly from 3D-printed parts, with a smattering of aluminum and acrylic. There are levers, shafts, and cams galore, not to mention the gears and sprockets that drive the mechanism via a 12-volt gear motor. The mechanism that moves the shuttle back and forth in the shed is particularly interesting; it uses cams to release the tension stored in elastic bands to flick the shuttle left and right. Shuttle timing is critical, as a few of the fails later in the video show. [Fraens] had to play with cam shape and lever arm length to get the timing right, not to mention having to resort to a chain drive to get enough torque to move the shuttle.

We’ve seen power looms before, but mainly those that operate at a somewhat more stately pace than this one. Hats off to [Fraens] for showing the true complexity involved in automating weaving.

Continue reading “3D-Printed Power Loom Shows How Complex Weaving Really Is”

A system that stores data on LEGO bricks

How To Use LEGO Bricks For Data Storage

Those old enough to have encountered punch cards in their lifetime are probably glad to be rid of their extremely low data density and the propensity of tall stacks to tip over. But obsolete as they may be, they’re a great tool to show the basics of binary data storage: the bits are easily visible and can even be manipulated with simple tools. As an experiment to re-create those features in a more modern system, [Michael Kohn] made a punch card-like system based on LEGO bricks that stores machine code instructions for a 65C816 CPU, the 16-bit successor to the venerable 6502.

Bits are stored on a white 8×20 stud board, onto which small black pieces are placed. A white background stud encodes a logic “zero”, while a black stud encodes a logic “one”. The bits are read out by an array of reflectance sensors, which conveniently has the same 8 mm pitch as standard LEGO studs. A big wheel driven by a stepper motor slides the data card under the readout circuit along a short stretch of LEGO train tracks.

The optical sensors are read out by an MSP430 series microcontroller, which also drives the motor through a stepper motor driver. Once the data is read out, the bytes are transferred into a WDC W65C265SXB board, which executes them as machine code instructions on its 65C816 CPU. In the video below, you can see a program being loaded that blinks an LED.

We’ve featured educational punch-card systems before, like this Raspberry Pi-based model. If you’ve got a bunch of actual punch cards that need reading out, check out this Arduino-powered readout system.

Continue reading “How To Use LEGO Bricks For Data Storage”

Refilling Single-Use Miele Dishwasher AutoDos Detergent Dispensing Disks

As part of [Erich Styger]’s recent kitchen overhaul with more power-efficient machines, he came across the ‘AutoDos’ feature of the new Miele G 27695-60 dishwasher. These are essentially overpriced containers of dishwashing powder that go into a special compartment of the machine, from which the dishwasher can then dispense the powder as needed. The high price tag and purported single-use of these containers led to the obvious question of whether they can be refilled.

With a cost of over $10 per PowerDisk container, each containing 400 grams of powder that suffice for ~20 cycles, it should be obvious that this is not a cheap system. Fortunately, each PowerDisk is just a foil-covered plastic container with no real special components. This meant that one hole and some funnel action later, [Erich] had refilled an empty PowerDisk with fresh powder, with the Miele dishwasher happily purring away and none the wiser that it wasn’t using Genuine Miele PowerDisk Dishwasher Powder™.

How well this system holds up long-term is uncertain, as the containers were not designed for constant reuse, but it offers the perspective of some creative 3D printing to create an (ABS-based?) container alternative. Having a automatic powder or liquid dosing system in a dishwasher is a pretty useful feature, but when it gets tied to what is clearly a cash grab, it rather ruins the deal.

(Thanks to [Christian] for sending this one in)

A Solar Frame From Scratch

“From scratch” is a bit of a murky expression. How scratchy does it get? Are you just baking your bread yourself or are you growing your own wheat? Rolling your own solar installation probably doesn’t involve manufacturing your own photovoltaic cells. But when it comes to making the frame to hold your panels, why not machine your own brackets and harvest the wood from trees nearby?. That’s what [Kris Harbour] did with his over-engineered 8.4kW solar stand.

He already had a wind turbine and a few solar panels elsewhere on the property, but [Kris] wanted a bit more power. At the start of the video, [Kris] makes an offhand comment that he wants this to last 30-40 years at a minimum. Everything from the focus on the concrete footings to the oversized brackets and beams reflects that. The brackets were cut on his plasma CNC and the wood was cut to rough dimensions using a sawmill on his property. He admits that the sapwood will rot away a bit after 20ish years, but since the core of the posts is heartwood, structurally they’ll last a long time. After planing down to the right size, cutting hole and grooves was a bit of an involved procedure. The structure is quite tall once erected and we loved watching it come together. The most impressive thing here is that this structure was put together by just a single person. All the rafters were cut and hand-chiseled to the right sizes and hoisted into place. The panels ultimately weren’t delivered on time and he had to switch to using new panels rather than the used panels he was expecting.

Previously, [Kris] had shown off his impressive hydroelectric setup. We’re looking forward to seeing the new solar array power all the projects [Kris] is planning in the future. Video after the break.

Continue reading “A Solar Frame From Scratch”

A brick mailbox with a LIDAR sensor mounted inside

Using A LIDAR Sensor To Monitor Your Mailbox

The inconvenience of having to walk to your mailbox to check for mail has inspired many hackers to install automated systems that let them know when the mail has been delivered. Mailbox monitors have been made based on several different mechanisms: some measure the weight of the items inside, some use cameras and machine vision, while others simply trigger whenever the mailbox’s door or flap is moved. When [Gary Watts] wanted to install a notification system for his 1940s brick letterbox, his options were limited: with no flap or door to monitor, and limited space to install mechanical contraptions, he decided to use a LIDAR sensor instead.

Probably best-known for their emerging application in self-driving cars, LIDAR systems send out a laser pulse and measure the time it takes for it to be reflected off a surface. In the case of [Gary]’s mailbox, that surface is either the brick wall or a letter leaning against it. Since letters are inserted through a vertical slot, they will usually be leaning upright against the wall, providing a clear target for the laser.

The LIDAR module, a VL53L0X made by ST, is hooked up to a Wemos D1 Mini Pro. The D1 communicates with [Gary]’s home WiFi through an external antenna, and is powered by an 18650 lithium battery charged through a solar panel. The whole system is housed inside a waterproof plastic case, with the LIDAR sensor attached to the inside of the mailbox through a 3D-printed mounting bracket. On the software side, the mailbox notifier is powered by Home Assistant and MQTT. The D1 spends most of its time in deep-sleep mode, only waking up every 25 seconds to read out the sensor and send a notification if needed.

We’ve seen quite a few fancy mailbox monitors over the years: some are extremely power efficient, some use multiple sensors to allow for different use-cases, and some others are simply beautifully designed.