Close

Taking a look at the ESP8266

A project log for STM32Miner

Mining cryptocurrency with a lot of STM32F030

ho-tuan-kietHo Tuan Kiet 05/28/2018 at 03:420 Comments

In the last log, I mentioned that the ESP8266 might be a good competitor to the F030 due to:

tl;dr: The ESP-12 does 8620 SHA256d operations per second (or 116usec per operation). This is 3.36x faster than the F030

At first, I didn't have high hopes for the ESP. While I know that the ESP and the F030 is pretty comparable except for the much higher clock speed, the ESP should be beating the F030 out of the water. Except had already implemented a Bitcoin miner on the ESP, and he only managed to get it to ~1200 ops/sec. That was quite counter-intuitive, so I decided to try it out by myself to see if it was really that bad, and if I could do anything to improve it.

But first I need a USB-to-UART dongle. The CP2102 is pretty nice by the way.

Then I loaded the same code that MerlotMachine used to my ESP8266. The result came out to be about 800usec per op, or just about 1250 ops/sec. Increasing the clock to 160MHz only made it a little bit more faster, at about 700usec/op or 1428 ops/sec. Basically I was hitting a brick wall here.

Then I decided to look through the SHA256 implementation, and this seem like a pretty bad one. So I replaced it with the one that I used on the F030. Boom, now it took only 116 usec/ops (or 8620ops/sec). I though it would be fast, but not this fast.

I'd account these two reasons for this drastic difference between the ESP and the F030:

So from that, the ESP looks like a very competitive alternative to the F030. But then here are some more comparisons:


STM32F030F4P6ESP8266
Hashing rate256486203.36x
Price$0.7$1.98-2.82x
Power consumption[TBD]
[TBD][TBD]
PCB efficiency (on a 5x5cm board)86 (ESP-01)
4 (ESP-12)
-2x
HeatCan't feel anyHot???

Might as well stick with the F030 then.

Disclaimer: I'm biasing towards choosing the F030.

Discussions