18 ms·
ESP32 Buyer’s Guide: Different Chips, Firmware, Sensors
- knaik94 4y agoI have been interested in Lilygo products does anyone have any experience using specific Lilygo esp32 boards?
- mhb 4y agoThis guy has some good videos using Lilygo stuff: https://www.youtube.com/watch?v=FHCYOlqoSUo https://www.youtube.com/watch?v=FHCYOlqoSUo
- knaik94 4y agoThat youtube channel is wonderful, thank you for the link. I'm not sure why I missed it earlier.
- wepple 4y agoI experimented with their TTGO LoRa boards and gave up out of frustration. That said, folks (including less technical) seem to have success with them for things like the meshtastic project, so they can’t be terrible. YMMV
- deeesstoronto 4y agoI've been very happy with their esp32 boards. Easy, cheap, well integrated. The only issue I've had is the battery charger circuit on some boards has a fuse instead of a diode making it a hazard (realized pretty quickly while testing). This is supposedly fixed on newer revisions but there's always a chance of getting an old one through some sources....
- kelchm 4y agoThey have been quite good in my experience. I particularly like the T5 4.7 and 2.13 which include integrated e-paper displays.
- thenthenthen 4y agoI have used and deployed the ttgo lora boards. The boards are a bit cramped, soldering the headers requires you to remove the screen in order not to melt the ribbon cable (w I didnt try). But they work. Zero problems in the field but two out if 20~ died on my bench while just coding/out of nowhere. Furthermore, IIRC, the default i2c pins used in many libraries are used for lora/oled so you need to define two custom pins using TwoWire for example.
- doubleg72 4y agoI used a couple for automated garage doors and I also build a little CDP/LLDP query tool to determine what switch port unlabeled Ethernet drops are connected to. The door openers are bulletproof and haven't had any issues with my tool either.
- zdw 4y agoIs your CDP/LLDP hardware tool public?
- brk 4y agoThey're hit or miss. I've used a few of their various boards successfully, but you usually wind up hunting down random libraries or having to tweak old code examples. I wouldn't use them for my first foray into ESP32, but if you're fairly decent at debugging C, you'll probably be fine.
- toast0 4y agoI built a clock with iCal support with the LILY Pi. Everything seemed to work, although I found it challenging to reproduce the example application, but once I did, things were fine. Eventually, I rearranged to build in Visual Studio with platform.io which I like a lot more; I feel there's more clarity than the Arduino IDE. Currently I have one device at home, and a second in the field, which a friend is planning to use once I make some timezone adjustments (Google stopped providing vtimezone data for new calendars, apparently, so I need to get it somewhere else).
- worldmerge 4y agoThe eye in the corner is cute, nice job.
- eitherway 4y agoThank you!
- fIREpOK 4y ago> ESP32-C6 If you need Wi-Fi 6 or ZigBee Support, this is the SoC you want to look for. I don't think that you can buy this one yet..
- knaik94 4y agoIt was actually launched in Jan 2023. It's been mostly out of stock, but a bare module with 4mb spi flash is in stock right now. However, currently populated dev boards are overpriced. https://www.adafruit.com/product/5670 https://www.adafruit.com/product/5670 edit: I'd wait to buy it regardless, software and sdk is still under active development. https://github.com/espressif/esp-idf/issues/10423 https://github.com/espressif/esp-idf/issues/10423 https://www.reddit.com/r/esp32/comments/10pkuin/esp32c6_reality_check/ https://www.reddit.com/r/esp32/comments/10pkuin/esp32c6_real...
- moffkalast 4y agoRight now it's the best time to buy "obsolete" Devkit V1 boards ;)
- fIREpOK 4y agoOnly one with Zigbee and Wi-Fi 6
- knaik94 4y agoIt supports wifi 6 but only on 2.4 ghz.
- moffkalast 4y agoHaha, that's like saying you eat vegetables while only eating tomatoes.
- fIREpOK 4y agoat least it's not saying like asking for microUSB and getting USB-C...
- mytailorisrich 4y agoThe ESP32-C3 has a limited number of IOs but it is very small and has a connector for an external antenna (At least the Seeed Xiao ESP32-C3 does). It's great for many applications when a bit of Wifi range is needed.
- brainzap 4y agofor playing around you probably want one with USB mount and circuitpython
- beardyw 4y agoI did some playing around with ESP8266 and found dealing with HTTPS to be a pain when certificates changed. Have things improved?
- eitherway 4y agoEncryption in General on the ESP32 is difficult. I haven't used it, but there now seems to be some good support in the ESP-IDF Framework: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/protocols/esp_tls.html?highlight=tls#overview https://docs.espressif.com/projects/esp-idf/en/latest/esp32/...
- realharo 4y agoIf you're just making HTTPS requests to your own servers, you can simply include the root certificate of the CA you're using, pass it to the config when calling `esp_http_client_init` (https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/protocols/esp_http_client.html#_CPPv4N24esp_http_client_config_t8cert_pemE https://docs.espressif.com/projects/esp-idf/en/latest/esp32c...) and then you probably don't have to worry about it for a long time, it will work through your regular certificate rotation. See https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/protocols/esp_http_client.html#https-request https://docs.espressif.com/projects/esp-idf/en/latest/esp32c... If you need to make requests to other people's servers, there is a tool to generate and include a bundle from Mozilla, that you can update in the future as part of an OTA update (https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/protocols/esp_crt_bundle.html#updating-the-certificate-bundle https://docs.espressif.com/projects/esp-idf/en/latest/esp32c...).
- wepple 4y ago“ESP32-S2 Old version of the ESP32-S3. ESP32-S3 Low power. Dual-core. Wi-Fi and Bluetooth LE. 45 GPIOs. Camera Support. AI Support.” That’s weird phrasing to say that the S2 is the older version, rather than the S3 is newer. Also, the AI links to a GitHub for doing ML on all versions - exactly what is this “AI support”? IMO the most interesting thing between the ESP32-Cx and ESP32-Sx is that the C is a RISC-V architecture
- wepple 4y agoThis is a better overview of the hardware: https://gist.github.com/sekcompsci/2bf39e715d5fe47579fa184fa819f421 https://gist.github.com/sekcompsci/2bf39e715d5fe47579fa184fa...
- eitherway 4y agoThis guide was mainly intended for beginners like me who didn't know the ESP platform yet (like me a few months ago). I'm also working on my writing skills. So forgive me for styling errors. I know the ESP32-Cx is based on the RISC-V architecture. Could you elaborate why this is a feature or in what way this is an advantage?
- mordae 4y agoYou don't need xtensa toolchain and use whatever your distro ships for one. A drawback is that ESP32 RISCV cores don't feature FPU, if I am remembering correctly.
- wepple 4y agoI realized after posting that this is a personal blog, not a corporate one - so I do regret and apologize for being rather blunt. (I think the .io and me misreading as “etherway” made me think it was company-published and for right or wrong I assume companies only ever blog for brand recognition, so am probably over critical of them) That’s partly a big compliment - your blog is really well styled and easy to read. RISC-V is a fairly popular topic on HN, and for me at least it’s really interesting as both a low-level nerd, as well as curiosity about what impact it may have given we lived in an x86 world for a long time, before ARM really took hold, and now that there’s a new player and it’s an open standard is really interesting. Could it be the “Linux kernel” of the hardware world? I have probably 20x ESP8266s doing various things in my life, maybe 5x ESP32-Sx, and will probably pick up a few -Cx, and they’ll be the first RISC-V device I own.
- myself248 4y agoThe -S2 (and -S3?) have native USB so you don't need a USB-UART chip on-board, and they can thus emulate other classes of USB devices. That's something I was hoping to find mentioned in this guide, but nope.
- tomn 4y agoYeah, this is great if you're making your own PCBs -- all you need is the ESP32 module, power supply and a USB connector. There's no need for a usb-serial converter, JTAG connector (you can debug over USB), or a serial header with yet another random pinout that you have to figure out every time you want to program the thing...
- girvo 4y agoExactly! Our board at work got all our JTAG pins back for us to use for other things, and we got a more robust programming/debugging setup to boot. So nice. The S3 is phenomenal, and the LX7 on it is surprisingly powerful too.
- tomn 4y agoNice. They also tidied up the GPIOs a lot, which is such a good quality of life improvement (though I did spend a while hunting through the datasheet looking for the bit where they tell you that GPIO7 can only be used as an output during a full moon, or whatever).
- realharo 4y agoESP32-C3 also has built-in USB serial/JTAG functionality (https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-guides/usb-serial-jtag-console.html https://docs.espressif.com/projects/esp-idf/en/latest/esp32c...). Unlike the ESP32-S ones though, that's all it does on the C, so you can use it to program and debug the thing, but you cannot make your own USB device with it.
- doug_life 4y ago
- jvm___ 4y agoI want to build a game with - a wireless led (a 5-light length of a led strip would work) - a camera or other module to tell what color ball is in front of it And a controller to change multiple of the wireless LED lights based on different cameras... Is ESP32 suitable?
- dvh 4y agoEsp32-cam has 4 available gpio pins (there are 2 more pins but one is used by SD card and one is connected to built-in flash) plus 2 uart pins. With narrow angle camera it costs around $6. Wide angle camera costs $4 or so. You need serial port to program it. There are some other limitations you'll only find when you start playing with it like DAC not working when wifi is on. So theoretically you can control 6 LEDs directly. On one 18650 battery it lasts 2 hours. -------------- | SDCARD | 5V -|1 16|- 3V3 GND -|2 CAMERA 15|- GPIO_16 (useless, can't be used for anything) A GPIO_12 -|3 14|- GPIO_0, connect to GND during programming, used by camera, don't use! A GPIO_13 -|4 13|- GND A GPIO_15 -|5 12|- 3V3/5V A GPIO_14 -|6 11|- UART RX, GPIO_3 A GPIO_2** -|7 10|- UART TX, GPIO_1 A GPIO_4* -|8 9|- GND (weird, don't use) | LED | -------------- - A=analog input 0..4096 - GPIO_4 is connected to FLASH LED, if you want to use as input you need to desolder resistor R13 that goes to base of npn transistor - GPIO_2 is HS2_DATA0 for SD card, it has 47k pullup
- squarefoot 4y agoYou may want to check out the ESP-EYE module. https://www.espressif.com/en/products/devkits/esp-eye/overview https://www.espressif.com/en/products/devkits/esp-eye/overvi...
- jvm___ 4y agoAny suggestions for remotely switching LEDs on and off within a system that can also read the camera.
- 4y ago
- Saris 4y agoThe S3 also has RGB display support which is great for projects with a display. The IPS version of this is my current favorite: https://www.aliexpress.us/item/3256804766379290.html https://www.aliexpress.us/item/3256804766379290.html
- joemi 4y agoWhat does that mean? You can hook and RGB display up to pretty much any microcontroller, as far as I know.
- Saris 4y agoNormally only if the display has its own controller, and you talk to it via SPI, i2c, or an 8 or 16 bit interface. But those methods are slower and if you're doing a higher resolution user interface, the RGB interface lets you drive stuff like an 800x480 display at well over 60 fps.
- joemi 4y agoAh, I see. I didn't get that it meant it had a controller built in. Interesting!
- Saris 4y agoThey're pretty neat! I've been playing around with one of these lately, it uses the ESP32-S3: https://www.aliexpress.us/item/3256804766379290.html https://www.aliexpress.us/item/3256804766379290.html
- briHass 4y agoFor those looking for cheap dev boards, I've had good luck with 'HiLetgo' on Amazon. The WROOM-32S is my go-to, but I also use the WROOM-32U when I need an external antenna (it _must_ be connected) or the 32S+CAM module for the camera. I haven't gotten a DOA component yet. The Ali prices aren't significantly cheaper than many of the sellers on Amazon (at least in small quantities), you don't have to wait a month, and if you get a dud, replacements are easy. Even though I started with the 8266, as the article mentions, there's little reason to choose that outdated board at this point. It's worth the extra $1 to get the 32 in a DEV board configuration. Having the CP210x and USB onboard is also worth it for the hobbyist.
- JOnAgain 4y agoWith a data point of 1, I had a bad HiLetgo ESP32 dev board, and I now avoid them.
- jakupovic 4y agoI bought a bunch of them and also second their ease of use. Basically my go to board too, for simple stuff.
- tazard 4y agoAmazon is giving me prices of $25-$35 for all the esp32, including the hitletgo you mentioned. Ali is $1.5-$2. Amazon also says 2+weeks deliver for many, Ali says 3 weeks. I'm in Canada
- crims0n 4y agoMy new HomePod was delivered yesterday and while exploring I discovered HomeKit now has Matter support. I have a few ESP 32s lying around and wondered if I could connect them directly instead of bridging through ESPHome / Home Assistant. Apparently you can! Will be trying it out later: https://docs.espressif.com/projects/esp-matter/en/main/esp32/index.html https://docs.espressif.com/projects/esp-matter/en/main/esp32...
- MegaDeKay 4y agoWhoa. You can also use their ecosystem to put together a Thread border router! I think your HomePod might integrate that functionality already, but this is super interesting for someone like me and my old trusty Asus wifi router. https://github.com/espressif/esp-idf/tree/master/examples/openthread/ot_br https://github.com/espressif/esp-idf/tree/master/examples/op...
- balloob 4y agoIt’s possible. We’ve published a couple of example apps for ESP32 variants build from the official SDK. You can find them at https://nabucasa.github.io/matter-example-apps/ https://nabucasa.github.io/matter-example-apps/
- stavros 4y agoIt looks like that's Matter Wifi, though, rather than using the Thread protocol (which may be fine for your needs, I don't know much about Matter).
- scotty79 4y agoThere's a really cool language for programming ESP32 which feels like crossbreed of Python and Ruby with smallest possible syntax for that semantics: https://docs.toit.io/language/#toit-language-basics https://docs.toit.io/language/#toit-language-basics
- kasperl 4y agoThank you for the mention! I have been working on the Toit language for the ESP32 for a number of years now -- and it has been an enjoyable challenge to build an open source stack capable of supporting live reloading on a micro-controller that can run for years on batteries. https://github.com/toitlang/toit https://github.com/toitlang/toit
- petre 4y agoThere'salso tge Berry language tha's built into tasmota32. https://github.com/berry-lang/berry https://github.com/berry-lang/berry
- shoelessone 4y agoCan somebody tell me the difference between `ESP32-WROOM-02` and `ESP32-WROOM-02-H4`?
- antoniuschan99 4y agothe H is usually the flash size I think?
- martin_a 4y agoESP32s are _sick_! I've only been building things with Arduino Uno/Nano/Mega (clones) so far and they are kind of limited. Those ESP32 I've now got seem to have _everything_ onboard: lots of IO pins, hardware PWM (although I do not understand that fully yet), WiFi, Bluetooth, hall and temperature sensor onboard. All of that for 8 Euro/piece. It's sick for IoT projects, really looking forward to doing more of that. I've got these: https://www.amazon.de/dp/B074RGW2VQ https://www.amazon.de/dp/B074RGW2VQ edit: I'd love if Arduino et. al. would start using USB-C plugs though. I've got everything from USB-A to micro USB around here and I'm constantly looking for the right cable to use a board. Does anybody know why they haven't switched to USB-C yet?
- skybrian 4y agoShop around, there are boards that have USB-C connectors. I've seen some on Adafruit.
- martin_a 4y agoThanks, I'll have a look around!
- Gigachad 4y agoI suspect USB-C connectors just cost 5 cents more so they aren't used on most dirt cheap dev boards. I've seen adafruit update their stuff to USB-C but they also charge a good premium over the generic ebay clones.
- girvo 4y agoAmusingly, the PWM output we do on our firmware is actually done using the RMT infrared remote control peripheral instead, as the LED strips we need to control are too fast for the internal PWM controller lol
- martin_a 4y agoI just had a quick glance at the PWM documentation but I don't fully grasp it anyway: I select one of the 16 internal PWM controllers, set it's clock/frequency and then bind an output pin to that. I thought that fading a LED would then stick to the frequency of the PWM controllers, but it seems I still have to take care of the speed? I thought setting the PWM frequency to 100 Hz and cycling my LED brightness from 1 to 100 would take 1 second. It doesn't work that way it seems?!?
- synergy20 4y agoJust got into IOT devices and I am using RP2040 boards(with wifi and without wifi, bluetooth is enabled now I think), what's the advantage of ESP32 to RP2040 these days? It's $4 ~ $6 a piece and also is solder-able to your base-board if you need make your own, it of course runs on its own without any base-board perfectly fine.
- 1023bytes 4y agoRP2040 itself definitely doesn't have WiFi or Bluetooth
- tony-allan 4y agoMany of the boards you can buy have an ESP32 for wifi. I quite like the separation between the two functions.
- Saris 4y agoCompared to the ESP32-S3, the RP2040 doesn't have Wifi/BT, doesn't have an RGB display controller, has slower clocks, and has less RAM and Flash. For most IoT devices the ESP32-S3 is overkill unless running a large display, and you could use the cheaper ESP32-C3, which has 1 core instead of 2, no RGB interface, and less GPIO. These run about $2 each for a solder-able module with built in antenna: https://www.digikey.com/short/cttthh0h https://www.digikey.com/short/cttthh0h Or $6 for a dev board with USB built in: https://www.digikey.com/short/9rp1zbb3 https://www.digikey.com/short/9rp1zbb3 I'd compare the RP2040 more to your classic STM32 arduino dev board, with the ESP series in another class above those.
- skybrian 4y agoThe RP2040 chip doesn't have WiFi but the Pico-W board certainly does and we've used it: https://www.adafruit.com/product/5526 https://www.adafruit.com/product/5526 Bluetooth support is supposed to be added in the next version of the SDK.
- 4y ago
- realharo 4y agoESP32 also has pretty good Rust support https://github.com/esp-rs https://github.com/esp-rs
- brink 4y agoSupport for the ESP8266 I had sitting in my desk drawer is a little rough, the code templates they provide don't seem to work out of the box. I gave up and am just buying an ESP32. Should be a much better experience, I'm hoping.
- IMcD23 4y agoA word of warning on this. It uses a custom fork of LLVM/Clang/Rust which adds support for a new architecture. The tooling that sets up this environment has failed in obscure ways each time I’ve attempted to set up and build one of their own hello world samples.
- steveklabnik 4y agoThe llvm patches were up streamed a few weeks ago, so that should help significantly once it trickles into releases of the actual compilers.
- sergiogasquez 4y agoHave you tried with espup(https://github.com/esp-rs/espup https://github.com/esp-rs/espup)? We`ve updated Xtensa tooling not long ago, for more details have a look at the book: https://esp-rs.github.io/book/installation/installation.html#espup https://esp-rs.github.io/book/installation/installation.html...
- pantalaimon 4y agoS2 and C2 are not old versions of S3 and C3 (C2 isn't even released yet), they are just cut down/lower cost version (but also with some added features for low power operation).
- eitherway 4y agoUups. You are right. Although, in my defence the S2 was released prior to the S3. Corrected it.
- antoniuschan99 4y agoalso s2 only has wifi
- pantalaimon 4y agoand H2 only has 802.15.4 (but also not released yet)
- efraim 4y agoIf it's a guide maybe you should mention that the original ESP32 is still for sale and still faster than some of the newer alternatives. There is also a new faster risc-v based variant without wifi/bt that was recently presented called ESP32-P4. All current variants: https://www.espressif.com/en/products/socs https://www.espressif.com/en/products/socs
- eitherway 4y agoWhat use case does the ESP32 have? Wouldn't it be better to just recommend the S3, where there is currently only one version available? There are like a dozen different versions for the ESP32. "Two or one CPU core(s) with adjustable clock frequency, ranging from 80 MHz to 240 MHz" In this case it seems to be the better choice to just use the ESP-S3 with better encryption support and support for Cameras.
- 4y ago
- JoeAltmaier 4y agoI wish the BSP was more robust. You try much, it dies. E.g. open/close connections to an IoT server out there repeatedly. Or try to talk to two endpoints over network with any kind of bandwidth. Even the serial code is fragile. It's good for proof-of-concept hobby projects. But on the job we've had to repair the BSP each time.
- eitherway 4y agoCould you elaborate what a BSP is? I am only starting in the IOT Hardware World.
- JoeAltmaier 4y ago'Board Support Package'. The library that FreeRTOS links to or whatnot, custom to each board shipped (a board being, SOM on a little dev card etc) They vary massively. Usually written in a sweatshop in the far east by students, pushed out and forgotten because they are table stakes but not a profit center. They usually include support for board boot, threads, timers, and something that looks like networking. I say 'looks like' because they are often paper-thin implementations of a familiar API, with little or nothing inside. No proper flow control; no dynamic anything. Not even thread-safe as a rule.
- pantalaimon 4y agoThe problem with ESP8266 is that the toolchain is not updated anymore, so you will forever be stuck with GCC 5.2
- rwaksmunski 4y agoOn the other hand the RISC V ones are good for decades to come.
- cmason 4y agoIf you’re into e-paper check out this board based on ESP32-S3 from Lily Go. They also have a touch screen for it. https://www.lilygo.cc/products/t5-4-7-inch-e-paper-v2-3 https://www.lilygo.cc/products/t5-4-7-inch-e-paper-v2-3 I’m working on a rust-based information display browser for it.
- doug_life 4y agoThere is a newer v3 out https://www.lilygo.cc/products/t5-4-7-inch-e-paper https://www.lilygo.cc/products/t5-4-7-inch-e-paper
- sergiogasquez 4y agoLooks really interesting, do you mind sharing it (if its open-source) once its done? Probably it could be a great addition to https://github.com/esp-rs/awesome-esp-rust https://github.com/esp-rs/awesome-esp-rust
- stavros 4y agoOooh please share the source, that would be excellent.
- doug_life 4y agoAmazon has them: https://www.amazon.com/dp/B09FSLKB9Q https://www.amazon.com/dp/B09FSLKB9Q also from https://www.tindie.com/products/lilygo/lilygo-t5-47-inch-e-paper-esp32-v3-version/ https://www.tindie.com/products/lilygo/lilygo-t5-47-inch-e-p... and https://www.aliexpress.us/item/3256801819744140.html?gatewayAdapt=glo2usa4itemAdapt&_randl_shipto=US https://www.aliexpress.us/item/3256801819744140.html?gateway... if you can wait longer
- stavros 4y agoSorry, I already bought the display, I meant the Rust source code for the app. It would be a great example for making my own.
- pantalaimon 4y agoRIOT-OS has pretty good support for all of those btw https://doc.riot-os.org/group__cpu__esp32.html https://doc.riot-os.org/group__cpu__esp32.html
- eitherway 4y agoThank you for posting the link. I've seen this, but lost the link. Would you mind explaining what the advantage is over the ESP-IDF or the Arduino-SDK?
- pantalaimon 4y agoYou are using a vendor agnostic API, so your code will also work on a e.g. a STM32 or nRF52. e.g. the Bluetooth examples will run without modification on an nRF52 or ESP32 board.
- johnny_canuck 4y agoThis is great. I tried to spin up a small project over the Christmas break and got bogged down with so many options for buying an esp32 and then struggled working through the docs. I previously worked with an Arduino Uno years ago and that thing felt like it had a better UX for someone that is a real amateur when it comes to hardware. Glad to see a resource like this cut through the fog.
- eitherway 4y agoThank you for the nice compliment. I have felt exactly the same way and that's why I've written this post.
- elliottkember 4y agohttps://shop.m5stack.com/products/atom-lite-esp32-development-kit https://shop.m5stack.com/products/atom-lite-esp32-developmen... I cannot recommend the M5 stack highly enough. I did a lot of ESP32 programming for my LED art hobby projects from 2016-2020 and these are amazing.
- balloob 4y agoYep, these are the way to go. Small and with a case, so ready to put around the house. Using just your browser you can transform these into Bluetooth proxies for Home Assistant with https://esphome.github.io/bluetooth-proxies/ https://esphome.github.io/bluetooth-proxies/
- _spduchamp 4y agoI've been using Wemos and other various 8266 and ESP32 boards but recently picked up a M5StickC PLUS and i dont think I'll ever go back to those little standalone boards. Having everything in a nice little case with battery and most of the sensors i need, it is def a good way to go. Poked around with that FlowUI stuff and it was just too creepy to have to have my microcontroller connect to a server across the globe to program it, so a switched back to Arduino and using OTA. The whole M5Stick ecosystem of addons it awesome too.
- no_time 4y ago>M5StickC PLUS I've been thinking about getting one but the I/O looks so anemic... Does it have extra pins on the inside or 3 GPIO's is all you get no matter what?
- anigbrowl 4y agoYes, there's a grove connector for 3.3v on one end and more GPIO that can handle up to 5v. They have a lot of i/o on that particular device already allocated - there's a screen, a beeper, a microphone, IR and LED out, an RTC, and a 6-way motion detector, plus the buttons and a small (120mAh) battery with charging management hardware. If you are unhappy about having that much power and flexibility for under $20 you might be a little hard to please :-) Larger units have 2, 3, or 6 grove connectors, plus a big library of pluggable peripherals.
- zamadatix 4y agoAnyone have a recommendation for something that can take 2 USB in and be the USB device to 2 separate up stream systems? I’d like to build something can pass through a keyboard and mouse to 2 systems but also embed some hot key actions and the like so it always works regardless if my preferred OS install is configured and booted.
- robbs 4y agoRaspberryPi can be both a USB host and a HID device. Sounds like a fun project!
- zamadatix 4y agoI thought about a Pi running a RTOS but I couldn’t find a way to get it to be a HID device to two different computers at the same time.
- tyingq 4y agoThe Teensy is very popular for acting as either USB host or peripheral and there's lots of projects to draw ideas and code from. The latest one only has 2 physical USB ports, so you would have to use a hub for your use case. I don't think you'll find a microcontroller with 4 physical ports anyway. https://www.pjrc.com/store/teensy41.html https://www.pjrc.com/store/teensy41.html
- zamadatix 4y agoHub for the inputs is fine but I think I'd need 3 physical ports in that case - 1 for the hub and 2 for the separate outs. However... it just occurred to me I could connect 2 together for cross signaling over the other pins and have 2 in and 2 out that way.
- tyingq 4y agoAnother idea, STM32Fxxx...3 physical USARTS in at least some of them. A project using it: https://github.com/satoshinm/pill_serial https://github.com/satoshinm/pill_serial Specs for one with 3 usbs: https://www.st.com/en/microcontrollers-microprocessors/stm32f103c8.html https://www.st.com/en/microcontrollers-microprocessors/stm32...
- karmicthreat 4y agoI have been using the M5Stack Tough for a product. It has worked reasonably well, though I have had a 10% defect rate on the touch digitizers. I will probably end up switching over to a product from https://www.makerfabs.com/ https://www.makerfabs.com/ for a larger display. But it has worked fairly well. The stack was: -Platform.io -ESP-IDF framework -LVGL an embedded ui framework that is pretty simple to use. -FreeRTOS Works great, its been reliable and it will probably remain my choice for the next couple years. One thing I would like is better Rust support. I have taken a look around and everything is just out of date bindings to C/C++ projects. Not a whole lot of native Rust, so I don't really feel the need to switch until that changes.
- sergiogasquez 4y ago> One thing I would like is better Rust support. I have taken a look around and everything is just out of date bindings to C/C++ projects. Not a whole lot of native Rust, so I don't really feel the need to switch until that changes. There are currently 2 approaches for Rust in ESPs: - std: Its built on top of ESP-IDF, so it ends up calling C functions. I guess this is what you've seen in the past. - no_std (bare-metal): Pure Rust implementation. See https://esp-rs.github.io/book/overview/index.html https://esp-rs.github.io/book/overview/index.html for more details
- xchip 4y agoIn general this guide is too high level. For example: what does it mean "Built-in battery support."? - will it allow you to monitor the battery charge? - can I charge it using the micro-USB - does it have undervoltage protection? - what is its quiescent voltage? - what is its consumption in deep sleep mode? As for the Esp32-Cam, those little camera modules are flawed, one of the pins act as a 20Mhz antenna and causes interference everywhere including itself, and your board might or might not work.
- analog31 4y agoGood point. Indeed, a closer look is needed in order to make use of any feature of a MCU board that's not built into the MCU itself. I've gotten in the habit of going straight to the schematic, e.g., for the Wemos C3 pico: https://www.wemos.cc/en/latest/_static/files/sch_c3_pico_v1.0.0.pdf https://www.wemos.cc/en/latest/_static/files/sch_c3_pico_v1.... Battery charging is handled by an external chip, so I've looked up its datasheet when I needed (for instance) to reduce the charging current. The schematic shows a voltage divider feeding one of the ADC inputs for battery monitoring. Also, no schematic, no buy. I've had good results with stuff from Wemos. I've also gotten boards that were definitely copies, worked fine, but caveat emptor.
- russianGuy83829 4y agoyeah, also the wroom wrover confusion
- sircastor 4y agoI had been using the 8266 in a personal project and this past year moved it over to the c3. I was excited to use a RISCV chip. That doesn’t really make a difference in the end, but I’m really pleased with it, especially after I stopped fighting the Arduino IDE and moved to PlatformIO - I had been reluctant to do so, but it’s really matured. Hunting around for answers about how the c3 works can be rough. There’s still not a lot of info about its quirks written up yet. But once you get into it, it’s great. And quite affordable.
- mkoryak 4y agoI tried to setup esp32-cam as a cheap security cam for my yard, but had a bad experience: - There are no good tutorials on how to have the cam save to SD. - streaming it is easy with esphome, but there is no easy way to save it since it doesn't use a normal streaming protocol - the camera image quality sucks. I got some 5mp cameras to use instead of stock camera, but the chip can't stream that resolution at anything above 2-3fps
- spicyjpeg 4y agoThe ESP32 is not really meant to be used with a camera. It has no hardware acceleration for the task, only ~500 KB of RAM (it can use external SPI PSRAM but not without massive performance penalties) and its radio is inadequate for high-bandwidth streaming. All those camera boards are basically a hack, they leverage the chip's parallel bus interface to receive data from a camera module with a built-in MJPEG encoder which does the heavy lifting; the data is then piped out as fast as the networking stack and radio can handle (i.e. not particularly fast). A proper SoC with a dedicated camera interface and an external WiFi chip is going to do a far better job than pretty much any of these microcontrollers; even the low-end Allwinner V3 often used in cheap Chinese IP cameras can run circles around the ESP32, even with the overhead of a full Linux kernel. Microcontrollers with hardware camera acceleration (including a soon-to-be-released ESP32 variant) are slowly becoming more common, but the original ESP32 isn't one of them.
- mmoskal 4y agoThe article doesn't mention plain ESP32 - the first in family, dual core. These are the most popular on Amazon etc. There is also ESP32-S0WD single core version.
- nicpottier 4y agoI really like the LilyGo boards. This one in particular is awesome if you aren't looking for battery power: https://www.amazon.com/LILYGO%C2%AE-T-Display-RP2040-Raspberry-Development/dp/B09J112YR7 https://www.amazon.com/LILYGO%C2%AE-T-Display-RP2040-Raspber...
- amelius 4y agoDo these boards include a Qualcomm Wifi chip? Or is the entire design made in China, including the CPU? Is the Wifi certified by the FCC?
- theatrus2 4y agoNo, the SoC is all inclusive. Various modules do carry FCC modular approval. The whole product needs to be certified of course.
- antoniuschan99 4y agoit's based on tensilica xtensa and newer ones are risc-v. The Wroom-32 are the ones that are fcc certified
- spicyjpeg 4y agoThe whole point of the ESP32 family is that the WiFi radio is integrated into the microcontroller itself, so the only external part required is some SPI flash memory for firmware storage. CE/FCC certification doesn't apply to chips, only to modules and products that include them, and there are several vendors (including well known names such as u-blox) offering pre-certified ESP32 modules that can be easily integrated into a custom design. Most of the development boards linked in the article are basically breakout boards for these modules.
- sowbug 4y agoDoes anyone know of a nicely packaged US smart plug that's not actually smart, but instead has an external input that I can plug a GPIO output into, and that has a solid-state relay so that I can PWM the plug? This is the closest I could find, but it uses a physical relay, so it would be loud and probably incapable of any reasonable PWM rate: https://www.amazon.com/gp/aw/d/B00WV7GMA2 https://www.amazon.com/gp/aw/d/B00WV7GMA2 I'm interested in playing around with sous vide. I realized I have all the parts (anything Arduino-like, basic AC immersion heater, water pump, thermocouple with MAX6675 interface) except the SSR. I could buy a $15 SSR, but if I'm adding one to my collection of tools for this and future projects, I'd prefer it look more like a smart plug than a mess of wires and terminals that could be a hazard in the kitchen. (Sorry to hijack, but can't resist this gathering of IoT enthusiasts.)
- fotta 4y agoShelly makes smart relays that you can put behind a standard plug.
- sowbug 4y agoThanks. I'm looking for something that can be put away when the project is done and that can be moved to other places and used in different projects. I could spend a weekend figuring out how to build something safe with a quad box, or I could give $20 to someone who's already done it.
- conductr 4y agoIf you’re willing to do that why not just buy a sous vide? There are $50-60 ones available. I’m guessing cause you want to code the control, but just saying because there was a time when I couldn’t find one for less than about $300 but they’re more affordable now.
- sowbug 4y agoI actually already have one that works fine. It's less about cooking better chicken, and more curiosity about the software, PID algorithms, etc. The AC relay isn't all that interesting to me, so I'd be happy to treat it as a black box.
- nabakin 4y agoI'm working on a network-level AdBlocker project functionally similar to Privoxy which requires 2 Ethernet ports. One connecting to the modem and the other connecting to the router so that it's possible to MITM the traffic, but I don't see any boards with 2 Ethernet ports. Should I: - buy 2 ESP32s with an Ethernet port on each and communicate between them over serial - buy an ESP32 with Ethernet and USB and use an Ethernet to USB adapter - or is there a better option?
- vkdelta 4y agoI don’t think it will be good option. I think RPi is better for your usecase. I believe pihole works with just 1 eth port as you are just using it for dns queries and not actually NAT’ing traffic through it.
- nabakin 4y agoYeah, I know a lot about PiHole and how it works, but I'm creating a MITM AdBlocker like Privoxy. For that, I need 2 Ethernet ports. Raspberry Pis also cost a ton right now because they have been heavily affected by the silicon shortage. Also, I want to develop for a platform which is cheaper than the Raspberry Pi at MSRP.
- m3koval 4y agoIt should be possible to do that using one Ethernet port using VLANs. You could buy a cheap L2 managed switch and use it to trunk two different Ethernet networks on the same port. Then you would configure the Linux networking stack to split the VLANs into separate interfaces. I am by no means a networking expert and was able to use technique to work around a similar issue in the past. It was easier than I expected!
- nabakin 4y agoAwesome, I didn't know this was an option! Is there a cheap L2 managed switch? I'm only seeing $100+ boards with a cursory search
- DannyBee 4y agoESP32 is nice in that a lot of things you might have to fiddle with elsewhere just work. They have a good ecosystem that they've spent time on. So things like auto-reconnecting wifi just works (it's been ported from ESP32 elsewhere but is a bit hit or miss). Same with bluetooth and OTA upgrades, and you name it. Especially coming from some other board types, it was like "oh i guess that just worked the first time" for a lot of things. I have a bunch of ESP32-S3's locked in some woodworking machine cabinets (they are used to monitor the machines for dust collection control/failure/etc.). It's trivial to make them do firmware reprogramming over bluetooth. You could do over wifi too, but in my case, the machines are too RF noisy (VFD's, etc) and enclosed to make it work. bluetooth only works because i'm like 2 feet away, but it works and i don't have to open the cabinet to update the programming. I also use one to broadcast a stupid bluetooth beacon that my garage door opener uses for "UL compliance" - It has bluetooth lights, and it won't let you open/close the door remotely unless it detects them, because UL requires they visually signal the open/close when done over wifi. Which again, just works. I never had that experience outside of the nRF52/nRF53 series There are some good low-power boards with the S3's, though it can be hit or miss (IE assuming you really want the 20ua deep sleep to be ~20ua). If you want something like a remote running off a small battery for 10 years, you may be better off with the heltec cubecell's or something. (They really easily get 3.5ua in sleep)
- devwastaken 4y agoComing from the rpi platform one thing I miss is there's no standard UI configurator or desktop OS. For wifi credentials or cloud authentication and such it ends up getting programmed in, or you have to build a UI yourself that is specific. But if it doesn't include all the amenities an OS would have like mouse/keyboard, USB file transfer, corporate wifi setup, etc - it's not useable for environments where IT has to co figure it.
- MSFT_Edging 4y agoI feel like the modern world of embedded hobbyist computing has really obscured the embedded aspect. This is good for getting people going but terrible for newcomers understanding the difference between a tiny personal computer with IO(raspberry pi) and baremetal/rtos devices that range in various levels of compatibility. When I read this, at first I thought "well DUH it doesn't have a desktop OS or various desktop utilities built in, its a microcontroller!" Then I realized for a lot of people now, their first led blink "hello world" was possibly not on a microcontroller at all. To me, the idea of wanting a mouse and keyboard for a microcontroller to set up wifi seems silly, but to others, they just haven't experienced the alternative. There is great support for various wifi security standards for the ESP though, you just need to create something equivalent to how a chromecast connects to the internet for the first time. bootstrap an AP, connect to a portal, configure on the portal, reboot and connect to the actual AP.
- jw_cook 4y agoIf you're willing to spend a little more for extra features, it's worth mentioning the S3 boards by Unexpected maker: https://esp32s3.com https://esp32s3.com They have some nice improvements over the generic boards you'll find on Amazon, etc., like extra flash, extra GPIO pins, USB Serial JTAG pins, multiple LDO regulators, and multiple Qwiic/Stemma QT connectors (4-pin JST PH-compatible connectors used by I2C devices made by Sparkfun and Adafruit).
- jw_cook 4y agoQuestion for anyone else using an ESP32 to build a USB input device (macropad, game controller, sim button box, control panel, etc.): Is there a generic library, config file format, host application, or other tool you use for configuring keypresses and macros? I'm currently doing that manually with hardcoded mappings, but it seems like there must be a better way. I'd really like to use something like QMK, but that's fairly specific to keyboards and doesn't support ESP32.
- jareklupinski 4y agoAre you already using TinyUSB? The examples are still pretty involved but it got me 95% of the way to a wireless USB game controller: https://github.com/hathach/tinyusb/blob/master/examples/device/hid_composite/src/main.c#L124 https://github.com/hathach/tinyusb/blob/master/examples/devi...
- spookthesunset 4y agoHow does dual core work on these microcontrollers? Do you have to deal with scheduling between both cores or is it magic? It would seem that it would be up to me to figure out which CPU something should run on, right? So if you aren’t doing a workload that requires it, is there a point? Or does it use one of the cores to offload managing networks, Bluetooth’s and whatnot?
- jareklupinski 4y agoA little bit of both. The simplest way that I like use is by creating a seperate function that you want to run asynchronously, then linking it to a callback that is scheduled to run by the FreeRTOS scheduler: https://savjee.be/blog/multitasking-esp32-arduino-freertos/ https://savjee.be/blog/multitasking-esp32-arduino-freertos/ As long as you don't create too many long-running tasks and be mindful of which core is running what, it's been incredibly reliable in my experience. My biggest use case for this is keeping an active display, like those 64x64 RGB LED Panels, fed with pixel data from a display buffer using one core fully pegged to the task, then using the second core for wifi and display buffer updates. In Arduino land, since loop runs on a specific core, you can basically put your 'constantly running code' in the loop, and schedule the tasks to run on the other core in setup().
- logbiscuitswave 4y agoThe multi-core aspect can cause interesting challenges, especially if you’re using Arduino libraries that assume single core usage. Fortunately there’s really great synchronization primitives that you can use but if you come from an Arduino world it can be a shock. You have to be a lot more careful with interrupts and such to avoid causing crashes. I’ve also found Espressif’s documentation to be exceptionally good which has been a big help. If you’re doing any ESP32 dev work I strongly recommend getting a FT232H which can be used as a JTAG debugger if you don’t have a board with native capabilities otherwise debugging is really, really painful.
- girvo 4y agoLwIP indeed runs in a particular FreeRTOS task on configurable core :)
- troysk 4y agoESP32 are great! The best use case for me is using them as bluetooth repeaters. I use ESPHome and its configs for most devices. For some ble devices, I use nrglogger on my Android to reverse engineer the commands and then feed that into an ESPHome config. It has helped to connect many devices which don't have WiFi anywhere in the house.
- WaitWaitWha 4y agoThanks for the article. I really enjoy using ESP32 devices in Home Assistant with ESPHome. From the add-on: > [ESPHome] add-on allows you to manage and program your ESP8266 and ESP32 based microcontrollers directly through Home Assistant with no programming experience required. All you need to do is write YAML configuration files; the rest (over-the-air updates, compiling) is all handled by ESPHome. You can also add that a lot of commercial home automation devices use ESP chips. This often allows the open source [Tasmota][0] firmware to be flashed on them and make the devices compatible with Home Assistant or alike. Some points that could be improved: The article reads like someone is talking. For me that style of writing is bit off-putting, i.e. too much fluff. I am surprised the manufacturer of the chip Expressif is not mentioned, as both ESP8266 and and ESP32 are by them. > The ESP has no integrated firmware. then near after this, you write > This firmware is then flashed to the ESP Chip with the help of a “burned into the chip” ROM bootloader (more info). That means there is a firmware, the bootloader. Expressif gives a really good [explanation][1] how this bootloader firmware works. [0]: https://tasmota.github.io/docs/ https://tasmota.github.io/docs/ [1]: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/startup.html https://docs.espressif.com/projects/esp-idf/en/latest/esp32/...
- gregmac 4y agoI started out with Arduino but quickly switched to EspHome. There's just so much built in that you don't have to sort out: * Wifi reconnect * Mqtt (and HomeAssistant) integration, with reconnect * Hotspot (initial configuration) support * Tons of hardware devices supported * Even for basic digital io, there's nice quality of life things a line of yaml away: debounce, internal pullup, invert.. Basically by my second or third experiment I found myself starting to build more reusable libraries to do stuff like wifi+mqtt reconnect. Thought "someone must have done this before" and found "Yes, plus went 1000 miles further and built EspHome"
- iamflimflam1 4y agoESP32s are great devices - I’ve done a whole bunch of projects including voice recognition on device. Really great fun.
- girvo 4y agoThe LX7 microcontroller on the ESP32-S3 has been excellent at work, and the vector extensions are great (though I wish they had proper C intrinsics)
- williamDafoe 4y agoCheck out LILYGO TTGO. ESP32 (orig, 2016, LX6) WITH 240x135 IPS display, 16MB flash, < $10 !!! Lots of "volos projects" videos on YouTube with videogame downloads for that platform (breakout, centipede etc.)
- ehsanu1 4y agoThe article doesn't mention the seeed esp32 c3 board, which is another cheap ($5) option: https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html https://www.seeedstudio.com/Seeed-XIAO-ESP32C3-p-5431.html Also interesting is the Picoclick C3: https://github.com/makermoekoe/Picoclick-C3 https://github.com/makermoekoe/Picoclick-C3
- logbiscuitswave 4y agoI really like ESP boards. A couple years ago, I had an expensive robotic cat toy which went out of support from the vendor (Petronics Mousr) and the app disappeared and I couldn’t even re-download it. I didn’t want it to become a brick so I decided to go down at rabbit hole of learning more about reverse engineering to figure out how the app works, Bluetooth LE sniffing to analyze the protocols, and then embedded programming to build a standalone device I could use to control the robot without needing a phone app. Using an ESP32, i2c joystick controller, and i2c 128x64 OLED display I was able to cobble together a device that could control the robot and perform all its functions, as well as get telemetry from Bluetooth LE and show it on the display along with displaying controller inputs. It wasn’t simple - it took months of work to get to a point where I had a mostly working prototype. That work including reverse engineering the device software and firmware, POCs running on my computer and then my phone before even starting on the standalone ESP32 version. Pretty much from the start I was impressed with the capability of the ESP32. I had quite a bit of past experience doing hobby projects with Arduino and its ATmega 328 but the ESP32 was a whole new world. It was quite a learning curve at times. While I could use Arduino libraries which helped accelerate a lot of my progress, the multi-core nature of the ESP32 also meant that I ran into many interesting issues and incompatibilities with things I would do on the Arduino. Interrupt handling was completely different, for instance. i2c in particular was very challenging with lots of new and exciting issues to contend with. Any sort of concurrent operations against the i2c bus would cause a crash, so I had to ensure I had careful synchronization of reads/writes. The speed of the ESP32 also meant I could easily saturate the i2c bus. This became a problem as I was trying to read inputs from the joystick, and output data to the display from both Bluetooth LE messages and the controller state. The ESP had the speed handle this no problem of course, but not the i2c bus. I had to write a rudimentary frame queue to control display output without saturating the bus since dropped frames weren’t as big a deal as not quickly processing joystick inputs. I also found many bugs in various Arduino libraries where they made bad assumptions on ESP32 hardware. I’d contribute fixes wherever I could. Most of my HW and libraries were from Adafruit, and they in particular were great about accepting my fixes into their repositories for the various issues I found. One saving grace throughout any challenges I had was I found much of Espressif’s documentation to be very good - far better than I’m accustomed to from embedded hardware vendors. The community was also really vibrant which meant answers were often easy to find. There was no serial debugging so I had to get a JTAG-capable device to save my sanity. Thankfully a cheap FT232H board in JTAG mode made a good enough debugger. After lots of trial and error, I ultimately settled on Platform IO with Visual Studio Code for my development environment. It worked pretty well, although I ran into some really nasty bugs in Platform IO when debugging that would cause it to quickly drain my laptop battery (which they still haven’t fixed as far as I can tell). Eventually the delisted software that inspired this whole project came back for download and I was able to get it back on all my devices and I kind of lost interest after that. However, the time I spent working on it was definitely a rewarding learning experience and made me a big fan of the ESP32.
- anigbrowl 4y agoIt's worth mentioning that the Arduino IDE now supports MicroPython, which will make getting started a lot easier for a lot of people. Most advanced IDEs do too. As far as makers/peripherals go, I'm also a big fan of M5stack, which have a big range of controllers and peripherals and are very accessible & responsive on Twitter. Their stuff is very competitively priced, available stripped down or in enclosures suitable for pocket, industrial or even outdoor deployment, and it's super-easy to get started with.
- MasterYoda 4y agoWhat good alternatives are there to ESP32?