Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add camera support #94

Open
probonopd opened this issue Mar 2, 2019 · 36 comments
Open

Add camera support #94

probonopd opened this issue Mar 2, 2019 · 36 comments

Comments

@probonopd
Copy link
Owner

probonopd commented Mar 2, 2019

There are now ESP32-CAM modules with camera and SD card. Can be had for around USD 10 from China. Ideal for our purpose.


@me-no-dev has added Arduino support for it :
espressif/esp32-camera#7 (comment)

It seems to be working well:

Thank you so much, worked out of the box here as well. I tried it on an ESP32-CAM with a wide angle lense I got from a TTGO T-Journal order.

@chepo92
Copy link
Collaborator

chepo92 commented Mar 3, 2019

Wow, buying it !

@probonopd
Copy link
Owner Author

@probonopd
Copy link
Owner Author

probonopd commented Mar 11, 2019

We need to find a way to not get the ESP32 boot messages onto the serial line since they will make it impossible to boot the printer firmware (I have tested it!).

We may not have free pins to use Serial1 on this board? GPIO16 seems to be the only pin that is on the board and not connected to cam or SD.

Pulling down GPIO15 to ground during boot should also silence the ESP32 boot messages. But GPIO15 is also attached to CMD of the SD card.

Reference:
espressif/arduino-esp32#642

@chepo92
Copy link
Collaborator

chepo92 commented Mar 11, 2019

We need to find a way to not get the ESP32 boot messages onto the serial line since they will make it impossible to boot the printer firmware (I have tested it!).

I'll test it too

We may not have free pins to use Serial1 on this board? GPIO16 seems to be the only pin that is on the board and not connected to cam or SD.

I haven't tested but I think Uarts can be mapped to any pin: https://quadmeup.com/arduino-esp32-and-3-hardware-serial-ports/

@probonopd
Copy link
Owner Author

Yes, but you need free pins that are not connected to the camera nor the SD card. And it looks like we are short of those...

@probonopd
Copy link
Owner Author

probonopd commented Mar 11, 2019

In addition to making a video stream of the printer, and taking timelapse images, we might do QR code recognition to e.g., recognize settings for different filaments based on QR codes (also see the Uniform Filament Identification system, UFID).

https://github.com/donny681/ESP32_CAMERA_QR/

@GMagician
Copy link
Collaborator

I read somewhere that boot log messages may be disabled on esp32 and not on esp8266, but I forget where I read it

@fred2088
Copy link

buy one, will test it out ...

@muenan
Copy link

muenan commented Mar 27, 2019

Yes, but you need free pins that are not connected to the camera nor the SD card. And it looks like we are short of those...

Maybe you can use the LED PIN (GPIO33) and with SoftSerial (RX, TX | GPIO16, GPIO33). At the LED PIN you can solder a wire to the + side for the TX. The user (v12345vtm : https://github.com/v12345vtm/timelapse-ESP32-CAM ) has developed a timelapse feature. If you could put the project and his together, it would be ideal.

@probonopd
Copy link
Owner Author

Let's try it out. Unfortunately I don't have this hardware.

@fred2088
Copy link

we bought it and would like to try it out ...

@probonopd
Copy link
Owner Author

Looking forward to hearing from you how it goes @fred2088

@probonopd
Copy link
Owner Author

Have you made any progress @fred2088?

@fred2088
Copy link

fred2088 commented Jul 6, 2019

thinking to merge two project
https://github.com/v12345vtm/timelapse-ESP32-CAM

@ETE-Design
Copy link

ETE-Design commented Sep 21, 2019

So we continue here... Can't help coding :-( My skills is not there yet... But have you looked at this project? Mabye it can help?
https://randomnerdtutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/

BTW, do you have some screenshots of your GUI?

@ETE-Design

This comment has been minimized.

@probonopd

This comment has been minimized.

@ETE-Design

This comment has been minimized.

@probonopd

This comment has been minimized.

@probonopd
Copy link
Owner Author

probonopd commented Oct 4, 2019

We need to find a way to not get the ESP32 boot messages onto the serial line since they will make it impossible to boot the printer firmware (I have tested it!).

Actually, this is easy. Tested with ESP32-CAM firmware.

  • Connect pin UOR to PL2303HX green = TX
  • Connect pin UOT to PL2303HX white = RX
  • Connect pin 5V to PL2303HX red = 5V
  • Connect pin GND to PL2303HX black = GND
  • Connect pin IO15 to GND. Boot messages gone

So it should be doable using this hardware.

Repository owner deleted a comment from ETE-Design Oct 4, 2019
Repository owner deleted a comment from ETE-Design Oct 4, 2019
Repository owner deleted a comment from ETE-Design Oct 4, 2019
@ETE-Design
Copy link

ETE-Design commented Oct 4, 2019

Well done, keep comming closer to get Cam Support :-) Still waiting for my ESP32-Cam to start testing...

@probonopd
Copy link
Owner Author

Someone just needs to do it.

@Colin66
Copy link

Colin66 commented Oct 21, 2019

Hi, there's a project interfacing esp32-cam to 3d printer which appears relevant here :

https://github.com/eben80/ESP32-CAM-Print-Monitor

@probonopd
Copy link
Owner Author

probonopd commented Oct 22, 2019

Hi @Colin66 very good, so it looks like @eben80 has figured out how to access the camera while also talking to the printer via the serial line. Hence it should be a breeze to combine it with WirelessPrinting. @Colin66 @eben80 would you be interested to give it a try?

@Colin66
Copy link

Colin66 commented Oct 22, 2019

Hi @probonopd I'm interested in the output but unfortunately I don't have the coding skills.

@eben80
Copy link

eben80 commented Oct 23, 2019

Hi @Colin66 very good, so it looks like @eben80 has figured out how to access the camera while also talking to the printer via the serial line. Hence it should be a breeze to combine it with WirelessPrinting. @Colin66 @eben80 would you be interested to give it a try?

Hi guys,
I'm also working with very limited skills. My solution for communicating with the Serial port is extremely inefficient, probably the right way to do it would be what @luc-github uses in ESP3D.
My solution I currently have so it just about functions... my standards are very low :D

Some pointers:
I'm using SoftwareSerial for coms with the printer, the rxbuffer needs to be increased for lengthy responses like file listings.... on the hardware side I'm using voltage limiting zener diodes and a common ground connection to do the level shifting on both RX and TX.

@probonopd
Copy link
Owner Author

Hi @eben80, may I be curious why you are using SoftwareSerial?

@eben80
Copy link

eben80 commented Oct 23, 2019

Hi @eben80, may I be curious why you are using SoftwareSerial?

@luc-github just asked me the same thing today :D
In my mind, I needed it because I wanted to keep UART0 for serial debugging...
I just realized that pin14 & 15 that I am using is connected to the SD Card.
Since I haven't been using the SD Card, I haven't had any issues.

@probonopd
Copy link
Owner Author

probonopd commented Oct 23, 2019

Well, in this project we need the SD card of course. But I think hardware serial is fine too, as I have tested here: #94 (comment)

@romandoss
Copy link

I run yesterday, but I had to solder wire for uart to 16 and 17 gpio directly to esp32.
And strange things, I have two esp32-cam, on one which branded AI Thinker after uploading sketch I get infinite bootloop, on other no name module worked fine.
And I also got worked sd card slot only after that modification "hasSD = SD.begin(13, SPI, fastSD ? 50000000 : 4000000);" I'm not sure correctly this or not.
And one more thing, if I reset 3d printer by button, serial gone to forever "#TIMEOUT#"

@probonopd
Copy link
Owner Author

When you reset the 3d printer you also need to reset the ESP at the same time. Connect the reset lines of the printer and of the ESP together.

I don't know the answer to the other questions.

@smartin015
Copy link

Not to muddy the waters too much, but there's now an ESP32S3 module with builtin camera: https://www.seeedstudio.com/XIAO-ESP32S3-Sense-p-5639.html

This board also appears to support USB host mode (crossover with #123). I splurged on a couple, should be arriving in a week or two. When I find the time to poke at them I can report back here with observations.

@probonopd
Copy link
Owner Author

probonopd commented Apr 16, 2023

..."supporting SD card slot for external 32GB FAT memory" sounds good. Don't forget to order that, too. We need to store the GCODE somewhere...

@smartin015
Copy link

..."supporting SD card slot for external 32GB FAT memory" sounds good. Don't forget to order that, too. We need to store the GCODE somewhere...

It's actually built into the module :D

@probonopd
Copy link
Owner Author

I was mislead by the "external".

@smartin015
Copy link

Small update - received the XIAO modules yesterday and took one for a test drive today with the default code. I could connect to wifi and stream video from the camera with zero issue. Pretty slick. I can also confirm it indeed comes with an SD card slot, although I haven't yet tried using it.

That's about as far as I'm going to test for now, until I'm finished with #123 on the S2 mini.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants