Thursday, May 1, 2025
Laziness is the mother of invention
Wednesday, May 24, 2023
Magnetic sensor arcade spinner
For a while I've wanted to have an arcade spinner for games like Tempest and Arkanoid. I made one with an Austria Microsystems hall-effect magnetic sensor. The spinner is mounted on ball-bearings and has satisfyingly smooth motion with lots of inertia.
Build instructions are here.
Monday, January 9, 2023
Three non-philosophy projects
Here are some non-philosophy hobby projects I’ve been doing over the break:
Measuring exercise bike power output
Dumping NES ROMs
Adapting Dance Dance Revolution and other mat controllers to work as NES Power Pad controllers for emulation.
Saturday, July 10, 2021
Reading a Game Boy Tetris cartridge
I saw a small rectangular PCB on the sidewalk not far from my house. It looked interesting. I left it for a couple of days in case someone lost it and returned for it. A web search showed it was the PCB from a Game Boy cartridge. Eventually, I took the PCB home, and made it a challenge to extract the data from it with only the tools I had at home and without harming the PCB (so, no soldering).
This PCB was from a ROM-only cartridge, 32K in size (I was able to identify it from the part number and photos online as likely to be Tetris), so it should have been particularly easy to read. The protocol is described here.
While the Game Boy cartridges run at 5V, the only microcontroller I had available with enough GPIOs and ready to use was an stm32f103c "black pill" which runs at 3.3V. Fortunately, it has a number of 5V-tolerant GPIOs, so there was some hope that I could run the cartridge at 5V and read it with the microcontroller.
The Game Boy I didn't have a cartridge connector, but fortunately the PCB had plated through-holes on all but two of the lines, and they fit my breadboard jumper wires very nicely. I used test clips for the remaining two lines (VCC and A0). After some detours due to connection mistakes and a possibly faulty breadboard or GPIO, I ended up with this simple setup (what a mess on the breadboard!).
1. Connect D0-D7 on the cartridge to 5V-tolerant inputs, connect A0-A14 on the cartridge to outputs, ground GND, A15 and RD (CS and RS were not connected to anything on the cartridge), and connect VCC to a power supply (it turned out that all my worries about 3.3V/5V were unnecessary: supplying 3.3V, 4.5V or 5V all worked equally well).
2. Write a 15-bit address to A0-A14. Wait a microsecond (this could be shaved down, but why bother?). Read the byte from D0-D7. Increment address. Repeat. Check the header and ROM checksums when done. Arduino code is here. (I just copied and pasted the output of that into a text file which I then processed with a simple Python script.)
It works! I now have a working Tetris in an emulator, dumped from a random PCB that had been lying on the sidewalk through torrential rains!
I've played many versions of Tetris. This one plays very nicely.
Some technical notes:
- I got advice from someone to set pulldown on the D0-D7 lines. Turns out that makes no difference.
- Cartridges that are more than 32K would need some bank switching code.
Sunday, April 5, 2020
Paddles for classic video games
Friday, May 25, 2018
Vector display for Arduino-type boards
Instructions and links here.
Sunday, January 14, 2018
Exercise machine USB game controller
I made a USB game controller where game movement and buttons are controlled with a Nunchuck or a Gamecube controller and speed of movement (slider) is controlled with the rotation sensor of an elliptical or exercise bike, as a way to encourage self and family to exercise.
Monday, November 6, 2017
Cheap Makey Makey alternative
The Makey Makey is a cool electronic gadget that lets kids make a USB controller out of any somewhat conductive stuff, like bananas, play dough, etc. Unfortunately, it's about $50 (there is also a $30 clone). Also, annoying, it requires a ground connection for the user. I made a capacitive version that costs about $3 using a $2 stm32f103c8 board. It emulates either a keyboard or a gamepad/joystick.
Here are instructions.
Thursday, October 26, 2017
Certamen practice machine
Build instructions are here. Code is here.
Wednesday, October 11, 2017
MIDI fruit piano
My daughters and I saw a Makey-Makey banana piano at a local fair, and they thought it was cool. So I made an Arduino(clone) fruit piano, using capacitive sensing, and a Python program on a computer that plays polyphonic music. It's super-simple, as it uses the ADCTouch library which doesn't need any electronic components besides the Arduino(clone), and it's better than the banana piano as it doesn't require the user to be grounded.While tweaking the project, I learned that MIDI format is really simple, so now the fruit-piano sends notes to the computer via MIDI-over-serial-over-USB, and so one can presumably use the fruit-piano as a keyboard for various kinds of desktop music software.
Instructions are here. Code is here.
If you look at the picture carefully, you'll see that I cheated. We didn't have the eight oranges for the C major scale that my eldest daughter thought we should have, so two of the keys are soda cans.
Friday, September 29, 2017
Gamecube controller to USB adapter
Wednesday, May 10, 2017
Certamen machine
So I offered my kids' school to design and build one for them as a fun summer project for me and an opportunity for my kids to learn to solder. I ordered about $60 of parts, mostly from Aliexpress, centered on an Arduino Mega (I haven't done any Arduino-based programming, but I've used the Arduino toolchain with an ESP8266 before). The parts have started to come in, including the Mega, so I've started writing some code and prototyping. According to my oscilloscope, the quick and dirty polling code I have gets a worst-case detection speed of 0.1 milliseconds, which should be good enough for a quiz game. (I continue to be grateful to the Austin guy who gave had an oscilloscope for sale for $50 on Craigslist, but when I wanted to buy it, gave it to me for free because he liked the sorts of things I was going to use it for.)
I am a bit nervous about signal problems over the three five-meter CAT6 cables (the most expensive single parts of the project) from the control box to the buttons, but I ordered some capacitors for noise suppression, and once my RJ45 jacks come in, I can do some testing.







