logo elektroda
logo elektroda
X
logo elektroda

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

p.kaczmarek2  14 4347 Cool? (+3)
Listen:

TL;DR LABEL_AI_GENERATED

  • Sipeed M1S Dock module with 2MP MIPI CSI camera and 1.69-inch 280x240 capacitive touchscreen for AIoT applications is put through first hands-on tests.
  • The board boots from the OTG port, exposes a USB flash device for firmware upload, and provides two serial ports over the second USB-C connector.
  • The author tests LVGL, image_processing_demo, tinymaix_mnist_demo, and PikaScript, including touchscreen interaction and line-by-line UART scripting.
  • The display and camera run smoothly, with no noticeable lag, and the SDK examples compile successfully on Ubuntu in a virtual machine.
  • TinyMaix digit recognition is unreliable, and WSL compilation has not yet been made to work.
AI summary based on the discussion. May contain errors.
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 14797 posts with rating 12954 , helped 659 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]

ElektrodaBot 13 Nov 2023 08:50

The indication on the pressure gauge is between 1 and 2 bar, closer to 2 bar to be exact. The pointer appears to have reached around 1.75 bar. Pressure gauges such as this are often used to measure pressure... [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]

FAQ LABEL_AI_GENERATED

TL;DR: Za ok. 100 zł SiPEED M1S Dock daje ekran 1,69 cala 280×240, kamerę 2 MP i bardzo prosty start. Autor ocenił: "na razie mi się podoba". Ten FAQ jest dla osób, które chcą szybko uruchomić demo, wgrywać firmware i ocenić, czy BL808 nadaje się do OCR, streamingu i małych projektów AIoT. [#20802860]

Dlaczego to ważne: Wątek pokazuje nie tylko funkcje płytki, ale też praktyczne pułapki: tryb wgrywania, dwa porty szeregowe, jakość kabla USB i niestabilne flashowanie na części komputerów z Windows 10.

Platforma Cena z wątku Mocne strony w tym zastosowaniu Ograniczenia z wątku
SiPEED M1S Dock trochę ponad 100 zł Kamera 2 MP, ekran dotykowy 1,69 cala, szybkie demo AIoT Wrażliwe flashowanie, TinyMaix słabo radzi sobie z odręcznymi cyframi
Raspberry Pi Zero 2 W + kamera około 100 zł Lepszy punkt odniesienia cenowego do OCR i kamery Brak zintegrowanego wyświetlacza w tym porównaniu
ESP32 / ESP nie podano Wystarcza do prostszych liczników i zegarów Według dyskusji gorzej wypada przy trudniejszym OCR

Kluczowy wniosek: Największą przewagą M1S Dock jest gotowy zestaw ekran + kamera + łatwe demo. Największym ryzykiem nie jest wydajność, lecz procedura flashowania i powtarzalność działania na różnych kablach oraz laptopach. [#20806420]

Quick Facts

  • Zestaw opisany w wątku ma kamerę 2 MP MIPI CSI oraz pojemnościowy ekran dotykowy 1,69 cala o rozdzielczości 280×240. [#20802860]
  • Autor kupił płytkę za trochę ponad 100 zł i ostrzegł, by sprawdzić, czy oferta obejmuje moduł, kamerę i ekran, a nie sam moduł lub obudowę. [#20802860]
  • Port konsoli działa po USB-C z ustawieniem 2000000 bps, a po podłączeniu widać dwa porty szeregowe: logi oraz linię poleceń. [#20802860]
  • W dokumentacji producenta pamięć USB miała 3,73 MB, ale w egzemplarzu autora była nieco większa, co zasugerowało inną wersję lub układ pamięci. [#20802860]
  • Flashowanie BL808 przez BLDevCube bywa niestabilne: na jednym laptopie z Windows 10 kończyło się błędem BFLB SET CLOCK PLL FAIL, a na innym przechodziło poprawnie. [#20806420]

1. Jak wykonać pierwszy start SiPEED M1S Dock, w tym do którego portu USB-C podać zasilanie i kiedy nacisnąć RESET?

Pierwszy start wykonasz, podając zasilanie do portu OTG USB-C i naciskając RESET. 1. Podłącz zasilanie do portu OTG. 2. Naciśnij przycisk RESET. 3. Poczekaj, aż uruchomią się ekran i kamera. Autor podkreślił, że opóźnienie obrazu z kamery było praktycznie niezauważalne, a ekran od razu pokazywał stan przycisków przez zmianę liczby w prawym górnym rogu. [#20802860]

2. Jaka jest poprawna procedura przejścia SiPEED M1S Dock do trybu wgrywania firmware przed skopiowaniem pliku demo?

Poprawna procedura wymaga wejścia w osobny stan wgrywania, a nie zwykłego restartu. 1. Przytrzymaj oba boczne przyciski. 2. Naciśnij RESET. 3. Zwolnij RESET, a dopiero potem oba przyciski boczne. Dopiero wtedy przeciągnij pobrany plik binarny demo na widoczny dysk USB. Autor zaznaczył ten krok pogrubieniem, bo bez niego kopiowanie pliku często nie daje efektu. [#20802860]

3. Dlaczego SiPEED M1S Dock pokazuje się jako dysk USB, ale nadal nie przyjmuje nowego firmware, jeśli nie jest w prawidłowym stanie wgrywania?

Dysk USB widoczny podczas działania dema nie oznacza jeszcze aktywnego trybu programowania. Płytka może być rozpoznana przez komputer jako pamięć masowa, ale zapis nowego firmware wymaga osobnego stanu uploadu uruchamianego kombinacją przycisków i RESET. Wątek wyraźnie pokazuje, że samo przeciągnięcie pliku na widoczny nośnik podczas pracy demo nie wystarcza do skutecznego flashowania. [#20802860]

4. Jakich ustawień portu szeregowego użyć do linii poleceń SiPEED M1S Dock i dlaczego po USB widać dwa porty szeregowe?

Użyj prędkości 2000000 bps, bo taka wartość została wskazana dla konsoli po drugim porcie USB-C. Po podłączeniu płytka pokazuje dwa porty szeregowe: pierwszy służy do logów, a drugi do linii poleceń, gdzie działa komenda help. To rozdzielenie ułatwia jednoczesne śledzenie startu systemu i wpisywanie poleceń bez mieszania strumieni danych. [#20802860]

5. Czym jest LVGL i co pokazuje `lvgl_demo` na ekranie dotykowym M1S Dock?

„LVGL” jest biblioteką graficzną, która rysuje interfejsy użytkownika na urządzeniach wbudowanych, a jej kluczową cechą jest lekkość i przenośność do małych systemów. Demo lvgl_demo pokazuje animacje graficzne, elementy UI i końcowe menu do testu panelu dotykowego. Autor uruchomił gotowy plik binarny z przykładów M1s_BL808_example i potwierdził, że na końcu można sprawdzić działanie dotyku bez pisania własnego kodu. [#20802860]

6. Jak przenieść kamerę MIPI CSI na drugą stronę SiPEED M1S Dock, nie wkładając taśmy odwrotnie?

Kamerę da się przełożyć na drugą stronę PCB, ale taśmy nie wolno odwrócić. Najpierw odepnij zatrzask złącza, wyjmij kamerę i przeprowadź taśmę przez szczelinę w płytce. Następnie włóż taśmę tak, aby pin 1 taśmy zgadzał się z pinem 1 złącza. Autor wyraźnie zaznaczył, że kamera może trafić na drugą stronę modułu, lecz orientacja styków musi pozostać poprawna. [#20802860]

7. Dlaczego `tinymaix_mnist_demo` na BL808 słabo rozpoznaje cyfry, jeśli pismo i oświetlenie nie są prawie idealne?

To demo działa słabo poza bardzo kontrolowanymi warunkami. Autor napisał, że liczby były rozpoznawane poprawnie tylko przy „idealnych cyfrach” i „idealnym oświetleniu”, a jego odręczne 1 myliło się z 7, zaś 5 nie działało wcale. Dodatkowo model często „uciekał” do wyniku 8. W praktyce oznacza to, że pokazane demo nadaje się bardziej do zabawy i testów niż do pewnego OCR z ręki. [#20802860]

8. Czym jest TinyMaix i jak używa się go do inferencji TinyML na SiPEED M1S Dock?

„TinyMaix” jest biblioteką inferencyjną TinyML, która uruchamia lekkie modele sieci neuronowych na mikrokontrolerach, a jej kluczową cechą jest mały narzut i praca na pojedynczych układach. Na M1S Dock użyto jej w tinymaix_mnist_demo do rozpoznawania cyfr z obrazu kamery. Wątek pokazuje więc realny przypadek inferencji na BL808, ale też ważne ograniczenie: skuteczność mocno spada przy gorszym świetle i mniej regularnym piśmie. [#20802860]

9. Jak wysyłać kod PikaScript linia po linii przez UART, aby tworzyć widżety LVGL na wyświetlaczu M1S Dock?

Po wgraniu dema PikaScript wysyłasz skrypt przez UART linia po linii. 1. Wgraj demo PikaScript. 2. Otwórz port szeregowy konsoli. 3. Wklej kolejne linie, na przykład tworzące lv.arc, etykietę lub przycisk. Autor pokazał działające przykłady: łuk z set_end_angle(200), napis „Hello, PicaScript!” oraz przycisk „Click Me!”. Nie udało mu się tylko uruchomić obsługi kliknięcia przycisku. [#20802860]

10. Czym jest PikaScript w kontekście SiPEED M1S Dock i czym różni się od pisania i kompilowania przykładów C z SDK?

„PikaScript” jest językiem skryptowym opartym na Pythonie, który uruchamia krótkie skrypty bez pełnego cyklu kompilacji, a jego kluczową cechą jest szybkie prototypowanie na urządzeniu. Na M1S Dock pozwala tworzyć elementy LVGL przez UART, linia po linii. To różni się od przykładów C z SDK, które trzeba zbudować i wgrać jako firmware. Wątek pokazuje oba tryby pracy: szybkie eksperymenty skryptowe oraz klasyczne kompilowanie przykładów źródłowych. [#20802860]

11. Dlaczego flashowanie BL808 przez BLDevCube kończy się błędem na jednym laptopie z Windows 10, a działa na innym, i jak bardzo liczy się jakość kabla USB oraz sterowniki?

Jakość kabla USB i różnice między komputerami mają tu duże znaczenie. Autor zauważył, że na dłuższym kablu RESET nie rebootował płytki po wgraniu Hello World, a na jednym laptopie z Windows 10 flashowanie zatrzymywało się na „Shakehand” lub chwilę później. W logach pojawił się błąd BFLB SET CLOCK PLL FAIL, podczas gdy na innym laptopie ten sam proces przechodził w 100% poprawnie. To mocna wskazówka, że problem leży w torze USB, sterownikach lub stabilności hosta. [#20806420]

12. Jak kompilować przykłady SDK SiPEED M1S BL808 na Ubuntu i co zwykle psuje ten sam proces pod WSL?

Na Ubuntu kompilacja przykładów SDK przebiegła autorowi bez problemów, nawet na maszynie wirtualnej. Wątek odsyła do głównej dokumentacji płytki, gdzie są instrukcje budowania i pełne linki do SDK, a sam autor nie rozwijał tego kroku właśnie dlatego, że zadziałał od razu. Pod WSL sytuacja była odwrotna: autor napisał, że nie udało mu się jeszcze uruchomić tego przepływu. Praktyczny wniosek jest prosty: do pierwszego buildu wybierz Ubuntu, nie WSL. [#20802860]

13. SiPEED M1S Dock vs Raspberry Pi Zero 2 W lub ESP32 — która platforma ma więcej sensu do OCR, streamingu z kamery i małych projektów AIoT?

Do szybkich eksperymentów AIoT większy sens ma M1S Dock, a do chłodnej kalkulacji koszt–możliwości często wygrywa Raspberry Pi Zero 2 W. W dyskusji padło, że za około 100 zł można mieć już rpi0 2w i kamerę, więc cena M1S nie jest bezkonkurencyjna. Z drugiej strony M1S daje od razu ekran dotykowy 1,69 cala, kamerę 2 MP i gotowe dema. ESP32 według rozmowy wystarcza do prostszych wskaźników, ale „nie radzi sobie z OCR” tak dobrze jak bardziej wyspecjalizowane podejście. [#20803152]

14. Jaki jest najlepszy sposób użycia SiPEED M1S Dock do odczytu liczników energii, manometrów, liczników, lampek lub stanów przełączników przy stałym widoku kamery?

Najlepszy kierunek to zadanie dedykowane pod stały kadr, stałą czcionkę i z góry znane pozycje odczytu. W wątku padła propozycja odczytu liczników energii, wskaźników analogowych, kontrolek i stanów przełączników bez ingerencji w sam przyrząd. Autor doprecyzował, że przy jednej ustalonej czcionce OCR powinien działać lepiej, bo pozycja cyfr się nie zmienia. To sugeruje prostszy pipeline: wykrycie zmiany, wycięcie obszarów ROI i sekwencyjny odczyt każdej cyfry lub wskazówki. [#20803391]

15. Jak trudno zdobyć dokumentację sprzętową BL808 dla DMA i kodeków audio, i czy dostępna dokumentacja pozwala pisać własne sterowniki niskiego poziomu?

Wątek nie daje jeszcze odpowiedzi, tylko stawia to pytanie otwarte. Ostatni uczestnik zapytał wprost o dokumentację sprzętową dla DMA i kodeków audio oraz o możliwość napisania własnych sterowników niskiego poziomu, ale w przytoczonym fragmencie nie pojawiła się żadna odpowiedź. Najuczciwszy wniosek brzmi więc: na podstawie tego wątku nie da się potwierdzić ani łatwej dostępności dokumentacji BL808, ani zakresu wsparcia dla własnych driverów. [#20816134]
AI summary based on the discussion. May contain errors.
%}