MartinFowler

Simple tablet 5.0 inches 800x480

 
Overview

Design and implementation of simple tablet based on Linux and Qt5

Station B video
simple tablet

1. Main research contents

   This topic is the design and implementation of a simple tablet based on Linux and Qt5. The main research content is related to Linux and Qt5. By transplanting the Linux system, you can master Uboot compilation, Linux kernel trimming, file system mounting and other related operations. You are also familiar with driver mounting and uninstalling, device tree writing, etc. By writing Qt5 applications, you can understand C++ language programming, understand the operating mechanism of slots and signals, and be familiar with the calling relationship between each module. Understand the general process of product development through the design of the entire system from hardware to software.
    This system is divided into three parts: hardware part design, system part design, and application part design. The design of the hardware part includes starting from device selection, main control chip, screen, speaker, battery management, etc., to schematic drawing, PCB layout and wiring, Jialichuang board making, welding and a series of processes. System part design includes cross-compiler installation, Uboot transplantation, Linux kernel tailoring and compilation, file system tailoring and mounting, Tslib transplantation, Mplayer transplantation, Qt transplantation, driver transplantation, driver writing, script language writing, etc. The application part includes video playback, music playback, photo playback, checking date and time, checking weather, checking temperature and humidity, checking settings, reading e-books, using notepad, using calculator, playing NES games, etc. Through the design of these three parts, a device with tablet functions is completed.

2. Design analysis

1. Hardware circuit design analysis

   The hardware circuit design is mainly divided into several modules for development. The advantage of such development is that the modules can be used in combination and can be fully utilized in the subsequent development of other products. It can be roughly divided into four modules, main control core board, main control backplane, charge and discharge management module, and serial port debugging module. The charge and discharge management module is mainly responsible for battery management, charging, discharging, battery protection, etc. The serial port debugging module is mainly used in the development stage. The device software part can be developed and debugged by printing information to the PC terminal. It is no longer needed after the design is completed. The main control core board is mainly the main control and its peripheral circuits, forming a minimum system. A single main control board can be used, and the baseboard can be expanded at will to be used as a music player, web camera, or voice assistant. The main control board is the core peripheral device of a simple tablet, mainly including headphone interface, power amplifier chip, clock chip, screen interface, touch interface, WIFI module, vibration motor interface, microphone, one-button power on and off circuit, gyroscope chip, temperature and humidity chip , LED and some buttons, etc. These peripheral devices form a channel for information exchange between the simple tablet and the outside world.

2. System transplantation design analysis

   This part is the core part and the most complex part, but it is also the easiest part to use, because this part is generally developed by the original chip factory and then provided to users. In other words, this part can be used directly through simple configuration. The first is Uboot compilation. Uboot is a piece of startup code that deals with the bottom layer of the chip, including system clock configuration, DDR initialization and a series of operations. After Uboot is started, the device tree and Linux kernel will be loaded, which requires us to transplant the Linux kernel. The entire Linux kernel is very large. We only need to transplant the required parts, that is, we need to trim the kernel. After trimming and compiling, we need to mount the file system. The file system is the part where subsequent files are stored and is also the part that is directly contacted. There are several options for the file system. You can choose the smallest file system, which is only a dozen MB in size, or you can choose the Debian system, which is divided into one with a desktop and one without a desktop. There are several ways to compile the file system. This system uses Buildroot to compile the minimum file system. After the file system is successfully started, we can proceed with driver development and application development.

3. Driver development design analysis

   We have carried out hardware development and system transplantation before, and then we will carry out driver development. This part mainly involves developing the hardware design part, using the device tree to define pin functions, and using the Linux kernel for driver development, which can be compiled into a Ko module. Loading, you can also directly compile it into the kernel. After being directly compiled into the kernel, it will be automatically loaded after power on. The following devices require driver development. The WIFI module driver is developed for networking, the clock module driver is developed for time display, the temperature and humidity module is developed for temperature and humidity acquisition, the vibration motor driver is developed to control motor vibration, the touch driver is developed to enable the screen touch effect, and the one-key switch circuit driver Develop and implement power on and off, button development for volume setting, Ethernet driver development, RGB screen driver development, microphone driver development, etc. By writing drivers, the simple tablet can exchange information with the outside world to prepare for subsequent application development. Driver development is the most complex, most error-prone, most time-consuming, and least easy to find problems.

4. Application development, design and analysis

   After driver development, it means that this design has the ability to exchange information with the outside world, but how to do it specifically requires application development. Application development means using the system application function API to deal with hardware drivers on a Linux system. This system is designed as a simple tablet, and it must realize some things that the tablet can do, such as video playback, music playback, picture playback, temperature and humidity acquisition, weather query, reading e-books, checking time, checking calendar, notepad, and NES games. , screen backlight adjustment, flashlight, etc. Applications are written through Qt5. Qt is a cross-platform, highly flexible development software that is easy to transplant and can be well applied to embedded devices.

5.3D shell design analysis

   In the final stage of design, simple flat packaging is required, and users cannot be given a bare board to use. Use Lichuang EDA Professional Edition to design 3D shells. It is easy to operate, and you can design directly in the drawn PCB file after drawing the circuit board. There is no need to switch back and forth between PCB design software and 3D modeling software, which greatly saves money. Development time. There are several points to pay attention to when designing the 3D casing. First, ensure heat dissipation and not completely seal it. The buttons, SD card slot, USB interface, and headphone jack must be slotted. The screen part can be directly wrapped, and the outer frame of the screen Do not show.

3. Design block diagram

1. Overall design block diagram

image.png
   This block diagram introduces the overall design idea. Starting from the hardware circuit, through system transplantation, driver development, application development and 3D design, the whole process of constructing a simple tablet is introduced step by step.

2.Hardware circuit design block diagram

image.png
   This block diagram introduces the hardware structure of a simple tablet, including the selection of some devices and corresponding functional circuits, such as one-key power on and off, headphone amplifier switching circuit, etc. It can be seen that designing a product requires a lot of devices.

3. System transplantation design block diagram

image.png
   This block diagram introduces the system transplantation of a simple tablet. It starts from three aspects, Uboot transplantation, Linux kernel cutting to the final file system compilation, and introduces the basic operations of the system level of the Linux system hardware platform.

4. Application development design block diagram

image.png
   This block diagram introduces the application APP of Simple Tablet. You can intuitively see that Simple Tablet has developed a wealth of applications. These basic applications can meet daily needs and introduces that a product requires the support of many software.

4. Hardware design

1. Core board introduction

   The design size of the core board is 3cm * 5cm, and it is designed using a four-layer board. The purpose of the core board design is to facilitate expansion, mainly to build a minimum system based on the main control, which can be run on a single core board. The core board design hardware includes Allwinner's V3S main control chip, as well as some V3S peripheral circuits, crystal oscillator, reset, etc. It also uses a DCDC chip EA3036 to provide 3-way power supply to provide power to the V3S. The MINI PCIE interface is used to connect to the base board. MINI PCIE can lead out 56 pins. The FPC row of the RGB screen is led out on the core board. In this way, the RGB screen pins are removed, and basically all the remaining pins can be led out. The core board also has a W25N01GVZEIG memory chip onboard, which can be used to store the system, and then does not require an SD card to run and start.

2. Baseboard introduction

   底板设计大小为7.6cm * 10cm,采用两层板进行设计。底板设计的主要功能就是构造简易平板所需的功能,包括一键开关机电路,电池接口,RTL8723BS WIFI蓝牙模块,耳机,8002B功放芯片,DS3231时钟芯片,SHT30温湿度芯片,MPU6050陀螺仪芯片,震动马达接口,SD卡接口,音量加减键,关机键,复位键,还板载了RGB屏幕背光电路等。通过底板上这些器件的运行可以保证实现本系统所需要的功能。

3.硬件电路原理图分析

1.全志V3S主控芯片原理图设计

   本系统使用的主控芯片是全志的V3S,是ARM Cortex-A7架构,主频最高支持1.2GHz,空载运行电流 90~100mA,满载运行电流~180mA,集成 64MB DDR2,可从8~32MB SPI Nor Flash、128MB Nand Flash和SD卡等设备启动。有一个RGB666屏幕接口,支持常见的 272x480, 480x800,1024x600 等分辨率。拥有一路100M Ether接口(含 EPHY),一路OTG USB接口,两路Speaker接口和一路Mic接口等资源,非常适合开发多媒体设备,满足简易平板的应用需求。
image.png

2.EA3036电源芯片原理图设计

   本系统使用的电源芯片是一款DCDC器件,型号为EA3036。EA3036采用20针QFN 3X3封装。EA3036支持2.7-5.5V范围输入,0.6V参考电压。EA3036为三路输出,每路输出可实现2A持续输出能力,并提供独立的使能端进行电源管理和上电时序控制。本系统的三路电源输出分别为1.2V、1.8V和3.3V。
image.png

3.RGB屏幕接口原理图设计

   这款芯片自带有RGB666的接口,所以可以驱动RGB的屏幕。RGB666表示数据有16位,分别是R6位,G6位,B6位,这些都是数据线,另外还有行同步信号,列同步信号,时钟信号等。RGB屏幕是一个通用接口,是市面上最为常见的屏幕之一,应用非常广泛。本系统原理图画的是正点原子的屏幕接口,并且带电容触摸。
image.png

4.MINI PCIE接口原理图设计

   本系统是设计为核心板加底板的方式,那必然核心板上要留出接口。关于接口,前期也了解很多,比如排针,BTB连接器,DDR,M.2,MINI PCIE等等。最终选择了MINI PCIE。因为MINI PCIE的引脚个数正好合适,间距为0.8mm,而与之相似的M.2的间距为0.5mm,PCB绘制的时候不好连线。经过层层考虑,最终选择了MINI PCIE接口进行核心板与底板的连接。
image.png

5.PT4103B23F升压芯片原理图设计

   PT4103是一款升压型DC/DC转换器,设计用于从单电池锂离子电池以恒定电流驱动多达8个串联的白色LED。由于PT4103直接调节输出电流,因此它非常适合驱动发光二极管(LED),而RGB的屏幕背光正好是多个LED进行连接,这款芯片用来驱动背光再好不过。
image.png

6.RT9193稳压芯片原理图设计

   RT9193是一款LDO芯片,输出电压为3.3V,选择封装为SOT-23-5,非常小巧,并且外围电路也不多,容易嵌入到系统板上。RT9193提供了稳定可靠的电源,只要输入电压在一定的范围内,输出电压永远保持在3.3V。
image.png

7.一键开关机原理图设计

   生活中的便携式电子产品都具有开关机按键,比如手机电源键就是一种非常典型的一键开关机,长按开机,长按关机。除了手机以外的其它电子产品,也可以使用这种方法,给用户良好的体验。本系统就是基于用户体验的角度,在系统底板上加入了一键开关机电路,方便用户对简易平板进行操作。
image.png

8.DS3231时钟原理图设计

   DS3231是一款精度很高的实时时钟芯片,内置自动补偿电路。可以自动调整月份和日期,还有闰年补偿功能。时钟的工作格式可以有两种模式,24小时模式或者12小时模式。DS3231内部集成了可编程的闹钟,并且支持两路。DS3231这个实时时钟不仅可以提供准确的走时而且还能保持断电走时,极大保障了系统时间的准确性。
image.png

9.麦克风原理图设计

   全志V3S集成了音频ADC,可以外接一个麦克风,通过麦克风可以获取外界的声音,然后存储起来,可以实现录音的功能。还可以开发软件部分,使其支持语音识别,可以实现语音助手的功能。
image.png

10.耳机和8002B功放原理图设计

   全志V3S不仅支持音频ADC,还支持播放音频,可以接一路耳机,有左右双通道。虽然插上耳机就可以播放音频,但毕竟还是需要有耳机才能播放。在设计上加入一个功放芯片8002B,通过功放外接一个喇叭就可以支持声音外放。而且设计过程中对耳机和功放部分做了处理,使插上耳机的时候耳机播放,不插耳机的时候就外放。
image.png

11.RTL8723BS WIFI蓝牙原理图设计

   RTL8723BS是一款小尺寸,小巧的WiFi + BT组合模块,电路板尺寸为12mm * 12 mm,高度为1.6mm。非常适合平板电脑,超极本,移动设备和消费类产品。它提供用于WiFi的GSPI/SDIO接口与主机处理器连接以及用于BT的高速UART接口。WiFi的吞吐量理论上可以达到150Mbps。本系统设计模块的初衷就是为了方便联网,毕竟作为一个移动设备,不可能一直插网线这种方式,并且这款模块还支持蓝牙,相当于一个模块就继承了WiFi和蓝牙,非常适合本系统。
image.png

12.MPU6050陀螺仪原理图设计

   MPU6050是一款陀螺仪芯片,内置陀螺仪和加速度计,可以通过检测当前的姿态来判断当前的平板的姿态位置。本系统设计的目的是为了实现重力感应,自动翻转屏幕,充当计步器等功能。
image.png

13.SHT30温湿度原理图设计

   SHT30是一款温度和湿度传感器。它的封装为DFN-8,封装外形为2.5mm * 2.5mm,同时保持0.8mm的高度,这意味着可以将它集成到多种应用中。本系统设计的目的是为了能够实时获取外界环境的温度和湿度,给用户一个直观的体验。
image.png

14.震动马达原理图设计

   震动马达是一个可以发生震动的器件,通过一个三极管就可以驱动。诸如手机一样,当设置为震动模式的时候,不会发出声音,但是手机本身发出震动。本系统就是基于这样的设计思想,当简易平板设置为震动模式的时候,一旦有外界消息震动马达就会发出震动,以提醒用户及时查看消息。
image.png

4.PCB分析

1.核心板PCB分析

   核心板PCB为四层板,最小线宽为4mil,是嘉立创四层板所支持的最小工艺。整体设计为两面都有器件,因为核心板只有设计的比较小,才能更方便的集成到应用中去。正面放置EA3036 DCDC器件,主控芯片V3S,和RGB屏幕接口FPC。FPC放到正面是为了方便后续接屏幕。背面大多是一些电容电阻和一个W25N01GVZEIG备用,W25N01GVZEIG默认是不焊接的。在内层1对电源进行了分割,主要有VBUS,1V2,3V0,3V3等。在内层进行电源分割,不仅方便布线,还增强系统的可靠性。

2.底板PCB分析

   The base PCB is a two-layer board with a minimum line width of 6mil. Jialichuang double-sided board supports a minimum line width of 5mil. The overall design has only the device on the back, because the entire screen is attached to the front. When designing this, you need to consider the screen cable arrangement and slot it at the corresponding location to facilitate cable connection. Also, the power switch and volume switch should be placed in appropriate positions to facilitate our operation. There are also type-c interfaces, microphones, headphone jacks, and the location of the SD card slot that need to be considered. The position of the screen FPC must be aligned with the FPC interface on the core board, that is, the FPC cable connection must be aligned and cannot be cross-knotted. It is best to place the MPU6050 in the middle of the board so that the measurement results are most accurate. Do not pour copper on the antenna part of RTL8723BS.

5. Test effect

1. Main interface test

   The main interface is the interface that is entered when the program is started. There are more than a dozen APP applications listed in it. You can slide to turn the page. Click the corresponding APP icon to enter the corresponding APP application interface.
image.png

2.Music playback test

   The music playback interface realizes the scrolling display of lyrics according to the progress bar, with functions such as pausing, previous song, and next song. It will display the current playback progress and total progress duration, and the scroll bar can be slid to jump to the music playback progress.
image.png

3. E-book test

   The e-book is divided into two interfaces. Clicking the e-book icon will enter the bookshelf interface, which will list the book information in the current file. Select the corresponding book to enter the reading interface. In the reading interface, you can modify the background color and text color, etc.
image.png
image.png

4. Weather forecast test

   Click the weather icon to enter the weather query interface. Enter the corresponding city name and click the query button to display the current temperature, wind direction and other information. There will also be a warm reminder at the bottom. Click the toggle button in the upper left corner to view the weather conditions in the next few days and remind you to pay attention to protection.
image.png
image.png

5. Calculator test

   Clicking on the calculator icon will enter the calculator interface. There is a background picture in contrast with the buttons, making it easy to use the buttons for operations. It supports continuous addition, subtraction, multiplication and division operations. The calculation results are displayed in large characters for easy access.
image.png

6. Set up interface testing

   Click the settings icon to enter the settings interface. In the settings interface, you can set WIFI, Bluetooth, sound, display, date and other operations. Click the About option to enter the About interface to display some system memory size, version and other information.
image.png

6. Conclusion

   This article mainly introduces the design and implementation of a simple tablet. The system starts from hardware design, and through system transplantation, driver development, application development, shell design and other operations, it has covered the basic process of a product from design to production. The hardware design is also very skillful. If something is slightly wrong, the board needs to be redesigned. From the beginning of the design to the final product, this system has made a total of two development boards, three core boards and three base boards, which is equivalent to eight boards alone. It involves two-layer boards and four-layer boards many times, as well as power splitting and some general precautions. By designing this system, you can strengthen the basic operations of the hardware design part and become proficient in PCB design. The system part mainly involves the knowledge of Linux system. By compiling Uboot, Linux kernel and Rootfs, you can skillfully configure the cross-compiler, understand the execution mechanism and programming specifications of Makefile, and be able to modify and add .config files. The main operation of driver development is to operate the underlying hardware. You need to understand the device manual, be able to drive the device using the communication protocol, know how to use the device tree to configure pins, how to flexibly use the driver framework, etc. Application development mainly involves Qt knowledge, being able to use C++ programming language proficiently, understanding the mechanism of signals and slots, knowing a little UI design, and being able to perform basic processing of images, etc. Shell design mainly involves processing some 3D graphics. You can skillfully design PCB shells and know how to open holes and how to set fixing holes. By designing this system, you can master a lot of knowledge and improve your own abilities.
    In the process of designing and developing this simple tablet, I consulted a lot of relevant information, provided a lot of ideas, and also learned from the well-designed parts. This system is developed and designed based on Linux and Qt5. The design direction of the operating system and UI is a common operation of mobile devices. Only when every step is designed properly can the final product achieve its intended function.
    Although the design cycle of this system is very long, due to the complexity of the knowledge involved and the amount of content that needs to be developed, it is inevitable that there will be design flaws and imperfect functions during the design process. I hope you can correct me. In the follow-up time, we will continue to develop some functions and modify some defects to make the functions more perfect and the system more sound.

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-22 15:40:17

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号