Al Williams – Hackaday https://hackaday.com Fresh hacks every day Tue, 25 Feb 2025 14:44:54 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 156670177 Tech In Plain Sight: Magsafe, and How To Roll Your Own https://hackaday.com/2025/02/25/tech-in-plain-sight-magsafe-and-how-to-roll-your-own/ https://hackaday.com/2025/02/25/tech-in-plain-sight-magsafe-and-how-to-roll-your-own/#comments Tue, 25 Feb 2025 15:00:40 +0000 https://hackaday.com/?p=759697 Apple likes magnets. They started out with magnetic laptop chargers and then graduated to a system that magnetically holds the phone, charges it, and can facilitate communication between the phone …read more]]>

Apple likes magnets. They started out with magnetic laptop chargers and then graduated to a system that magnetically holds the phone, charges it, and can facilitate communication between the phone and a charger or other device. Even if you are like me and have no Apple devices, you can retrofit other phones to use Magsafe accessories. In fact, with a little work, you can build your own devices. Regardless, the technology is a clever and simple hack, and we are just a little sorry we didn’t think of it.

Terms

Using a magnet to attach a phone isn’t a new idea. But, historically, the phone had either a metal back or an adhesive metal plate attached that would stick to the magnet. This wouldn’t necessarily help with charging, but was perfectly fine for holding the device. The problem is, it is hard to wirelessly charge the phone through the metal.

Magsafe can do several different things. Obviously, it can attach the phone magnetically. However, since it is a ring shape, you can still have a charging coil in the middle of the ring. Better still, the Magsafe system will align the phone and charger with a satisfying click when you put them together.

In addition, a Magsafe device can have an NFC communication point just below the ring. This can allow, for example, a phone and a charger to negotiate for current or communicate charge level. For the purposes of this post, I’m mostly thinking about the magnetic attachment. Assuming you have two charging coils and two NFC points aligned, it is easy to figure out how charging and communication take place.

The Magsafe Way

Wireless charging relies on the coils in the charger and the device being reasonably well aligned, otherwise the losses increase rapidly. A simple magnet and plate system would allow you to attach the phone in a variety of ways and that won’t assure that the charging coil will line up.

If you think about how to solve the magnet and charging problem, it might make sense to move the magnets into a circle, leaving the center free for charging. That still doesn’t help with alignment, though. Magsafe actually uses two magnetic rings. One presents a north magnetic pole, and the other presents a south magnetic pole. Obviously, the mating ring has the poles swapped.

An Apple video shows how Magsafe goes together.

Deep into an old Apple Video, you can find the adjacent image of how the whole system goes together, but it hides a lot of detail in the phrase “magnet array.”\

However, Apple has a public document that describes, among other things, all the requirements for working with Magsafe. We imagine there might be more details if you join their Mfi program, but that’s hardly necessary.

Section 37 of the document goes into plenty of detail, including the materials for the magnet, the dimensions, and the positioning. It even covers how to test the various parameters. It reveals that you can have a simple ring if you don’t care about orientation, or incorporate a ring and an alignment magnet to ensure the devices mate in a particular way.

The real key, though, is the cross-sectional views. These show how each ring is made of thin magnets. Keep in mind that this figure is just one part of the ring. There is an identical section across the center of the ring to the right.

A cross-section of one of the rings.

If present, the orientation magnet also has multiple magnetic faces. This alignment is perfect for wireless charging since the coils will line up directly. In addition, the NFC connection allows the phone and a compatible charger to negotiate for a faster charge rate.

No Apple, No Problem

These days, you can find cases for many phones that will provide attachment rings. You can also just buy rings. Some rings are metallic, so they’ll stick but don’t necessarily align. For alignment, you need magnets on both sides. You’ll notice that some rings are thicker than others. In general, rings that will be close to their mating ring can be thinner than rings that are made to go inside, for example, a case.

The availability of rings means that you can craft your own accessories or even faux phones (e..g., a ring on your digital meter). If you want charging, you can also get “pucks” that have everything ready to go and insert them into a 3D print like [Alien Gaming] did in the video below.

There are plenty of commercial accessories to inspire you. (Or will they tempt you to buy instead of make?) You can get a notepad and pen, for example, that snaps to the back of your phone. There are camera grips, tripods, wallets, and probably more. [Michael Vance] rounds up some of the stranger ones in the video below.

What cool ideas can you dream up for either Magsafe accessories or hosts? You could probably make a very phone-specific attachment to put a telephoto lens in front of your camera, for example. Keep in mind that you could talk WiFi or Bluetooth to the phone, too, so a satellite phone back could work. Sure, some of these wouldn’t meet the Apple spec, but they could still be done.

If you miss the old-style laptop magnetic connectors, you can roll your own. If you haven’t looked at the Apple documentation, we’ve been impressed with it

]]>
https://hackaday.com/2025/02/25/tech-in-plain-sight-magsafe-and-how-to-roll-your-own/feed/ 6 759697 magsafe_patent
To Test a (Smart) LED https://hackaday.com/2025/02/24/to-test-a-smart-led/ https://hackaday.com/2025/02/24/to-test-a-smart-led/#comments Tue, 25 Feb 2025 06:00:19 +0000 https://hackaday.com/?p=765468 Adding LEDs to a project used to be enough to make it cool. But these days, you need arrays of addressable multi-color LEDs, and that typically means WS2812B or something …read more]]>

Adding LEDs to a project used to be enough to make it cool. But these days, you need arrays of addressable multi-color LEDs, and that typically means WS2812B or something similar. The problem is that while it was pretty easy to test garden-variety LEDs, these devices can be a bit harder to troubleshoot. [Gokux] has the answer, as you can see in the video below.

Testing these was especially important to [Gokux] because they usually swipe the modules from other modules or LED strips. The little fixture sends the correct pulses to push the LED through several colors when you hold it down to the pads.

However, what if the LED is blinking but not totally right? How can you tell? Easy, there’s a reference LED that changes colors in sync with the device under test. So, if the LEDs match, you have a winner. If not… well, it’s time to desolder another donor LED.

This is one of those projects that you probably should have thought of, but also probably didn’t. While the tester here uses a Xiao microcontroller, any processor that can drive the LEDs would be easy to use. We’d be tempted to breadboard the tester, but you’d need a way to make contact with the LED. Maybe some foil tape would do the trick. Or pogo pins.

]]>
https://hackaday.com/2025/02/24/to-test-a-smart-led/feed/ 14 765468 led1
Line Power with No Transformer https://hackaday.com/2025/02/24/line-power-with-no-transformer/ https://hackaday.com/2025/02/24/line-power-with-no-transformer/#comments Mon, 24 Feb 2025 16:30:00 +0000 https://hackaday.com/?p=759959 Normally, when you want a low DC voltage from the AC line, you think about using a transformer of some kind. [RCD66] noticed that an AC monitor meter must have …read more]]>

Normally, when you want a low DC voltage from the AC line, you think about using a transformer of some kind. [RCD66] noticed that an AC monitor meter must have some sort of power supply but had no transformers in sight. That led to an exploration of how those work and how you can use them, too. You can watch the work in the video below.

Sensibly, there is a transformer in the test setup — an isolation transformer to make it safe to probe the circuit. But there’s no transformer providing voltage changes. Isolation is important even if you are taking apart something commercial that might be trasformerless.

The circuit is simple enough: it uses a capacitor, a resistor, and a pair of diodes (one of them a zener diode). He uses this basic circuit to drive simple regulators with input and output filter capacitors. We’ve seen many variations on this design over the years.

You can’t draw a lot of power through this arrangement. But sometimes it is all you need. However, this is pretty dangerous, as we’ve discussed before. Be sure you understand exactly what the risks are before you decide to build something like this.

]]>
https://hackaday.com/2025/02/24/line-power-with-no-transformer/feed/ 43 759959 ac
Unhacked Mattress Phones Home https://hackaday.com/2025/02/24/unhacked-mattress-phones-home/ https://hackaday.com/2025/02/24/unhacked-mattress-phones-home/#comments Mon, 24 Feb 2025 09:00:08 +0000 https://hackaday.com/?p=759975 [Dylan] has a fancy bed that can be set to any temperature. Apparently this set him back about $2,000, it only works if it has Internet, and the bed wants …read more]]>

[Dylan] has a fancy bed that can be set to any temperature. Apparently this set him back about $2,000, it only works if it has Internet, and the bed wants $19 a month for anything beyond basic features. Unsurprisingly, [Dylan] decided to try to hack the mattress firmware and share what he learned with us.

Oddly enough, it was easy to just ask the update URL for the firmware and download it. Inside, it turned out there was a mechanism for “eng@eightsleep.com” to remotely SSH into any bed and — well — do just about anything. You may wonder why anyone wants to gain control of your bed. But if you are on the network, this could be a perfect place to launch an attack on the network and beyond.

Of course, they can also figure out when you sleep, if you sleep alone or not, and, of course, when no one is in the bed. But if those things bother you, maybe don’t get an Internet-connected bed.

Oddly enough, the last time we saw a bed hack, it was from [Dillan], not [Dylan]. Just because you don’t want Big Sleep to know when you are in bed doesn’t mean it isn’t useful for your private purposes.

]]>
https://hackaday.com/2025/02/24/unhacked-mattress-phones-home/feed/ 29 759975 bed
Learn Assembly the FFmpeg Way https://hackaday.com/2025/02/23/learn-assembly-the-ffmpeg-way/ https://hackaday.com/2025/02/23/learn-assembly-the-ffmpeg-way/#comments Mon, 24 Feb 2025 03:00:58 +0000 https://hackaday.com/?p=759946 You want to learn assembly language. After all, understanding assembly unlocks the ability to understand what compilers are doing and it is especially important for time-critical code. But most tutorials …read more]]>

You want to learn assembly language. After all, understanding assembly unlocks the ability to understand what compilers are doing and it is especially important for time-critical code. But most tutorials are — well — boring. So you can print “Hello World” super fast. Who cares?

But decoding video data is something where assembly can really pay off, so why not study a real project like FFmpeg to see how they do things? Sounds like a pain, but thanks to the FFmpeg asm-lessons repository, it’s actually quite accessible.

According to the repo, you should already understand C — especially C pointers. They also expect you to understand some basic mathematics. Most of the FFmpeg code that uses assembly uses the single instruction multiple data (SIMD) opcodes. This allows you to do something like “add 5 to these 200 data items” very quickly compared to looping 200 times.

There are three lessons so far. Of course, some of the material is a little introductory, but they do jump in quickly to SIMD including upcoming instruction sets like AVX10 and older instructions like MMX and AVX512. It is no surprise that FFmpeg needs to understand all these variations since it runs on behalf of (their words) “billions of users.”

We enjoyed their link to a simplified instruction list. Not to mention the visual organizer for SIMD instructions.

The course’s goal is to prepare developers to contribute to FFmpeg. If you are more interested in using FFmpeg, you might enjoy this browser-based GUI. Then again, not all video playback needs high performance.

]]>
https://hackaday.com/2025/02/23/learn-assembly-the-ffmpeg-way/feed/ 26 759946 asm
Over the Counter Glucose Monitor Dissected https://hackaday.com/2025/02/23/over-the-counter-glucose-monitor-dissected/ https://hackaday.com/2025/02/23/over-the-counter-glucose-monitor-dissected/#comments Sun, 23 Feb 2025 21:00:34 +0000 https://hackaday.com/?p=759939 If you deal with diabetes, you probably know how to prick your finger and use a little meter to read your glucose levels. The meters get better and better which …read more]]>

If you deal with diabetes, you probably know how to prick your finger and use a little meter to read your glucose levels. The meters get better and better which mostly means they take less blood, so you don’t have to lacerate your finger so severely. Even so, taking your blood several times a day is hard on your fingertips. Continuous monitoring is available, but — until recently — required a prescription and was fairly expensive. [Andy] noticed the recent introduction of a relatively inexpensive over-the-counter sensor, the Stelo CGM. Of course, he had to find out what was inside, and thanks to him, you can see it, too.

If you haven’t used a continuous glucose monitor (CGM), there is still a prick involved, but it is once every two weeks or so and occurs in the back of your arm. A spring drives a needle into your flesh and retracts. However, it leaves behind a little catheter. The other end of the catheter is in an adhesive-backed module that stays put. It sounds a little uncomfortable, but normally, it is hardly noticeable, and even if it is, it is much better than sticking your finger repeatedly to draw out a bunch of blood.

So, what’s in the module? Plenty. There is a coin cell, of course. An nRF52832 microcontroller wakes up every 30 seconds to poll the sensor. Every 5 minutes it wakes up to send data via Bluetooth to your phone. There are antennas for Bluetooth and NFC (the phone or meter reads the sensor via NFC to pair with it). There are also a few custom chips of unknown function.

[Andy] makes the point that the battery could last much longer than the two-week span of the device, but we would guess that a combination of the chemicals involved, the adhesive stickiness, the need to clean the site (you usually alternate arms), and accounting for battery life during storage, two weeks might be conservative, but not ridiculous.

It’s amazing that we live in a time when this much electronics can be considered disposable. CGM is a hard problem. What we really want is an artificial pancreas.

]]>
https://hackaday.com/2025/02/23/over-the-counter-glucose-monitor-dissected/feed/ 33 759939 cgm
Retrotectacular: Ham Radio As It Was https://hackaday.com/2025/02/21/retrotectacular-ham-radio-as-it-was/ https://hackaday.com/2025/02/21/retrotectacular-ham-radio-as-it-was/#comments Sat, 22 Feb 2025 06:00:00 +0000 https://hackaday.com/?p=759758 We hear a lot about how ham radio isn’t what it used to be. But what was it like? Well, the ARRL’s film “The Ham’s Wide World” shows a snapshot …read more]]>

We hear a lot about how ham radio isn’t what it used to be. But what was it like? Well, the ARRL’s film “The Ham’s Wide World” shows a snapshot of the radio hobby in the 1960s, which you can watch below. The narrator is no other than the famous ham [Arthur Godfrey] and also features fellow ham and U.S. Senator [Barry Goldwater]. But the real stars of the show are all the vintage gear: Heathkit, Swan, and a very oddly placed Drake.

The story starts with a QSO between a Mexican grocer and a U.S. teenager. But it quickly turns to a Field Day event. Since the film is from the ARRL, the terminology and explanations make sense. You’ll hear real Morse code and accurate ham lingo.

Is ham radio really different today? Truthfully, not so much. Hams still talk to people worldwide and set up mobile and portable stations. Sure, hams use different modes in addition to voice. There are many options that weren’t available to the hams of the 1960s, but many people still work with old gear and older modes and enjoy newer things like microwave communications, satellite work, and even merging radio with the Internet.

In a case of history repeating itself, there is an example of hams providing communications during a California wildfire. Hams still provide emergency communication in quite a few situations. It is hard to remember that before the advent of cell phones, a significant thing hams like [Barry Goldwater] did was to connect servicemen and scientists overseas to their families via a “phone patch.” Not much of that is happening today, of course, but you can still listen in to ham radio contacts that are partially over the Internet right in your web browser.

]]>
https://hackaday.com/2025/02/21/retrotectacular-ham-radio-as-it-was/feed/ 22 759758 k7