Author Topic: ESP32 projec...  (Read 1422 times)

0 Members and 1 Guest are viewing this topic.

Offline L0R3NZ0_L30ZTopic starter

  • Newbie
  • Posts: 5
  • Country: ar
ESP32 projec...
« on: October 27, 2022, 02:30:52 pm »
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.
 

Offline EsPiFF

  • Contributor
  • Posts: 15
  • Country: de
Re: ESP32 projec...
« Reply #1 on: October 27, 2022, 03:32:23 pm »
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 board https://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.
 

Offline L0R3NZ0_L30ZTopic starter

  • Newbie
  • Posts: 5
  • Country: ar
Re: ESP32 projec...
« Reply #2 on: October 27, 2022, 07:10:49 pm »
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.
 

Offline Fire Doger

  • Regular Contributor
  • *
  • Posts: 208
  • Country: 00
  • Stefanos
Re: ESP32 projec...
« Reply #3 on: October 27, 2022, 11:32:51 pm »
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/Android
RMT 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.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12052
  • Country: ch
Re: ESP32 projec...
« Reply #4 on: October 27, 2022, 11:57:17 pm »
.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.
Where’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).

.Which LED strip do you recommend, i need a  RGB 5v one.
I like the ones that use APA102C or SK9822 (which is a clone with slightly better specs).

What LED density is adequate so that I don't distinguish single LEDs without it going to expensive?
We can’t answer that for you with the info provided. That depends on your application, especially viewing distance.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12052
  • Country: ch
Re: ESP32 projec...
« Reply #5 on: October 28, 2022, 12:01:05 am »
I don't use Arduino for ESP, it cripples down the capabilities so I don't know about these libraries.
Because 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.
 

Offline Infraviolet

  • Super Contributor
  • ***
  • Posts: 1101
  • Country: gb
Re: ESP32 projec...
« Reply #6 on: October 28, 2022, 02:57:31 am »
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.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12052
  • Country: ch
Re: ESP32 projec...
« Reply #7 on: October 28, 2022, 06:31:28 am »
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.
 

Offline L0R3NZ0_L30ZTopic starter

  • Newbie
  • Posts: 5
  • Country: ar
Re: ESP32 projec...
« Reply #8 on: October 28, 2022, 05:50:31 pm »
I don't use Arduino for ESP, it cripples down the capabilities so I don't know about these libraries.
I know it´s not ideal to use the Arduino IDE, but I don´t know any other IDE for ESP.

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.
Ok, I will take it into acount, thanks :-+

.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.
Where’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).
I didn´t see that it was compatible, I shoud start using glases. If it has worked for you, it should for me.

What LED density is adequate so that I don't distinguish single LEDs without it going to expensive?
We can’t answer that for you with the info provided. That depends on your application, especially viewing distance.
Some typical values for a hobby projec. 2 meter for reference.

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.
I´m new but I know that. I´ve use the ULN2003 wich has evrything in it. Thanks anyways.
 

Offline tooki

  • Super Contributor
  • ***
  • Posts: 12052
  • Country: ch
Re: ESP32 projec...
« Reply #9 on: October 28, 2022, 06:43:44 pm »
I don't use Arduino for ESP, it cripples down the capabilities so I don't know about these libraries.
I know it´s not ideal to use the Arduino IDE, but I don´t know any other IDE for ESP.
PlatformIO: 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.
 

Offline soubitos

  • Frequent Contributor
  • **
  • Posts: 352
  • Country: gr
    • I sell on Tindie
Re: ESP32 projec...
« Reply #10 on: October 29, 2022, 07:37:34 am »
You might find this open hardware design interesting https://oshwlab.com/catech75/3in1-esp-tool
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf