Four jumper wires with white heatshrink on them, labelled VCC, SCL, SDA and GND

Three Pitfalls In I2C Everyone Wishes Weren’t There

The best part of I2C is that it is a bus that is available just about anywhere, covering a vast ecosystem of devices that offer it as a hardware-defined interface, while being uncomplicated enough that it can also be implemented purely in software on plain GPIO pins. Despite this popularity, I2C is one of those famous informal standards that feature a couple of popular implementations, while leaving many of the details such as exact timing, bus capacitance and other tedious details to the poor sod doing the product development. Thus it is that we end up with articles such as a recent one on the tongue-twisting [pair of pared pears] blog, covering issues found while implementing an I2C slave.

As with any shared bus, whether multi-master or not, figuring out when the bus is clear is a fun topic, yet one which can cause endless headaches. One issue here comes from a feature that the SMBus version of I2C calls quick read/write. This allows for the rapid transfer of some data. Still, depending on the data returned by the slave, it may appear to the master that nothing is happening yet, since SDA is being held low by the slave until the stop condition, essentially locking the bus.

I2C hold times example.
I2C hold times example.

Where things get even more exciting comes generally in the form of what logic analyzers love to traumatically call a ‘spurious start/stop condition’. This refers to the behavior of SDA and SCL, with SDA going low before SCL indicating an error. This can occur due to a hold time that’s too low, causing other devices on the bus to miss the transition. Here SMBus defines a transition time of 300 ns, while I2C calls for 0 seconds, but it’s now suggested to delay calling a start/stop condition until a delay of 300 ns has passed. Essentially, it would seem that implementing a hold time is the way forward until evidence to the contrary appears.

The third pitfall pertains to the higher-speed modes of I2C, including Fast-Mode (FM) and Fast-Mode Plus (FM+). Backward compatibility with these higher speed versions is absent to spotty. Although FM+ (introduced by NXP in 2007) is supposed to be backward compatible with slower speeds, effectively the timing requirement differences between the FM+ and FM standards are too large to compensate for. At least in the current versions of the standards, but one of the joys of I2C is that there’s always another new set of revisions to look forward to.

Freq Out With LTSpice

We always enjoy [FesZ’s] videos, and his latest about FREQ function in LTSpice is no exception. In fact, LTSpice doesn’t document it, but it is part of the underlying Spice system. So, of course, you can figure it out or just watch the video below. The FREQ keyword allows you to change component attributes in a frequency-depended way.

Of course, capacitors and inductors are frequency dependent by design. But the FREQ technique allows you to adjust things like voltage sources or resistance in arbitrary ways. By default, you must specify the frequency response data in decibels, which isn’t always convenient. However, [FesZ] shows you how to use other methods to express them using modifiers to the command.

Continue reading “Freq Out With LTSpice”

Presence Sensor Locks Computer When You Step Away

Having a computer that locks its screen after a few minutes of inactivity is always a good idea from a security standpoint, especially in offices where there is a lot of foot traffic. Even the five- or ten-minute activity timers that are set on most workstations aren’t really perfect solutions. While ideally in these situations we’d all be locking our screens manually when we get up, that doesn’t always happen. The only way to guarantee that this problem is solved is to use something like this automatic workstation locker.

The project is based around the LD2410 presence sensor — a small 24 GHz radar module featuring onboard signal processing which simplifies the detection of objects and motion. [Enzo] paired one of these modules with a Seeed Studio XIAO nRF52840 development board to listen to the radar module and send the screen lock keyboard shortcut to the computer when it detects that the user has walked away from the machine. The only thing that [Enzo] wants to add is a blinking LED to let the user know when the device is about to timeout so that it doesn’t accidentally lock the machine when not needed.

One of the parts of this build that is a little bit glossed over is the fact that plenty of microcontroller platforms can send keystrokes to a computer even if they’re not themselves a USB keyboard. Even the Arduino Uno can do this, so by now this feature is fairly platform-agnostic. Still, you can use this to your advantage if you have the opposite problem from [Enzo] and need your computer to stay logged in no matter what.

a modern car dipped into a chemical bath for electrodeposition adding a phosphate layer

Watching Paint Dry For Over 100 Years

A Model T Ford customer could famously get their car “in any color he wants, so long as it’s black.” Thus begins [edconway]’s recounting of the incremental improvements in car paint and its surprising role in mass production, marketing, and longevity of automobiles.

In it, we learn that the aforementioned black paint from Ford had so much asphalt in it that black was the only color that would work. Not to go down a This Is Spinal Tap rabbit hole, but there were several kinds of black on those Model Ts. Over 30 of them were used for various purposes. The paints also dried in different ways. While the assembly only took 12 hours, the paint drying time took days, even weeks backing up production and begging for innovation. [edconway] then fast-forwards to an era of “conspicuous consumption and ‘planned obsolescence’” with DuPont’s invention of Duco that brought color to the world of automobiles.

edconway graph of paint drying time by year

See the article for the real story of advances in paint technology and drying time. Paint application technology has also steadily improved over the years, so we recommend diving in to get the century’s long story.

Hackaday Links Column Banner

Hackaday Links: July 2, 2023

Members of Pixelbar woke up to shocking news on Wednesday morning this week as they learned that a fire had destroyed the building housing their Rotterdam hackerspace. Pictures of the fire are pretty dramatic and show the entire building ablaze. We’re not familiar with Pixelbar specifically, but most hackerspaces seem to share space with other businesses in repurposed warehouses and other industrial buildings, and it looks like that was the case here. Local coverage doesn’t indicate that a cause has been determined, but they do say that “large batches of wood” were stored in or near the structure, which likely contributed to the dramatic display. There don’t seem to be reports of injuries to civilians or first responders, so that’s a blessing, but Pixelbar seems to have been completely destroyed. If you’re in a position to help, check out their GoFundMe page. As our own Jenny List, who currently lives in The Netherlands, points out, spaces suitable for housing a hackerspace are hard to come by in a city like Rotterdam, which is the busiest port in Europe. That means Pixelbar members will be competing for space with businesses that have far deeper pockets, so anything you can donate will likely go a long way toward rebuilding.

Continue reading “Hackaday Links: July 2, 2023”

Saying Goodbye To Don Lancaster

The electronics world has lost a guru. On June 7th this year, Don Lancaster passed away. [Brad] from Tech Time Traveller paid tribute to Don in a recent video. Don Lancaster was perhaps best known as the designer of the TV Typewriter.  The Typewriter drew characters on a TV screen when the user typed on a keyboard. It was the fundamental part of a simple terminal. This was quite an accomplishment in 1973 when the article was first published.

Don embodied the hacker spirit by figuring out low-cost (cheap) ways to overcome obstacles. His genius was his ability to communicate his methods in a way even non-technical people could understand. Keyboards are a great example. Back in the 1970’s a simple keyboard cost hundreds of dollars. Don figured out how to build one from scratch and published an article explaining how to do it.

Like many people we cover here on Hackaday, Don was quite a character. His website layout hasn’t changed much since the 1990’s, but the content has grown. To say he was a prolific writer would be an understatement. PostScript, Magic Sinewaves, and patents are just a few of his favorite topics. Don’s recent work involved the research of prehistoric canals in the American Southwest.

Everyone here at Hackaday sends our deepest condolences to Don’s family.

Continue reading “Saying Goodbye To Don Lancaster”

Pill Bugs And Chitons Get Jobs As Tiny Grippers

A research paper titled Biological Organisms as End Effectors explores the oddball approach of giving small animals jobs as grippers at the end of a robotic arm. Researchers show that pill bugs and chitons — small creatures with exoskeletons and reflexive movements — have behaviors making them useful as grippers, with no harm done to the creatures in the process. The prototypes are really just proofs of concept, but it’s a novel idea that does work in at least a simple way.

Pill bugs reflexively close, and in the process can grasp and hold lightweight objects. The release is simply a matter of time; researchers say that after about 115 seconds a held object is released naturally when the pill bug’s shell opens. While better control over release would be good, the tests show basic functionality is present.

The chiton — a small mollusk — can grip underwater.

Another test involves the chiton, a small mollusk that attaches to things with suction and can act as an underwater end effector in a similar way. Interestingly, a chiton is able to secure itself to wood and cork; materials that typical suction cups do not work on.

A chiton also demonstrates the ability to manipulate a gripped object’s orientation. Chitons seek dark areas, so by shining light researchers could control in which direction the creature attempts to “walk”, which manipulates the held object. A chiton’s grip is strong, but release was less predictable than with pill bugs. It seems chitons release an object more or less when they feel like it.

This concept may remind readers somewhat grimly of grippers made from dead spiders, but researchers emphasize that we have an imperative to not mistreat these living creatures, but to treat them carefully as we temporarily employ them in much the same manner as dog sleds or horses have been used for transportation, or carrier pigeons for messages. Short videos of both pill bug and chiton grippers are embedded below, just under the page break.

Continue reading “Pill Bugs And Chitons Get Jobs As Tiny Grippers”