Arduino Drum Platform Is Fast

Drums are an exciting instrument to learn to play, but often prohibitive if there are housemates or close neighbors involved. For that problem there are still electronic drums which can be played much more quietly, but then the problem becomes one of price. To solve at least part of that one, [Jeremy] turned to using an Arduino to build a drum module on his own, but he still had to solve yet a third problem: how to make the Arduino fast enough for the drums to sound natural.

Playing music in real life requires precise timing, so the choice of C++ as a language poses some problems as it’s not typically as fast as lower-level languages. It is much easier to work with though, and [Jeremy] explains this in great detail over a series of blog posts detailing his drum kit’s design. Some of the solutions to the software timing are made up for with the hardware on the specific Arduino he chose to use, including an even system, a speedy EEPROM, hardware timers, and an ADC that can sample at 150k samples per second.

With that being said, the hardware isn’t the only thing standing out on this build. [Jeremy] has released the source code on his GitHub page for those curious about the build, and is planning on releasing several more blog posts about the drum kit build in the near future as well. This isn’t the only path to electronic drums, though, as we’ve seen with this build which converts an analog drumset into a digital one.

Continue reading “Arduino Drum Platform Is Fast”

Building Faster Rsync From Scratch In Go

For a quick file transfer between two computers, SCP is a fine program to use. For more complex, large, or regular backups, however, the go-to tool is rsync. It’s faster, more efficient, and usable in a wider range of circumstances. For all its perks, [Michael Stapelberg] felt that it had one major weakness: it is a tool written in C. [Michael] is philosophically opposed to programs written in C, so he set out to implement rsync from scratch in Go instead.

[Michael]’s path to deciding to tackle this project is a complicated one. His ISP upgraded his internet connection to 25 Gbit/s recently, which means that his custom router was the bottleneck in his network. To solve that problem he migrated his router to a PC with several 25 Gbit/s network cards. To take full advantage of the speed now theoretically available, he began using a tool called gokrazy, which turns applications written in Go into their own appliance. That means that instead of installing a full Linux distribution to handle specific tasks (like a router, for example), the only thing loaded on the computer is essentially the Linux kernel, the Go compiler and libraries, and then the Go application itself.

With a new router with hardware capable of supporting these fast speeds and only running software written in Go, the last step was finally to build rsync to support his tasks on his network. This meant that rsync itself needed to be built from scratch in Go. Once [Michael] completed this final task, he found that his implementation of rsync is actually much faster than the version built in C, thanks to the modernization found in the Go language and the fact that his router isn’t running all of the cruft associated with a standard Linux distribution.

For a software project of this scope, we find [Michael]’s step-by-step process worth taking note of for any problem any of us attempt to tackle. Not only that, refactoring a foundational tool like rsync is an involved task on its own, let alone its creation simply to increase network speeds beyond what most of us would already consider blazingly fast. We’re leaving out a ton of details on this build so we definitely recommend checking out his talk in the video below.

Thanks to [sarinkhan] for the tip!

Continue reading “Building Faster Rsync From Scratch In Go”

Vintage Computers With A Real Turbo

In prior centuries, it was common practice to tie the operation of a program to a computer’s clock speed. As computers got faster and faster, the programs tied to that slower clock speed sometimes had trouble running. To patch the issue temporarily, some computers in the early 90s included a “TURBO” button which actually slowed the computer’s clock speed down in order to help older software run without breaking in often unpredictable ways. [Ted Fried] decided that he would turn this idea on its head, though, by essentially building a TURBO button into the hardware of old computers which would greatly increase the execution speed of these computers without causing software mayhem.

To accomplish this, he is running CPU emulators on Teensys (Teensies?), but they are configured to be a drop-in replacement for the physical CPU of several retro computers such as the Apple II, VIC-20, and Commodore 64 rather than an emulator for an entire system. It can be configured to run either in cycle-accurate mode, making it essentially identical to the computer’s original hardware, or it can be placed into an accelerated mode to take advantage of the Teensy 4.1’s 800 MHz processor, which is orders of magnitude faster than the original hardware. This allows (most of) the original hardware to still be used while running programs at wildly faster speeds without needing to worry about any programming hiccups due to the increased clock speed.

The video below demonstrates [Ted]’s creation running in an Apple II but he has several other cores for other retro computers. It’s certainly a unique way to squeeze more computing power out of these antique machines. Some Apple II computers had a 4 MHz clock which seems incredibly slow by modern standards, so the 800 MHz Teensy would have been considered wizardry by the standards of the time, but believe it or not, it’s actually necessary to go the other direction for some applications and slow this computer down to a 1 MHz crawl.

Continue reading “Vintage Computers With A Real Turbo”

Street-Legalize Your Ebike With A Magnet

Getting into e-biking is a great hobby. It can get people on bikes who might otherwise not be physically able to ride, it can speed up commute times, and it can even make hauling lots of stuff possible and easy, not to mention it’s also fun and rewarding. That being said, there are a wide array of conflicting laws around what your e-bike can and can’t do on the road and if you don’t want to run afoul of the rules you may need a programmable device that ensures your e-bike is restricted in the appropriate way.

This build is specifically for Bafang mid drives, which can be up to 1000 W and easily power a bike beyond the speed limit where [Tomblarom] lives. A small microcontroller is housed in a waterproof box on the bike and wired between the motor’s display and controller. A small hall effect sensor and magnet sit by this microcontroller, and if the magnet is removed then the microcontroller reprograms the bike’s controller to limit the speed and also to disable the throttle, another feature that is illegal in some jurisdictions but not others. As an added bonus, the microcontroller also handles brake lights, turn signals, and automatic headlights for the bike as well.

While the project page mentions removing the magnet while getting pulled over to avoid fines and other punishments, that’s on you. We imagine this could still be useful for someone who wants to comply with local laws when riding on the road, but still wants to remove the restrictions when riding on private property or off-road where the wattage and speed restrictions might not apply.

Watch A Fast Sand Plotter Plow Patterns At Speed

[Mark]’s sand table wisely has a glass top.
Most of us have probably seen a video of a sand drawing table at work, in which a steel ball — magnetically-coupled to a gantry under a layer of sand — lazily draws geometric patterns with utter precision and zen-like calmness. That’s all well and good, but [Mark Rehorst] thinks it can also be interesting to crank up the speed and watch the ball plow through sand just as physics intended. There’s a deeper reason [Mark] is working at this, however. Faster drawing leads to less crisp results, but by how much, exactly? To answer this, [Mark] simply ran his table (which is named The Spice Must Flow) at both fast and slow speeds and documented the results.

These two images show the difference between running the table at 100 mm/s versus 500 mm/s. The slower speed is noticeably crisper, but on the other hand the faster speed completed the pattern in about a fifth of the time. [Mark] says that as the ball aggressively accelerates to reach target speeds, more sand is thrown around over existing lines, which leads to a loss of detail.

Crisper detail, or a faster draw? Which is “better” depends on many things, but it’s pretty clear that [Mark]’s cat finds the fast version more exciting. You can see [Mark]’s table at high speed and the cat’s reaction in the video, embedded below.

Continue reading “Watch A Fast Sand Plotter Plow Patterns At Speed”

Enforce Speed Limits With A Rusty Bike

They say you can’t manage what you can’t measure, and that certainly held true in the case of this bicycle that was used to measure the speed of cars in one Belgian neighborhood. If we understand the translation from Dutch correctly, the police were not enforcing the speed limit despite complaints. As a solution, the local citizenry built a bicycle with a radar gun that collected data which was then used to convince the police to enforce the speed limit on this road.

The bike isn’t the functional part of this build, as it doesn’t seem to have been intended to move. Rather, it was chosen because it is inconspicuous (read: rusty and not valuable) and simply housed the radar unit and electronics in a rear luggage case. The radar was specially calibrated to have less than 1% error, and ran on a deep cycle lead acid battery for around eight days. Fitting it with an Arduino-compatible shield and running some software (provided on the github page) is enough to get it up and running.

This is an impressive feat of citizen activism to provide the local police with accurate data to change a problem in a neighborhood. Not only was the technology put to good use, but the social engineering involved with hiding expensive electronics in plain sight with a rusty bicycle is a step beyond what we might have thought of as well.

Thanks to [Jo_elektro] for the tip!

GPS Overlays Give Real Life Racing A Video Game Feel

Racing is certainly exciting for the person rocketing around the track fast enough to get the speedometer into the triple digits, and tends to be a decent thrill for the spectators if they’ve got good seats. But if you’re just watching raw race videos on YouTube from the comfort of your office chair it can be a bit difficult to appreciate. There’s a lack of context for the viewer, and it can be hard to get the same sense of speed and position that you’d have if you saw the event first hand.

In an effort to give his father’s racing videos a bit more punch, [DusteD] came up with a clever way of adding video game style overlays to the recordings. The system provides real-time speed, lap times, and even a miniature representation of the track complete with a marker to show where the action is taking place. The end result is that recordings of Dad’s exploits on the track could pass as gameplay footage from Gran Turismo (we know GT doesn’t have motorcycles, but you get the idea).

The first part of the system is the tracker itself, which consists of a GPS receiver, an Arduino Pro Micro, and an SD card module. [DusteD] powers the device with two 18650 cells in parallel, and a DC-DC boost converter to step it up to 5V. Everything is contained in a 3D printed enclosure that he designed in OpenSCAD, with the only external elements being a toggle switch, a momentary switch, and most critically, a set of LEDs.

These LEDs play into the second part of the system, the software. The blinking LEDs are positioned so they’ll get picked up by the camera, which is then used to help synchronize the data stored on the SD card with the video. [DusteD] came up with some software that will take the speed and position information from the card, and turn it into PNG files with transparent backgrounds. These are then placed on top of the video with the help of FFmpeg. It takes a little adjustment to get everything lined up properly, but as the video after the break shows the end result is very impressive.

This build reminds us of the Raspberry Pi powered GPS helmet camera we featured a few years back, and it’s interesting to see how the two projects achieved what’s essentially the same goal in different ways.

Continue reading “GPS Overlays Give Real Life Racing A Video Game Feel”