Bringing an iPod to the Modern NAND Era

Flash storage was a pretty big deal back in the mid ’00s, although the storage sizes that were available at the time seem laughable by today’s standards. For example, having an iPod that didn’t have a spinning, unreliable hard drive was huge even if the size was measured in single-digit gigabytes, since iPods tended to not be treated with the same amount of care as something like a laptop. Sadly, these small iPods aren’t available anymore, and if you want one with more than 8GB of storage you’ll have to upgrade an old one yourself.

This build comes to us from [Hugo] who made the painstaking effort of removing the old NAND flash storage chip from an iPod Nano by hand, soldering 0.15mm enameled magnet wire to an 0.5mm pitch footprint to attach a breakout board. Once the delicate work was done, he set about trying to figure out the software. In theory the iPod should have a maximum addressable space of 64 GB but trying to get custom firmware on this specific iPod is more of a challenge and the drives don’t simply plug-and-play. He is currently using the rig for testing a new 8GB and new 16GB chip though but it shows promise and hopefully he’ll be able to expand to that maximum drive size soon.

The build is really worth a look if you’re into breathing new life into old media players. Sometimes, though all these old iPods really need to get working again is just to be thrown into a refrigerator, as some genius engineer showed us many years ago.

source https://hackaday.com/2020/08/04/bringing-an-ipod-to-the-modern-nand-era/

Official Arduboy Upgrade Module Nears Competition

We’ve been big fans of the Arduboy since [Kevin Bates] showed off the first prototype back in 2014. It’s a fantastic platform for making and playing simple games, but there’s certainly room for improvement. One of the most obvious usability issues has always been that the hardware can only hold one game at a time. But thanks to the development of an official add-on, the Arduboy will soon have enough onboard storage to hold hundreds of games

Even the rear silkscreen was a community effort.

The upgrade takes the form of a small flexible PCB that gets soldered to existing test points on the Arduboy. Equipped with a W25Q128 flash chip, the retrofit board provides an additional 16 MB of flash storage to the handheld’s ATmega32u4 microcontroller; enough to hold essentially every game and program ever written for the platform at once.

Of course, wiring an SPI flash chip to the handheld’s MCU is only half the battle. The system also needs to have its bootloader replaced with one that’s aware of this expanded storage. To that end, the upgrade board also contains an ATtiny85 that’s there to handle this process without the need for an external programmer. While this is a luxury the average Hackaday reader could probably do without, it’s a smart move for an upgrade intended for a wider audience.

The upgrade board is currently available for pre-order, but those who know their way around a soldering iron and a USBasp can upgrade their own hardware right now by following along with the technical discussion between [Kevin] and the community in the “Project Falcon” forum. In fact, the particularly astute reader may notice that this official upgrade has its roots in the community-developed Arduboy cartridge we covered last year.

source https://hackaday.com/2020/08/04/official-arduboy-upgrade-module-nears-competition/

MenoPlay Through the Pain of Menopause

Menopause, that fireworks finale of fertility, is like a second puberty that works in reverse. At least, that’s what we hear. Along with mood swings and acne, there are new joys like hot flashes that make you want to jump naked into the nearest snowdrift, or at least put your head in the freezer for a while. Sounds great; can’t wait.

The biggest problem with menopause is that it gives suffers pause when it comes to getting help. This is natural, they think. There’s nothing I can do but ride it out. Those who do seek relief are likely to find expensive products that only treat single symptoms. This dearth of solutions inspired [Moinak Ghosh] to create one system to rule them all, a wearable with a suite of sensors that’s designed to take the pause out of menopause.

MenoPlay will take temperature readings at the neck and pelvis and switch on a Peltier module worn on the back of the neck when it senses a hot flash in progress. Exercise is a natural defense against hormonal imbalance, but step counters are too easy to cheat or ignore. The MenoPlay system will model the user’s movements using 9DoF accelerometers and suggest exercises that fill in the gaps.

We particularly like the automation aspect of this wearable. After decades of manually tracking menstrual cycles and everything that implies, the idea of so much useful biological data being collected automatically and fed over BLE to a NodeRed application sounds wonderful.

Hot flashes may not feel useful internally, but would do a fine job of powering the right kind of flashlight.

source https://hackaday.com/2020/08/04/menoplay-through-the-pain-of-menopause/

Unbricking a $2,000 Exercise Bike with a Raspberry Pi Zero and Bluetooth Hacks

Really, how did we get the point in this world where an exercise bike can be bricked? Such was the pickle that [ptx2] was in when their $2,000 bike by Flywheel Home Sports was left without the essential feature of participating in virtual rides after Peloton bought the company. The solution? Reverse engineer the bike to get it working with another online cycling simulator.

Sniffing Flywheel Bluetotooth packets with Bluetility

We have to admit we weren’t aware of the array of choices that the virtual biking markets offers. [ptx2] went with Zwift, which like most of these platforms, lets you pilot a smart bike through virtual landscapes along with the avatars of hundreds of other virtual riders. A little Bluetooth snooping with Bluetility let [ptx2] identify the bytes in the Flywheel bike’s packets encoding both the rider’s cadence and the power exerted, which Zwift would need, along with the current resistance setting of the magnetic brake.

Integration into Zwift was a matter of emulating one of the smart bikes already supported by the program. This required some hacking on the Cycling Power Service, a Bluetooth service that Zwift uses to talk to the bike. The final configuration has a Raspberry Pi Zero W between the Flywheel bike and the Zwift app, and has logged about 2,000 miles of daily use. It still needs a motor to control the resistance along the virtual hills and valleys, but that’s a job for another day.

Hats off to [ptx2] for salvaging a $2,000 bike for the price of a Pi and some quality hacking time, and for sticking it to The Man a bit. We have to say that most bike hacks we see around here have to do with making less work for the rider, not more. This project was a refreshing change.

[Featured images: Zwift, Flywheel Sports]

[via r/gadgets]

 

source https://hackaday.com/2020/08/04/unbricking-a-2000-exercise-bike-with-a-raspberry-pi-zero-and-bluetooth-hacks/

Don’t Let Endianness Flip You Around

Most of the processor architectures which we come into contact with today are little-endian systems, meaning that they store and address bytes in a least-significant byte (LSB) order. Unlike in the past, when big-endian architectures, including the Motorola 68000 and PowerPC, were more common, one can often just assume that all of the binary data one reads from files and via communication protocols are in little-endian order. This will often work fine.

The problem comes with for example image formats that use big-endian formatted integers, including TIFF and PNG. When dealing directly with protocols in so-called ‘network order’, one also deals with big-endian data. Trying to use these formats and protocol data verbatim on a little-endian system will obviously not work.

Fortunately, it is very easy to swap the endianness of any data which we handle.

Keeping Order

If bits can be packed in either order, it makes sense to tag the data with a marker up front. For instance, in TIFF (Tagged Image File Format) images, the first two bytes of the file indicate the byte order: if they read ‘II’ (from ‘Intel’) the file is in little-endian (LE) format, if they read ‘MM’ (from ‘Motorola’) then the data is in big-endian (BE) format. Since Unicode text can also be multi-byte in the case of UTF-16 and UTF-32, its endianness can optionally be encoded using the byte order mark (BOM) at the beginning of the file.

Although one could argue the need to care about endianness in most code, it bears reminding that many processor architecture in use today are in fact not LE, but bi-endian (BiE), allowing them to operate in either LE or BE mode. These architectures include ARM, SPARC, MIPS and derivatives like RISC-V, SuperH, and PowerPC. On these systems, one can’t just assume that it’s running in LE mode. Even more fun is that some of these architectures allow for endianness to be changed per process, without restarting the system.

Case Study: Dealing with Endianness

Recently I implemented a simple service discovery protocol (NyanSD) that uses a binary protocol. In order to make it work regardless of the endianness of the host system, I used another project of mine called ‘ByteBauble‘, that contains a few functions to easily convert between endiannesses. This utility was originally written for the NymphMQTT MQTT library, to also allow it work on any system.

The use of ByteBauble’s endianness features is fairly straightforward. First one has to create an instance of the ByteBauble class, after which it can be used for example to compose a binary (NyanSD) message header:

ByteBauble bb;
BBEndianness he = bb.getHostEndian();
std::string msg = "NYANSD";
uint16_t len = 0;
uint8_t type = (uint8_t) NYSD_MESSAGE_TYPE_BROADCAST;

After the message body has been defined, the length of the message (len) is the only part of the message header that is more than a single byte. As the NyanSD protocol is defined as being little-endian, we must ensure that it is always written to the byte stream in LE order:

len = bb.toGlobal(len, he);
msg += std::string((char*) &len, 2);

The global (target) endianness is set in ByteBauble as little-endian by default. The toGlobal() template method takes the variable to convert and its current endianness, here of the host. The resulting value can then be appended to the message, as demonstrated. If the input endianness and output endianness differ, the value is converted, otherwise no action is taken.

The other way around while reading from a byte stream is very similar, with the known endianness of the byte stream being used together with the toHost() template method of ByteBauble to ensure that we are getting the intended value instead of the inverted value.

Converting Between Endiannesses

Fortunately, processor architectures don’t simply leave us hanging with these endianness modes. Most of them also come with convenient hardware features to perform the byte swapping operation required when converting between LE and BE or vice versa. Although one could use the required assembly calls depending on the processor architecture, it is more convenient to use the compiler intrinsics.

This is also how ByteBauble’s byte swapping routines are implemented. Currently it targets the GCC and MSVC intrinsics. For GCC the basic procedure looks as follows:

std::size_t bytesize = sizeof(in);
if (bytesize == 2) {
	return __builtin_bswap16(in);
}
else if (bytesize == 4) {
	return __builtin_bswap32(in);
}
else if (bytesize == 8) {
	return __builtin_bswap64(in);
}

As we can see in the above code, the first step is to determine how many bytes we are dealing with, following by calling the appropriate intrinsic. The compiler intrinsic’s implementation depends on what the target architecture offers in terms of hardware features for this process. Worst case, it can be implemented in pure software using an in-place reverse algorithm.

Determining Host Endianness

As we saw earlier, in order to properly convert between host and target endianness, we need to know what the former’s endianness is to know whether any conversion is needed at all. Here we run into the issue that there is rarely any readily available OS function or such which we can call to obtain this information.

Fortunately it is very easy to figure out the host (or process) endianness, as demonstrated in ByteBauble:

uint16_t bytes = 1;
if (*((uint8_t*) &bytes) == 1) {
	std::cout << "Detected Host Little Endian." << std::endl;
	hostEndian = BB_LE;
}
else {
	std::cout << "Detected Host Big Endian." << std::endl;
	hostEndian = BB_BE;
}

The idea behind this check is a simple experiment. Since we need to know where the MSB and LSB are located in a multi-byte variable, we create a new two-byte uint16_t variable, set the LSB’s first bit high and then proceed to check the value of the first byte. If this first byte has a value of 1, we know it is the LSB and that we are working in a little-endian environment. If however the first byte is 0, we know that it is the MSB and thus that this is a big-endian environment.

The nice thing about this approach is that it does not rely on any assumptions such as the checking of the host architecture, but directly checks what happens to multi-byte operations.

Wrapping Up

We will likely never see the end of having to deal with these differences in byte order. This both due to the legacy of existing file formats and processor architectures, as well as due to the fact that some operations are more efficient when performed in big-endian order (like those commonly encountered for networking equipment).

Fortunately, as we saw in this article, dealing with differing endianness is far from complicated. The first step is to always be aware of which endianness one is dealing with in the byte stream to be processed or written. The second step is to effectively use the host endianness with readily available functions provided by compiler intrinsics or libraries wrapping those.

With those simple steps, endianness is merely a mild annoyance instead of a detail to be ignored until something catches on fire.

source https://hackaday.com/2020/08/04/dont-let-endianness-flip-you-around/

[NileRed] Makes Superconductors

We always enjoy [NileRed’s] videos. His latest shows how he made some relatively high-temperature superconducting ceramic. After finding what appeared to be some really good instructions on the Internet, [NileRed] found there were some things in the paper that didn’t make sense. You can watch the video, below.

The superconductor was YCBO, sometimes known as 123 because of the ratio of its components. Turns out that most of the materials were available online, except for one exotic chemical that he had to buy from a more conventional source.

The purity of some of the chemicals was in doubt, so he purified some of it and did find some contaminants in it. If you want to do this yourself, you are going to need some chemical handling gear and we’d suggest reading the safety sheets on all the material involved.

If you don’t have the tools, you are going to have to arrange for vacuum chambers, an 8-ton press, furnaces, and more mundane things like stirring hot plates and lab glassware. You might even need a blender.

Of course, you also need to handle liquid nitrogen to cool things off enough to see the superconducting effect. [NileRed] actually had to buy a furnace for this effort–spending about $2,000– and had a bit of a challenge getting it in one piece, as you’ll see, along with hitting it with twice the rated voltage.

Even though we might not have had to repair the furnace, we doubt we are going to make any superconductors anytime soon. But it is reassuring to know that it is in the realm of what you could do in your garage if you wanted to.

We’ve talked about some of the projects that [NileRed] found for inspiration. While we were impressed with the process, we aren’t sure this material is up to making a practical hoverboard.

source https://hackaday.com/2020/08/04/nilered-makes-superconductors/

IOT Pinball Puts Oktoberfest Fun on Tap

We don’t really miss going out to bars all that much, unless you’re talking about the one downtown with all the pinball machines. Don’t get us wrong — pinball emulators have gotten crazy good, and you can find exact digital replicas of most machines to play on your phone or whatever. But it just doesn’t compare to the thrill of playing a real cabinet.

Don’t despair, because for the next couple of weeks, you can queue up to play on a real Oktoberfest pinball machine that’s sitting in Espoo, Finland. The controls are hooked up to a Raspberry Pi 4 through a custom HAT, along with a camera pointed at the playfield and another focused on the backglass screen. The game development/video streaming company Surrogate is hosting a tournament over the internet, and will be giving prizes to the top ten high rollers.

We usually have to wait until the holiday season to come across these remote-reality gaming opportunities. Having played it several times now, we recommend spamming the flippers until you get a feel for the lag. Also, just holding the flippers up while the ball is in the upper half of the playfield will catch a lot of balls that you might otherwise lose due to flipper lag, and sometimes they end up back in front of the launcher to shoot again. After the break, check out a brief but amusing video of setting up the cameras and Pi that includes a taste of the Oktoberfest music.

The tournament runs until the end of August, which should be enough time for somebody to set up CV and a keyboard to play this automatically. Need inspiration? Here’s an open-source pinball machine that can play itself.

 

source https://hackaday.com/2020/08/03/iot-pinball-puts-oktoberfest-fun-on-tap/

IOT Pinball Puts Oktoberfest Fun on Tap

We don’t really miss going out to bars all that much, unless you’re talking about the one downtown with all the pinball machines. Don’t get us wrong — pinball emulators have gotten crazy good, and you can find exact digital replicas of most machines to play on your phone or whatever. But it just doesn’t compare to the thrill of playing a real cabinet.

Don’t despair, because for the next couple of weeks, you can queue up to play on a real Oktoberfest pinball machine that’s sitting in Espoo, Finland. The controls are hooked up to a Raspberry Pi 4 through a custom HAT, along with a camera pointed at the playfield and another focused on the backglass screen. The game development/video streaming company Surrogate is hosting a tournament over the internet, and will be giving prizes to the top ten high rollers.

We usually have to wait until the holiday season to come across these remote-reality gaming opportunities. Having played it several times now, we recommend spamming the flippers until you get a feel for the lag. Also, just holding the flippers up while the ball is in the upper half of the playfield will catch a lot of balls that you might otherwise lose due to flipper lag, and sometimes they end up back in front of the launcher to shoot again. After the break, check out a brief but amusing video of setting up the cameras and Pi that includes a taste of the Oktoberfest music.

The tournament runs until the end of August, which should be enough time for somebody to set up CV and a keyboard to play this automatically. Need inspiration? Here’s an open-source pinball machine that can play itself.

 

source https://hackaday.com/2020/08/03/iot-pinball-puts-oktoberfest-fun-on-tap/

IOT Pinball Puts Oktoberfest Fun on Tap

We don’t really miss going out to bars all that much, unless you’re talking about the one downtown with all the pinball machines. Don’t get us wrong — pinball emulators have gotten crazy good, and you can find exact digital replicas of most machines to play on your phone or whatever. But it just doesn’t compare to the thrill of playing a real cabinet.

Don’t despair, because for the next couple of weeks, you can queue up to play on a real Oktoberfest pinball machine that’s sitting in Espoo, Finland. The controls are hooked up to a Raspberry Pi 4 through a custom HAT, along with a camera pointed at the playfield and another focused on the backglass screen. The game development/video streaming company Surrogate is hosting a tournament over the internet, and will be giving prizes to the top ten high rollers.

We usually have to wait until the holiday season to come across these remote-reality gaming opportunities. Having played it several times now, we recommend spamming the flippers until you get a feel for the lag. Also, just holding the flippers up while the ball is in the upper half of the playfield will catch a lot of balls that you might otherwise lose due to flipper lag, and sometimes they end up back in front of the launcher to shoot again. After the break, check out a brief but amusing video of setting up the cameras and Pi that includes a taste of the Oktoberfest music.

The tournament runs until the end of August, which should be enough time for somebody to set up CV and a keyboard to play this automatically. Need inspiration? Here’s an open-source pinball machine that can play itself.

 

source https://hackaday.com/2020/08/03/iot-pinball-puts-oktoberfest-fun-on-tap/

Optimizing GIF Playback For Microcontrollers

Despite being cooked up by Compuserve back in the late 1980s, GIFs have seen a resurgence on the modern internet, mostly because they’re fun. However, all our small embedded systems are getting color screens these days, and they’d love to join in the party. [Larry Bank] has whipped up a solution for just that reason, letting embedded systems play back short animated GIFs with limited resources.

[Larry] does a great job of explaining how the GIF format works, using LZW compression and variable-length codes. He talks about how the design of the format presents challenges, particularly when working with microcontrollers. Despite this, the final code works well, and is able to work with most animated GIFs of the right dimensions and construction. 24K of RAM is required, and image width is limited to 320 pixels. Images can be loaded from flash, memory, or SD cards, and he notes that best performance is gained with a microcontroller with fast SPI for writing to screens quickly.

It’s a great piece of software that promises to add a lot of charm, or silliness, to microcontroller projects. It also simplifies the use of animations, which can now be designed on computers rather than by using onboard graphics libraries. GIF really is the format that never seems to die; we’ve featured cameras dedicated to the form before. Video after the break.

 

 

source https://hackaday.com/2020/08/03/optimizing-gif-playback-for-microcontrollers/

William English, Computer Mouse Co-Creator, Has Passed

We are saddened to report that William English, co-inventor of the computer mouse, died July 26 in San Rafael, California. He was 91 years old.

Bill at the controls at Stanford Research Institute. Image via MSN

Every piece of technology starts with a vision, a vague notion of how a thing could or should be. The computer mouse is no different. In fact, the mouse was built to be an integral part of the future of personal computing — a shift away from punch cards and mystery toward a more accessible and user-friendly system of windowed data display, hyperlinks, videoconferencing, and more. And all of it would be commanded by a dot on the screen moving in sync with the operator’s intent, using a piece of hardware controlled by the hand.

The stuff of science fiction becomes fact anytime someone has the means to make it so. Often times the means includes another human being, a intellectual complement who can conjure the same rough vision and fill in the gaps. For Douglas Engelbart’s vision of the now-ubiquitous computer mouse, that person was William English.

William English was born January 27, 1929 in Lexington, Kentucky. His father was an electrical engineer and William followed this same path after graduating from a ranch-focused boarding school in Arizona. After a stint in the Navy, he took a position at Stanford Research Institute in California, where he met Douglas Engelbart.

The first computer mouse, built by William English in the 1960s. Image via Wikipedia

Engelbart showed William his notes and drawings, and he built the input device that Englebart envisioned — one that could select characters and words on the screen and revolutionize text editing. The X/Y Position Indicator, soon and ever after called the mouse: a sort of rough-yet-sleek pinewood derby car of an input device headed into the future of personal computing.

William’s mouse was utilitarian: a wooden block with two perpendicular wheels on the bottom, and a pair of potentiometers inside to interpret the wheels’ X and Y positions. The analog inputs are converted to digital and represented on the screen. The first mouse had a single button, and the cord was designed to run out the bottom, not the top.

This controller was designed to steer Engelbart’s magnum opus, an experimental computer dubbed oN-Line System, later NLS, which turned out to be a great prognosticator of modern networked computing. Engelbart and English presented the many facets of the NLS in a legendary demonstration given December 9th, 1968 in San Francisco. This event, known as the mother of all tech demos, was well covered by our own [Dan Maloney] in a biographical/Retrotechtacular mash-up marking the 50th anniversary. By the time they gave the demo, the mouse had three buttons and sat atop a stately chair-mounted lap console designed by Herman Miller. This NLS console contained an IBM Selectric keyboard and held a 5-button chording keyboard on the left side.

The luxury console of the NLS. Image via The Smithsonian

Bill designed all the audio-visuals for the demo, set everything up, and staged the 90+ minute presentation by speaking to Englebart and others through headsets. The show was only possible from a technical standpoint because Bill had a chance encounter with a Silicon Valley phone technician and convinced him to set up a wireless link for voice and video between the hall and their lab some 30 miles away in Menlo Park. That, plus the giant Eidophor projector they borrowed from NASA to show the demo to the hundreds of engineers in attendance. English and Englebart discuss the NLS, the Eidophor, and much more in the interview embedded below, but the topic is worth much a much deeper dive (something Mike Harrison did for his talk at the 2016 Hackaday Belgrade conference).

In 1971, Bill left Stanford Research Institute for Xerox’s famed Palo Alto Research Center (PARC) where he continued to develop the features of the NLS into the Alto. You likely know the story from here — Bill Gates and Steve Jobs both toured PARC, both saw the Alto, and both steered the personal computer toward their own vision.

Main and thumbnail images via NYT

source https://hackaday.com/2020/08/03/william-english-computer-mouse-co-creator-has-passed/

William English, Computer Mouse Co-Creator, Has Passed

We are saddened to report that William English, co-inventor of the computer mouse, died July 26 in San Rafael, California. He was 91 years old.

Bill at the controls at Stanford Research Institute. Image via MSN

Every piece of technology starts with a vision, a vague notion of how a thing could or should be. The computer mouse is no different. In fact, the mouse was built to be an integral part of the future of personal computing — a shift away from punch cards and mystery toward a more accessible and user-friendly system of windowed data display, hyperlinks, videoconferencing, and more. And all of it would be commanded by a dot on the screen moving in sync with the operator’s intent, using a piece of hardware controlled by the hand.

The stuff of science fiction becomes fact anytime someone has the means to make it so. Often times the means includes another human being, a intellectual complement who can conjure the same rough vision and fill in the gaps. For Douglas Engelbart’s vision of the now-ubiquitous computer mouse, that person was William English.

William English was born January 27, 1929 in Lexington, Kentucky. His father was an electrical engineer and William followed this same path after graduating from a ranch-focused boarding school in Arizona. After a stint in the Navy, he took a position at Stanford Research Institute in California, where he met Douglas Engelbart.

The first computer mouse, built by William English in the 1960s. Image via Wikipedia

Engelbart showed William his notes and drawings, and he built the input device that Englebart envisioned — one that could select characters and words on the screen and revolutionize text editing. The X/Y Position Indicator, soon and ever after called the mouse: a sort of rough-yet-sleek pinewood derby car of an input device headed into the future of personal computing.

William’s mouse was utilitarian: a wooden block with two perpendicular wheels on the bottom, and a pair of potentiometers inside to interpret the wheels’ X and Y positions. The analog inputs are converted to digital and represented on the screen. The first mouse had a single button, and the cord was designed to run out the bottom, not the top.

This controller was designed to steer Engelbart’s magnum opus, an experimental computer dubbed oN-Line System, later NLS, which turned out to be a great prognosticator of modern networked computing. Engelbart and English presented the many facets of the NLS in a legendary demonstration given December 9th, 1968 in San Francisco. This event, known as the mother of all tech demos, was well covered by our own [Dan Maloney] in a biographical/Retrotechtacular mash-up marking the 50th anniversary. By the time they gave the demo, the mouse had three buttons and sat atop a stately chair-mounted lap console designed by Herman Miller. This NLS console contained an IBM Selectric keyboard and held a 5-button chording keyboard on the left side.

The luxury console of the NLS. Image via The Smithsonian

Bill designed all the audio-visuals for the demo, set everything up, and staged the 90+ minute presentation by speaking to Englebart and others through headsets. The show was only possible from a technical standpoint because Bill had a chance encounter with a Silicon Valley phone technician and convinced him to set up a wireless link for voice and video between the hall and their lab some 30 miles away in Menlo Park. That, plus the giant Eidophor projector they borrowed from NASA to show the demo to the hundreds of engineers in attendance. English and Englebart discuss the NLS, the Eidophor, and much more in the interview embedded below, but the topic is worth much a much deeper dive (something Mike Harrison did for his talk at the 2016 Hackaday Belgrade conference).

In 1971, Bill left Stanford Research Institute for Xerox’s famed Palo Alto Research Center (PARC) where he continued to develop the features of the NLS into the Alto. You likely know the story from here — Bill Gates and Steve Jobs both toured PARC, both saw the Alto, and both steered the personal computer toward their own vision.

Main and thumbnail images via NYT

source https://hackaday.com/2020/08/03/william-english-computer-mouse-co-creator-has-passed/

Hack a Folding Bike to Help You Catch Some Pike

For many of us, this whole pandemic thing has produced some unexpected upsides. One of [George Turvey]’s was finding a nice new scenic route to work that goes by a lake with bike trails. [George] thought it might be nice to go fishing after work, and use a folding bike to cover a lot of ground while looking for good spots on the shore. There was just one problem — riding a bike while transporting tackle is awkward.

The bike comes with a front mount that’s meant to hold the special bags they make, so that became square one for designing a rod and tackle holder. Then [George] had to weigh the pros and cons of additive vs. subtractive methods for prototyping the holder, or at least the connection between it and the mount on the bike.

Milling won out, at least for the initial proof of concept, and result is a modular mock-up that combines a milled Kydex connector and tackle box holder with a double-barrel PVC rod holder. This way, [George] had a prototype in a fraction of the time it would have taken to design and print it. Cast your line past the break to see how fast [George] can switch gears into fishing mode.

3D printing definitely has a place in the fishing world. How else are you gonna design your own lures?

source https://hackaday.com/2020/08/03/hack-a-folding-bike-to-help-you-catch-some-pike/

Cryptographic LCDs Use The Magic of XOR

Digital security is always a moving target, with no one device or system every being truly secure. Whether its cryptographic systems being compromised, software being hacked, or baked-in hardware vulnerabilities, it seems there is always a hole to be found. [Max Justicz] has a taste for such topics, and decided to explore the possibility of creating a secure communications device using a pair of LCDs.

In a traditional communications system, when a message is decrypted and the plaintext is displayed on screen, there’s a possibility that any other software running could capture the screen or memory state, and thus capture the secret data. To get around this, [Max]’s device uses a concept called visual cryptography. Two separate, independent systems with their own LCD each display a particular pattern. It is only when the two displays are combined together with the right filters that the message can be viewed by the user, thanks to the visual XOR effect generated by the polarized nature of LCDs.

The device as shown, working with both transparent OLEDs and traditional LCDs, is merely a proof of concept. [Max] envisions a device wherein each display is independently sourced, such that even if one is compromised, it doesn’t have the full message, and thus can’t compromise the system. [Max] also muses about the problem of side-channel attacks, and other factors to consider when trying to build a truly secure system.

We love a good discussion of cryptography and security around here; [John McMaster]’s talk on crypto ignition keys was a particular hit at Supercon last year. Video after the break.

source https://hackaday.com/2020/08/03/cryptographic-lcds-use-the-magic-of-xor/

Linux-Fu: Help Messages for Shell Scripts and Here Documents

Imagine that you want to output multiple lines of text in Bash, or any shell script. Maybe it’s for a help string for a particularly convoluted shell script you’re writing. You could have a separate echo command for each line.  Or you could use the “here document“.

The “here document” construction takes the text between two delimiters and passes it, as if it were piped, to a command.

if [[$# == 0 ]] || [[ "$1" == "-h" ]]; then
cat << EOF
This is my help message. There are many like it but this one is mine.
My help message is my best friend.
EOF

All of the text, as written, with line breaks and spaces and all, get passed to cat and your helpful formatted message is printed to the user.

You can use here documents interactively at the command prompt, and you can use them in functions:

#!/bin/bash
help() {
    cat << EOF
Here is your help.
EOF
}

More About Here Documents

More than just writing help scripts, here documents are useful any time that you want to enter multiple lines and have them piped to a command. We use them most often from the shell directly. There are a few nuances, however.

You probably figured out that the “EOF” string in the above examples marks the beginning and end of the here document. There’s nothing special about it. You can use any word that doesn’t appear in your document. So “<< END_OF_HERE_DOC” would work.

The end of document string has to be at the beginning of a line, and by itself. You should not have whitespace before or after it. It is usually a good idea to use something odd and more than a few characters as the end string, although — in theory — you could use even a single character.

But that requirement messes up code indentation — see the help() function above.  If you put a dash between the redirection brackets and the string, the shell will consume any leading tab characters (but not spaces!). That lets you indent your message so it doesn’t all run together. But here, you have to be careful about spaces in the declaration: cat <<- EOF and cat <<-EOF work, while cat << -EOF doesn’t.  (It expects the delimiter “-EOF”.)  Still, it lets you indent your code if you can get it right, and use tabs instead of spaces.

 
#!/bin/bash 
help() { 
    cat <<- EOF 
        Here is your help. 
    EOF 
} 

Substitution

One thing that might not be obvious is that the here document can handle variable expansion. Try typing:

cat << EOF
Your path is $PATH
Your prompt is $PS1
EOF

Your path is /usr/local/sbin:/usr/local/bin:...
Your prompt is ($HOSTNAME \w)\$

That even works with things like command substitution. So you could put things in like $(ls), for example. Sometimes you don’t want that, though. In those cases, just quote the end string. For example:

cat << "EOF"
Your path is $PATH
Your prompt is $PS1
EOF

Your path is $PATH
Your prompt is $PS1

Peculiarities

You can even send the input to a program that does nothing like : which might seem odd. But some people use that to comment out large blocks of script for debugging or other purposes. It is a bit wasteful, because the lines you don’t want get put in a temporary file and fed to the input of a program that will ignore them, but you might see it done.

Clearly, here documents are niche. I use them a lot for writing help strings in scripts, but they’re just the ticket when you need to pass multiple lines in a script or to a script as you typed multiple lines into stdin.

 

source https://hackaday.com/2020/08/03/linux-fu-help-messages-for-shell-scripts-and-here-documents/

Cheap And Effective Mosquito Trap Looks Like A Disco

Words cannot quite articulate the collective loathing humankind has for mosquitoes, and rightfully so! These parasite peddling, blood sucking little critters are responsible for a great deal of human suffering. Mosquito-borne diseases such as malaria still account for a significant proportion of human mortality, especially in under-developed parts of the world . So it’s no wonder that people try to reduce their numbers; see this latest $40 mosquito trap by [jacobsk]. (Video, embedded below.)

The idea is critically simple, opening up the potential for widespread deployment. The base and body of the trap are made out of three five-gallon buckets with a mini desk fan sandwiched in between, providing suction into the main trap bin. An opening is cut in the top bucket as a point of entry, and an old school incandescent blacklight is mounted in the centre, with just enough IR and UV output to entice these little vermin, who will definitely regret mistaking it for a black-light rave.

[jacobsk] also does a very good job of showing every step of its construction in his videos. Whilst this solution is purposefully low tech, check out this admittedly overcooked way of killing mosquitoes, with a laser turret.

source https://hackaday.com/2020/08/03/cheap-and-effective-mosquito-trap-looks-like-a-disco/

Pinephone Gets Thermal Imaging Backpack

When you buy a mass-market mobile phone, you’re making the decision to trust a long list of companies with your private data. While it’s difficult for any one consumer to fully audit even a single piece of consumer technology, there have been efforts to solve this problem to a degree. The Pinephone is one such example, with a focus on openness and allowing users to have full control over the hardware. [Martijn Braam] is a proud owner of such a device, and took advantage of this attitude to add a thermal imager to the handset.

The build is not a difficult one, thanks to the expansion-friendly nature of the Pinephone hardware. The rear of the phone sports six pogo pins carrying an I2C bus as well as power. [Martin] started by modifying the back cover of the phone with contacts to interface with the pogo pins. With this done, the MLX90640 thermal imager was attached to the case with double-sided tape and wired up to the interface.

While the 32×24 output from the sensor isn’t going to help you build cutting edge heat-seeking missiles, it’s an affordable sensor with good performance for low-end thermal imaging tasks. We’ve featured teardowns of thermal imaging hardware before, too.

source https://hackaday.com/2020/08/03/pinephone-gets-thermal-imaging-backpack/

See the Science Behind VR Display Design, and What Makes a Problem Important

VR headsets are more and more common, but they aren’t perfect devices. That meant [Douglas Lanman] had a choice of problems to address when he joined Facebook Reality Labs several years ago. Right from the start, he perceived an issue no one seemed to be working on: the fact that the closer an object in VR is to one’s face, the less “real” it seems. There are several reasons for this, but the general way it presents is that the closer a virtual object is to the viewer, the more blurred and out of focus it appears to be. [Douglas] talks all about it and related issues in a great presentation from earlier this year (YouTube video) at the Electronic Imaging Symposium that sums up the state of the art for VR display technology while giving a peek at the kind of hard scientific work that goes into identifying and solving new problems.

Early varifocal prototype

[Douglas] chose to address seemingly-minor aspects of how the human eye and brain perceive objects and infer depth, and did so for two reasons: one was that no good solutions existed for it, and the other was that it was important because these cues play a large role in close-range VR interactions. Things within touching or throwing distance are a sweet spot for interactive VR content, and the state of the art wasn’t really delivering what human eyes and brain were expecting to see. This led to years of work on designing and testing varifocal and multi-focal displays which, among other things, were capable of presenting images in a variety of realistic focal planes instead of a single flat one. Not only that, but since the human eye expects things that are not in the correct focal plane to appear blurred (which is itself a depth cue), simulating that accurately was part of things, too.

The entire talk is packed full of interesting details and prototypes. If you have any interest in VR imaging and headset design and have a spare hour, watch it in the video embedded below.

Things have certainly come a long way since mobile phone-based VR headsets, and displays aren’t the only thing getting all the attention. Cameras have needed their own tweaks in order to deliver the most to the VR and AR landscape.

source https://hackaday.com/2020/08/03/see-the-science-behind-vr-display-design-and-what-makes-a-problem-important/

Electrochemistry at Home

A few years ago, I needed a teeny, tiny potentiostat for my biosensor research. I found a ton of cool example projects on Hackaday and on HardwareX, but they didn’t quite fulfill exactly what I needed. As any of you would do in this type of situation, I decided to build my own device.

Now, we’ve talked about potentiostats before. These are the same devices used in commercial glucometers, so they are widely applicable to a number of biosensing applications. In my internet perusing, I stumbled upon a cool chip from Texas Instruments called the LMP91000 that initially appeared to do all the hard work for me. Unfortunately, there were a few features of the LMP91000 that were a bit limiting and didn’t quite give me the range of flexibility I required for my research. You see, electrochemistry works by biasing a set of electrodes at a given potential and subsequently driving a chemical reaction. The electron transfer is measured by the sensing electrode and converted to a voltage using a transimpedance amplifier (TIA). Commercial potentiostats can have voltage bias generators with microVolt resolution, but I only needed about ~1 mV or so. The problem was, the LMP91000 has a resolution of ~66 mV on a 3.3 V supply, mandating that I augment the LMP991000 with an external digital-to-analog converter (DAC) as others had done.

However, changing the internal reference of the LMP91000 with the DAC confounded the voltage measurements from the TIA, since the TIA is also referenced to the same internal zero as the voltage bias generator. This seemed like a problem other DIY solutions I came across should have mentioned, but I didn’t quite find any other papers describing this problem. After punching myself a little, I thought that maybe it was a bit more obvious to everyone else except me. It can be like that sometimes. Oh well, it was a somewhat easy fix that ended up making my little potentiostat even more capable than I had originally imagined.

I could have made a complete custom potentiostat circuit like a few other examples I stumbled upon, but the integrated aspect of the LMP91000 was a bit too much to pass up. My design needed to be as small as possible since I would eventually like to integrate the device into a wearable. I was using a SAMD21 microcontroller with a built-in DAC, therefore remedying the problem was a bit more convenient than I originally thought since I didn’t need an additional chip in my design.

I am definitely pretty happy with the results. My potentiostat, called KickStat, is about the size of a US quarter dollar with a ton of empty space that could be easily trimmed on my next board revision. I imagine this could be used as a subsystem in any number of larger designs like a glucometer, cellphone, or maybe even a smartwatch.

Check out all the open-source files on my research lab’s GitHub page. I hope my experience will be of assistance to the hacker community. Definitely a fun build and I hope you all get as much kick out of it as I did.

source https://hackaday.com/2020/08/02/electrochemistry-at-home/

Electrochemistry at Home

A few years ago, I needed a teeny, tiny potentiostat for my biosensor research. I found a ton of cool example projects on Hackaday and on HardwareX, but they didn’t quite fulfill exactly what I needed. As any of you would do in this type of situation, I decided to build my own device.

Now, we’ve talked about potentiostats before. These are the same devices used in commercial glucometers, so they are widely applicable to a number of biosensing applications. In my internet perusing, I stumbled upon a cool chip from Texas Instruments called the LMP91000 that initially appeared to do all the hard work for me. Unfortunately, there were a few features of the LMP91000 that were a bit limiting and didn’t quite give me the range of flexibility I required for my research. You see, electrochemistry works by biasing a set of electrodes at a given potential and subsequently driving a chemical reaction. The electron transfer is measured by the sensing electrode and converted to a voltage using a transimpedance amplifier (TIA). Commercial potentiostats can have voltage bias generators with microVolt resolution, but I only needed about ~1 mV or so. The problem was, the LMP91000 has a resolution of ~66 mV on a 3.3 V supply, mandating that I augment the LMP991000 with an external digital-to-analog converter (DAC) as others had done.

However, changing the internal reference of the LMP91000 with the DAC confounded the voltage measurements from the TIA, since the TIA is also referenced to the same internal zero as the voltage bias generator. This seemed like a problem other DIY solutions I came across should have mentioned, but I didn’t quite find any other papers describing this problem. After punching myself a little, I thought that maybe it was a bit more obvious to everyone else except me. It can be like that sometimes. Oh well, it was a somewhat easy fix that ended up making my little potentiostat even more capable than I had originally imagined.

I could have made a complete custom potentiostat circuit like a few other examples I stumbled upon, but the integrated aspect of the LMP91000 was a bit too much to pass up. My design needed to be as small as possible since I would eventually like to integrate the device into a wearable. I was using a SAMD21 microcontroller with a built-in DAC, therefore remedying the problem was a bit more convenient than I originally thought since I didn’t need an additional chip in my design.

I am definitely pretty happy with the results. My potentiostat, called KickStat, is about the size of a US quarter dollar with a ton of empty space that could be easily trimmed on my next board revision. I imagine this could be used as a subsystem in any number of larger designs like a glucometer, cellphone, or maybe even a smartwatch.

Check out all the open-source files on my research lab’s GitHub page. I hope my experience will be of assistance to the hacker community. Definitely a fun build and I hope you all get as much kick out of it as I did.

source https://hackaday.com/2020/08/02/electrochemistry-at-home/

Folding@Home And Rosetta, For ARM

Most readers will be aware of the various distributed computing projects that provide supercomputer-level resources to researchers by farming out the computing tasks across a multitude of distributed CPUs and GPUs. The best known of these are probably Folding@Home and Rosetta, which have both this year been performing sterling service in the quest to understand the mechanisms of the SARS COVID-19 virus. So far these two platforms have remained available nearly exclusively for Intel-derived architectures, leaving the vast number of ARM-based devices out in the cold. It’s something the commercial distributed-computing-on-your-phone company Neocortix have addressed, as they have successfully produced ARM64 clients for both platforms that will be incorporated into the official clients in due course.

So it seems that mundane devices such as mobile phones and the more capable Raspberry Pi boards will now be able to fold proteins like a boss, and the overall efforts to deliver computational research will receive a welcome boost. But will there be any other benefits? It’s a Received Opinion that ARM chips are more power-efficient than their Intel-derived cousins, but will this deliver more energy-efficient distributed computing? The answer is “probably”, but the jury’s out on that one as computationally intensive tasks are said to erode the advantage significantly.

Folding@Home was catapulted by the influx of COVID-19 volunteers into first place as the world’s largest supercomputer earlier this year, and we’re pleased to say that Hackaday readers have played their part in that story. As this is being written the July 2020 stats show our team ranked at #39 worldwide, having racked up 14,005,664,882 points across 824,842 work units. Well done everybody, and we look forward to your ARM phones and other devices boosting that figure. If you haven’t done so yet, download the client and join us..

Via HPCwire. Thanks to our colleague [Sophi] for the tip.

source https://hackaday.com/2020/08/02/foldinghome-and-rosetta-for-arm/

Hackaday Links: August 2, 2020

If you somehow manage to mentally separate yourself from the human tragedy of the COVID-19 pandemic, it really has provided a fascinating glimpse into how our planet operates, and how much impact seven billionpeople have on it. Latest among these revelations is that the shutdowns had a salubrious effect in at least one unexpected area: solar power. Researchers found that after the Indian government instituted mandatory lockdowns in March, output from solar power installations in Delhi increased by more than eight percent. The cause: the much-diminished smog, which let more sunlight reach solar panels. We’ve seen similar shutdown-related Earth-impact stories, from decreased anthropogenic seismicity to actually being able to see Los Angeles, and find them all delightfully revealing.

Remember Google Glass? It’s hard to forget, what with all the hype leading up to launch and the bitter disappointment of realizing that actually wearing the device wouldn’t go over well in, say, a locker room. That said, the idea of smart glasses had promise, and several startups tried to make a go of combining functionality with less out-there styling that wouldn’t instantly be seen as probable cause for being a creep. One such outfit was North, who made the more-or-less regular looking (if a bit hipsterish) Focals smart glasses. But alas, North was bought out by Google back in June, and as with so many things Google acquires, Focals smart glasses are being turned off. Anyone who bought the $600 specs will reportedly get their money back, but the features of the smart glasses will no longer function. Except, you know, you’ll still be able to look through them.

It looks like someone has finally come up with a pretty good use case for the adorably terrifying robot mini-dogs from Boston Dynamics. Ford Motors has put two of the yellow robots to work in their sprawling Van Dyke Transmission Plant in Michigan. Dubbed Fluffy and Spot (aww), the dogs wander around the plant with a suite of cameras and sensors, digitally mapping the space to prepare for possible future modifications and expansions. The robots can cover a lot of ground during the two hours that their batteries last, and are even said to be able to hitch a ride on the backs of other robots when they’re tuckered out. Scanning projects like these can keep highly trained — and expensive — engineers busy for weeks, so the investment in robots makes sense. And we’re sure there’s totally no way that Ford is using the disarmingly cute robo-pets to keep track of its employees.

We all know that the Linux kernel has some interesting cruft in it, but did you know that it can actually alert you to the fact that your printer is aflame? We didn’t either until  Editor-in-Chief Mike Szczys shared this reddit post that details the kernel function lp_check_status and how it assumes the worst if it detects the printer is online but also in “check mode.” The Wikipedia entry on the “lp0 on fire” error message has some interesting history that details how it’s not as implausible as it might seem for a printer, especially one in the early 1970s, to burst into flames under the right conditions. A toner fuser bar running amok on a modern laser printer is one thing, but imagine a printer with a fusing oven running out of control.

And finally, because 2020 is apparently the gift that can’t stop giving, at least in the weirdness department, the US Department of Defense let it slip that the office charged with investigating unidentified aerial phenomena is not quite as disbanded as they once said it was. Reported to have been defunded in 2017, the Advanced Aerospace Threat Identification Program actually appears to live on, as the Unidentified Aerial Phenomena Task Force, operating out of the Office of Naval Intelligence. Their purpose is ostensibly to study things like the Navy videos of high-speed craft out-maneuvering fighter jets, but there are whispers from former members of the task force that “objects of undetermined origin have crashed on earth with materials retrieved for study.” All this could just be a strategic misdirection, of course, but given everything else that has happened this year, we’re prepared to believe just about anything.

source https://hackaday.com/2020/08/02/hackaday-links-august-2-2020/

A DIY 6.5-Digit Multimeter Is A Lesson In Clever Circuitry

A multimeter is an easy prospect, right? Back in the day you could make one fairly easily with a decent panel meter and a set of precision resistors, and now a digital one can be had for throwaway prices from China.

But what if instead of a cheap-and-cheerful bench instrument your needs extend to a high-precision device, a really good multimeter? It’s a path [jaromir.sukuba] has trodden with his 6.5 digit multimeter project, and along the way he’s offered us a fascinating window into their design that should be of interest to any electronic engineer even if they never intend to build a multimeter.

The range selection network of switches and resistors, microcontroller, and seven-segment displays are universal to a multimeter design, meaning that there is nothing too special about them in a high-precision instrument except that here he’s using an FPGA for timing.

Where the meat lies in this project is in the ADC and its associated voltage reference, and for that he takes a surprising turn. Instead of taking an off-the-shelf ADC part from one of the usual manufacturers, he’s created his ADC from scratch using op-amps, and to understand why that is the case he takes us on a journey into the world of dual-slope integrating ADCs. These circuits are very well explained in a 1989 HP journal article (PDF, page 8), and are a clever design that measures the time taken to charge and discharge a capacitor from the voltage to be measured and compares it to the same time from the reference voltage.

The beauty of it comes out in the HP article, that the mathematics of the charge/discharge cycle cancel out any effects of the analogue component values, allowing the much higher precision of the reference and the clock timing to dictate that of the reading. We look forward to seeing more of this project.

It’s surprising how few home-made multimeters we have on these pages, perhaps because of those cheap ones. Of the few we’ve had, perhaps this state-based Nixie one is most unusual.

source https://hackaday.com/2020/08/02/a-diy-6-5-digit-multimeter-is-a-lesson-in-clever-circuitry/

Springs and Things Wrap into a Polyhedron of Interactive LED Art

Any resemblance between The Wobble Sphere and a certain virus making the rounds these days is purely coincidental. Although as yet another project undertaken during the COVID-19 lockdowns, we can see where the inspiration came from.

Wobble Sphere is another work of interactive art from the apparently spring-driven imagination of [Robin Baumgarten], whose Quantum Garden piece graced our pages last year. The earlier, flatter version used a collection of spring door stops — the kind that sound awesome when plucked by a passing foot — each of which is surrounded by a Neopixel ring. The springs act as touch sensors that change the patterns and colors on the LED rings in endlessly fascinating ways.

For Wobble Sphere, [Robin] took the same spring and LED units, broke them into a collection of hexagonal and pentagonal PCBs, and wrapped the whole thing up into a 72-sided polyhedron. There’s some impressive mechanical and electrical engineering involved in the transition from 2D to 3D space, not least of which is solving the problem of how to connect everything while providing pluck-friendly structural support. The former was accomplished with a ton of ribbon cables, while the latter was taken care of with a combination of a 3D-printed skeleton and solder connections between adjacent PCBs. The result is a display that invites touch and rewards it with beautiful patterns of light chasing around the sphere. See it in action in the video after the break.

Lest anyone think springs are the only tool in [Robin]’s box, we mustn’t forget that he once set a knife-wielding Arduino-powered game on an unsuspecting public. Check it out; it’s way more fun than it sounds.

source https://hackaday.com/2020/08/02/springs-and-things-wrap-into-a-polyhedron-of-interactive-led-art/

Little Jumping Bot Can Now Stick The Perfect Landing

Sticking the perfect landing can take years of practice for a human gymnast, and it seems the same is true for little monopedal jumping robots. Salto-1P, an old acquaintance here on Hackaday, always needed to keep jumping to stay upright. With some clever control software improvements, it can now land reliably on an area the size of a coin, and then stay there. (Video after the break)

[Justin Yim] from the UC Berkeley’s Biomimetics Lab has been working on Salto for the past four years, and we’ve covered it twice before. Attitude control is handles by a combination of propeller thrusters for roll and yaw, and a reaction wheel for pitch.While it was already impressive before, it had a predictable landing area about the size of a dinner plate.

The trick to the perfect landing is a combination of landing angle, angular velocity and angular momentum. Salto can only correct for ±2.3° of landing angle error, because it doesn’t have a second foot to catch itself when something goes wrong. Ideally the robot’s angular velocity and momentum should be as close as possible to 0 at takeoff, which gives the reaction wheel maximum control authority in flight, as well as on landing.  Basically a well executed takeoff directly influences the chances of a good landing.  [Justin] does an excellent job explaining all this and more on the project’s presentation video.

What is the practical application of Salto, you may ask? Search and rescue of course.

Successfully controlling a robot like Salto is all about control theory. If you want to learn more about the field, you can check out some online lectures on the fundamentals, or get your feet wet with self-blancing robots.

Thanks [Qes] for the tip!

source https://hackaday.com/2020/08/02/little-jumping-bot-can-now-stick-the-perfect-landing/