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.

ESP8266 Adds Web Control To Old Home Theater

There was a time when you could hold onto a TV or A/V receiver for the better part of the decade and not feel as though you were missing out on the latest and greatest features. But today you’re lucky to get three years out of a “smart” TV before it’s either supplanted by a vastly improved version, or falls victim to some weird issue that (surprise, surprise) means you need to buy a new one.

A simple touch interface hosted on the ESP8266

Not content with the status quo of planned obsolescence, [aamarioneta] recently set out to add a sprinkling of modern convenience to a circa 2008 Denon AVR 2308 home theater receiver. Like any good A/V receiver, the AVR 2308 features a dizzying array of ports on the back panel, one of which happens to be for an external infrared receiver. This turned out to be the perfect place to jack in an ESP8266, earning this 12 year old receiver an honorary membership into the Internet of Things.

The interesting thing about this hack is that there’s actually no IR involved. Sure, the code could be used to drive an IR LED attached to the ESP8266’s GPIO pins, and the AVR 2308 would respond as if the original remote was being used; but where’s the fun in that? Thanks to the receiver port, they’re able to inject the IR codes directly into the device. It’s the same protocol, just without the photons.

With a simple web-interface running on the ESP8266, they can control the AVR 2308 from a smartphone’s browser anywhere in the house. From here it would only take a few more lines of code to tie it into an existing home automation system or add in support for Alexa voice control.

We love seeing projects that add modern features to older hardware, as that’s one less piece of gear sent to an early grave because its owner felt they were behind the curve. It’s getting a bit unfriendly out there for consumers, and anything that puts the power back into the owner’s hands is a step in the right direction.

Scott Shawcroft Is Programming Game Boys With CircuitPython

Some people like to do things the hard way. Maybe they drive a manual transmission, or they bust out the wire wrap tool instead of a soldering iron, or they code in assembly to stay close to the machine. Doing things the hard way certainly has its merits, and we are not here to argue about that. Scott Shawcroft — project lead for CircuitPython — on the other hand, makes a great case for doing things the easy way in his talk at the 2019 Hackaday Superconference.

In fact, he proved how easy it is right off the bat. There he stood at the podium, presenting in front of a room full of people, poised at an unfamiliar laptop with only the stock text editor. Yet with a single keystroke and a file save operation, Scott was able make the LEDs on his Adafruit Edge Badge — one of the other pieces of hackable hardware in the Supercon swag bag — go from off to battery-draining bright.

Code + Community

As Scott explains, CircuitPython prides itself on being equal parts code and community. In other words, it’s friendly and inviting all the way around. Developing in CircuitPython is easy because the entire environment — the code, toolchain, and the devices — are all extremely portable. Interacting with sensors and other doodads is easy because of the import and library mechanics Python is known for, both of which are growing within the CircuitPython ecosystem all the time.

CircuitPython is so friendly that it can even talk to old hardware relatively easily without devolving into a generational battle. To demonstrate this point, Scott whipped out an original Nintendo Game Boy and a custom cartridge, which he can use to play fun sounds via the Game Boy’s CPU.

Now You’re Playing With Python

It’s interesting to see the platforms on which Scott has used the power of CircuitPython. The Game Boy brings the hardware for sound and pixel generation along with some logic, but he says it’s the code on the cartridge that does the interesting stuff.

The CPU communicates with carts at a rate of 1MHz. As long as you can keep this rate up and the CPU understands your instructions, you can get it to do anything you want.

Scott’s custom cart has a 120MHz SAMD51. He spends a second explaining how he gets from Python libraries down to the wire that goes to the Game Boy’s brain — basically, the C code underneath CircuitPython accesses direct structs defined within the SAMD to do Direct Memory Access (DMA), which allows for jitter-free communication at 1MHz.

He’s using the chip’s lookup tables to generate a 1MHz signal out of clock, read, and A15 in order to send music-playing instructions to the sound register of the Game Boy’s CPU. It sounds like a lot of work, but CircuitPython helps to smooth over the dirty details, leaving behind a simpler interface.

If you want easy access to hardware no matter how new or nostalgic, the message is clear: snake your way in there with CircuitPython.

Continue reading “Scott Shawcroft Is Programming Game Boys With CircuitPython”

ESP32 Rover With PCB Chassis Is Ready To Roll

The microcontrollers are cheap, the sensors are cheap, even the motors are cheap. So why are all the good wheeled robotics platforms so expensive? [Dimitris Platis] wanted to develop an affordable platform for experimenting with rovers, but the cheap plastic chassis he was using gave him all sorts of problems. So he did what any good hacker would do, and built a better version himself.

Interestingly, [Dimitris] decided to go with a chassis made from two PCB panels. The motors, mounted to small angled brackets, bolt directly to the lower PCB. These aren’t your standard $2 DC cans either. Each JGB37-520 gearhead motor comes complete with an encoder that allows your software to determine speed, distance, and direction. The upper PCB connects to the lower with several rows of pin headers, and plays host to whatever electronics payload you might be experimenting with at the time.

For the controller, [Dimitris] says the ESP32 is hard to beat by pretty much any metric you want to use. With integrated wireless and considerable computational power, there’s plenty of options for controlling your little rover either remotely or autonomously. But he also says that every effort has been made to ensure that you could switch out the microcontroller with something else should you want to spin up a customized version.

The whole idea reminds us a bit of quadcopters we’ve seen in the past, where the PCB wasn’t just being used structurally as a place to bolt the motors and hardware to, but actually contained functional traces and components that reduced how much wiring you needed to do. Naturally, this means that any damage to the chassis might cripple the electronics, but presumably, that’s what the big foam bumpers are there for.

[Dimitris] designed this project for educational use, so he assumes you’ll want to build 10 or 12 of these for your whole classroom. In those quantities, he says each bot will cost around $60. If you wanted to reduce the price a bit more, he says swapping the motors would be your best bet as they’re the single most expensive component of the design. That said, $60 for a quality open source rover platform sounds pretty fair to us.

Still too much? You could check out one of the 3D printable rover designs we’ve covered over the years. Or see if you can get lucky and pick up a cheap robot from the clearance rack and hack it.

What Time Is It? Infinity Time

Since the dawn of the infinity craze, we’ve seen all kinds of projects — mirrors, smart mirrors, coffee tables, clocks, you name it. Unfortunately all of these cool projects sit at home, unappreciated by the public. Well, not anymore. [nolandoktor] is taking infinity to the streets with this beautiful and functional vortex watch.

Though this project is pretty darned advanced, it’s all open source and completely within reach for anyone who has the tools and the time. The watch is based around an ATmega32u4 and uses a DS3231 real-time clock to keep accurate time on the WS2812 LEDs that represent the numbers. The time is displayed using R, G, and B assigned to hour, minute, and second. Actually reading the time is bit tricky until you understand how the colors work together, but something this lovely deserves to maintain a slight air of mystery.

The watch’s case parts are all printed — metal for the bezel, and SLA for the white inner ring that lets a bit of light leak out the side in order to illuminate the USB port and the two stainless steel screws that act as touch contacts. In the future, [nolandoktor] wants to add flashlight mode that turns all the LEDs white, some gaskets to resist water, and wake-on-gesture functionality with an IMU. Take a second to check out the demo after the break.

If you prefer a more traditional timepiece of infinite interest, this clock moves more mundanely, but still looks cool.

Continue reading “What Time Is It? Infinity Time”

The Newbie’s Guide To JTAG

Do you even snarf?

If not, it might be because you haven’t mastered the basics of JTAG and learned how to dump, or snarf, the firmware of an embedded device. This JTAG primer will get you up to snuff on snarfing, and help you build your reverse engineering skills.

Whatever your motivation for diving into reverse engineering devices with microcontrollers, JTAG skills are a must, and [Sergio Prado]’s guide will get you going. He starts with a description and brief history of the Joint Test Action Group interface, from its humble beginnings as a PCB testing standard to the de facto standard for testing, debugging, and flashing firmware onto devices. He covers how to locate the JTAG pads – even when they’ve been purposely obfuscated – including the use of brute-force tools like the JTAGulator. Once you’ve got a connection, his tutorial helps you find the firmware in flash memory and snarf it up to a file for inspection, modification, or whatever else you have planned.

We always appreciate guides like these that cover the basics, since not everyone is in the same place in their hardware hacking journey. This puts us in the mood to crack something open and start looking for pins, if for no other reason than to get some practice.

[Thumbnail image source: LufSec]

Bitluni Brings All The ESP-32 Multimedia Hacks To Supercon

Of all the people I was looking forward to meeting at Supercon, aside from my Hackaday colleagues with whom I had worked for five years without ever meeting, was a fellow from Germany named Matthias Balwierz. The name might not ring a bell, but he’ll certainly be familiar to Hackaday readers as Bitluni, the sometimes goofy but always entertaining and enlightening face of “Bitluni’s Lab” on YouTube.

I’d been covering Bitluni’s many ESP32 hacks over the years, and had struck up a correspondence with him, swapping ideas and asking for advice on the many projects I start but somehow never finish. Luckily for us, Bitluni is far better on follow-through than I am, and he brought that breadth and depth of experience to the Design Lab stage for that venue’s last talk of the 2019 Superconference, before the party moved next door for the badge-hacking presentations.

Continue reading “Bitluni Brings All The ESP-32 Multimedia Hacks To Supercon”