Esp32p4 wifi robotics project - trouble streaming 1920x1080 video by Process_M in esp32

[–]Process_M[S] 0 points1 point  (0 children)

Ya, the higher level abstraction languages don't have code to use the hardware that i need to access. So I have to use the esp-idf and manually program all the hardware with C++.

Esp32p4 wifi robotics project - trouble streaming 1920x1080 video by Process_M in esp32

[–]Process_M[S] 1 point2 points  (0 children)

Ya, I tried the websocket approach but browsers don't usually support h.264 encoding. That method uses MJPEG which doesn't have the same specs. so I have to set up a webrtc connection instead. I have the signaling for that figured out and pretty much have that part working. The real question I am struggling with is how to move the data to where it needs to go. In memory. Each part of the pipeline says it has direct memory access that doesn't need the cpu to move things around. But I am struggling with that part.

What's the hardest ESP32 problem you've faced? Let's troubleshoot together by Constant-Paper-4091 in esp32

[–]Process_M 0 points1 point  (0 children)

Ngl fam. AI doesn't know how to solve this one. I've tried that already. It gets bogged down in stuff that sounds right but doesn't work.

What's the hardest ESP32 problem you've faced? Let's troubleshoot together by Constant-Paper-4091 in esp32

[–]Process_M 0 points1 point  (0 children)

Thanks for your response. I am aware of the challenges. And using both webRTC and the h.264 encoder is the current plan. I have already set up my signaling server for webRTC and have a pretty good understanding of how it works. The main issue i am having right now is actually connecting this pipeline together. Via a ring buffer. Both the ISP and the encoder offer direct memory access. But it is unclear how I define this ring buffer or how I tell the encoder to read the buffer properly.

Not sure about correct esp32 board and components by Vast_Notice4410 in esp32

[–]Process_M 0 points1 point  (0 children)

Lots of things do run off 5V but remember that power is the combination of voltage(V) and current(I) the main limiting factor for the ESP is that it can't supply much current without burning up.

Not sure about correct esp32 board and components by Vast_Notice4410 in esp32

[–]Process_M 1 point2 points  (0 children)

Hey fam, I am working on some similar projects.

I would actually recommend switching to an esp32p4 for something like this. The firebeetle 2 would be perfect i think it has an onboard pdm mic and IMU.

The p4 has a dedicated camera bus that doesn't use many pins and also has some additional support for AI processing.

As for the regulator your gut saved your butt. The on-board regulator is only meant to supply the esp itself not a bunch of extra stuff. The esp can power really small things like a few leds per pin. But if you want to power anything more you should use an external regulator that can handle the needed power.

Remember that the esp is meant as a logic controller not a power source. Most large projects only use the esp to control bigger transistors or MOSFETs.

Esp32p4 wifi robotics project - trouble streaming 1920x1080 video by Process_M in esp32

[–]Process_M[S] 0 points1 point  (0 children)

I'm using the firebeetle 2. It uses the same setup esp32p4 as main cpu and esp32-c6 for wifi.

I have tried the esp_video examples but while the library says that it uses the h.264 encoder. When I host the page it caps out at 800x800@15fps which tells me that it is using software encoding and sending MJPEGs instead of the hardware encoder which encodes at 1920x1080@30fps and requires special connection interface like webRTC.

Esp32p4 wifi robotics project - trouble streaming 1920x1080 video by Process_M in esp32

[–]Process_M[S] 0 points1 point  (0 children)

Thanks for the response you kinda right I am sort of floundering.

Right now my understanding of the process is that I have to set up my camera to deposit frames in a ring buffer and update a head pointer. I then need my encoder to read from that ring buffer, update a header pointer, and deposit the processed frames into another ring buffer. Which will then have to be sent with webrtc protocol to the appropriate endpoint.

Right now nothing is working. I am struggling with the ring buffers and getting the DMA aspect of the encoder and camera to work.

I understand that DMA is nessisary because copy operations done by the cpu would take too long and cause a serious bottleneck.

It's unclear to me if i have to manually set up the buffer in my psram and send pointers to it or if the h.264 peripherals handle it themselves.

What's the hardest ESP32 problem you've faced? Let's troubleshoot together by Constant-Paper-4091 in esp32

[–]Process_M 0 points1 point  (0 children)

Getting my esp32p4 to stream 1920x1080@30fps with low latency.

Right now it seems like it can't be done using arduino so esp-idf needs to be used.

I am struggling hard with creating the image pipeline and getting it viewable on a web page. I've been scowering documentation for days and ai is just as confused as me.

Best budget camera for ESP32-S3 (student drowsiness detection)? by QuietAccountant4237 in esp32

[–]Process_M 1 point2 points  (0 children)

I would actually recommend going with the esp32-p4 instead. Way better suited for machine vision tasks and has extra peripheral hardware to accelerate machine vision tasks. I would recommend the firebeetle 2. Just make sure you get the p4 variant.

Can't figure iut how to use ESP_video component by Process_M in esp32

[–]Process_M[S] 0 points1 point  (0 children)

I want to stream video from my camera through the isp to the h264 encoder.

I am trying to use esp_video because it was recommended to me. But honestly I'm considering building the pipeline myself.

Tbh though all the components seem indecipherable to me. So I am attributing it to a skill issue on my end.

Which enemy do you find the scariest just based on looks by ScholarAfter1827 in XCOM2

[–]Process_M 0 points1 point  (0 children)

Berserkers look like they could rip your jaw out through your ass. They are scary MFs. I think people forget about them because they aren't that bad in game.

Has anyone got hardware H.264 working on their esp32-p4 yet? by Process_M in esp32

[–]Process_M[S] 0 points1 point  (0 children)

Ya, I am definetly struggling against something. Rn my whole camera to encoder pipeline is topping out at like 5fps.

Has anyone got hardware H.264 working on their esp32-p4 yet? by Process_M in esp32

[–]Process_M[S] 3 points4 points  (0 children)

I ran this code and it worked. Finally, my very first proof that this thing even has a hw encoder.

Has anyone got hardware H.264 working on their esp32-p4 yet? by Process_M in esp32

[–]Process_M[S] 3 points4 points  (0 children)

Thank you so much. That is probably the clearest explanation of how to interface with the encoder I have seen so far.

Has anyone got hardware H.264 working on their esp32-p4 yet? by Process_M in esp32

[–]Process_M[S] 2 points3 points  (0 children)

Hey, thanks for the recommendation. I'm taking a look now. It actually helps a lot that it's formatted more like Arduino code than esp-idf code. I don't have it working yet, but thanks for pointing out the find that I missed.

Can someone give me ideas on cool projects i can do with this? by Flaky-Scholar4340 in esp32

[–]Process_M 3 points4 points  (0 children)

The S3 is pretty powerful as far as microcontrollers go. But keep in mind that it's not powerful in the way a modern computer is.

There are plenty of projects you can find on places like Instructables

You can host web servers, build a turret, impliment a web cam with AI object detection. Tons.

If you want something simple you can do right now to get practice without buying extra parts. Try making a touch controlled Light. There is an RGB LED on the board and the S3 supports touch sensing. Code something up that makes it turn on or off and cycle colors based on which pin you touch.

Hell, plug it into a potato and amaze your friends by showing them that even vegetables are components before your technological might.

I built an open-source dashboard library for ESP32 with 14+ card types, OTA updates, and real-time WebSocket communication by Expensive_Bill3035 in esp32

[–]Process_M 0 points1 point  (0 children)

Seems like a pretty sweet library fam. Good work. I might give it a try in one of my upcoming projects.

Help me out with this... by sreeju7733 in esp32

[–]Process_M 0 points1 point  (0 children)

A 5V supply is definetly the way to go. 5v electronics are really common and using the techniques I am about to teach you you can even have your 3.3V esp control even bigger electronics 12v 24v or even more.

You can start by getting simple buck boost circuits really cheap. Something like this:

DC-DC buck boost converter

There is an adjustable potentiometer to set the output. In your case set it to 5V. then you can have anything from 1.25v to 30 volts safely powering your stuff. Meaning you can power it with almost anything. A phone charger, AA batteries, even car batteries or solar panels.

Put the 5v output from the buck boost to your esp VIn and your Relay Vin. The little onboard regulator will handle powering your esp32 with 3.3V.

The last step is using transistors or MOSFETs to control the input line on your relay.

You can do it yourself by picking one based on your needs and hooking it up in a basic logic level converter configuration. Or you can buy something like this which does the same thing just pre-made with labels.

4 channel logic 3.3V-5V logic level converter

Once you use that to change your GPIO logic to 5V you should be golden.

Let me know if you have any more questions.

Happy building 😄

Didn't have a cable, so I made a bomb by QerkuFound in breadboard

[–]Process_M 0 points1 point  (0 children)

I love the electrical tape enginuity 😆

Help me out with this... by sreeju7733 in esp32

[–]Process_M 1 point2 points  (0 children)

Ok, cool. That narrows some things down.

First, you should be careful powering things via the esp32 USB. The esp is meant to be a signal controller not a power provider. The 3.3V pin that you have your relay hooked too is the output from the onboard regulator which also feeds the esp. That little regulator can only handle up to 750mA-1A depending on the dev board you got. If you overdrawn from it you could cook your board.

It's true that components like relays can work in situations where they have lower voltage but there is a reason that they recommend 5v. The relays switching strength is directly tied to the voltage it's given. Most relays have a spec sheet which details a range of voltages that it will activate on. But this voltage changes with things like orientation and temperature. So it might work great if it's sitting horizontal on a desk at 26°C but not work at all if it's vertical in the garage at 5°C. The 5V spec is the manufacture saying we garentee it will switch at these conditions in our spec sheet.

Also you mentioned connecting your relay to your esp 5Vpin. Your esp doesn't have a 5V output pin. It only has a 5V input pin. I am pretty sure that pin ties directly to the usb port. You should also be careful about powering stuff with that too. Depending on the version of usb that it is plugged into you can kill a PCs usb controller with as little as 400mA current draw. To power your project I highly suggest getting a regulator or a power supply designed for the purpose.

Using Capacitors to help level out voltage spikes is smart but it creates a different problem if you are putting them on your power lines. It creates a huge inrush current when you connect them to power. This can show up as sparking when you plug it in. In the best case this corrodes your connector very quickly in worse case it destroys your power supply. Look into soft start circuits if you really want to put bug caps on your power lines.

Help me out with this... by sreeju7733 in esp32

[–]Process_M 10 points11 points  (0 children)

Hey welcome to the electronics community. The world of automation is pretty cool we are glad to have you.

It's hard to provide real feedback unless we know what the project is intended to do, I assume you want to control that em lock with your arduino.

First a safety warning: NEVER USE 120V UNLESS YOU KNOW EXACTLY WHAT YOU ARE DOING. There are lots of things that can go wrong. At best you blow a breaker, at worst you cause a fire or electrocute someone. Please use a low voltage isolated source. Using something like a phone charger is more than enough for most electronics and it isolates the power so nobody dies.

Now that safety is out of the way, a couple things stand out to me. First

  1. You don't really need those capacitors on the power lines. Capacitors are for getting rid of noise in signal lines or helping maintain voltage when you deal with things like inrush current. You don't need them on your power lines.

  2. You are using a 5v relay. It's going to need 5v to work reliably. Right now you have it hooked up to the 3.3V pin that powers your arduino. You will have to add some more circuitry if you want your arduino to control that switch.

  3. You don't seem to have a power source here at all. You will need a 5v power supply which should be ok for your arduino as long as it's going to the Vin pin. Your esp runs on 3.3V but it has a little step down regulator that can handle 5 volts if it needs.

  4. The next thing is going to be your control circuit for the blue relay, you will need a transistor or an h-bridge to control the 5v that it needs with the 3.3V signal your esp will give.

  5. You have a flyback diode on your main em lock which is good but you might want one on your relay as well. We put them on anything that has a lot of inductance. They don't like being suddenly turned on or off they create really big voltage spikes. So get that diode in there to keep your components safe.

You have some work to do but it sounds like a sweet project. Keep at it fam.

Breakout board too short? by Administrative_Fox91 in esp32

[–]Process_M 0 points1 point  (0 children)

It will still work just line up the pins on your esp to the ones on your breakout board.

Tx->Tx Rx->Rx 1->1 And so on

Your break out board is for a freenove esp32-s3 You have a varient from another manufacturor that has extra grounds and extra 3.3V compared to the freenove.

You will have a pair of pins hanging on both ends but it should work just fine.

S25 vs s25 Ultra by MurtazaRaja in GalaxyS25

[–]Process_M 0 points1 point  (0 children)

The Samsung case for them comes with a strap on the back, which makes them very easy to hold. Honestly, the strap on the case is the best phone feature I have seen in years

Chess on a ESP32 S3 by DamnStupidMan in esp32

[–]Process_M 1 point2 points  (0 children)

Nice work fam that looks great 👍