Arduino Brings USB Mouse To Homebrew Computer

When building your own homebrew computer, everything is a challenge. Ultimately, that’s kind of the point. If you didn’t want to really get your hands dirty with the nuts and bolts of the thing, you wouldn’t have built it in the first place. For example, take the lengths to which [rehsd] was willing to go in order to support standard USB mice on their 6502 machine.

Code for mapping mouse movement to digital output.

The idea early on was to leverage existing Arduino libraries to connect with a standard USB mouse, specifically, the hardware would take the form of an Arduino Mega 2560 with a USB Host Shield. There was plenty of code and examples that showed how you could read the mouse position and clicks from the Arduino, but [rehsd] still had to figure out a way to get that information into the 6502.

In the end, [rehsd] connected one of the digital pins from the Arduino to an interrupt pin on the computer’s W65C22 versatile interface adapter (VIA). Then eleven more digital pins were connected to the computer, each one representing a state for the mouse and buttons, such as MOUSE_CLICK_RIGHT and MOUSE_LEFT_DOWN.

Admittedly, [rehsd] says the mouse action is far from perfect. But as you can see in the video after the break, it’s at least functional. While the code could likely be tightened up, there’s obviously some improvements to be made in terms of the electrical interface. The use of shift registers could reduce the number of wires between the Arduino and VIA, which would be a start. It’s also possible a chip like the CH375 could be used, taking the microcontroller out of the equation entirely.

From classic breadboard builds to some impressively practical portable machines, we’ve seen our fair share of 6502 computers over the years. Despite the incredible variation to be found in these homebrew systems, one thing is always the same: they’re built by some of the most passionate folks out there.

Continue reading “Arduino Brings USB Mouse To Homebrew Computer”

Electric Vehicles, The Gasoline Problem, And Synthetic Fuels

When you’re standing at the gas station filling up your car, watching those digits on the pump flip by can be a sobering experience. Fuel prices, especially the price of gasoline, have always been keenly watched, so it’s hard to imagine a time when gasoline was a low-value waste product. But kerosene, sold mainly for lighting, was once king of the petroleum industry, at least before the automobile came along, to the extent that the gasoline produced while refining kerosene was simply dumped into streams to get rid of it.

The modern mind perhaps shudders at the thought of an environmental crime of that magnitude, and we can’t imagine how anyone would think that was a good solution to the problem. And yet we now face much the same problem, as the increasing electrification of the world’s fleet of motor vehicles pushes down gasoline demand. To understand why this is a problem, we’ll start off by taking a look at how crude oil is formed, and how decreasing demand for gasoline may actually cause problems that we should think about before we get too far down the road.

Continue reading “Electric Vehicles, The Gasoline Problem, And Synthetic Fuels”

The Doom computer game rendered with HTML checkboxes

Play DOOM Using Web Browser Checkboxes (Finally)

If you’ve ever felt the need to render DOOM using nothing but web browser checkboxes, [Andrew Healey] has you covered with his recent port of the first-person shooter. Naturally, this gets our tick of approval.

Yes, you read that right. You can now play DOOM in a 160 x 100 grid of HTML-generated checkboxes, much like this: ☑. The secret sauce for this project is partly derived from the fascinating Checkboxland project by fellow hacker Brian Braun, who uses HTML checkboxes to generate a variety of artistic demos.

[Andrew Healey] also made use of Cornelius Diekmann’s port of DOOM using WebAssembly, which we recently covered here on Hackaday. A smattering of code ties both projects together, and the end result is DOOM at 160×100 resolution, rendered entirely with HTML checkboxes.

The port can be played here using Chrome or Edge (other browsers may have issues if they do not support the zoom property in CSS). The source code is also available over on GitHub.

While the resolution and color palette aren’t what we have come to expect from DOOM, it’s likely that the graphics could be further improved by tinkering with the dithering and threshold settings. Higher resolutions may also be possible with further optimization.

We would be hard pressed to pick our favorite port of DOOM, as the list is becoming quite long. However for something completely different, check out our story on how DOOM was brought to Twitter.

Continue reading “Play DOOM Using Web Browser Checkboxes (Finally)”

caliper jaw tools

Printable Caliper Jaws Increase Precision, Deflect Derision

If you’ve watched as many machining videos as we have, no doubt you’ve seen someone commit the cardinal sin of metalworking: using caliper jaws to scratch a mark into metal. Even if it’s a cheap Harbor Freight caliper rather than an expensive Starrett or Mitutoyo tool being abused, derision and scorn predictably rain down upon the hapless sinner’s head.

The criticism is not without its merit, of course. Recognizing this, [Nelson Stoldt] came up with these clamp-on nosepieces designed to turn calipers into a better marking tool. Using stock calipers as marking gauges always introduces some error, since the jaws are equal lengths and thus have to be held at a slight angle to the workpiece in order to make a mark. The caliper jaws correct for this admittedly negligible error by extending one jaw, allowing it to ride on a reference face while the other jaw remains perpendicular to the workpiece. As a bonus, the short jaw has a slot to mount a steel marking knife, saving the caliper jaws from damage.

[Nelson] chose to 3D-print his caliper jaws, but they could just as easily be milled from solid stock to make them a little more durable. Then again, you could always 3D-print the calipers in the first place, and integrate these jaws right into them.

Inconsistent layer heights in a 3D print

An Easy Fix For Inconsistent Layers In Cheap 3D Printers

If there’s one thing you can say about [Stefan] from CNC Kitchen, it’s that he’s methodical when he’s working on an improvement to his 3D printing processes, or when he’s chasing down a problem with a printer. Case in point: this root-cause analysis of extrusion inconsistencies with an entry-level 3D printer.

The printer in question is a Cetus MK3, a printer that found its way onto many benches due to its ridiculously low price and high-quality linear bearings. Unfortunately, there’s still a lot to be desired about the printer, and its tendency for inconsistent layers was chief among [Stefan]’s gripes. Such “blubbiness” can be pinned on any number of problems, but rather than guess, [Stefan] went through a systematic process of elimination to find the root cause. We won’t spoil the ending, but suffice it to say that the problem was subtle, and could probably be the cause of similar problems with other printers. The fix was also easy, and completely mechanical — just a couple of parts to replace. The video below shows the whole diagnosis process, as well as the before and after comparisons. [Stefan] also teases an upcoming treatment on how he converted the Cetus from the stock proprietary control board, which we’re interested in seeing.

If you haven’t checked out any of [Stefan]’s other 3D printing videos, you really should take a look. Whether it’s vibration damping with a concrete paver, salt annealing prints for strength, or using finite element analysis to optimize infills, he’s always got an interesting take on 3D printing.

Continue reading “An Easy Fix For Inconsistent Layers In Cheap 3D Printers”

Arduino Nano Floppy Emulator For When Your Disk Is Not Accessible

Among the plethora of obsolete removable media there are some which are lamented, but it can be difficult to find those who regret the passing of the floppy disk. These flexible magnetic disks in hard plastic covers were a staple of computing until some time in the early 2000s, and their drives could be found by the crateload in any spares box. But what about today, when there’s a need for a real floppy drive and none is to be found? Enter [Acemi Elektronikci], with an Arduino Nano based floppy emulator, that plugs into the floppy port of a PC old enough to have one, and allows the easy use of virtual floppy disks.

Aside from the Nano it has an SD card and associated level shifter, and an SSD1306 i2c screen. Most of the Arduino’s lines drive the floppy interface, so the five-button control comes to a single ADC pin via a resistor ladder. He freely admits that it’s not a perfect cycle-exact emulator of original hardware and there may be machines or even operating systems that complain when faced with it, but for all that it is a useful tool. One of the machines that may have issues is the Amiga, but fortunately there’s a fix for that with a Raspberry Pi.

Hackaday Links Column Banner

Hackaday Links: October 17, 2021

We found a couple of headlines this week that seemed pretty alarming at first, mentioning as they did both “Chinese grannies” and “stun guns.” Digging a little deeper, it appears that widespread elder abuse isn’t what this is about, although there certainly is an unsavory aspect to the story. Apparently, it’s pretty common in Chinese cities for large groups of people to get together for exercise, with “square dancing” being one popular form. This isn’t the “do-si-do and allemande right” square dancing that made high school gym class really awkward for a few days, but rather large groups of mostly older women busting moves to Chinese music in public spaces. It’s the music that’s bothering some people, enough so that they’re buying “stun guns” that can somehow turn off the dancing grannies’ music. None of the articles go into any detail on the device besides describing it as a flashlight-looking thing, and that it appears to do no permanent damage to the sound system. We’d love to know where to get one of these things — you know, for science. And really, it’s kind of sad that people are taking offense at senior citizens just looking for a bit of exercise and social contact.

A couple of weeks back, we mentioned TeachMePCB, a free online PCB design class designed to take you from zero to PCB designer. We’ve been working through the course material and enjoying it, but it strikes us that there’s a lot to keep track when you’re designing a PCB, especially if you’re new to the game. That’s where this very detailed PCB design checklist would come in handy. It takes you right from schematic review and breadboard testing of subassemblies right through to routing traces to avoid crosstalk and stray capacitance problems, and right on to panelization tips and even how to make sure assembly services get your build right. Reading through the list, you get the feeling that each item is something that tripped up the author (grosdode) at one time or another. So it’s a little like having someone with hard-won experience watching over your shoulder as you work, and that can’t really be a bad thing.

Our friend Jeroen Vleggaar over at Huygens Optics on YouTube posted a video the other day about building an entire Schmidt-Cassegrain reflecting telescope out of a single piece of glass. The video is mostly an interview with optical engineer Rik ter Horst, who took up the building of monolithic telescopes as a hobby. It turns out that one of his scopes will be flying to space aboard a cubesat in January. If you’re a fan of precision optics, you’ll want to check this out. Jeroen also teased that he’ll be building his own version of Rik’s monolithic telescope, so watch for an article on that soon.

Heads up — applications are now being accepted for the Open Hardware Summit’s Ada Lovelace Fellowships. This year there are up to ten fellowships offered, each of which includes a $500 travel stipend to attend the Open Hardware Summit in April. The fellowships seek to foster a more diverse community in open-source hardware; applications are being accepted until December 17th, so hurry.

And finally, if you’ve got some spare cycles, you might want to turn your Mark 1 eyeballs to the task of spotting walrus from space. The World Wildlife Federation (WWF) is crowdsourcing its walrus census efforts by training people to spot the well-armed marine mammals in satellite photos. Assessing population numbers and distribution is important to understanding their ecology, and walrus are cute and cuddly (no, they’re not), so getting people to count them makes sense. But this seems like a job for machine vision — there has to be a model trained to recognize walrus, right? Or maybe just something to count dark spots against a white background? Maybe someone can whip something up to make this job a bit easier and less subjective.