Supersonic NERF Dart Speedometer

ATtiny Chronograph

[John] was faced with an interesting problem: after he built his own air cannon, how could he tell exactly how fast his NERF darts were moving? Luckily he had some spare parts on hand and hacked together a fully functional projectile speedometer for less than the cost of an Arduino.

A device is essentially two detectors spaced a precise distance apart from one another. When something passes the first detector, a timer is activated which measures how long it takes the object to reach the second detector. From this, the device calculates the speed. [John] used infrared emitter/detector pairs spaced exactly three inches apart and wired them to an ATtiny2313. After a little bit of coding, he now knows just how fast he can fire those squishy ballistic missiles.

The infrared emitter/detector pairs are mounted to a PVC pipe through which the projectile travels. [John] notes that in theory this could be used to measure almost anything that could fit through the pipe, although this particular device might be damaged by muzzle flash or a pressure wave from an actual gun.

We’ve seen other NERF dart air cannons before, and we wonder if maybe there should be some sort of competition to see who can shoot a NERF dart the fastest now that there’s an easy way to measure speed?

 

Digital Speedometer With An Arduino

[Martyn] is restoring a 32-year-old Honda motorcycle, so when the ancient speedometer broke last year he thought it was prime time to start of a digital speedometer project. We’re loving the results so far, and would love seeing it on a nicely restored bike.

Instead of the relative horror of driving 40 LEDs with a single Arduino, [Martyn] bit the bullet and got a Maxim 7221 LED driver. Controlling 64 LEDs  over a three-wire interface simplified the board design somewhat, allowing [Martyn] to etch his own PCB with the toner transfer & HCl/H2O2 method. To actually power and control the entire circuit, [Martyn] used an Arduino loaded up with a program based  LedControl library makes programming the spedometer a snap.

Although the speedo works, [Martyn] says he isn’t proud of how it looks. We don’t mind – the candy colored jumpers add a nice flair to the project, and they’re hidden behind the face plate of the speedometer. We’re sure once he gets the neutral, high-beam, and warning indicators working with the LED bar array / tachometer, everything will look awesome.

via reddit

Swapping Speedometer Needle For LEDs

[Ah2002] didn’t like the shaky needle in his car’s speedometer so he replaced it with a ring of LEDs. The old speedometer had a cable which rotated along with the gearbox for mechanical speed measurement. By connecting the stepper motor from a printer instead of this cable, a voltage is generated that fluctuates with the speed of the car. The fluctuation is linear so a given voltage measurement can be directly associated with one particular speed. By using a trimpot to calibrate the input voltage, [Ah2002] connected the signal to an LM3914 dot/bar display driver. These can be chained together, lighting a string of outputs based on the single voltage input. The result is the board seen above, which was covered with a printed paper graph in the final assembly.

Judging from the video after the break, we’d bet there was some distracted driving during the calibration process. The driver appears to be holding the video recorder, and since a cellphone GPS was used during calibration we wonder if [Ah2002] was adjusting the trimpot, looking at the GPS, and driving all at once. It’s a fairly awesome hack, but do be careful when you’re working on something like this.

Continue reading “Swapping Speedometer Needle For LEDs”

Replacement Speedometer

[Howard] built his own replacement speedometer for his truck after the original speedometer cable broke. He’s using surface mount components and produced a two-board design that is quite nice. When he tipped us off he mentioned that this is Arduino powered and uses a hall effect sensor. There’s not talk of this in his writeup but we gather that he’s just using the bootloader on an AVR chip and that he hall effect sensor measures the rotation of one of the wheels. When the vehicle isn’t moving the board alternates between max speed and trip distance. Once he’s on the roll it shows current speed.

GPS At Any Speed

[Mellow_Labs] was asked to create a GPS speedometer. It seems simple, but of course, the devil is in the details. You can see the process and the result in the video below.

We have to admit that he does things step-by-step. The first step was to test the GPS module’s interface. Then, he tried computing the speed from it and putting the result on a display. However, testing in the field showed that the display was not suitable for outdoor use.

That prompted another version with an OLED screen. Picking the right components is critical. It struck us that you probably need a fast update rate from the GPS, too, but that doesn’t seem to be a problem. Continue reading “GPS At Any Speed”

Accurate Cycle Counting On RP2040 MicroPython

The RP2040 is a gorgeous little chip with a well-defined datasheet and a fantastic price tag. Two SDKs are even offered: one based on C and the other MicroPython. More experienced MCU wranglers will likely reach for the C variant, but Python does bring a certain speed when banging out a quick project or proof of concept. Perhaps that’s why [Jeremy Bentham] ported his RP2040-based vehicle speedometer to MicroPython.

The two things that make that difficult are that MicroPython tries to be pretty generic, which means some hackery is needed to talk to the low-level hardware, and that MicroPython doesn’t have a reputation for accurate cycle counting. In this case, the low-level hardware is the PWM peripheral. He details the underlying mechanism in more detail in the C version. On the RP2040, the PWM module can count pulse edges on an input. However, you must start and stop it accurately to calculate the amount of time captured. From there, it’s just edges divided by time. For this, the DMA system is pulled in. A DMA request can be triggered once the PWM counter rolls over. The other PWM channel acts as a timer, and when the timer expires, the DMA request turns off the counter. This works great for fast signals but is inaccurate for slow signals (below 1kHz). So, a reciprocal or time-interval system is included, where the time between edges is captured instead of counting the number of edges in a period,

What’s interesting here is how the hardware details are wrapped neatly into pico_devices.py. The uctypes module from MicroPython allows access to MMIO devices such as DMA and PWM. The code is available on GitHub. Of course, [Jeremy] is no stranger to hacking around on the RP2040, as he has previously rolled his own WiFi driver for the Pico W.

ChatGPT, The Worst Summer Intern Ever

Back when I used to work in the pharma industry, I had the opportunity to hire summer interns. This was a long time ago, long enough that the fresh-faced college students who applied for the gig are probably now creeping up to retirement age. The idea, as I understood it, was to get someone to help me with my project, which at the time was standing up a distributed data capture system with a large number of nodes all running custom software that I wrote, reporting back to a central server running more of my code. It was more work than I could manage on my own, so management thought they’d take mercy on me and get me some help.

The experience didn’t turn out quite like I expected. The interns were both great kids, very smart, and I learned a lot from them. But two months is a very tight timeframe, and getting them up to speed took up most of that time. Add in the fact that they were expected to do a presentation on their specific project at the end of the summer, and the whole thing ended up being a lot more work for me than if I had just done the whole project myself.

I thought about my brief experience with interns recently with a project I needed a little help on. It’s nothing that hiring anyone would make sense to do, but still, having someone to outsource specific jobs to would be a blessing, especially now that it’s summer and there’s so much else to do. But this is the future, and the expertise and the combined wisdom of the Internet are but a few keystrokes away, right? Well, maybe, but as you’ll see, even the power of large language models has its limit, and trying to loop ChatGPT in as a low-effort summer intern leaves a lot to be desired.

Continue reading “ChatGPT, The Worst Summer Intern Ever”