Reverse Engineering The Apple Lightning Connector

A frequent contributor to the hacker community, [stacksmashing] has prepared an excellent instructional video on reverse engineering Apple’s Lighting connector proprietary protocol. The video begins by showing how to gain physical access to the signals and hooking them up to a logic analyzer. He then notes that the handshaking uses only a single signal and proposes that Apple isn’t going to re-invent the wheel (perhaps a risky assumption). Using a ChatGPT search, obligatory these days, we learn that Dallas Semiconductor / Microchip 1-wire is probably the protocol employed.

Which embedded single-wire busses exist that encode bits with different lengths of low and high signals?

At the basic level, 1-wire and protocols like Texas Instruments SDQ operate in a similar manner. It turns out that [stacksmashing] already wrote a SDQ analyzer module for the Saleae logic analyzer. Aided by this tool, he digs deeper and learns more about the kinds of messages and their contents. For example, upon being plugged in, the host system queries the accessory’s serial number, manufacturer, model number, and product description. Finally, he introduces the CRC reverse engineering tool reveng to determine which CRC polynomial and algorithm the protocol uses to frame each packet.

Even if you have no interest in Lightning cables, this video is a great tutorial on the types of things you need to do in order to make sense of an unknown communications protocol. Gather what information you can, make some educated guesses, observe the signals, revise your guesses, and repeat. In part two, [stacksmashing] will show how to build a homemade iPhone JTAG cable.

We wrote in more detail about cracking the Lightning interface back in 2015. The Lightning interface may have been a good solution in its day, foreshadowing some of the features we now have in USB-C. But its proprietary and closed nature meant it wasn’t used outside of the Apple ecosystem. With the proliferation and capabilities of USB-C, not to mention various legislative edicts, Lightning’s days seem numbered. Is the industry finally settling on one interface? Let us know your thoughts in the comments below.

Continue reading “Reverse Engineering The Apple Lightning Connector”

Broken Genes And Scrambled Proteins: How Radiation Causes Biological Damage

If decades of cheesy sci-fi and pop culture have taught us anything, it’s that radiation is a universally bad thing that invariably causes the genetic mutations that gifted us with everything from Godzilla to Blinky the Three-Eyed Fish. There’s a kernel of truth there, of course. One only needs to look at pictures of what happened to Hiroshima survivors or the first responders at Chernobyl to see extreme examples of what radiation can do to living tissues.

But as is usually the case, a closer look at examples a little further away from the extremes can be instructive, and tell us a little more about how radiation, both ionizing and non-ionizing, can cause damage to biochemical structures and processes. Doing so reveals that, while DNA is certainly in the crosshairs for damage by radiation, it’s not the only target — proteins, carbohydrates, and even the lipids that form the membranes within cells are subject to radiation damage, both directly and indirectly. And the mechanisms underlying all of this end up revealing a lot about how life evolved, as well as being interesting in their own right.

Continue reading “Broken Genes And Scrambled Proteins: How Radiation Causes Biological Damage”

Logic Gate Game Is Fun AND Educational

How well do you know your logic gates? For their final submission for STEM Projects class, [BKriet] gamified the situation using a Raspberry Pi Pico, some blinkenlights, and a not-insignificant amount of 3D printing. The result is Name! That! Gate!, a fun and educational toy that [BKriet] ultimately donated back to the class (that’s a hot move in our book).

The objective of this game is to figure out which logic gate is being used to make the output shown on the screen, given A, B, and/or C as inputs. There are ten stages to the game, and each correct stage awards the player 14 points, for a perfect score of 140. Although a random gate is loaded for every stage, code ensures that no gate is ever repeated during a single game.

This project is completely open source, so the gate is wide open. Don’t have a 3D printer? Here’s a big set of PCB logic gates, but really, you can make logic gates out of almost anything.

Surface Mount Breathing Light PCB, using LM358 op-amp

Surface-Mount Light Breathes Life Into Your Project

If you’ve ever seen those gadgets with the “breathing light” LEDs on them and wondered how to do it, then [DIY GUY Chris] can show you how to design your own surface-mount version, using only analogue electronics.

Simulation trace showing the LED breathing light circuit operating. Traces for voltage and current are shown over a few seconds
The LED current tracks up and down in an approximately triangular-wave pattern

The circuit itself is built around a slow triangular-wave oscillator, that ramps the current up and down in the LEDs to make it look as if the lights are breathing in and out. The overall effect is rather pleasing, and the oscillation speed can be adjusted using the on-board potentiometer.

This project is actually an update to a previous version that used through-hole components (also shown in the video below), and goes to show that revisiting completed projects can give them a new lease of life. It also shows how easy it has become to design and order custom circuit boards these days. It’s not so long ago that a project like this would have been either made on stripboard or etched from copper-plated FR4 in a bubbling tank of acid!

If you have revisited an old project that you’re proud of and would like to show others, why not drop us a message on our tips line?

We have covered some other options for breathing LEDs in the past, such as this digital logic version, and this Arduino library that has a host of other effects to choose from, too. Continue reading “Surface-Mount Light Breathes Life Into Your Project”

Honey, Did You Feed The Lamp? Company Wants To Create Living Light Bulbs

The BBC’s [Peter Yeung] had an interesting post about a small French town experimenting with using bioluminescent organisms to provide lighting. A firm called Glowee is spearheading the effort in Rambouillet and other towns throughout France, using a variety of biological techniques to harness nature’s light sources.

Glowing animals are reasonably common ranging from fireflies to railroad worms. In the case of the French street lighting, Glowee is using a marine bacterium known as aliivibrio fischeri. A salt-water tube contains nutrients and when air is flowing through the tube, the bacteria glow with a cool turquoise light. The bacteria enter an anaerobic state and stop glowing if you shut off the air.

Continue reading “Honey, Did You Feed The Lamp? Company Wants To Create Living Light Bulbs”

High Noon For Daylight Savings Time

The US Senate has approved the “Sunshine Protection Act”, a bill to make Daylight Saving time the default time and do away with the annual time changes. While I can get behind the latter half of this motion, redefining Daylight Saving time as Standard time is, in my opinion, nonsense.

It’s particularly funny timing, coming right around the Vernal Equinox, when the sun stands at its highest right at Noon Standard Time, to be debating calling this time “one PM” forevermore.

Right Idea, Wrong Time

Let’s do a quick overview of the good idea here — doing away with time changes. These are known to cause sleep disturbances and this leads not just to sleepy heads on Monday morning, but to an increased risk of heart attack and accidents in general. When researchers look into the data, it’s the “springing forward” that causes trouble. People who’ve slept one extra hour don’t seem to suffer as much as people who’ve lost one. Go figure.

So maybe it makes sense to stop changing times. If we’re going to settle on one standard time, do we pick Standard time or Daylight Saving time? Admittedly, this is a totally unfair way to pose the question, but there are a number of good reasons to prefer all-year Standard time. The biggest one is winter. Basically, it’s already tough enough to get up on a cold January morning when the sun is not due to rise for another hour or two. Add another hour of darkness on top, and you know why the two previous attempts to run all-year Daylight Saving were short-lived. And why the Swedes drink so much coffee.

France-002886 – Sundial” by archer10 (Dennis) CC BY-SA 2.0.

There’s also the fundamental logic behind our measurement of time that’s stood for centuries, and is embedded in most of our cultural references to time. Ante Meridian and Post Meridian. High Noon, when the hour hand on the clock points straight up, represents the sun itself. But even before clocks, the sun’s halfway point along its daily journey marked the halfway point of the day. That’s not only why we eat lunch when we do, it’s the origin of man’s time-telling itself.

If we change the definition of noon permanently, we’ve decoupled time from the sun. How will we explain time to future children? I’ll accept Daylight Saving time when we start reprinting analog watches with 1 o’clock at the top and start referring to 12 AM as the one that’s just before the sun reaches its peak. As soon as “one noon” replaces “twelve noon”, I’ll get on board. Midnight, when the clock strikes one, just doesn’t send the same shiver down my spine. Sorry, Dracula.

If culture and physics point to Standard Time, why would you want Daylight Saving to be the new normal? When people think of Daylight Saving, they naturally think of those nice long summer days that stretch out into the night. My personal bet is that many folks are confounding summertime with Summer Time. Heck, even the name of the bill proposes to protect sunshine itself, rather than just move the hands of the clock around. These are not good reasons.

Continue reading “High Noon For Daylight Savings Time”

PiSpy, The Camera Setup Designed To Make Biological Observations Better

Back in grad school, we biology students were talking shop at lunch one day. We “lab rats” were talking about the tools of the trade, which for most of us included things like gel electrophoresis, restriction endonucleases, and polymerase chain reaction. Not to be left out, a fellow who studied fire ants chimed in that his main tool was a lawn chair, which he set up by a Dumpster in a convenience store parking lot to watch a fire ant colony. Such is the glamor of field biology.

Ants on the march. Tough luck for the crickets, though.

What our colleague [Mike] wouldn’t have given for something like PiSpy, the automated observation tool for organismal biology by [Greg Pask] of Middlebury College, et al. As discussed in the preprint abstract, an automated imaging platform can be key to accurate observations of some organisms, whose behavior might be influenced by the presence of a human observer, or even a grad student in a lawn chair. Plus, PiSpy offers all the usual benefits of automation — it doesn’t get tired, it doesn’t need to take bathroom breaks, and it can even work around the clock. PiSpy is based on commonly available components, like laser-cut plywood and a Raspberry Pi and camera, so it has the added advantage of being cheap and easy to produce — or at least it will be when the Pi supply picks back up again. PiSpy takes advantage of the Pi’s GPIO pins to enable triggering based on external events, or controlling peripherals like lights or servos.

While built for biological research, there are probably dozens of uses for something like PiSpy. It could be handy for monitoring mechanical testing setups, or perhaps for capturing UI changes during embedded device development. Or you could just use it to watch birds at a feeder. The source is all open-sourced, so whatever you make of PiSpy is up to you — even if it’s not for watching fire ants.