
For students engaged in embedded development or those who enjoy DIY, they are often willing to tinker with various hardware and software. Today, I will share something from an embedded enthusiast – the M5Pi.
What is M5Pi?
M5Pi is an embedded Linux development board that I recently created and made open source. It is based on the Allwinner Technology F1C200s chip, features an onboard MPU6050 attitude sensor, a 2-inch full-fit capacitive touch display with a resolution of 320×240, and a 1W small speaker for sound playback. The Wi-Fi uses ESP8089. Most importantly, it has a beautiful shell, which is why I call it the most exquisite “Pi”.
This project is completely open source, with the PCB designed using the open-source software KiCAD, some 3D models created with the open-source software FreeCAD, and the system built using the popular buildroot. I also wrote a simple launcher using LVGL (which is not yet fully completed).
Why DIY?
I have been involved with embedded Linux for quite a while, starting with the Raspberry Pi, then moving on to NanoPi, Orange Pi, Lychee Pi, and so on; I have basically tried them all. Additionally, I recorded a few beginner tutorial videos on Bilibili, but my regular work is not primarily Linux-related, so my understanding and explanations are quite superficial.
What truly motivated me to start from scratch to create my own “Pi” was seeing the small computer made by ZhiHui last year, which I thought was fantastic. I wanted to make one too, but after trying, the difficulty was quite high, so I ended up making a microcontroller version of a small TV using ESP32-S2. However, that idea never disappeared.
What attempts have been made?
The second attempt to create it should have been in November of last year because I had been playing with M5Core2 for a while and thought that the size, shell, and touch screen were simply fantastic. Just right, I had the shell and display on hand, so I wanted to give it a try and specifically chose the Allwinner H5. I then browsed forums, searched for information, and downloaded resources…
When I actually started to design the PCB, I realized I was still missing something because the H5 does not have built-in DDR, and I wanted to add eMMC, which falls into the category of high-speed PCBs, making it quite difficult. I simply made a layout version of the PCB, looked at the main components, and gave up. Due to the constraints of the shell size, the front space was quite small, and I was not sure if placing components on the back would interfere with the screen or if heat would affect the display, so I dropped it again.
There are also two DDRs on the back, and before layout, I felt it would be difficult to manage.
However, I did not completely give up. I still successfully managed to create a version using FriendlyARM’s NanoPi NEO Air core board and designed an expansion version. I successfully prototyped a version, although it was a roundabout way, and the size was not quite right, among many other small issues, but the effect was still very good!
I ran Armbian on it, and I also struggled for a long time to drive the screen. I couldn’t get it to light up no matter what I did. In the end, I found out that the FPC connector was poorly soldered… I almost wanted to smack myself at that moment.
The front looks quite good, but the back is a bit of a disaster…
How was it done?
After finishing with NanoPi, I got lazy (actually, I’m just inexperienced) and wanted to use a CPU with better performance. I couldn’t manage the PCB, and those I could manage had low performance, leading me into a long phase of CPU selection. The overall idea was to choose one with built-in DDR and decent performance.
Initially, I did not plan to use F1C200s for M5Pi; I was looking at SSD202 because my company was working on a project (Unit V2) and I had some understanding of it. However, the documentation for this chip requires signing an NDA, which would affect my ability to open source later, so it was better to choose a widely used chip, even though the official documentation has never been released.In the end, I focused on F1C and V3s.
Although V3s has better performance than F1C, it is also a bit more expensive. Since this was my first attempt, I decided to go with a cheaper option. Thus, I settled on F1C and officially started working on it at the end of April. Designing a chip with built-in DDR is much simpler; as long as the power supply and crystal oscillator are fine, it can run normally…
(Here, thousands of words are omitted; the development records can be found on the Pit website, with links at the end of the article.)
The first version of the PCB can run normally, but the touch and LED were reversed, and other than that, there were no major issues.Then the software development went quite smoothly because the great Aodzip had already done a lot of adaptations, so I just needed to make simple modifications to the device tree, and it ran without any problems, unlike the previous time where soldering issues caused me to spend several days troubleshooting software (ahhhh), which was a bit of a humble brag.
From start to normal operation, it actually took quite a long time, mainly working on weekends. I had actually made several versions of the PCB, mainly for layout and structural testing.The most frustrating part of the development process was soldering; it’s a long story filled with tears, as soldering is extremely tedious…
What have I gained?
Working on M5Pi for a long time has been very enjoyable. This feeling can only be experienced when you do it yourself, debugging bit by bit, and the satisfaction of getting each function to work is indescribable~
Completing a small project is quite rewarding, and I encourage everyone to try it out as well. Many students on Bilibili have asked me how to learn and develop, and I believe that hands-on practice is the best method. M5Pi is not yet fully developed, but I have already started preparing for the next version!
Special Thanks
During the process of making M5Pi, I received help from many people. First, I would like to thank the friends at Waku Network (formerly Pit Network), then my BOSS, who generously provided me with several sets of shells (unfortunately, the display screen was out of stock), and the laboratory where I could tinker around on weekends. Lastly, thanks to Allwinner’s Kirin, who sent me a Nezha D1 development board, and to the netizens who documented and shared various issues!
Finally, the project is open source and can be found in the Github repository.
Related Links
-
https://github.com/imliubo/M5Pi
-
https://www.bilibili.com/video/BV1RV411W7eH
-
https://whycan.com/viewtopic.php?id=6402&action=onlyshowauthor
Source: DF Maker Community
Original link: https://blogs.oopswow.com/2021/08/13/How-to-make-a-M5Pi/
Copyright belongs to the original author. If there is any infringement, please contact for deletion.