logo elektroda
logo elektroda
X
logo elektroda

First start with SiPEED M1S DOCK module - AI+IoT RTOS_Linux All-Round Module

p.kaczmarek2 
Sipeed M1s Dock module with connected USB cables and a display showing Hello, PicaScript!. I'd like to invite you to a hands-on demonstration and first steps with the Sipeed M1s Dock module with a 2MP camera with MIPI CSI interface and a 1.69-inch 280x240 capacitive touchscreen display for AIoT applications. The module was already briefly presented in the topic: Sipeed M1s and M0sense - inexpensive AI modules based on BL808 and BL702 so here I will focus on showing how it looks in practice.
The board can be purchased for a little more than PLN 100:
Sipeed M1s Dock AI+IoT kit with display and camera module
First, make sure that you choose a kit with a camera and a screen. It is easy to be fooled by a lower price, where in fact you buy, for example, the module or the case alone. It is necessary to check well what you order.
What does the M1S offer?
Let's give voice to the specifications from the seller:
Inputs:
Sipeed M1s Dock board with labeled pins.
A housing can also be purchased, although mounting it requires moving the camera to the other side of the module:
Image of Sipeed M1s Dock module offer with price and thumbnails of various views.
The basis of our work with this module will probably be the documentation from sipeed com:
https://wiki.sipeed.com/hardware/en/maix/m1s/m1s_dock.html
I also based my work on this material myself. Below is a description of my steps, along with my comments and experiences.

First boot
Put power to the OTG port and press the RESET button. The board should wake up, the screen and camera will boot up.
The delay from the camera is not noticeable, everything runs very smoothly:



The screen also shows the status of the buttons, as a demonstration, they can change the value of the number in the upper right corner:



Additionally, our computer will recognize the new USB device. This can be used to upload firmware for us.
USB drive properties window showing file system and capacity information.
In the manufacturer's documentation, the USB drive shown here is 3.73MB, in mine the size is slightly larger. Do I have a newer version with more memory?
Screenshot of the Devices and Drives window in Windows, showing a connected USB drive with a capacity of 7.73 MB.

The second USB C slot offers access to the serial port. You need to select baud 2000000:
Screenshot of RealTerm program with serial communication.
And actually - to the serial ports, because there are two:
Screenshot of software settings for serial port with baud rate of 2000000 and list of available ports.
The first is the already shown log, the second is the command line.
You can send commands there, for example help :
RealTerm program interface displaying data in terminal mode.


Demo lvgl_demo [/size]
Let's now take a look at some examples from M1s_BL808_example. First, a graphics demo.
LVGL (Light and Versatile Graphics Library) is a free open source library for drawing graphics.
A compiled example is available here:
https://dl.sipeed.com/shareURL/MAIX/M1s/M1s_Dock/7_Firmware/demo_bin/lvgl_demo
To upload the batch, you need first put the board into the upload state .
Really - just because the board is also visible as a flash device/memory while the demo is running, doesn't mean it will succeed in uploading something.
Hold both side buttons and then press RESET, then release RESET and only then release the side buttons .
Then drag the downloaded (or compiled by us) batch onto the mobile device:
File copying screen to USB drive.
After a while, the board should boot itself. Here's the LVGL demo in action:



At the end, a menu will be displayed where you can also test the touchscreen:




Front-facing camera
After purchase, you will receive the module received in such a way, that the camera "looks" in the same direction as the display. This makes testing difficult to some extent.
The camera can be switched to the other side, as its ribbon goes through a slot in the PCB:
Sipeed M1s Dock module with display and camera. Sipeed M1s Dock module on a wooden background. Sipeed M1s Dock module with screen and camera viewed from the side. First you need to unfasten the ribbon (on the other side of the connector you unfasten it):
Close-up of the Sipeed M1s Dock module with a camera and user interface. Sipeed M1s Dock module with ports and components on a PCB.
Removed camera:
Sipeed M1s Dock module with detached camera module
The camera can be plugged in so that it will be on the other side of the module, but we can not reverse the ribbon, pins first (marked 1) of the ribbon must match pin 1 on the connector:
Sipeed M1s Dock module with camera and headers on a wooden background

. Image processing demo Another demo, image_processing_demo, demonstrates the ability to process images. The processing itself is quite simple, we use the buttons to select one of the predefined masks and so we can observe the effects:
Sipeed M1s Dock module with an active display. Sipeed M1s Dock module with display and camera in action Close-up of the Sipeed M1s Dock module with a 2MP camera and 1.69-inch display, showing interface graphics.
[size=18] Character recognition demo? Now let's run the tinymaix_mnist_demo demo.
TinyMaix is a small neural network inference library designed specifically for microcontrollers (TinyML), allowing you to run lightweight machine learning models on any single-chip microcomputer. I didn't have much luck with this demo. In theory, it's supposed to recognize numbers, but in my case it often limped to 8 or recognized incorrectly. I can show a screenshot from the manufacturer's documentation here for comparison:
Sipeed M1s Dock module with display and camera showcasing numbers Unlike me, on the other hand, it was.... hard, only perfect digits under perfect lighting are recognized:
Display showing the recognized digit 1
With my painter's handwriting, the program confuses 1 with 7 and with 5 it does not cope at all:




PikaScript language
There is also a demo PikaScript . PikaScript is a cross-platform, powerful Python-based scripting language.
After uploading the PikaScript demo, we can send this script to the board via the UART, line by line. Here's an example:
arc = lv.arc(lv.scr_act())
arc.set_end_angle(200)
arc.set_size(150, 150)
arc.center()

Let's review how this script works step by step. The first line creates the arc/slider, here is the effect after execution:

arc = lv.arc(lv.scr_act())

Terminal interface displaying sensor module information. Sipeed M1s Dock with screen and USB-C ports
The line with set_end_angle sets the position of the knob:

arc.set_end_angle(200)
Sipeed M1s Dock module with a screen displaying graphics on a 1.69-inch display.
You can change the value of its argument, then the effect will be different:

arc.set_end_angle(380)
Sipeed M1s Dock module with display and USB cables
The center function, on the other hand, centers the object on the screen:

arc.center()

Display with blue arc on Sipeed M1s Dock module.
Let's try to do a little more. Maybe a script like this:

# Create a screen
scr = lv.scr_act()

# Create a label widget
label = lv.label(scr)
label.set_text("Hello, PicaScript!")
label.align(lv.ALIGN.CENTER, 0, 0)

Result:
Sipeed M1s Dock with display showing Hello, PicaScript!
You can also create a button:

# Create a button widget
btn = lv.btn(scr)
btn.align(lv.ALIGN.CENTER, 0, -20)
label = lv.label(btn)
label.set_text("Click Me!")

Result:
Sipeed M1s Dock display with Hello, PicaScript! message and Click Me! button.
I also tried to write a click event handler for the button in this language, but I haven't gotten it to work yet.

Compiling source examples [/size] Compiling source examples[/b] 6fbd5ec
On the main documentation page of the board there are also instructions for compiling example sources and full links to the SDK. I managed to compile them on a virtual machine with Ubuntu, there were no problems, therefore I do not describe it.
Virtual machine console showing the completion of the compilation process.
I also made an attempt to compile them on WSL, which is a "Linux environment on Windows", but I have not yet managed to get it working.


Summary
This was just a first look at this board. So far I like it.
It is easy to upload programs, and the display and camera have satisfactory performance for me. I also didn't feel any image lag, and this also bodes well for future projects.
In the next topic I'll try to compile, test and discuss other examples of it from the SDK, maybe I can also modify it a bit, such as making a simple watch on a touchscreen display.
In addition, I plan to run an example of streaming video from a webcam to a PC (it is practically ready in the SDK) and experiment with TinyML.
Meanwhile I will ask - do you have any experience with this board, do you see a potential use for it? Or do you think it is an unnecessary gadget and it is better to just reach for Raspberry? Feel free to discuss.

About Author
p.kaczmarek2
p.kaczmarek2 wrote 11845 posts with rating 9941 , helped 566 times. Been with us since 2014 year.

Comments

chemik_16 06 Nov 2023 22:32

Application - to read energy meters :) ESP and the like do not cope with OCR, this may have some chance. You have to catch the screen sequence change and then parse each one in turn. Only ofc it's too... [Read more]

p.kaczmarek2 07 Nov 2023 08:36

OCR counter may be a good idea here. My test of their text detection demo was pretty rough. In a situation where we have one fixed font, it could probably work better. I'll have to try how much their demo... [Read more]

PiotrekD 07 Nov 2023 08:55

Hello my dears :) application - maybe wearable jewelry and an early warning module for stepping in dog turds which are now everywhere, or alternatively as a module that triggers the flush in the toilet... [Read more]

p.kaczmarek2 07 Nov 2023 10:27

A discussion of TinyML themes is planned, I don't know how much yet, but I intend to do that as well. For the moment, I am familiarizing myself with this board. [Read more]

maestro16s 07 Nov 2023 18:14

Try, out of curiosity, to draw the digits more in the "American" way, i.e. one is a straight line, 6 and 9 just as the Brda, mn.in., has lit up [Read more]

p.kaczmarek2 09 Nov 2023 09:45

There will be a moment then I will check it. Meanwhile I continue to struggle with the board - I already want to flash both cores, and for this you need a BLDevCube. For now I have the following observations:... [Read more]

p.kaczmarek2 11 Nov 2023 11:24

The problem previously described I did not solve, I still do not know why on one of my W10 machines it is impossible to flash this BL808, and on the other it is possible.... But I have progress with... [Read more]

gulson 11 Nov 2023 19:32

All in all, I wonder if it would be possible to teach these boards to read various indicators in plants or at nodes: https://obrazki.elektroda.pl/7274756600_1699727487_thumb.jpg All in all, these... [Read more]

gulson 13 Nov 2023 08:47

How about adding Vision ChatGPT to read the indication of industrial equipment? A bit of overkill, but not sure if you can learn any other way at this point. @ElektrodaBot write what indication you see... [Read more]

gulson 13 Nov 2023 08:51

OK I take back the idea, you need to create something custom and dedicated to the given sensors, sensors or meters. How about this very board? [Read more]

chemik_16 13 Nov 2023 09:39

@gulson such a clock you and on esp32 will embrace. The problem is how you have to recognize with 50 digits at once :) https://github.com/jomjol/AI-on-the-edge-device https://pysource.com/2022/04/... [Read more]

p.kaczmarek2 13 Nov 2023 11:18

@chemik16 good suggestion, I will try it out and maybe one day on the forum I will describe it [Read more]

arti4-92 15 Nov 2023 12:10

Ever since I found out about this chip I was wondering how is the issue of HW documetance, i.e. dma and audio codecs. Could you tell me if getting the documentation is a big problem? And does it even allow... [Read more]