Breaking Into A Secure Facility: STM32 Flash

In a perfect world, everything would be open source. Our current world, on the other hand, has a lot of malicious actors and people willing to exploit trade secrets if given the opportunity, so chip manufacturers take a lot of measures to protect their customers’ products’ firmware. These methods aren’t perfect, though, as [zapb] shows while taking a deeper look into an STM microcontroller.

The STM32F0 and F1 chips rely on various methods of protecting their firmware. The F0 has its debug interface permanently switched off, but the F1 still allows users access to this interface. It uses flash memory read-out protection instead, which has its own set of vulnerabilities. By generating exceptions and exploiting the intended functions of the chip during those exceptions, memory values can be read out of the processor despite the memory read-out protection.

This is a very detailed breakdown of this specific attack on theses controllers, but it isn’t “perfect”. It requires physical access to the debug interface, plus [zapb] was only able to extract about 94% of the internal memory. That being said, while it would be in STM’s best interests to fix the issue, it’s not the worst attack we’ve ever seen on a piece of hardware.

A Super-Brain For An E-bike

There’s no better way of improving a project than logging data to make informed decisions on future improvements. When it came to [Brian]’s latest project, an electric bike, he wanted to get as much data as he could from the time he turned it on until the time he was finished riding. He turned to a custom pyBoard-based device (and wrote it up on Hackaday.io), but made it stackable in order to get as much information from his bike as possible.

This isn’t so much an ebike project as it is about a microcontroller platform that can be used as a general purpose device. All of the bike’s controls flow through this device as a logic layer, so everything that can possibly be logged is logged, including the status of the motor and battery at any given moment. This could be used for virtually any project, and the modular nature means that you could scale it up or down based on your specific needs. The device is based on an ARM microcontroller so it has plenty of power, too.

While the microcontroller part is exceptionally useful ([Brian] talks about some of its other uses here and gives us even more data on his personal webpage), we shouldn’t miss the incredible bike that [Brian] built either. It has a 3 kW rear hub motor and can reach speeds of around 60 mph. While we let the commenters below hash out the classic argument of “bicycle vs. motorcyle” we’ll be checking out some electric vehicles that are neither.

The TMS1000: The First Commercially Available Microcontroller

We use a microcontroller without a second thought, in applications where once we might have resorted to a brace of 74 logic chips. But how many of us have spared a thought for how the microcontroller evolved? It’s time to go back a few decades to look at the first commercially available microcontroller, the Texas Instruments TMS1000.

Imagine A World Without Microcontrollers

The Texas Instruments Speak And Spell from 1978 was a typical use for the TMS1000.
The Texas Instruments Speak & Spell from 1978 was a typical use for the TMS1000. FozzTexx (CC-SA 4.0)

It’s fair to say that without microcontrollers, many of the projects we feature on Hackaday would never be made. Those of us who remember the days before widely available and easy-to-program microcontrollers will tell you that computer control of a small hardware project was certainly possible, but instead of dropping in a single chip it would have involved constructing an entire computer system. I remember Z80 systems on stripboard, with the Z80 itself alongside an EPROM, RAM chips, 74-series decoder logic, and peripheral chips such as the 6402 UART or the 8255 I/O port. Flashing an LED or keeping an eye on a microswitch or two became a major undertaking in both construction and cost, so we’d only go to those lengths if the application really demanded it. This changed for me in the early 1990s when the first affordable microcontrollers with on-board EEPROM came to market, but by then these chips had already been with us for a couple of decades.

It seems strange to modern ears, but for an engineer around 1970 a desktop calculator was a more exciting prospect than a desktop computer. Yet many of the first microcomputers were designed with calculators in mind, as was for example the Intel 4004. Calculator manufacturers each drove advances in processor silicon, and at Texas Instruments this led to the first all-in-one single-chip microcontrollers being developed in 1971 as pre-programmed CPUs designed to provide a calculator on a chip. It would take a few more years until 1974 before they produced the TMS1000, a single-chip microcontroller intended for general purpose use, and the first such part to go on sale. Continue reading “The TMS1000: The First Commercially Available Microcontroller”

’75 Nixie Multimeter As Digital Dice

For the casual Monopoly or Risk player, using plain six-sided dice is probably fine. For other games you may need dice with much more than six sides, and if you really want to go overboard you can do what [John] did and build electronic dice with a random number generator if you really need to remove the pesky practice of rolling physical dice during your games of chance.

The “digital dice” he built are based on a multimeter from 1975 which has some hardware in it that was worth preserving, including a high quality set of nixie tubes. Nixies can be a little hard to come by these days, but are interesting pieces of hardware in their own right. [John] added some modern hardware to it as well, including an AVR microcontroller that handles the (pseudo) random number generation. A hardware switch tells the microcontroller how many sides the “die” to be emulated will need, and then a button generates the result of the roll.

This is a pretty great use for an old piece of hardware which would otherwise be obsolete by now. [John] considers this a “Resto-Mod” and the finish and quality of the build almost makes it look all original. It’s certainly a conversation piece at the D&D sessions he frequents.

A Soft Robotic Insect That Survives The Fly Swatter

Swarms of robotic insects incapable of being swatted away may no longer be the product of science fiction and Black Mirror episodes. A team from EPFL’s School of Engineering has developed an insect propelled at 3 cm/s, dubbed the DEAnsect.

What makes this robot unique is its exceptional robustness. Two versions of the robot were initially developed, one tethered with ultra-thin wires capable of being squashed with a shoe without impacting its functions and the second fully wireless and autonomous. The robot weighs less than 1 gram and is equipped with a microcontroller and photodiodes to recognize black and white patterns.

The insect is named for its dielectric elastomer actuators (DEAs), an artificial muscle that propels it with vibrations and enables it to move lightly and quickly.

The DEAs are made of an elastomer membrane wedged between soft electrodes that are attracted to each other when a voltage is applied, compressing the membrane. The membrane returns to its original shape when the voltage is turned off. Movement is generated by switching the voltage on and off over 400 times per second. The team reduced the thickness of the membranes and developed soft, highly conductive electrodes only several molecules thick using nanofabrication techniques. They plan on fitting even more sensors and emitters to allow the insects to communicate directly with one another for greater swarm-like activity.

Continue reading “A Soft Robotic Insect That Survives The Fly Swatter”

Analog Meter Clock Uses Parts From A Simpler Time

Clocks with hands that turn are all well and good for the common folk, but hacker types prefer something different. [Sjm4306] is one such person, and developed this analog dial clock with parts we’d almost consider retro by modern standards.

The microcontroller at the heart of the build is a PIC16F886. An 8-bit micro from the Microchip brand, it features no Arduino bootloader or USB interface, being flashed via a dedicated programmer. This is combined with a DS1302 real-time clock to keep accurate time, and a MCP4922 DAC which is responsible for generating the output to drive the dials. The dials themselves are sourced from eBay, being simple voltmeters. They’re given a new backing to display hours and minutes instead of volts, and backlit with LEDs for style.

In this day and age, we’re more used to seeing high-end micros used with integrated DACs and USB programming, but it’s nice to see the parts of yesteryear being used, too. It’s not the first clock we’ve seen from [sjm4306], either. Video after the break.

Continue reading “Analog Meter Clock Uses Parts From A Simpler Time”

Simplified AI On Microcontrollers

Artificial intelligence is taking the world by storm. Rather than a Terminator-style apocalypse, though, it seems to be more of a useful tool for getting computers to solve problems on their own. This isn’t just for supercomputers, either. You can load AI onto some of the smallest microcontrollers as well. Tensorflow Lite is a popular tool for this, but getting it to work on your particular microcontroller can be a pain, unless you’re using an Espruino.

This project adds support for Tensorflow to this class of microcontrollers without having to fuss around with obtuse build tools. Basically adding a single line of code creates an instance, all without having to compile anything or even reboot. Tensorflow is a powerful software tool for microcontrollers, and having it this accessible now is a great leap forward.

So, what can you do with this tool? The team behind this build is using Tensorflow on an open smart watch that can be used to detect hand gestures and many other things. They also opened up these tools for use in a browser, which allows use of the AI software and emulates an Espruino without needing a physical device. There’s a lot going on with this one, and it’s a bonus that it’s open source and ready to be turned into anything you might need, like turning yourself into a Street Fighter.