A Colorful Way To Play Chess On An ATmega328

We’ve all seen those chess computers that consist out of a physical playing field, and a built-in computer that would indicate where you should put its pieces while inputting the position of your pieces in some way. These systems are usually found in a dusty cardboard box in a back room’s closet, as playing like this is fairly cumbersome, and a lot depends on the built-in chess computer.

This take by [andrei.erdei] on this decades-old concept involves an ATmega328p-based Arduino Pro Mini board, a nice wooden frame, and 4 WS2812-based 65×65 mm RGB 8×8 LED matrices, as well as some TTP223 touch sensors that allow one to control the on-board cursor. This is the sole form of input: using the UP and RIGHT buttons to select the piece to move, confirm with OK, then move to the new position. The chess program will then calculate its next position and indicate it on the LED matrix.

Using physical chess pieces isn’t required either: each 4×4 grid uses a special pattern that indicates the piece that occupies it.  This makes it highly portable, but perhaps not as fun as using physical pieces. It also kills the sheer joy of building up that collection of enemy pieces when you’ve hit that winning streak. You can look at the embedded gameplay video after the break and judge for yourself.

Continue reading “A Colorful Way To Play Chess On An ATmega328”

Xpedit Is A Mood Ring For Mother Nature

Whether you’re in the woods or way up a mountain, basic knowledge of your environment can yield a lot of power. The more you know about the temperature, humidity, barometric pressure, and your altitude, the easier it is to predict future weather and stick to your height limits. Sure, you could buy some pre-fab doohickey that does all of this, but why? [DIYMechanics] shows how easy it is to build your own pocket-sized weather station for under $20.

Xpedit’s brain is an ATMega328 running on a 20MHz crystal heartbeat. The atmospheric readings come from a BME280, a nifty all-in-one module that’s available for pennies on Ali. The rotary encoder handles user inputs, and the simple interface displays on an OLED. There’s even a tiny compass embedded in the 3D printed case.

We really like the custom alarm feature, which can buzz you via vibe motor if you’ve climbed too high, or the pressure is dropping. [DIYMechanics] has Xpedit completely open-sourced, so trek on down to the GitHub for the latest Eagles, Gerbers, and INOs. Don’t have a USBtiny ISP yet? He’s got the plans for that, too.

Maybe you’re the indoorsy type who’d rather read about mountainous jungle adventures than experience them firsthand. Add some weather-driven ambiance to your book nook by hacking an IKEA cloud lamp.

Booting The Game Boy Advance Into Bluetooth

While it might not be quite as revered as its predecessor, the Game Boy Advance is arguably the peak of “classic” handheld gaming, before things got all 3D and dual screen on us. One of its best features is the so-called multiboot mode, which allows the GBA to download a program from its link port. Officially this feature was introduced so you could play multiplayer with your friends even if they didn’t have the game cartridge, but naturally it didn’t take long for hackers to realize you can use it to run arbitrary code on an unmodified system.

[Shyri Villar] has put this capability to excellent use with a plug-in board that allows a stock GBA to be used as a general purpose Bluetooth HID controller. Now you can emulate GBA games on your computer while using the real thing as your input device. Or if that’s a bit too redundant for you, then any 2D game you think could benefit from the classic Game Boy control layout.

An ATmega328P on the board initiates the multiboot sequence when the system powers up, and feeds it the GBA program that’s stored on a W25Q32 chip. Once the code is running on the GBA, it communicates with a common HC-05 Bluetooth module through the same link port. To perform this handoff, [Shyri] uses a HCF4066 switch IC to literally change the pin assignments in the connector from the SPI used to upload the ROM to the UART lines of the Bluetooth module.

With everything powered from the 3.3 V provided by the GBA’s link port, and some software niceties like the ability to store Bluetooth pairing information for subsequent device connections, this is actually a very practical gadget. The fact that you can do this on a completely stock GBA is very compelling, especially considering some of the previous Bluetooth Game Boy modifications we’ve seen. Granted the market might be somewhat limited, but with a custom PCB and a 3D printed enclosure, we could see this potentially being a popular accessory for the classic handheld. It’s not like it can be any more niche than using the GBA as a remote display for your multimeter.

Simple Arduino Universal Remote Control

The infrared remote control might not hold the seat of honor in the average home theater setup that it once enjoyed, but it’s not quite out to pasture yet. After all, what are you going to use to stop Netflix once the Chromecast invariably disconnects from your phone? As long as there are devices out there that will respond to commands blasted their way via an IR LED, hackers will be looking to get in on the action.

In an effort to make IR remote hacking just a bit easier, [sjm4306] has submitted his Remoteduino for the 2019 Hackaday Prize. With this handy tool in your arsenal, you can focus on developing the software side of your next IR remote project without worry about the hardware. Just upload your code, and get clicking.

As you might imagine, the design is rather simple. On the front edge of the PCB you’ve got the prerequisite IR LED, and a healthy supply of tactile buttons that your code can use as input. The remote features a fairly standard layout on the top half, complete with silkscreened labels for the common functions, but below that [sjm4306] has packed in six general purpose buttons that can be used for whatever you like.

The Remoteduino is powered by an ATmega328P, and the whole thing runs on a CR2032 cell mounted on the backside. [sjm4306] mentions in his write-up on Hackaday.io that battery life was always a consideration during development of the Remoteduino, so he’s made a few energy-saving considerations. Using the internal 8 MHz oscillator instead of an external crystal shaved a bit off the top, and the aggressive sleep routines got him the rest of the way. In testing, he estimates the battery should last a few years even with daily use.

Continue reading “Simple Arduino Universal Remote Control”

An Impeccably Designed High-Speed LED Flash

If you want to take a picture of something fast, and we mean really fast, you need to have a suitably rapid flash to illuminate it. A standard camera flash might be good enough to help capture kids running around the back yard at night, but it’s not going to do you much good if you’re trying to get a picture of a bullet shattering a piece of glass. For that you’ll need something that can produce microsecond flashes, allowing you to essentially “freeze” motion.

You can buy a flash that fast, but they aren’t common, and they certainly aren’t cheap. [td0g] thought he could improve on the situation by developing his own microsecond flash, and he was kind enough to not only share it with the world, but create a fantastically detailed write-up that takes us through the entire design and construction process. Even if you aren’t in the market for a hyper-fast flash for your camera, this is a fascinating look at how you can build an extremely specialized piece of gear out of relatively common hardware components.

So what goes into a fast LED flash? Rather unsurprisingly, the build starts with high-quality LEDs. After some research, [td0g] went with an even dozen CREE CXA2530 arrays at just shy of $7 USD each. Not exactly cheap, but luckily the rest of the hardware is pretty garden variety stuff, including a ATMega328P microcontroller, some MOSFETs, and a TC4452 driver. He did pack in some monstrous 400 V 10μf capacitors, but has since realized they were considerably overkill and says he would swap them out if doing it all over again.

To make development easier (and less costly, should anything go wrong), [td0g] designed the flash so that the LEDs are arranged in banks of three which can be easily removed or swapped in the 3D printed case. Each trio of LEDs is in a removable “sled” that also holds the corresponding capacitor and MOSFET. Then it was just a matter of getting the capacitors charged up and safely dumping their energy into the banks of LEDs without frying anything. Simple.

At this point, the astute reader is probably thinking that a high speed flash is worthless without an equally fast way of triggering it. You’d be right, but [td0g] already figured that part. A couple years back we covered his incredible ballistic chronometer which is being used as a sensor to fire off his new flash.

Pocket Sized Arduino Calculator Makes A Great First Project

We’ve all got calculators on our phones, in our web browsers, and even in the home “assistant” that’s listening in on your conversations all day on the off chance you blurt out a math question is can solve for you. The most hardcore among us might even still have a real calculator kicking around. So in that light, building your own DIY calculator might not seem too exciting. But we can’t deny this Arduino calculator project by [Danko Bertović] would look good sitting on the bench.

In the video after the break, [Danko] walks us through the creation of the calculator, from placing all the through-hole components to writing the code that pulls it all together. Special attention is given to explaining the wiring, making this is a good project for those just getting started on their digital hacking journey. It also helps that the whole thing is put together on perfboard with jumper wires; no PCB fabrication required for this one.

For the user interface, [Danko] is using an array of 17 tactile switches for the keyboard and a very crisp 128×32 I2C OLED display. Beyond the battery, a crystal, and a handful of passive components, that’s about all the support hardware it takes to put this project together. You don’t even need an enclosure: a second piece of perfboard and some standoffs are used to sandwich the battery and fragile wiring inside.

Of course, the star of the show is the ATmega328P microcontroller, which is mounted in a place of honor right under the OLED screen. The chip gets programmed in an Arduino Uno and then transplanted into the calculator, a neat trick if you don’t have a dedicated programmer handy. Given how cheap Arduino clones can be had online, this is becoming a more common practice.

The construction of this calculator reminds us a bit of the DIY Sinclair scientific calculator we looked at over the summer. But if you want to see the peak of homebrew calculator technology, this Raspberry Pi powered build is tough to beat.

Continue reading “Pocket Sized Arduino Calculator Makes A Great First Project”

Adding Bluetooth To Original SNES Controllers

There’s a bunch of companies selling wireless Super Nintendo style controllers out there. You can go on Amazon and get any number of modern pads that at least kinda-sorta look like what came with Nintendo’s legendary 1990’s game console. They’ve got all kinds of bells and whistles, Bluetooth, USB-C, analog sticks, etc. But none of them are legitimate SNES controllers, and for some people that’s just not good enough.

[sjm4306] is one of those people. He wanted to add Bluetooth and some other modern niceties to a legitimate first-party SNES controller, so he picked up a broken one off of eBay and got to work grafting in his custom hardware. The final result works with Nintendo’s “Classic Edition” consoles, but the concept could also work with the original consoles as well as the computer if you prefer your classic games emulated.

A custom ATMEGA328P-powered board polls the controller’s SPI serial shift register in much the same way the original SNES would have. It then takes those button states and sends them out over UART with a HC-05 Bluetooth module. The controller is powered by a 330 mAh 3.7V battery, and a charging circuit allows for easily topping the controller off with a standard USB cable.

A particularly nice touch on the controller is the use of custom light pipes for the status LEDs. [sjm4306] made them by taking pieces of transparent PLA 3D printer filament, heating and flattening the end, and then sanding it smooth. This provides a diffusing effect on the light, and we’ve got to say it looks very good. Definitely a tip to file away for the future.

On the receiving side, this project was inspired by a custom NES Classic Edition Advantage controller we featured last year, and borrows the work creator [bbtinkerer] did to get his receiver hardware talking to the Classic console over I2C.

We’ve seen a number of projects which have added wireless functionality to the classic Super Nintendo controller, but most tend to be more invasive than this one. We like the idea of reading the controller’s original hardware rather than completely gutting it.

Continue reading “Adding Bluetooth To Original SNES Controllers”