An OpenBikeSensor

OpenBikeSensor Measures Close Calls

Cycling is fun, healthy, and good for the environment. But unfortunately it’s not always the safest of activities, as inconsiderate drivers can be a significant hazard to cyclists. Several countries, including Germany, France, and Belgium have introduced legislation mandating a minimum passing distance of at least 1.5 meters between cars and bikes. Enforcing such a rule is tricky however, and without accurate data on average passing distances it’s hard to know how many drivers are following it.

Enter OpenBikeSensor, an open-source hardware and community science project designed to gather exactly this information. Currently in its prototype phase, it aims to make a simple bike-mounted sensor that measures the lateral distance to any passing vehicles. The resulting data is collected online to generate maps highlighting danger zones, which can ultimately be used by city planners to improve cycling infrastructure.

The hardware is based around a set of ultrasonic sensors that measure the lateral distance to any large object. A GPS module keeps track of the bike’s location, while an ESP32 reads out the data and stores it onto an SD card. The user interface consists of a handlebar-mounted display that shows the system’s status. There’s also a button that the user needs to press any time they are passed by a vehicle: this will trigger a measurement and log the location. Once back home, the user can connect the OpenBikeSensor to their WiFi network and download their trip data.

The initial results look promising, and any project that gets people cycling and tinkering with electronics at the same time is worth looking into. It’s not the first time we’ve seen bike-mounted sensors either: people have designed their own sensors to measure air pollution in South America, or simply their own bike’s speed or tire pressure. Continue reading “OpenBikeSensor Measures Close Calls”

A complex arrangement of LEGO gears

Analog Computer Made From LEGO Predicts Tides

Although the tides in the ocean are caused by the motion of the Sun and the Moon, both of which are easy to observe, accurately predicting the tide more than a few days in advance turns out to be rather difficult. The math behind the tidal movement is so complex that some of the earliest analog computers were built specifically to perform tide calculations. Sir William Thomson (better known as Lord Kelvin) designed one such “tide-predicting machine”, an impressive arrangement of gears and pulleys, back in the late 19th century.

[Pepijn de Vos] built a modern interpretation of Thomson’s machine out of LEGO parts, and it’s no less impressive than the original. A total of 96 LEGO gears move perfectly in sync to the ocean’s natural rhythms, while a set of pulleys connect four banks of gears together to create the sum of the constituent frequencies. An ultrasonic sensor reads the output value and sends the result back to a PC.

One interesting problem that [Pepijn] ran into, and which he explains in great detail on his blog, is that LEGO gears can only provide a very limited set of gear ratios. In order to match the tide calculations to any kind of precision, he needed to connect many gears in series without creating too much friction and backlash in the mechanism. Optimizing this setup was a non-trivial task that required a significant amount of computing power by itself.

As you can see in the video embedded below, the machine makes beautifully smooth movements, which correspond quite accurately to the actual motion of tides. If you’re interested in the science behind analog tide predictors, we’ve got an in-depth article about just that.

Continue reading “Analog Computer Made From LEGO Predicts Tides”

An LED bulb with integrated controller chip

Reverse-Engineering A Two-Wire LED Strip Protocol

Although Christmas may be several weeks behind us, various colorful LED contraptions can nowadays be found in our houses at any time of year. [Tim] got his hands on an LED curtain that came with a remote control that allows the user to set not only the color of the LEDs as a whole but also to run simple animations. But these were not your standard WS2812B strips with data lines: all the LEDs were simply connected in parallel with just two wires, so how was this even possible?

An oscilloscope screenshot showing the data protocol used in an LED string
The LED string protocol is very simple, with one address field and one data field.

[Tim] hooked up his oscilloscope to the LED strings to find out how they worked, detailing the results in a comprehensive blog post. As it turns out, the controller briefly shorts the LED strip’s supply voltage to generate data bits, similar to the way old pulse-dialing phones worked. A tiny chip integrated into each LED picks up these pulses, but retains its internal state thanks to a capacitor that keeps the chip powered when the supply line goes low.

After reverse-engineering the protocol, [Tim] went on to implement a similar design using an ATMega328P as a controller and an ATtiny10 as the LED driver. With just a few lines of code and a 100 nF buffer capacitor across the ATtiny’s power pins, [Tim] was able to turn an LED on and off by sending pulses through the supply lines. Some work still needs to be done to fully implement a protocol as used in the LED strings, but as a proof-of-concept it shows that this kind of power-line communication is possible with standard components.

We’ve seen projects that send signals down a two-wire LED chain before, although as an add-on to a more ordinary LED strip. [Tim] is not the first to reverse-engineer poorly documented LED strip protocols, but probably won’t be the last either.

A kinetic art installation with many metal parts

Kinetic Art Installation Brings All The World’s Lightning To One Place

Lightning is a force to be reckoned with: ever since ancient times, humans have been in awe of the lethal power of lightning strikes and the deafening roar of thunder. Quite reasonably, they ascribed these events to acts of angry gods; today, modern science provides a more down-to-earth explanation of the physics involved, and a world-wide network of sensors generates a real-time record of lightning strikes around the globe.

[Dmitry Morozov]’s latest kinetic art installation called Adad is driven by this stream of data. Named after a Mesopotamian god of thunder, it consists of a set of arms that suddenly jerk upwards when a lightning strike is detected anywhere in the world. When an arm falls down again, it strikes a piezo crystal, which generates an electric charge that triggers a bright flash of light as well as a sound effect. Those crystals are pieces of potassium sodium tartrate (also known as Rochelle salt) and were grown specifically for this project. They are housed in plexiglass holders which also provide electrical connections.

Adad‘s spider-like design, its eerie sounds as well as the sudden pops and flashes make this a rather unsettling yet beautiful display of Nature’s violence. And it’s a piece of beauty from an engineering point of view as well: sleek aluminium tubes, servo-driven motion and those transparent crystal holders, all controlled by an Arduino that receives live lightning data through an internet connection.

We’ve seen several types of lightning detectors, usually based on a standard radio receiver or a specialized chip. If you’re interested in growing your own piezo crystals, we’ve covered that too. Continue reading “Kinetic Art Installation Brings All The World’s Lightning To One Place”

An MK-85 with a modern CPU replacement

Upgrading A Soviet Calculator With A Modern CPU

Today’s supply chain issues can make it hard to buy microcontrollers, or really any kind of semiconductor. But for those keeping retrocomputers alive, this problem has always existed: ancient components might have been out of production for decades, with a dwindling supply of second-hand parts or “new old stock” as the only option. If a rare CPU breaks, you might have no option but to replace the entire computer.

[Piotr Patek] ran into this issue when he obtained an Elektronika MK-85 programmable calculator with a broken CPU. Unable to find a replacement, he decided instead to build a pin-compatible CPU unit based on an STM32 microcontroller. Of course no modern CPU is pin-compatible with a Soviet design from the 1980s, so [Piotr] had to design a small interposer PCB to match the original pinout. This also gave him enough space to add an efficient DC/DC converter chip that generates the 2.5 V supply for the STM32.

As for the software, [Piotr] managed to port the original BASIC interpreter, which was written in PDP-11 assembly, to a modern equivalent written in C. While he was at it, he fixed a few bugs that had been sitting there for about 35 years. The updated CPU also allows the MK-85 to run circles around its contemporary siblings: [Piotr] timed it to be about thirty times faster than the original chip, while using a comparable amount of power.

If you also happen to have an MK-85 with a dodgy CPU, you’ll be pleased to find that the schematics and source code to [Piotr]’s modification are all available on his blog. This is probably the first calculator CPU update we’ve seen, although we’ve featured other ancient calculators updated with new firmware, and some completely new calculator designs based on classic hardware.

Thanks for the tip, [cmholm]!

An alpha spark detector

Detecting Alpha Particles Using Copper Wire And High Voltage

If you want to measure radioactivity, nothing really beats a Geiger counter: compact, rugged, and reasonably easy to use, they’re by far the most commonly used tool to detect ionizing radiation. However, several other methods have been used in the past, and while they may not be very practical today, recreating them can make for an interesting experiment.

[Mirko Pavleski] used easily obtainable components to build one such device known as an alpha radiation spark detector. Invented in 1945, a spark detector contains a strong electric field into which discharges are triggered by ionizing radiation. Unlike a Geiger-Müller tube, it uses regular air, which makes it sensitive only to alpha radiation; beta and gamma rays don’t cause enough ionization at ambient pressure. Fortunately, alpha radiation is the main type emitted by the americium tablets found in old smoke detectors, so a usable source shouldn’t be too hard to find.

The construction of this device is very simple: a few thin copper wires are suspended above a round metal can, while a cheap high-voltage source provides a strong electric field between them. Sparks fly from the wires to the can when an alpha source is brought nearby; a series resistor limits the current to ensure the wires don’t overheat and melt.

Although not really practical as a measurement device, the spark detector can nevertheless be used to perform simple experiments with radioactivity. As an example, [Mirko] demonstrates in the video embedded below that alpha particles are stopped by a piece of paper and therefore present no immediate danger to humans. The high voltage present in the device does however, so care must be taken with the detector more than with the radiation source.

We’ve seen several homebrew Geiger counters, some built with plenty of duct tape or with the good old 555 timer. But you can also use photodiodes or even certain types of plastic to visualize ionizing radiation.

Continue reading “Detecting Alpha Particles Using Copper Wire And High Voltage”

An Apple I hooked up to lab power supplies and a monitor

Powering Up An Original Apple I After Three Decades In A Museum

The Apple I is the stuff of legend. Designed and marketed in 1976 by Steve Wozniak and Steve Jobs, it was the very first product released by what would become today’s multi-trillion-dollar manufacturer of iPhones and iMacs. With about 60 original ones known to exist today, prices at auction are commonly in the $300,000 range, while confirmed working ones are even more valuable.

The Heinz Nixdorf Museumsforum (HNF), a computer museum in the German city of Paderborn, is fortunate enough to have an original Apple I in its collection. Although it has been there since 1996, it was always on static display and had never been powered on. In fact, it was unknown whether it would even work, and with it being the most valuable exhibit in the entire museum, simply firing it up would be a seriously risky project.

But computers are meant to be used, so museum director [Jochen Viehoff] decided to take the plunge and attempt to get the classic Apple to run again. In the four-part video series embedded below, [Jochen] explains the history of Apple’s first product and the steps he took to bring it back to life. This began with taking it out of its bullet-proof display case and bringing it upstairs to the museum’s workshop.

In order to make a complete system, HNF staff also dug up a period-correct keyboard as well as a slightly newer Apple monitor that could display the 60 Hz composite video output. Hooking up an original power supply would have been way too risky, because a single mistake or malfunction could send their top exhibit up in flames. Instead, they used a set of lab power supplies with a programmable current limit; this way, even a dead short on the PCB would not result in any serious damage.

Not that there were any shorts: after a bit of fiddling with the keyboard and adjusting the video output level, the 45-year-old computer came to life and began to respond to commands. With just 256 bytes of ROM, its default feature set is rather limited, but the computer duly executed a simple “Hello, World” program writen in 6502 machine code. It thereby joined the elite club of confirmed working Apple I’s, of which there are thought to be about twenty.

If you haven’t got $300,000 to spare but would still like to try your hand at programming the Apple I, you’ll be happy to hear that you can get a modern copy at a far more affordable price. And if all that classic hardware is too fiddly for you, you might want to try implementing the Apple I on an FPGA.

Continue reading “Powering Up An Original Apple I After Three Decades In A Museum”