DIY 40FPS 16bpp Platformer On A Cortex M0+

Sure, you can play a bunch of retro games on a Raspberry Pi, but if you’re really hardcore, you build your own retro console and write your own games for it. [Nicola Wrachien]’s entry into this year’s Hackaday prize is his DIY Cortex M0+ game console and the platform game he wrote to test the hardware.

The board that [Nicola] is using is the uChip, a small DIP board based around a ATSAMD21 (the same chip that runs the Arduino Zero). That, along with a 160×128 TFT LCD screen, makes up the bulk of the hardware. A carrier board holds both of these as well as several buttons and an OpAmp.

The ATSAMD21 chip has decent hardware DMA that [Nicola] is using to get the frame rate needed. Since the DMA hardware and the CPU can work at the same time, while the DMA is handling one chunk of graphics, the CPU is working on the next chunk. Using this system, [Nicola] is able to get a better framerate than originally designed. Take a look at [Nicola]’s webpage for more details on the algorithm used.

In order to create a level in the platformer that [Nicola] made to show off the console, [Nicola] created a full blown level editor in Java. Using the editor, you can place the tiles and sprites and set their behaviours. The map can then be exported in an optimized format for loading on to the hardware and into the game.

A video showing off the game is after the break. There’s no shortage of great DIY consoles on the site — check out this impressive vector console, or if RetroPie is more your thing, take a look at this DIY Zelda-playing device.

Continue reading “DIY 40FPS 16bpp Platformer On A Cortex M0+”

Process Characterization On The Cheap With A Custom Test Rig

Testing is a key part of any product development cycle. Done right, it turns up unknown bugs and problems, and allows for them to be fixed prior to shipment. However, it can be a costly and time-consuming process. The [Bay Libre] team needed to do some work on power management, but the hardware required was just a little on the expensive side. What else does a hacker do, but build their own?

Enter the Thermo-Regulated Power Measurement Platform. It’s a device designed to control the die temperature of a chip during process characterization. This is where a chip, in this case the iMX8MQ, is run at a variety of temperatures, voltages, and frequencies to determine its performance under various conditions. This data guides the parameters used to run the chip in actual use, to best manage its power consumption and thermal performance.

The rig consists of a Peltier element with controller, a heatsink, and a fan. This is lashed up to a series of Python scripts that both control the chip temperature and run through the various testing regimes. Thanks to this automation, what would normally be a day’s work for an engineer can now be completed in just two hours.

Through a few smart component choices, the team accomplished the job at around one-tenth of the cost of commercial grade hardware. Granted, the average hacker probably won’t find themselves doing process characterization for cutting-edge silicon on a regular basis. Still, this project shows the value in building custom hardware to ease the testing process.

Testing is key to success in production. Custom jigs can make for light work when large orders come in, and we’ve run a primer on various testing techniques, too.

Faux-Neon Sign Says What?, Auf Deutsch

To a speaker of English, a sign asking ‘Was?” may not make much sense. In German, however, the question is a more thought-provoking “What?” That’s exactly the point of this faux-neon sign created by [noniq]. The sign uses silicone-enclosed “neon-like” LED strips to spell out the question for all to see — and ponder.

While true neon aficionados will bristle at even calling such LED strips “faux neon” (check the comments below for examples), we really like them for sign projects like this. They’re great-looking, inexpensive, easy to work with, and available with RGB LEDs for variable colors. In this case, they were mounted on 3 mm polystyrene plate glued to a wooden frame made from 22 mm square beams.

One of the things that caught our eye about this build is the use of a CNC mill to create a prototype. With the strokes milled out of a foam board, the final effect could be visualized before committing to the design. This board later served as a template for cutting the LED strips to length — clever! We suspect this could also be done with a hobby knife and a liberal dose of patience by those without access to a CNC mill.

Of course, this type of project doesn’t always turn out perfect the first time. The sign was missing a dot for the question mark, light leakage from ends of the individual segments was creating distracting bright spots on the base, areas where the silicone had been removed to connect the LEDs were noticeably darker, and the letters looked too thin. We’re looking forward to the promised second post, in which [noniq] describes the solution to these issues.

This isn’t the first time we’ve seen these LED strips used for sign-making, like in this logo build last Spring.

After The Con: Da Bomb Badge Post Mortem

We’ve reported on the world of electronic badges here at Hackaday since their earliest origins in [Joe Grand]’s work for DEF CON 14 in 2006. In that time we’ve seen an astonishing variety of creations, covering everything from abstract artwork to pure functionality in a wearable device. But it’s not been quite so often that we’ve looked at the other side of the BadgeLife coin, so it’s fascinating to read [John Adams]’ account of the work that went into the production of this year’s 500-piece run of the Da Bomb DEF CON indie badge.

In it, [John] goes over scheduling worries, component sourcing issues, PCB assembly delays, and an in-depth look into the finances of such a project. In case anyone is tempted to look at Badgelife as the route to millions, it rapidly becomes apparent that simply not losing too much money is sometimes the best that can be hoped for. There were a few design problems, one of them being that the SAO I2C bus was shared with the LED controller, resulting in some SAOs compatibility issues. In particular the AND!XOR DOOM SAO had its EEPROM erased, creating something of a headache for the team.

A surprise comes in the distribution: obviously shipping is expensive, so you’d think badge pick-ups at the con would be straightforward alternative. Unfortunately, they became something of a millstone in practice, and organising them was a Herculean task. Astoundingly, some paying customers didn’t bother turn up for their badges. Which was especially infuriating since the team lost valuable conference time waiting for them.

Some of you are BadgeLife creators and will nod sagely at this. Still more of you will wish you were BadgeLife creators and find it a useful primer. For everyone else it’s a fascinating read, and maybe makes us appreciate our badges a bit more.

The images may have departed, but just to return to the origins of BadgeLife, here’s our coverage of that first [Joe Grand] badge.

(Mis)use This Part To Attach 3D Printed Stuff To A Shaft

Interfacing a shaft to a 3D printed gear doesn’t have to be tricky. [Tlalexander] demonstrated a solution that uses one half of a spider coupling (or jaw coupling) to create an effective modular attachment. The picture above (and this older link) shows everything you need to know: the bottom of the coupling is mounted to the shaft, and a corresponding opening is modeled into the the 3D printed part. Slide the two together, and the result is a far sturdier solution than trying to mate a 3D printed gear directly to a motor shaft with a friction fit or a screw. This solution isn’t necessarily limited to attaching gears either, any suitable 3D printed part could be interfaced to a shaft in this way.

These couplings are readily available, and fortunately for hobbyists, come in sizes specifically designed for common stepper motors like NEMA 17 and NEMA 23. Ironically, these couplings are often used when building custom 3D printers for those same reasons. With this method interfacing anything at all to a motor shaft becomes mostly a matter of modeling a matching hole out of the part to be 3D printed. One coupling even provides two such attachments, since only one of the two sides is used.

The image up top is from [Tlalexander]’s Rover image gallery, which contains a ton of fantastic pictures of the work that went into the gearboxes, a major part of the Rover’s design that we’ve seen in the past.

Scrapyard Milling Machine Gets Work Done On A Budget

Which to buy first, a lathe or a mill? It’s a tough question for the aspiring home machinist with limited funds to spend on machine tools, but of course the correct answer is a lathe. With a lathe, we are told, all other machine tools can be built, including a milling machine. Granted that might be a slight  exaggeration, but [Maximum DIY] was still able to use his budget-blowing lathe to make a decent milling machine mostly from scrap.

Details are a bit sparse in the forum post, but there’s enough there and in the video after the break to be mightily impressed with the build. Unlike many DIY mills that are basically modified drill presses, [Maximum DIY] started with things like a scrapped bench grinder pedestal and surplus steel tubing. The spindle motor is from a paint sprayer and the Z-axis power feed is a treadmill incline motor. The compound table was a little too hard to make, so the purchased table was fitted with windshield wiper motor power feeds.

Therein lies perhaps the most clever hack in this build: the use of a plain old deep 19mm socket as a clutch for the power feeds. The 12-point socket slides on the square shaft of the wiper motor to engage the drive screw for the compound table – simple and bulletproof.

To be sure, the finished mill is far from perfect. It looks like it needs more mass to quell vibration, and those open drive pulleys are a little nerve wracking. But it seems to work well, and really, any mill is better than no mill. Of course, if you’re flush with cash and want to buy a mill instead of making one, this buyer’s guide should help.

Continue reading “Scrapyard Milling Machine Gets Work Done On A Budget”

Automate Sorting Your Trash With Some Healthy Machine Learning

Sorting trash into the right categories is pretty much a daily bother. Who hasn’t stood there in front of the two, three, five or more bins (depending on your area and country), pondering which bin it should go into? [Alvaro Ferrán Cifuentes]’s SeparAItor project is a proof of concept robot that uses a robotic sorting tray and a camera setup that aims to identify and sort trash that is put into the sorting tray.

The hardware consists of a sorting tray mounted to the top of a Bluetooth-connected pan and tilt platform. The platform communicates with the rest of the system, which uses a camera and OpenCV to obtain the image data, and a Keras-based back-end which implements a deep learning neural network in Python.

Training of the system was performed by using self-made photos of the items that would need to be sorted as these would most closely match real-life conditions. After getting good enough recognition results, the system was put together, with a motion detection feature added to respond when a new item was tossed into the tray. The system will then attempt to identify the item, categorize it, and instruct the platform to rotate to the correct orientation before tilting and dropping it into the appropriate bin. See the embedded video after the break for the system in action.

Believe it or not, this isn’t the first trash-sorting robot to grace the pages of Hackaday. Potentially concepts like these, that rely on automation and machine vision, could one day be deployed on a large scale to help reduce how much recyclable material end up in landfills. Continue reading “Automate Sorting Your Trash With Some Healthy Machine Learning”