Hackaday Prize Best Product Finalist: PewPew

This year for the Hackaday Prize, we’re doing something very, very cool. We’re encouraging hardware entrepreneurs to come up with the next big electronic thing. We’re giving the Best Product in the Hackaday Prize $30,000, and an opportunity to work in a lab filled with tools to turn that prototype into a marketable reality.

Last week, we announced the twenty finalists of the Hackaday Prize Best Product competition. There’s still a lot of work these hackers and tinkerers need to do before the final judging round, but until then we can start taking a look at what are already some of the finest products in this year’s Hackaday Prize.

For his entry into the Best Product finals, [Radomir] is working on a game machine. Consider this an educational toy. Game programming is hard, and some talent is required to go from the main loop to handling buttons to pushing pixels. This project is the minimal game machine. It’s a FeatherWing for Adafruit’s family of micro dev boards meant to teach PyGame programming.

On this board is an 8×8 matrix of bi-color LEDs, a few switches, resistors, and a chip that turns those LEDs into something that can be memory mapped. It’s simple, but that’s the point: it’s a minimum viable product to teach game programming.

Right now, the business plan is to develop games and examples for this add-on board, build a community, write a few tutorials, and sell a few of these boards on Tindie. From there, it’s just a matter of growing, and there are already plans for a PewPew wing with a TFT screen, an STM32 processor, and a tile and sprite engine built in. This could very well be the beginnings of a very cool educational toy, and we’re happy to have it as a finalist in the Best Product competition of the Hackaday Prize.

Bespoke Processors Might Soon Power Your Artisanal Devices

Modern microprocessors are a marvel of technological progress and engineering. At less than a dollar per unit, even the cheapest microprocessors on the market are orders of magnitude more powerful than their ancestors. The first commercially available single-chip processor, the Intel 4004, cost roughly $25 (in today’s dollars) when it was introduced in 1971.

The 4-bit 4004 clocked in at 740 kHz — paltry by today’s standards, but quite impressive at the time. However, what was remarkable about the 4004 was the way it shifted computer design architecture practically overnight. Previously, multiple chips were used for processing and were selected to just meet the needs of the application. Considering the cost of components at the time, it would have been impractical to use more than was needed.

That all changed with the new era ushered in by general purpose processors like the 4004. Suddenly it was more cost-effective to just grab a processor of the shelf than to design and manufacture a custom one – even if that processor was overpowered for the task. That trend has continued (and has been amplified) to this day. Your microwave probably only uses a fraction of its processing power, because using a $0.50 processor is cheaper than designing (and manufacturing) one tailored to the microwave’s actual needs.

Anyone who has ever worked in manufacturing, or who has dealt with manufacturers, knows this comes down to unit cost. Because companies like Texas Instruments makes millions of processors, they’re very inexpensive per unit. Mass production is the primary driving force in affordability. But, what if it didn’t have to be?

Professors [Rakesh Kumar] and [John Sartori], along with their students, are experimenting with bespoke processor designs that aim to cut out the unused portions of modern processors. They’ve found that in many applications, less than half the logic gates of the processor are actually being used. Removing these reduces the size and power consumption of the processor, and therefore the final size and power requirements of the device itself.

Of course, that question of cost comes back into play. Is a smaller and more efficient processor worth it if it ends up costing more? For most manufacturers of devices today, the answer is almost certainly no. There aren’t many times when those factors are more important than cost. But, with modern techniques for printing electronics, they think it might be feasible in the near future. Soon, we might be looking at custom processors that resemble the early days of computer design.

 

Take the Blue Pill and Go Forth

Forth has a long history of being a popular hacker language. It is simple to bootstrap. It is expressive. It can be a very powerful system. [jephthal] took the excellent Mecrisp Forth and put it on the very inexpensive STM32 “blue pill” board to create a development system that cost about $2. You can see the video below.

If you have thirty minutes, you can see just how easy it is to duplicate his feat. The blue pill board has to be programmed once using an STM32 programmer. After that, you can use most standard Forth words and also use some that can manipulate the low-level microcontroller resources.

Continue reading “Take the Blue Pill and Go Forth”

Injecting Code Into Mouse Firmware Should Be Your Next Hack

Here’s a DEF CON talk that uses tools you likely have and it should be your next hacking adventure. In their Saturday morning talk [Mark Williams] and [Rob Stanely] walked through the process of adding their own custom code to a gaming mouse. The process is a crash course in altering a stock firmware binary while still retaining the original functionality.

The jumping off point for their work is the esports industry. The scope of esporting events has blown up in recent years. The International 2016 tournament drew 17,000 attendees with 5 million watching online. The prize pool of $20 million ($19 million of that crowdfunded through in-game purchases) is a big incentive to gain a competitive edge to win. Contestants are allowed to bring their own peripherals which begs the questions: can you alter a stock gaming mouse to do interesting things?

The steelseries Sensei mouse was selected for the hack because it has an overpowered mircocontroller: the STM32F103CB. With 128 KB of flash the researchers guessed there would be enough extra room for them to add code. STM32 chips are programmed over ST-Link, which is available very inexpensively through the ST Discovery boards. They chose the STM32F4DISCOVERY which runs around  $20.

Perhaps the biggest leap in this project is that the firmware wasn’t read-protected. Once the data, clock, and ground pads on the underside of the board were connected to the Discovery board the firmware was easy to dump and the real fun began.

They first looked through the binary for a large block of zero values signifying unused space in flash. The injected firmware is designed to enumerate as a USB keyboard, open Notepad, then type out, save, and execute a PowerShell script before throwing back to the stock firmware (ensuring the mouse would still function as a mouse). Basically, this builds a USB Rubber Ducky into stock mouse firmware.

There are a few useful skills that make taking on this project a worthwhile learning experience. To compile your custom code correctly you need to choose the correct offset address for where it will end up once pasted into the firmware binary. The vector table of the original code must be rewritten to jump to the injected code first, and it will need to jump back to the mouse execution once it has run. The program flow on the left shows this. Both of these jumps require the program counter and registers to be saved and restored. The ARM stack is subtractive and the address will need to be updated to work with the added code.

The talk ended with a live demo that worked like a charm. You can check out the code in the MDHomeBrew repo. In this case the PowerShell script adds keyboard shortcuts for DOOM cheats. But like we said before, the experience of getting under the hood with the firmware binary is where the value will be for most people. With this success under your belt you can take on more difficult challenges like [Sprite_TM’s] gaming keyboard hack where the firmware couldn’t easily be dumped and an update binary was quite obsfucated.

The End of Arduino 101: Intel Leaves Maker Market

This looks like the end of the road for Intel’s brief foray into the “maker market”. Reader [Chris] sent us in a tip that eventually leads to the discontinuation notice (PCN115582-00, PDF) for the Arduino 101 board. According to Intel forum post, Intel is looking for an alternative manufacturer. We’re not holding our breath.

We previously reported that Intel was discontinuing its Joule, Galileo, and Edison lines, leaving only the Arduino 101 with its Curie chip still standing. At the time, we speculated that the first wave of discontinuations were due to the chips being too fast, too power-hungry, and too expensive for hobbyists. Now that Intel is pulling the plug on the more manageable Arduino 101, the fat lady has sung: they’re giving up on hardware hackers entirely after just a two-year effort.

According to the notice, you’ve got until September 17 to stock up on Arduino 101s. Intel is freezing its Curie community, but will keep it online until 2020, and they’re not cancelling their GitHub account. Arduino software support, being free and open, will continue as long as someone’s willing to port to the platform.

Who will mourn the Arduino 101? Documentation was sub-par, but a tiny bit better than their other hacker efforts, and it wasn’t overpriced. We’re a little misty-eyed, but we’re not crying.  You?

[via Golem.de]

Backchannel UART without the UART

Anyone who has worked with a microcontroller is familiar with using printf as a makeshift debugger. This method is called tracing and it comes with the limitation that it uses up a UART peripheral. Believe it or not, there are 8051 variants out there that come with only one serial block and you are out of luck if your application needs it to communicate with another device.

[Jay Carlson] has a method by which he can piggyback these trace messages over an on-chip debugger. Though the newer ARM Cortex-M software debugger already has this facility but [Jay Carlson]’s hack is designed to work with the SiLabs EFM8 controllers. The idea is to write these debug messages to a predefined location in the RAM which the debugger can access anyway. His application polls a certain area of the memory and when it finds valid information, it reads the data and spits it out into a dedicated window. It’s using the debugger as a makeshift printf!

[Jay Carlson] used slab8051.dll interface and put together a C# program and GUI that works alongside the SiLab’s IDE. The code is available on GitHub for you to check out if you are working the EFM8 and need a helping hand. The idea is quite simple and can be ported to other controllers in a multitude of ways like the MSP430 perhaps. For those of you who like the Teensy, you might want to take a look at adding debugger support to the Teensy 3.5/3.6.

Monitor Your City’s Air Quality

[Radu Motisan]’s entry in the 2017 Hackaday Prize is a series of IoT Air Quality monitors, the City Air Quality project. According to [Radu], air pollution is the single largest environmental cause of premature death in urban Europe and transport is the main source. [Radu] has created a unit that can be deployed throughout a city and has sensors on it to report on the air quality.

The hardware has a laser light scattering sensor for particulate matter and 4 electromechanical sensors for carbon monoxide, nitrogen dioxide, sulfur dioxide and ozone (these sense the six parameters that are recognized as having significant health impact by multiple countries.) These sensors have2-yearear lifespan, so they are installed in sockets for easy replacement, and if needed, you can swap to different sensors to detect different things. The PCBs for the hardware are separated into a WiFi version and a LoRaWAN version and the software runs on an ATMega328 – the PCB has the standard six-pin ISP connection for programming.

The data collected is sent to a server where it is adjusted based on the unit’s calibration parameters and stored in a database per sensor. This makes servicing the sensors at the end of their life easier as all that’s required is replacing the sensors in the unit and changing the calibration parameters stored for that unit, the software changes are required. The server offers the data via a RESTful API so that building dashboards with the stats and charts become easy.

[Radu] used an off the shelf module as the first prototype and attached it to a car while driving around. He used this to test out the plan and work on the server. He then proceeded to designing the PCB hardware and the enclosure for the final unit. This work is an extension of [Radu]’s previous work, spotlit here in the 2015 Hackaday Prize, but also check out this project to put air quality sensors in the classroom.

Continue reading “Monitor Your City’s Air Quality”