Mining Bitcoin On The ESP32 For Fun, Definitely Not Profit

Bitcoin’s great, if you sold at the end of 2017. If you’re still holding, your opinion might be a little more sour. The cost to compete in the great hashing race continues to rise while cryptocurrency values remain underwhelming. While getting involved at the top end is prohibitively expensive, you can still have some fun with the basic concepts – as [Jake] did, by calculating Bitcoin hashes on the ESP32.

It’s a project that is very much done for fun, rather than profit. [Jake] notes that even maxing out both cores, it would take 31 billion years to mine one block at current difficulty levels. Regardless, the underlying maths is nothing too crazy. Double-hashing the right data with the SHA256 algorithm is all that’s required, a task that is well within the ESP32’s capabilities. There’s hardware acceleration available, too – though this is weirdly slower than doing it in software.

Overall, you’re not going to get rich hashing Bitcoin on a cheap microcontroller platform. You might just learn something useful, though. If this isn’t weird enough though, you could always try the same thing on a 1970s Xerox Alto. 

 

RemoteDebug For ESP Platforms

Debugging tools are critical to quick and effective development. Without being able to peek under the hood at what’s really going on, it can be difficult to understand and solve problems. Those who live on the Arduino platform are probably well acquainted with using the serial port to debug, but it’s far from the only way. [JoaoLopesF] has coded the RemoteDebug tool for ESP platforms, and the results are impressive.

RemoteDebug does away with the serial interface entirely, instead using the ESP’s native wireless interface to send debug data over TCP/IP. It’s all handled over telnet, making it completely platform agnostic. By handling things over the WiFi connection, it negates issues with physical access, as well as hassles with cables and limited serial ports. It’s also of benefit to robotics projects, which no longer need a tether when debugging.

It comes with a similar set of features to [JoaoLopesF]’s earlier work, SerialDebug. Things like verbosity and timestamps are all built in, making it easy to get high-quality debug data without having to reinvent the wheel yourself. Video after the break.

Continue reading “RemoteDebug For ESP Platforms”

ESP32 Drives Controllerless Display Using I2S Hack

It’s possible to find surplus LCDs in all kinds of old hardware. Photocopiers, printers – you name it, there’s old junk out there with displays going to waste. Unfortunately, unlike the displays on sale at your favourite maker website, these often lack a controller and can be quite difficult to drive. [pataga] took on the challenge to drive a LCD of unknown provenance, using the power of the ESP32.

The LCD in question is a 240×160 monochrome device, that was initially being driven successfully with a Microchip PIC24 with a dedicated LCD driver peripheral. This allowed [pataga] to study the display interface under working conditions with the help of an oscilloscope. Inspiration was then taken from a project by [Sprite_tm], which used the I2S peripheral to drive a small LED display without placing load on the CPU.

Using the ESP32’s I2S peripheral in parallel mode makes it possible to shift data out in the correct format to drive the LCD without bit-banging IO pins and using up precious CPU time. This leaves processor cycles free to do interesting things, like generating 3D images using [cnlohr]’s routines from the Channel 3 project. There’s a little extra work to be done, with the frame signal being generated by an external flip flop and some fudging with the arrangement of various registers, but it’s a remarkably tidy repurposing of the I2S hardware, which seems to be the gift that keeps on giving. (Here it is spitting out VGA video through a resistor DAC.)

Code is available on Github for those looking to get at the nuts and bolts of the hack. It’s another build that goes to show, it’s not the parts in your junk box that count, but how you use them.

A Coin Cell Powers This Tiny ESP32 Dev Board

Just for the challenge, just for fun, just for bragging rights, and just to do a little showing off – all perfectly valid reasons to take on a project. It seems like one or more of those are behind this tiny ESP32 board that’s barely larger than the coin cell that powers it.

From the video below, [Mike Rankin] has been working down the scale in terms of powering and sizing his ESP32 builds. He recently completed a project with an ESP32 Pico D4 and an OLED display that fits exactly on an AA battery holder, which he populated with a rechargeable 14550. Not satisfied with that form factor, he designed another board, this time barely larger than the LIR2450 rechargeable coin cell in its battery holder. In addition to the Pico D4, the board sports a USB charging and programming socket, a low drop-out (LDO) voltage regulator, an accelerometer, a tiny RGB LED, and a 96×16 OLED display. Rather than claim real estate for switches, [Mike] chose to add a pair of pads to the back of the board and use them as capacitive touch sensors. We found that bit very clever.

Sadly, the board doesn’t do much – yet – but that doesn’t mean we’re not impressed. And [Mike]’s no stranger to miniaturization projects, of course; last year’s Open Hardware Summit badge was his brainchild.

Continue reading “A Coin Cell Powers This Tiny ESP32 Dev Board”

Eurorack Gets A Wireless MIDI Connection

Modular synthesizers have been around since the early 1960s, delivering huge tonal possibilities from their impressive and imposing patchbays. In 1996, the Eurorack standard was launched, and has become the go-to choice for enthusiasts new to the world of modular synthesis. [Rich Heslip] is just one such enthusiast, and has brought Bluetooth MIDI to Eurorack with his Motivation Radio module.

[Rich]’s module is built around the ESP32, which provides plenty of processing power, along with all the necessary radio hardware to communicate over Bluetooth. The unit packs plenty of connectivity into an 8HP wide panel, with four gate inputs and outputs, four CV inputs and outputs, and serial MIDI in and out.

Thanks to its Bluetooth connection, Motivation Radio makes it easy to pass note and gate data into a Eurorack setup, and can be used with the wide variety of tablet and smartphone MIDI software on offer. If you’re eager to build your own, PCB and panel designs are available courtesy of [jakplugg] and [Rich] has shared the software on Github.

Of course, if you prefer MIDI over USB, [little-scale] has the build for you. Video after the break.

Continue reading “Eurorack Gets A Wireless MIDI Connection”

Badge.Team: Badges Get A Platform

Electronic conference badges are now an accepted part of the lifeblood of our community, with even the simplest of events now sporting a fully functional computer as an eye-catching PCB on a lanyard. Event schedules and applications are shipped on them, and the more sophisticated ones have app libraries and support development communities of their own.

The trouble is that so often those badges fail to live up to their promise, and one reason behind that stems from the enormity of the task facing a badge team when it comes to firmware for a modern badge. There is some fascinating news from the Netherlands  that might reduce some of those firmware woes though, badge.team is a freshly-launched project that provides a ready-made badge firmware with the promise of both stability and long-term support. If you’re making a badge, or even a one-off device using the ESP32, this is a project worth checking out.

Continue reading “Badge.Team: Badges Get A Platform”

Inefficient NeoPixel Control Solved With Hardware Hackery

Everyone loves NeoPixels. Individually addressable RGB LEDs at a low price. Just attach an Arduino, load the demo code, and enjoy your blinking lights.

But it turns out that demo code isn’t very efficient. [Ben Heck] practically did a spit take when he discovered that the ESP32 sample code for NeoPixels used a uint32 to store each bit of data. This meant 96 bytes of RAM were required for each LED. With 4k of RAM, you can control 42 LEDs. That’s the same amount of RAM that the Apollo Guidance Computer needed to get to the moon!

His adventure is based on the thought that you should be able to generate these signals with hardware SPI. First, he takes a look at Adafruit’s DMA-Driven NeoPixel example. While this is far more efficient than the ESP32 demo code, it still requires 3 SPI bits per bit of NeoPixel data. [Ben] eventually provides us with an efficient solution for SPI contro using a couple of 7400 series chips:

Schematic of SPI to NeoPixel circuit using 74HC123

[Ben]’s solution uses some external hardware to reduce software requirements. The 74HC123 dual multi-vibrator is used to generate the two pulse lengths needed for the NeoPixels. The timing for each multi-vibrator is set by an external resistor and capacitor, which are chosen to meet the NeoPixel timing specifications.

The 74HC123s are clocked by the SPI clock signal, and the SPI data is fed into an AND gate with the long pulse. (In NeoPixel terms, a long pulse is a logical 1.) When the SPI data is 1, the long pulse is passed through to the NeoPixels. Otherwise, only the short pulse is passed through.

This solution only requires a 74HC123, an AND gate, and an OR gate. The total cost is well under a dollar. Anyone looking to drive NeoPixels with a resource-constrained microcontroller might want to give this design a try. It also serves as a reminder that some problems are better solved in hardware instead of software.

Continue reading “Inefficient NeoPixel Control Solved With Hardware Hackery”