Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

1. The most cost-effective camera solution

V3S is a cost-effective camera solution chip launched by Allwinner, featuring the following highlights:

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras1080P@30fps video encoding, integrated ISP

Allwinner V3s is equipped with a high-performance and low-bitrate video engine, capable of achieving 1080p@30fps encoding. It also integrates an advanced image signal processor (ISP) to provide higher image quality.

Designing Hardware and Software Solutions for Allwinner V3s Dash CamerasHigh system integration, built-in DRAM

Allwinner V3s integrates 64MB DRAM to reduce the number of external components, significantly simplifying PCB layout. It also integrates MIPI and parallel CSI controllers, LCD controllers, audio codecs, EMAC+PHY, etc. Allwinner V3s adopts a 128-pin eLQFP package, significantly improving manufacturing efficiency.

Designing Hardware and Software Solutions for Allwinner V3s Dash CamerasLow power consumption

Due to its leading manufacturing process and optimized processor architecture design, Allwinner V3s has very high energy efficiency.

1.1 Specific specifications

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

1.2 Overall architecture

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

2. Hardware design

2.1 Chip selection

Allwinner Technology is a company with outstanding achievements in the design of smart application processor SoCs, high-performance analog devices, and wireless interconnect chips. Since its establishment in 2007, Allwinner Technology has emerged in the domestic and international chip design industry with its excellent technical strength and innovative spirit.

2.2 Core function planning

The main functional modules of the solution include: power supply, minimum system, programming, display, camera.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

2.2.1 Board and core board structure

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

In embedded system design, the design idea of separating the core board from the expansion board has many practical advantages. The core board usually integrates the processor, memory, and necessary interfaces, while the expansion board provides additional interfaces and functions, such as extra I/O ports, sensor interfaces, communication modules, etc.

This modular design makes the system more flexible and scalable. Developers can choose the appropriate core board based on project requirements and expand or customize functions by replacing or adding different expansion boards without redesigning the entire system. This not only shortens the product development cycle but also reduces development costs.

Moreover, this design also facilitates maintenance and upgrades. When the core technology (such as the processor) needs to be upgraded or replaced, only the core board needs to be changed without affecting the expansion board, and vice versa. This allows the product to adapt to rapidly changing technological environments, extending the product’s market lifecycle.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Baseboard + Core Board

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Baseboard without core board

Due to the size limitations of this solution and the relatively few peripherals, a single-board solution design is adopted.

2.3 Minimum system

2.3.1 CPU packaging

1)DIP packaging

This packaging is larger in size, with long pins, making it suitable for quickly building prototypes with breadboards or universal boards.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

2)QFP packaging

QFP packaging is small in size and suitable for installation on PCB, saving space. For this course, this type of packaging is preferred.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

3)eLQFP

eLQFP packaging is thinner, usually 1.0mm thick. This makes it very suitable for high-density and space-constrained circuit board designs.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

2.3.2 Oscillator is the heart of the MCU

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

In the context of digital electronics, we know that modern CPUs operate by relying on voltage signals with timing fluctuations to capture the rising edge and push the execution of internal chip instructions when these rising edges arrive. To generate such waveforms on the circuit board, modern computers mainly use quartz oscillators made from quartz materials. Quartz oscillators can provide very stable and precise clock signals, which are crucial for ensuring the accuracy and reliability of computers and other digital devices.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Profile of passive oscillator components:

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Two types of oscillators

Many MCUs support both passive and active oscillators.

Passive oscillator:

The following image shows two common passive oscillators. The internal structure of a passive oscillator is essentially a quartz piece, which is directly a quartz crystal with metal plates attached on both sides. It must rely on external circuit support to vibrate stably. At this time, the passive oscillator and the external circuit that allows it to vibrate are referred to as the clock circuit.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Active oscillator:

An active oscillator contains not only a quartz chip but also associated ICs and resistive-capacitive circuits. Generally, it has three pins (the common package has four pins, but one pin serves only as a fixing function and is an empty pin). This component internally forms a clock circuit, and we only need to connect the VCC and GND pins accordingly to capture the oscillation signal from the third pin.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

2.4 Power supply module

This solution uses PMU (Power Management Unit: AXP203) to provide critical power output.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Block diagram of the schematic:

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

AXP203 is a highly integrated power management IC that provides a simple and flexible power solution for applications powered by a single lithium-ion battery and supports multiple power outputs. It fully meets the increasingly complex power control requirements of application processors.

AXP203 converts three input sources: AC power, USB, and battery into various outputs such as DCDC and LDO.

The performance indicators of LDO and DC-DC differ mainly in that the linear voltage regulator (LDO) has a smaller output voltage ripple, but when the input working voltage and output voltage differ significantly, the conversion efficiency is relatively low, as it can only step down. The switching voltage regulator (DC-DC) has a larger ripple, but when the input working voltage and output voltage differ significantly, it converts with higher efficiency and can achieve both step-up and step-down output.

Differences between LDO and DC-DC:

LDO DC-DC
Fewer external components, simple circuit, low cost More external components, complex circuit, high cost;
More external components, complex circuit, high cost; Load response is slower than LDO, output ripple is larger
Low efficiency, input-output voltage difference cannot be too large High efficiency, wide input voltage range
Can only step down Supports both step-down and step-up
Limited output current, possibly only a few A, and the maximum output depends on the input-output voltage

High output current, high power

Low noise Switching noise is large; to improve the accuracy of the switching DC-DC, many applications will connect an LDO after the DC-DC
Divided into adjustable and fixed types Generally, they are adjustable types, adjusted via FB feedback resistors

Common LDO

LDO (Low Dropout Linear Regulator) is a device that can stabilize the output of a specified voltage. For example, if we choose an LDO with a fixed output of 3.3V, it can stabilize output to 3.3V regardless of whether the input voltage is 5V, 6V, or 8V (though there will be very slight fluctuations). The key function of an LDO is to provide stable voltage to the circuit, and it is important to note that the input voltage of the LDO must always be higher than its output voltage, and it does not have a step-up function.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Common DC-DC

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

This solution integrates the commonly used circuits mentioned above into the AXP203 chip, making the content involved invisible to the user. This improves the stability and integration level of the system.

2.5 Programming: Supports USB and SD card programming

USB A port B port and C port

USB A and B ports were introduced by USB-IF in 1996. According to the USB protocol at that time, the A port was mainly used for master devices (such as computers), while the B port was used for slave devices (such as printers and cameras). With the increasing popularity of the USB-C interface, devices using the B port are now becoming less common.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

TF card

The four main types of memory cards currently available on the market are TF cards, SD cards, CF cards, and CFast cards.

TF cards, also known as Micro SD cards, are the smallest type of SD card, commonly found in Nokia-era phones. They are now widely used in devices such as GoPro, drones, and switches, and TF cards can be inserted into SD slots using an SD card adapter.

SD cards are the most common type of storage card, used in a wide variety of devices, including digital cameras and laptops. Most friends likely need to buy SD cards.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

TF card socket

There are two common types of card sockets:

Self-ejecting: Self-ejecting TF card sockets usually include a spring mechanism that allows the socket to automatically pop out or retract when the TF card is inserted or removed. This design makes it easy for users to quickly change storage cards.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Flip-cover: Flip-cover TF card sockets have a flip cover that must be manually opened to insert or remove the TF card. This design provides better protection against dust or debris entering the slot.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

2.6 Camera

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

AR0330

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

MIPI Alliance is the Mobile Industry Processor Interface (MIPI) Alliance, established by Texas Instruments (TI), STMicroelectronics, ARM, and Nokia to define and promote open standards for mobile application processor interfaces.

MIPI-CSI

The MIPI-CSI-2 protocol is a sub-protocol of the MIPI Alliance protocol, specifically designed for camera chip interfaces. Due to its high speed and low power consumption characteristics, the MIPI-CSI2 protocol has greatly supported the development of high-definition cameras. It is precisely due to its popularity that five-megapixel cameras on mobile phones became front-facing cameras, and this interface technology is mainly mastered by Toshiba in Japan, Samsung in South Korea, and OmniVision in the United States.

Schematic:

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

2.7 Display

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

2.7.1 Interface definition

RGB color is a color standard in the industry, obtained by varying the three color channels of Red (R), Green (G), and Blue (B) and their combinations to produce various colors. RGB represents the colors of the three channels, and this standard encompasses nearly all colors perceivable by human vision, making it one of the most widely used color systems.

2.7.2 Interface types

a. Parallel RGB

Parallel RGB uses a parallel transmission method, where data for each color channel (Red, Green, Blue) is transmitted simultaneously through different lines.

b. Serial RGB

Serial RGB uses a serial transmission method, where data for all color channels is transmitted sequentially on the same line.

3. System driver software design

3.1 Driver configuration

The driver layer software configures the sys_config.fex file based on the physical pin connections in the schematic to drive peripherals.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

3.2 Introduction to the system middleware CamDroid

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

CamDroid is a highly customizable Android slim system formed by trimming the Android system, retaining the operation mechanism of the native layer, and minimizing the size as much as possible. Its purpose is to maximize the reuse of Android system achievements and improve development efficiency. Key features include:

(1) Basic system (kernel + ramdisk + rootfs) is less than 4M, including libe, libm, properties, binder, servicemanager, init.rc, busybox, debugging system, utils library, netlink framework, vold, crypto, ssl, timezone, etc.

(2) Retains and expands the Android compilation system. Libraries, executable files, and frameworks that can run on the Android system can be ported to the CamDroid platform without any modifications. The required libraries can be flexibly selected according to product features, thereby achieving firmware size reduction based on resource availability.

(3) Supports NDK development and third-party file porting.

4. Apps and user interface

Common embedded GUIs:

LVGL

LVGL is written in C, with excellent portability and flexibility, suitable for various microcontrollers and operating systems. It provides a rich set of controls and layout options. Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

Qt

Qt is a cross-platform C++ application development framework widely used for GUI application development. Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

MiniGUI

MiniGUI aims to provide a fast, stable, fully functional, cross-platform window and GUI support system, especially suitable for Linux/uClinux, eCos, and other traditional RTOS. Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

SimpleGUI

SimpleGUI is an interface library designed for monochrome displays. Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras

This solution uses MiniGUI:

The MiniGUI project started in 1998 and can run on low-end devices with a main frequency of 30MHz as well as high-end devices with GPUs, widely used in consumer electronics and industrial instruments.

Designing Hardware and Software Solutions for Allwinner V3s Dash Cameras
Configuration management interface during system operation

The main functions of the app include: real-time monitoring of the camera, recording function, configuration management, etc.

The code structure is as follows:

Designing Hardware and Software Solutions for Allwinner V3s Dash CamerasDesigning Hardware and Software Solutions for Allwinner V3s Dash Cameras

Leave a Comment