ESP32 projec... - Page 1
Forum section: electronics / projects

author: L0R3NZ0_L30Z
author_rank: Newbie
timestamp: October 27, 2022, 02:30:52 pm
content: Hi, I´ve been working on an ESP32 automation project. I will tell you a bit of the project and at the end I will put the problems I have.The project started with an arduino nano and the HC-06 bluetooth module. I quickly abandoned the idea because it had connectivity issues, it had a considerable lag and most importantly I had to connect to the module each time I wanted to control something. So I went with the ESP32, it has wifi and bluetooth built in, I went with wifi. I wrote code and made an app to be able to control it, no blink rubbish or similar. A full dedicated app with just the things I needed. After one year and a lot of research I got it working correctly, and I didn't have the issues before mentioned. But if you eliminate some, others appear. I want to be able to control 6 relays, a temperature sensor and a LED strip. I got the two first ones but I have some questions about the LED strip..It was recommended to me that I use the Fastled library to control the LEDs, but when I read about the subject I noticed that the ESP32 might not be compatible. I don't want to risk spending money on an LED strip and it not working. What are your experiences ?? I don't want to use the WLED library because I can't adapt it to my app..Which LED strip do you recommend, i need a RGB 5v one. What LED density is adequate so that I don't distinguish single LEDs without it going to expensive? 5 meter or so... It doesn't need to be waterproof..What power supply do you recommend to me so that it doesn't blow up. Amps wise. The LEDs won´t be use at max power.I am an electronics student and english is not my mother tongue, be comprehensive. Anything you have to say, I will appreciate.

author: EsPiFF
author_rank: Contributor
timestamp: October 27, 2022, 03:32:23 pm
content: are you planning to build your own PCB for this? Or just connect existing parts together? Any requirements for a stable product to sell, maybe FCC certification? Or just a "proof of concept", to show somebody that you can do?if your after a low cost "proof of concept" solution, I would start with a grove system from seeedstudio.Maybe this ESP32 boardhttps://wiki.seeedstudio.com/ESP32_Breakout_Kit/And then connect, whatever is needed and available as grove module:https://wiki.seeedstudio.com/Grove_System/These kind of modular systems are also available from Adafruit and others, and are, or are not, compatible. I can not recommend one over the other, I just know they exist.The attractive point is, that you can daisy-chain some of the modules. There are also so called Hubs, to connect more modules.For the I2C parts, you need to avoid address conflicts, or maybe use I2C-bus expander, to connect I2C devices with the same address. But with your just 3 parts, that looks not too complicated.Again, I would not use such a setup for a real-world product.

author: L0R3NZ0_L30Z
author_rank: Newbie
timestamp: October 27, 2022, 07:10:49 pm
content: Yes, I allready desing a PCB model, it need some adjuments but it's functional. This projet is just a proof of concept, to play around and learn a bit about this automation world. Thanks for replaying so fast. Danke.

author: Fire Doger
author_rank: Regular Contributor
timestamp: October 27, 2022, 11:32:51 pm
content: I don't use Arduino for ESP, it cripples down the capabilities so I don't know about these libraries.I have done sound reacting effects with ws2812, 144 leds running locked at 30 refresh per second and UDP packets from PC/AndroidRMT is a bit buggy and had sudden flickering on some leds.SPI with DMA works perfectly.Be care, leds draw a lot of current and they can dip your power rail if you have 100 of them. Needs a separate power supply or a lot of capacitance for ESP32 plus diode to prevent capacitors discharging on the leds.

author: tooki
author_rank: Super Contributor
timestamp: October 27, 2022, 11:57:17 pm
content: Quote from: L0R3NZ0_L30Z on October 27, 2022, 02:30:52 pmWhere’s you get the idea it might not be compatible?!? The FastLED website expressly lists ESP32 as a supported platform (and I can confirm it works).Quote from: L0R3NZ0_L30Z on October 27, 2022, 02:30:52 pmI like the ones that use APA102C or SK9822 (which is a clone with slightly better specs).Quote from: L0R3NZ0_L30Z on October 27, 2022, 02:30:52 pmWe can’t answer that for you with the info provided. That depends on your application, especially viewing distance.

author: tooki
author_rank: Super Contributor
timestamp: October 28, 2022, 12:01:05 am
content: Quote from: Fire Doger on October 27, 2022, 11:32:51 pmBecause the ESP32 “ArduinoCore” layer runs on top of ESP-IDF and FreeRTOS, you can access ALL the features of ESP-IDF and FreeRTOS from within Arduino. All you have to do is #include the relevant ESP-IDF .h files in your header so the compiler knows you want to access it directly.

author: Infraviolet
author_rank: Super Contributor
timestamp: October 28, 2022, 02:57:31 am
content: If the library you want isn't compatible with any given LED strip another library should be. If you can't find a library which is then you could write your own library or bit-banging code. If the Fastled library uses specific AVR features, which would be a likely possibility in a library which is only compatible with some types of arduino operable boards, then you could lok inside the library code and see what these are and replace them with ESP32 applicable features. If I recall correctly the ESP32 has a faster clock than the "standard" arduino compatible board (ATMEGA328P AVR based Uno), so even if your code is inefficient you should be able to get it to be fast enough.P.S. the relays, if you;re new to electronics, a warning. Put diodes across them to absorb any spikes which occur when they turn off (things with coils in them like relay magnets can do this). Look up "flyback" diode arrangements.

author: tooki
author_rank: Super Contributor
timestamp: October 28, 2022, 06:31:28 am
content: Again, FastLED expressly supports ESP32. (And a number of other architectures. It’s certainly not relying on AVE-specific commands.)A standard Arduino Uno or Mega2560 is an 8-bit MCU running at 16MHz. The standard ESP32 is a dual-core 32-bit MCU running at 160MHz-240MHz. It runs circles around the Uno/Mega2560 while blindfolded and hogtied. There’s no one definitive benchmark, but the ESP32 typically performs 25-50x as fast as the Uno/Mega2560, and that’s without optimizing to use both cores.

author: L0R3NZ0_L30Z
author_rank: Newbie
timestamp: October 28, 2022, 05:50:31 pm
content: Quote from: Fire Doger on October 27, 2022, 11:32:51 pmI know it´s not ideal to use the Arduino IDE, but I don´t know any other IDE for ESP.Quote from: Fire Doger on October 27, 2022, 11:32:51 pmOk, I will take it into acount, thanksQuote from: tooki on October 27, 2022, 11:57:17 pmI didn´t see that it was compatible, I shoud start using glases. If it has worked for you, it should for me.Quote from: tooki on October 27, 2022, 11:57:17 pmSome typical values for a hobby projec. 2 meter for reference.Quote from: Infraviolet on October 28, 2022, 02:57:31 amI´m new but I know that. I´ve use the ULN2003 wich has evrything in it. Thanks anyways.

author: tooki
author_rank: Super Contributor
timestamp: October 28, 2022, 06:43:44 pm
content: Quote from: L0R3NZ0_L30Z on October 28, 2022, 05:50:31 pmPlatformIO: for ESP32, you can either use it with the Arduino framework, or using the “native” ESP-IDF framework (or both at once).Regardless of what board you’re using, using PlatformIO to program Arduino code is way, way more productive. There’s a bit of a learning curve, but it’s so worth it.

author: soubitos
author_rank: Frequent Contributor
timestamp: October 29, 2022, 07:37:34 am
content: You might find this open hardware design interestinghttps://oshwlab.com/catech75/3in1-esp-tool