Hacker News new | ask | show | jobs
by kkielhofner 1282 days ago
I love seeing more ESP32 based projects and hardware. It’s a remarkably capable platform with a robust ecosystem that for a “microcontroller” somewhat resembles that of the Raspberry Pi.

I have an irrational frustration when I see people doing simple GPIO, etc with a Raspberry Pi 4 (when you used to be able to get them). I mean come on people, it has four cores, gigabytes of RAM, and can drive two 4k displays(at 30Hz) and you’re using a pin?!?

The Raspberry Pi has relatively low power consumption compared to what most people are used to with anything x86 but an ESP32 based solution comes in at 1/10 the power consumption (or less), a fraction of the cost, and you can actually get them these days.

Then I calm myself down when I remember GPIO on a Raspberry Pi is following one of the 100,000 guides that’s been written on the topic and can be done in a comfortable, standard Linux environment with a few lines of python (or whatever).

Question for this project - does anyone know the specific regulatory issues of a “commercial” product that calls for an external WiFi antenna? From my little understanding on the topic it seems that ERP, etc could pose a regulatory issue although I think there are exceptions for low scale/hobby products.

3 comments

I love it, because the ESP32 is more powerful than this little one,

https://en.m.wikipedia.org/wiki/PC1512

Many folks don't have a real perception of how powerful these little computers happen to be.

Although not the same, everything from around MS-DOS 3.3 - 5.0 time that could fit onto 512KB would be a possible application, plus the extra cores and connectivity options.

The ESP32 is stronk. I wasted a bunch of time implementing fixed point maths and lookup table trig functions because “of course” before testing it and finding that for our purposes just calling sin/cos wasn’t an issue.

Edit: If you’re doing ‘real’ real-time stuff then make sure you get a dual core model and use core 2 for time sensitive things, though. The wifi stack uses up some solid chunks of time.

To be fair, back in the day most likely you have had to use fixed point math. :)
Yep, I think the last proper embedded project I worked on before this one was on an i386EX running at 40MHz, trying to eke 40KHz sample rate processing the output of a line scan CCD. I, a brash 22yo, declared it impossible to process ~250 pixels in 10 clock cycles (there was DMA and cool dual-port RAM stuff going on). My boss at the time explained the obvious way to approach it and I tried again, I think I got to 36KHz or something after pulling out all the stops. Fun times.

The idea that you could just use trig functions and get away with it on a micro is still kinda foreign. :P

The problem is that today, a lot of programmers remember that and ignore the fact that you can often do floating point math on a modern real time system and meet all your deadlines.

Just last week I fixed a bug in such a system: in an effort to speed things up by avoiding floating point math, calculations were done with uint32_t's and the developer(s) didn't notice that in some cases there was an internal overflow before the final result was produced.

You could stick the equivalent of a BBC micro in a matchbox and have room for a battery. Whole generations of programmers cut their teeth on platforms like that.
ESP-32 is a little computer that is very capable but this new breed of low cost SoC is really taking it to the next level [1].

This new SoC has MMU for full Linux installation, NPU for AI processing and network peripherals for IoT.

[1]The $8 Linux Computer:

https://news.ycombinator.com/item?id=34024914

Wish there was an ESP64 with just enough RAM to run a Debian distro, even slowly, so we could stop waiting for Zeros to get cheaper.
You can run Armbian and DietPI (both Debian derivatives) on most small boards; some like the NanoPI NEO are in the same price ballpark as the Pi Zero, but are in stock.

https://www.friendlyelec.com/index.php?route=product/product...

https://www.armbian.com/download/?device_support=Supported

https://dietpi.com/#download

This new breed of similarly price low cost SoC is an awesome alternative to ESP-32. It has MMU for full Linux installation, NPU for AI processing and network peripherals for IoT [1],[2]:

[1]The $8 Linux Computer:

https://news.ycombinator.com/item?id=34024914

[2]Sipeed M1s DOCK development board:

https://wiki.sipeed.com/hardware/zh/maix/m1s/m1s_dock.html

BeagleBone has always been an option. The cool kids just choose to ignore it.
It is quite expensive (US$ 50-ish). In 2023 we should have plenty of $2-5 chips capable of running a normal distro of Linux.
I have a BBB in a drawer somewhere. It's a very nice platform, but I quickly realized that for the $50, I could use a $30 RasPi B+ (back when you could get them) talking to a $2 arduino clone and accomplish the same thing far more easily.
rp2040 might be a good alternative nowadays, esp with its PIO blocks. esp32 might have some other political "risks" these days as it is made in china.
I am not sure why the Raspberry Pi Pico abandoned the 40 pin interface. It would be really cool to be able to develop C or Python code both under Linux, for ease of editing and debugging, and then run it on a microcontroller.
pico does have 40 pins, and yes I develop all c/python on it under x86 linux, you can also develop it on a Raspberry Pi.
I mean the 2x20 header. It's become a standard for Linux SBCs but not for microcontrollers.

The Pico doesn't let you use a Raspberry Pi with ssh to develop your code using the very same hardware modules that you will use on the microcontroller. You need to either make a mess of jumper cables, or cross compile and transfer the executable constantly over serial.