2016 I bought the PTC06 camera from ebay. Since today I did not got the camera working properly and for years I gave it up to get it working. Now, since i have more time (im in vacation) I took my old project and tried to get it working. I already read the whole topic of xKoldFuzionx (VC0706 PTC06 v1.0 Can't figure out why I can't get the FBUF lengths - Programming Questions - Arduino Forum) but changing the rx and tx pin did not solve it for me. The thing is that the camera responds, but not as it should
I use the following hardware:
Arduino Pro Mini 3.3v
VC0706 PTC06 Camera
My goal is quite simple. I try to make a picture but the respond of the camera is not what i expected.
For the first step I sent the command for resetting the camera:
The Pro Mini 3.3v operates at 8Mhz. The SoftwareSerial library only supports 115200 baud on 16Mhz. The max you can have with 8Mhz is 57600. Do you have another higher speed Arduino you could use?
I have an arduino nano with 5v. So I had to do some wiring:
I took a 10k resistor to the rx-pin from the camera. So the 5V from the Arduino is turned to 3.3V to the camera rx-Pin.
The Tx from the camera is directly connected to the arduinos Pin, because the camera also sends 3.3v to the arduino.
The thing is, that sometimes the right response occours but sometimes it does not.
Do you have any other ideas, how to get always the expected response?
skateboy:
I have an arduino nano with 5v. So I had to do some wiring:
I took a 10k resistor to the rx-pin from the camera. So the 5V from the Arduino is turned to 3.3V to the camera rx-Pin.
The Tx from the camera is directly connected to the arduinos Pin, because the camera also sends 3.3v to the arduino.
Just the one resistor? You would need two resistors to make a voltage divider to safely reduce the voltage.
skateboy:
The thing is, that sometimes the right response occours but sometimes it does not.
Do you have any other ideas, how to get always the expected response?
To be honest, you are trying to use SoftwareSerial at the bleeding edge. It might work at that speed under optimal conditions, but anything short of that is likely to cause issues. You can take a look at this old forum post to see what I mean.
Even if you get it to work for your simple test program, something is going to break when you actually want to do something useful with the camera.
Best using hardware serial, even if it means switching boards to one with multiple hardware serials, eg. Mega.
arduarn:
...Best using hardware serial, even if it means switching boards to one with multiple hardware serials, eg. Mega.
Hello arduarn,
You pushed me in the right direction!! Many thanks for that.
I turned over to a ESP32 Module and used there the HardwareSerial! And it works like a charm!!
One last thing is missing. I really dont know why the image has such a bad quality. Do you think, that the cameramodule could be a little bit broken or buggy?
I used the standard Adafruit example.
skateboy:
One last thing is missing. I really dont know why the image has such a bad quality. Do you think, that the cameramodule could be a little bit broken or buggy?
skateboy:
Ok even that problem is now fixed.
I simply took a picture at daylight and the quality is much better!! :-[
Glad you've made good progress.
When I looked at the first picture the first thing I thought of was the lighting. Then I zoomed in and saw the very distinctive pixel pattern in the image and thought it must be something else. But it looks like it may well just be the lighting and you have discovered the camera's limitations.
I'll point you at the tweak tool on the Adafruit page which you could use for checking the image quality by a second means, assuming you don't mind installing an executable of questionable heritage. I don't see any settings there that IMO are likely to improve things dramatically, but you could take a (cautious!) look.