Seeed Camera Shield

Ardiuno Compatible shields

Moderators: violet, jessie, cory.j.fowler

Post Reply
mholler
Pre-kindergarten
Pre-kindergarten
Posts: 11
Joined: Thu Dec 18, 2014 9:35 pm

Seeed Camera Shield

Post by mholler » Thu Jan 14, 2016 1:32 am

There seem to be a few missing bits of information in the Seeed Camera Shield Wiki. In particular the description of how to modify the default shield configuration to use hardware serial communication with the arduino under it only describes the software changes required.

Several hardware changes seem to be required. One is that the serial port jumpers need to be moved to the pins on the arduino board where its hardware serial port are located. On an arduino Uno or a Stalker these are pins 0(arduino RX) 1(arduinoTX).

The other hardware change involves the Uart Select Jumper which is actually just a couple traces which have to be cut and others soldered. The default is CMR_TX connected to GPIO0/TX which needs to be changed to UART_TXD and similar for the CMR_RX signal.

The reason you may need to do this is because the arduinos based on Atmega 328 can only have one Software Serial port receiving at a time. If you want to use both the camera and the radio on a Stalker at the same time one of them needs to use the Hardware serial port. This is what I am trying to do. I have not yet completed this change successfully.

mholler
Pre-kindergarten
Pre-kindergarten
Posts: 11
Joined: Thu Dec 18, 2014 9:35 pm

Seeed Camera Shield Hardware Serial Port Config.

Post by mholler » Thu Jan 14, 2016 9:57 am

I am having trouble getting the Camera shield to work using the hardware serial port to communicate with the camera. The Software Serial port on pins 2,3 or 4,5 works fine until I start using another software serial port to communicate with the XBee radio on the Stalker V2.3 that I have the Camera Shield installed on. The arduino reference says Atmega 328 based arduinos can only receive on one Software Serial port at a time. Hence my attempt to use the Hardware Serial port option which is described on the Camera Shield Wiki.

Based on the Wiki for the camera shield and some assumptions I had to make about what should be done to the hardware I did the following:
1. I commented out the two lines in my sketch derived from the example snapshot specifying Software serial and uncommented the line specifying hardware serial VC0706 cam = VC0706(&Serial1). It wouldn't compile with Serial1 so I changed it to Serial. The stalker has only one serial port. This suggests that use of the hardware port may only be intended for users of the the arduino Mega and other boards with multiple serial ports. Can the hardware serial port be made to work on the Stalker? I have been unsuccessful thus far. I have removed all the Serial.print statements from my code and I pull the camera board off to program the stalker which seems to mostly work but I get no commuincation (orange LED flashes ) in this configuration.
2. Change the #Define USE_SOFTWARE_SERIAL in VC0706_UART.h FROM 1 TO ZERO.
3. Move the CMR_RX and CMR_TX jumpers on the camera board from pins 2,3 to 0,1 respectively. The Wiki gives no hint these need to be moved.
4. I cut the UART Select solder bridges to GPIO1, GPIO0 of the VC0706 and soldered across to the alternate connections UART_RXD and UART_TXD respectively which I am assuming are the hardware UART connections that should be used for hardware serial communication with the arduino. Is this right?
5. I pulled off the Uartsbee 6 pin serial connector to the stalker and replaced it with a two pin connector to supply +5V to the USB5V pin which provides 5V to the camera shield.

QUESTION: Did I made the right hardware modifications to use the Hardware serial port for communication with the camera? Do I need to make any other changes to the code to use Serial instead of Serial1? Any other guidance would be appreciated.

Note the schematic doesn't show the LEDs for the SD card or the Camera on it. It neglects to show the camera chip as well. These are not show stoppers but, they do make me wonder what else is missing from the schematic.

Mark

mholler
Pre-kindergarten
Pre-kindergarten
Posts: 11
Joined: Thu Dec 18, 2014 9:35 pm

More on Hardware serial port use on Camera Shield

Post by mholler » Fri Jan 15, 2016 6:19 am

After another day of researching I found a document which describes the registers and protocol for using the VC0706. https://www.adafruit.com/datasheets/VC0706protocol.pdf

There is a fundamental chicken and egg problem in trying to communicate with a device to tell it how you want to communicate with it. It now appears that the solution to this problem is to communicate with the VC0706 using its default serial communication parameters and then modify the communication parameters using the connection established or just live with the defaults. I have decided to do the later which is now working.

In addition to the serial protocol parameter defaults there is also a default communication port which is the UART port not the HS_UART or SPI. I've been trying to communicate with the HS_UART port thinking it would be listening but, since the VC0706 is preconfigured(in its flash memory) to use the NON -HS port by default I got no response from it. I modified the solder bridges on CMR_RX and CMR_TX back to their default configuration which is to connect the arduino with the NON-HS UART port on pins 76,77 of the VC0706. I then set the default baudrate of the arduino Hardware Serial port (0,1) to the default baudrate of the VC0706 UART port, 38400. Now the Camera initializes fine during setup(). However when I try to initialize it again in the loop() after initializing a Software Serial port for communication with the XBee the camera fails to initialize. I still seem to have a conflict somewhere. Going to Hardware Serial instead of software serial should have eliminated the two port use of Software serial which is known not to work. If you have any ideas for what to look for next please do comment. Thanks.

kavi
Staff
Staff
Posts: 305
Joined: Tue Dec 09, 2014 12:06 pm

Re: Seeed Camera Shield

Post by kavi » Mon Jan 18, 2016 8:14 pm

Hi,
1. I commented out the two lines in my sketch derived from the example snapshot specifying Software serial and uncommented the line specifying hardware serial VC0706 cam = VC0706(&Serial1). It wouldn't compile with Serial1 so I changed it to Serial. The stalker has only one serial port. This suggests that use of the hardware port may only be intended for users of the the arduino Mega and other boards with multiple serial ports. Can the hardware serial port be made to work on the Stalker? I have been unsuccessful thus far. I have removed all the Serial.print statements from my code and I pull the camera board off to program the stalker which seems to mostly work but I get no commuincation (orange LED flashes ) in this configuration.
2. Change the #Define USE_SOFTWARE_SERIAL in VC0706_UART.h FROM 1 TO ZERO.
3. Move the CMR_RX and CMR_TX jumpers on the camera board from pins 2,3 to 0,1 respectively. The Wiki gives no hint these need to be moved.
4. I cut the UART Select solder bridges to GPIO1, GPIO0 of the VC0706 and soldered across to the alternate connections UART_RXD and UART_TXD respectively which I am assuming are the hardware UART connections that should be used for hardware serial communication with the arduino. Is this right?
5. I pulled off the Uartsbee 6 pin serial connector to the stalker and replaced it with a two pin connector to supply +5V to the USB5V pin which provides 5V to the camera shield.
all this hardware modifications are correct.
You need to modify the software inorder to make your project work.

Please find the attached library and example which we have modified according to your requirements.Follow the steps below to use the library.

1.Upload the attached code.
2.Remove the RX,TX and DTR from the UARSbee
3.Then install the camera shield.

Let us know if you have any other issues.
Thanks and Regards

charles.curry
Pre-kindergarten
Pre-kindergarten
Posts: 1
Joined: Thu Apr 12, 2018 4:13 am

Re: Seeed Camera Shield

Post by charles.curry » Wed May 16, 2018 11:42 pm

So this is going to seem like a fairly bizarre question, but I am going to ask anyways. I have been using 5 of the seeed studio cameras for a few months now in a test design and prototype that I am developing. They work great, and so I am moving to the next phase which is taking me off of the shields and boards, and going to a single non-modular design. I have studied the schematic you have online, as well as the datasheets for the vc0706 and the ov7725. I'm not financially able to pay a professional for this so I am having to go it alone. So please forgive if I am asking a question that you would usually charge to answer. My question is that the VC0706 says it can be configured using external memory, and naturally you have an I2C EEPROM chip connected to CS_SDA and CS_SCL, so is that chip being used to configure the vc0706, or is it being used as a buffer.

The data sheets from Vimicros leave many many questions unanswered. Before I fabricate this board and start mounting components, I wanted to know if I should be preprogramming that EEPROM with some form of command structure. In your design you have the OROM_Mod set to boot from internal rom, so I am thinking you are using that chip as a buffer, and not to set the registers. Is my assumption accurate or should I continue researching. I apologize for asking you and not vimicro but after 3 weeks of calling their offices all over the world and no one answering, and all of their electronic contact links and emails being non-functional, I figured I would return to where I started. Which was with your camera shields. Any help that you can provide would be very very much appreciated.

If it is being used to set registers on the vc0706, how would I know which registers to set and how to set them. Would you recommend reading the entire EEPROM chip and copying its contents to another chip. The data sheet contains absolutely no register information at all. I don't know the register address, values, options, or functions. I am worried that I cannot simply fabricate the board, mount the components, plug it into my software, and it start working. Please tell me if I am on the correct path.

I have taught myself all the electrical and software engineering that I know in the last 6 months. I am in way over my head, but I love the challenge.


Thank you so much for your assistance. Also your products have been great and I have learned a lot from studying them.

Charlie

Post Reply