This project is a remote camera based on Zynq. It provides a set of simple and easy-to-use TCP interface, which can easily obtain camera images, control camera operation and modify camera ISP parameters through the network environment.
- development environment:Vivado 2018.3
- kernal board: Xilinx XC7Z020CLG400-2
- development board: 正点原子 领航者v2
- camera: OV5640
The hardware system consists of two side.
The first side is the PS(Processing System) side. It consists of two ARM A9 cores, which can run embedded C language code. In our system, it is responsible for controlling the operation of the system and network communication.
The second side is the PL(Processing Logic) side. It is a piece of FPGA. We use Verilog to write the code to drive the camera and screen, and write the relevant IP core for PS and PL communication. Based on the flexibility of FPGA, we can realize any function we want in this side.
We use pure C language to write programs. All programs run on the PS side. The program mainly performs two functions:
- Initialize the PL end components
- Use TCP protocol for communication
We will not describe the initialization content of PL side too much. This part of the code is mostly some fixed statements, such as executing some necessary logic for setting device initialization
We use LwIP to realize TCP network communication. We test in 100m network environment, and the actual network communication speed can reach 10Mbps. This bandwidth can meet our needs, but for higher quality image or video streaming, we can further improve the implementation scheme of the application layer to maximize the use of network bandwidth. In order to facilitate the modification of camera ISP parameters, we have specially set up an interface
In utils/tcp_cam.py, we provide a simple Python program to realize the video transmission between the host computer and the development board.