- Category: Embedded Development
- Published: Saturday, November 07 2020 18:48
- Hits: 60
The Lichee Pi Nano
Some time ago, a year or so I believe, I learned about the Lichee Pi Nano. It is a single board development computer with an ARM 9 microprocessor and 16MB of flash memory. That may seem underwhelming until I mention that at the time it was about $8. The price is now down around $7.
Here are the specifications from the Nano website:
Lichee Nano is an SD Card Sized Linux Development Board Powered by Allwinner F1C100s ARM9 Processor
-Allwinner F1C100s, ARM 926EJS processor,up to 900MHz
- Memory & storage
-32MB DDR integrated into SoC, 16MB SPI Flash
-Onboard TF Slot, can be boot from TF Card,
-40-pin RGB LCD FPC connector supporting 272×480, 480×800, 1024×600
and other resolutions resistive displays(and capacitive displays trough the adapter board).
-Support 720P video output, support video stream decoding such as H.264 / MPEG
- Communication Interface
-SDIO for WiFi module
-SPI x2, TWI x3, UART x3
-OTG USB x1, TV out
- Other interface
-PWM x2, LRADC x1
-Headphone output x2, Mic x1
- Electrical characteristics
-Input 5V via micro USB port, 3.3 to 5V via pin
-Output – 3.3V, selectable input RTC voltage
-Power Consumption – 54mA (idle) with Linux, 250mA with display
-Storage Temperature: -40~125°C; operating: -20 to 70°C
The problem I immediately encountered, after waiting a month to receive the order of 4 I made from China, was that I had no idea how to use these things. I am not an embedded developer by trade. I am a curios person by nature though, so off to reading about as much as I can, getting side tracked with other projects, creating a choropleth map in D3.js being the current side project, and finally hitting on the few pages and YouTube videos that helped me move forward. If you want to experiment with one or more of these I recommend ordering from Mouser.com or some other US based electronics company. Not for any anti-Chinese sentiment, Seeed Studio has a good e-commerce setup, but because a US based supplier may keep stock on hand and can get you the boards in a week as opposed to a month or more.
I knew what they could do, sort of, but not how to get them to do it. I really didn't even know how to connect it to anything. It has a couple of connectors built in: micro SD card slot (shown), a 40 pin RGB LCD FPC (Flexible Printed Circuit) connector to attach a display, and a USB-C version 2 connector. It also includes a WIFI transceiver, but the drivers are not added to the base system. You can see from the photograph that it also has the ability to be through hole or surface mounted. I have only done the through hole connection since my skills at surface mount are not good enough yet. I'll see if I can attach a KiCAD file for the device a little later.
Here are the pin outs for the board from https://raw.githubusercontent.com/SeeedDocument/Outsourcing/master/Sipeed%20Pic/Lichee%20Nano%20Pin.jpg:
The unit as shipped includes a preloaded xboot bare metal image. Here is a picture of the unit at boot.
I have connected a PL2303 USB to UART adapter to the U0RX, U0TX, 5V and GND connectors on the Nano. Make sure to swap the RX (Receive) and TX (Transmit) on the PL2303. If you don't, then it will be like two people talking to each other without listening for the response and two people listening to each other without saying anything. Each person needs to listen to what is being said, so RX connects to TX and vice versa. The when the Nano speaks, the PL2303 will hear and when the PL2303 speaks, the Nano will hear.
Now that you have connected the Nano to the PL2303, plug the USB end of the PL2303 into a computer. I recommend using PuTTY to connect to your Nano. Below is a screen shot of the configuration I use. If you are using a Linux computer, make sure to add yourself to the dialout group with the command: usermod -a -G dialout yourUserName. If you do not, you will need to run PuTTY in su mode, which is never a good idea for anything except when it absolutely has to be done in su. There are always other options, but I have found PuTTY to be the easiest to use.
After connecting to the Nano you may or may not get a prompt. If you connect a display to the 40 LCD connector then PuTTY won't show any text when it is waiting for you to login. You will see the boot status on the LCD. Once it is complete you can use the root account. If you do not connect the display then the boot text will be displayed in PuTTY or whatever terminal software you are using. Here is a screenshot of running the littlevgl_sysmon application.
The default password for root is licheepi. The installed OS is pretty bare bones, but does include one demo program called littlevgl_sysmon. It is in the littlevgl_demo folder in the root home directory.This program only does something if you have a LCD connected to it. If you have a touchscreen LCD it is also interactive. Below is a photo of the application running on my non-touch screen LCD display and the dialog in PuTTY. As you can see it does not keep track of the date or time. Littlevgl is an open source library for building embedded displays. I think in the future I will be buying a touchscreen LCD display and trying it out. For now, we just have the screenshot.
Speaking of the future for the Nano, at least my use of it, the next step is to develop an OS with the Yocto project, exploring machine learning with Tensor Flow Lite, maybe figuring out how to add more RAM to it, exploring Robot Operating System, and finally get the WIFI working. As far as I can tell this will be the hardest part since you cannot use the included WIFI module and a Micro SD card at the same time.
At $7 a system, the only real limiter will be time.
Like it on Facebook, +1 on Google, Tweet it or share this article on other bookmarking websites.