VC0706 PTC06 - Pro Mini 3.3v - Wrong camera-responding

Hello guys,

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 :frowning:

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:

  camera.write((byte)0x56);
  camera.write((byte)0x00);
  camera.write((byte)0x26);
  camera.write((byte)0x00);

And here is the output from the serial console:

Write bytes to camera


Device received: 0x77 0x0 0x27 0x0 0x0 0x57 0x43 0x30 0x37 0x30 0x31 0x20 0x30 0x2F 0x30 0x30 0xC 0x9 0x41 0x76 0x71 0x6E 0x20 0x68 0x6F 0x67 0x71 0x20 0x66 0x78 0x68 0x73 0x76 0xE 0x9 0x4F 0x57 0xB3 0x31 0xC6 0x18 0xC 0x9 0x34 0x31 0x36 0xE 0x9 0x48 0x6F 0x68 0x76 0x20 0x64 0x6F 0x66 0xC 0x9 


Write bytes to camera


Device received: 0x77 0x0 0x27 0x0 0x80 0x57 0x68 0x77 0x7 0x37 0x7 0xB 0xE7 0x6 0x7 0xD7 0x9C 0xFC 0x68 0x93 0x61 0x20 0x68 0x6F 0x67 0x71 0x20 0x66 0x78 0x68 0x71 0x76 0xC 0x9 0x4F 0x57 0x37 0x37 0x31 0x30 0xC 0xE1 0x33 0xCE 0xCC 0xC3 0x9 0x48 0x6F 0x68 0x76 0x20 0x66 0x6F 0x64 0xE 0x9 


Write bytes to camera


Device received: 0x77 0x0 0x27 0x0 0xC0 0x57 0x43 0x30 0x37 0x30 0x31 0x20 0x30 0x2F 0x30 0x30 0xE 0xB 0x43 0x74 0x71 0x6E 0x20 0x68 0x6F 0x67 0xEE 0x90 0x64 0x78 0x68 0x6F 0x69 0x46 0xF8 0x4F 0x57 0x37 0x37 0x33 0x30 0xE 0x9 0x36 0x31 0x36 0x83 0xA 0x48 0x6F 0x9A 0x74 0x20 0x66 0x6F 0x64 0xC 0x9 


Write bytes to camera


Device received: 0x73 0x0 0x27 0x0 0x80 0x57 0x41 0x30 0x37 0x30 0x31 0x20 0x30 0x2F 0x30 0x30 0xE 0x9 0x41 0x76 0x73 0x6C 0x20 0x68 0x6F 0x67 0x71 0x20 0x64 0x78 0x68 0x73 0x74 0xC 0xD 0x4F 0x57 0xB1 0x27 0x7 0x7F 0x83 0xA 0x34 0x31 0x36 0xC 0xB 0x48 0x6F 0x68 0x76 0x20 0x66 0x6F 0x66 0xC 0xE1 


Write bytes to camera


Device received: 0x77 0x0 0x27 0x0 0x0 0x57 0x41 0x30 0x37 0x30 0x31 0x90 0x30 0x2F 0x30 0x30 0xE 0x9 0x43 0x72 0x71 0x6C 0x20 0x68 0x6F 0x67 0x73 0x20 0x66 0x78 0x68 0x71 0xBD 0xC 0xB 0x4F 0x57 0x37 0x37 0x33 0x30 0xC 0xD 0x36 0x33 0x36 0xE 0xB 0x48 0x6F 0xB2 0xF4 0x40 0xCD 0x67 0x64 0x83 0xB 


Write bytes to camera


Device received: 0x77 0x0 0x27 0x0 0x80 0x57 0x41 0x30 0x37 0x30 0x31 0x20 0x30 0x2F 0x9C 0x30 0xC 0xB 0x43 0x74 0x71 0x6C 0x20 0x68 0x6F 0x67 0x73 0x20 0x66 0x78 0x68 0x71 0x76 0xE 0xB 0x4F 0x57 0x37 0x37 0x33 0x30 0xE 0xB 0x36 0x31 0x34 0xC 0x9 0x48 0x6F 0x68 0x76 0x20 0xB1 0xEE 0xC4 0x1D 0x5 


Write bytes to camera


Device received: 0x77 0x0 0x27 0x0 0xC0 0x57 0x43 0x9C 0x37 0x30 0x33 0x20 0x30 0x2F 0x30 0x30 0x83 0xB 0x41 0x74 0x71 0x6E 0x20 0x68 0x6F 0x67 0x71 0x20 0xB1 0xF8 0x68 0x71 0x76 0xC 0x9 0x4F 0x57 0x37 0x37 0x31 0x30 0xC 0xB 0x36 0x33 0x36 0xE 0x9 0x48 0x6F 0x68 0x76 0x20 0x64 0x6F 0x64 0xC 0x9

The camera-specification (https://www.mouser.com/ds/2/737/adafruit_english%20camera-1217461.pdf) tells me, that i should expect a respond like this: 0x76 0x00 0x26 0x00
But like in the code section above i get 0x77 or sometimes 0x73 at the beginning of my output.

I attached my source code to reproduce the problem.

I would be really really happy, if someone can help me to get my camera working.

PTC06Communication.ino (750 Bytes)

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?

Hello arduarn,

Thanks for your hint! :slight_smile:

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.

Finally the print out is the following:

Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0x69 0xEE 0xE6 0xF2 0x20 0xE5 0x78 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0x74 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0x64 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0x43 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0x4F 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0x69 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0x49 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0x77 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0x43 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0x74 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0x74 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0xE9 0x6E 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0x43 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0x72 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0x78 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0x56 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0x49 0x6E 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0x56 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0x43 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0x72 0x20 0xE5 0xF8 0xE9 0xF3 0x74 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xD 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0x64 0xD 0xA 
Write bytes to camera
Device received: 0x76 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0x74 0xF2 0xEC 0x20 0x69 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0x74 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0x49 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0x76 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0x43 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0x76 0x0 0x26 0x0 0x0 0xD6 0x43 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0x69 0xEE 0xE6 0xF2 0x20 0x65 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0x43 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0x69 0xEE 0xE6 0xF2 0x20 0x65 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0x4F 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0x65 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0x73 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0x69 0xEE 0xE6 0xF2 0x20 0xE5 0x78 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0x72 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0x65 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0xE9 0x6E 0xE6 0xF2 0x20 0xE5 0xF8 0x69 0xF3 0xF4 0xD 0xA 0xCF 0x57 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0x69 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0xC3 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0x78 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0x56 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA 
Write bytes to camera
Device received: 0xF6 0x0 0x26 0x0 0x0 0xD6 0xC3 0x30 0x37 0x30 0x33 0x20 0x31 0x2E 0x30 0x30 0xD 0xA 0x43 0xF4 0xF2 0xEC 0x20 0xE9 0xEE 0xE6 0xF2 0x20 0xE5 0xF8 0xE9 0xF3 0xF4 0xD 0xA 0xCF 0xD6 0x37 0x37 0x32 0x30 0xD 0xA 0x35 0x32 0x35 0xD 0xA 0xC9 0xEE 0xE9 0xF4 0x20 0xE5 0xEE 0xE4 0xD 0xA

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.

Ok even that problem is now fixed.

I simply took a picture at daylight and the quality is much better!! :-[ :smiley:

Thanks a lot again arduarn!!

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!! :-[ :smiley:

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.

Have fun!