Switzerland
Asked
Resolved Resolved by DJ Sures!

Add A Camera Control To My JD Project

Some time ago I got a DEVELOPER KIT (EZB-v4) from a friend and already made the 3D prints for a JD and already realized some robot skills. Unfortunately I don't have the EZ-B ROBOTIC CAMERA for this kit. That's why I would like to install an M5Stack camera that I already have.

My question is, how can I connect my Unit CAM M5 with a UART interface with connector(GND,5V,G17,G16)? I don't want to use WiFi for the connection, but only use the connector from the EZB-4 CTS, RTS, TX, RX, GND, 3.3V (6-pin JST-PH 2.0mm pitch). Any help would be appreciated


Related Hardware EZ-B v4

ARC Pro

Upgrade to ARC Pro

Discover the limitless potential of robot programming with Synthiam ARC Pro – where innovation and creativity meet seamlessly.

PRO
Synthiam
#1   — Edited

doesn’t the camera come with the ezrobot developer kit?

You could connect that camera to the ezb v4 camera port, but the data it transmits will need to be modified for the same protocol.

I don’t know much about the camera you’re using. Is that camera  an arduino programmable? If so, that could happen quite easily.

PRO
Synthiam
#2   — Edited

I looked on the website and there's several m5 cameras. Which one do you have? https://shop.m5stack.com/collections/camera-series

And they're SOOOOO expensive eak

Switzerland
#3  

Hi DJ Sures Unfortunately, the Ezrobot developer kit was already used and therefore not complete, so I have to try it with another camera. No no the camera is not an expensive model it is the (Unit Cam Wi-Fi Camera (OV2640) SKU: U109 Regular price$7.50) and it has a programming platform: ESP-IDF/Arduino/UIFlow. I also have a programmable USB TTL downloader but I don't know which program I could use to use all camera functions with the EZB-v4. I would be glad if you could help me there. Plokber

PRO
Synthiam
#4  

You’d have to write the jpeg image out of the uart with the ezimg header and file size.

Take a look at the firmware source code for the esp32cam: https://synthiam.com/Support/Hardware/ESP32-Cam

there’s a section where the jpeg of every frame is written to the tcp response. In your case it would be written to the uart

Switzerland
#5  

Thank you for the tip, I had another problem with this M5Stack camera because I couldn't reset it. Now I had the opportunity to swap my camera for an ESP cam at my last workshop. I installed the specified firmware on this camera and it works. But now to my personal problem, I would like to use this camera "offline" in my JD because a WiFi connection is already available. I would like to connect the camera via the "Camera Expansion Header" via the CTS,RTS,TX,RX,GRD,3.3V connections. Is there a possibility?

PRO
Synthiam
#6   — Edited

Looks like it should work. The esp32 cam has a uart header pin. You could modify the firmware to write the image out the uart. That will connect to the ezrobot ezb v4 camera header.

I believe the ezb v4 camera also uses the rts line so you’ll need to set that as well.

The baud rate is 3,333,333

PRO
Synthiam
#7  

You can try this firmware, it may need changes because i didn't test it: https://synthiam.com/Firmware/ESP32-Cam-UART-HLT3KZKGG3F

Switzerland
#8  

Loading the firmware onto the ESP cam worked and I connected the cables as they indicated, but I can't get the camera in ARC to work with the ESP-Cam. What do I have to write in the window where the IP address is so that I can get the camera image. if I go to "Costom" then it doesn't work either. I think I will use the ESP32-camera for the further projects via WiFi.

PRO
Synthiam
#9  

You'd have to enter the same ip address as the EZB. The manual for the camera device explains more: https://synthiam.com/Support/Skills/Camera/Camera-Device?id=16120

PRO
Synthiam
#10  

Did you have success with the ESP32 Cam connected to the EZ-B v4?

Switzerland
#11  

sorry for the late answer (was on vacation)

Now I enter the same IP address as the EZB and it freezes image  for 1-2 sec. given. Unfortunately I had to restart the EZB again to repeat that.

The debug output was always: "Camera Initialized: ECB://192.168.1.110 @ 320x240 EZ-B v4 Camera Error: Unable to read data from the communication link: A connection attempt failed because the remote station did not properly respond after a period of time, or the established connection failed because the connected host did not respond. camera disabled"

I've been trying to make changes in the sketch for a whole day, but haven't gotten any better results. I give up and will continue with the normal WIFI function. Has nobody tried anything like this?

PRO
Synthiam
#12   — Edited

Hmmm the esp32 might be sending data faster than the ezb can relay it via the tcp socket. I made a change to use the RTS pin so the ezb can control the dataflow. Try this firmware (v3): https://synthiam.com/Firmware/ESP32-Cam-UART-HLT3KZKGG3F

Switzerland
#13  

Yes, it worked, I now get the whole picture on the virtual display, but the picture is lengthwise and not set up high when the camera is set up. Thank you very much for the help, if you have a tip to set up the picture that would be great?

PRO
Synthiam
#14  

Rotate the camera so the picture is in the correct orientation