Posts with «open hardware» label

Package Inspection with Anomaly Detection and a VLM on the Arduino UNO Q

Inspecting a parcel before shipping means looking at it, recognising a defect and deciding what to do about it. SolomonGithu’s project does all of this on the Arduino UNO Q: a visual anomaly detection model finds dents, tears and liquid leaks, then SmolVLM-500M describes the defect in natural language. Both models run locally on the board, with no cloud. Package inspection with Arduino thus becomes a self-contained block, ready to be mounted on a packaging line.

The logic is a cascade. The first stage is a detector trained with Edge Impulse Studio and exported as an .eim binary. The second stage is the VLM, which only comes into play when needed. This split reduces false alarms: the lightweight model does the heavy lifting in 31 ms, and the heavy model only speaks up if there really is something to report.

The Edge Impulse detector: 31 ms, 3.3 MB of RAM and 372 KB of flash

Anomaly detection model trained with Edge Impulse Studio

The anomaly detection model is the part that sets the performance figures. On the UNO Q it has an on-device inference time of 31 ms, a RAM peak of 3.3 MB and takes up 372 KB of flash. These are numbers that leave room for the rest of the application, because the board still has to handle the webcam, the web interface and loading the VLM. The model is exported from Edge Impulse Studio as an .eim binary and copied into the /home/arduino/.arduino-bricks/ei-models/ directory of the UNO Q, along with a model.yaml file that describes its configuration.

The reference Edge Impulse project has ID 1030618. Anyone who wants to rebuild it can start from there and replace the dataset with their own images of parcels, then re-export the binary. The vlm_anomaly_threshold threshold decides when the second stage steps in: below that threshold the image is considered clean and the VLM is not loaded.

SmolVLM-500M and the application on App Lab

Deploying the models on the UNO Q

When the anomaly exceeds the threshold, the system loads SmolVLM-500M and passes it the image together with a text prompt defined by vlm_prompt. The processing takes about 29 seconds, during which the UNO Q’s CPU peaks at 99% utilisation. The natural-language answer can be useful to a human inspector or to an AI agent that adjusts operating parameters, for example the gripping force of robots if the parcel is dented.

The application, backend and frontend, is cloned from a GitHub repository and copied into the /home/arduino/ArduinoApps/ directory of the UNO Q. It is started from App Lab with the Run button and opens in the browser at the board’s local IP address on port 7000. The image is chosen from the sample ones in the img folder or uploaded as a JPG or PNG file up to a maximum of 500 KB. Pressing Run Detection starts the anomaly model first and then, if needed, the VLM.

  • Arduino UNO Q as the only computing board
  • Logitech HD Pro webcam connected via USB
  • USB hub powered from the mains
  • Anomaly model exported from Edge Impulse as .eim
  • SmolVLM-500M loaded on-device

To rebuild the project you need an Arduino UNO Q, a USB webcam and a USB hub powered from the mains: the webcam alone can draw more current than the board makes available on a single port. For the computing side, the board from the catalogue with the STM32U585 microcontroller and the integrated processor is the one the project is built on, so no other hardware is needed. The full description of the flow and the files can be found on the SolomonGithu project page on Hackster.io.

The SmolVLM-256M model is a lighter alternative, but according to the author’s tests it shows limits in captioning: it hallucinates text, misidentifies objects and is less reliable at following instructions. The 256M has only 18% of its training data dedicated to image captioning, so the choice of the 500M is not random. Those in a hurry can still try it, accepting less precise descriptions.

Source: https://www.hackster.io/sologithu/genai-on-arduino-uno-q-spots-and-describes-anomalies-5d1a49

The post Package Inspection with Anomaly Detection and a VLM on the Arduino UNO Q appeared first on Open Electronics.

Fetch, the 3D-printed robot that fetches the ball using computer vision

Fetch is a 3D-printed robot that plays fetch. It finds an orange ball, reaches it, grabs it with two arms and brings it back to its owner by looking for their hand. No remote control, no app: the robot decides on its own what to do. It is the first autonomous robot built by its author, Aswinth Raj, and the parts cost around 300 dollars.

What stands out is how simple the computer vision is. The object detection model has just two classes, ball and hand, and is trained on about 200 images for each. The hard work, then, is not in the recognition but in the arms, the guidance and the troubleshooting.

Two classes and 200 photos to make the robot see

The model was trained in Edge Impulse with YOLO-Pro. The photos were taken with the robot’s camera, under different lighting conditions, on different floors and backgrounds. This step matters more than it seems: a model trained on clean images struggles as soon as the room changes, so variety in the training photos is the real insurance.

The hardware heart is the Arduino UNO Q board, which pairs a processor capable of running Linux with a separate microcontroller. The Linux processor handles the camera and the model, the microcontroller handles real-time control. That way vision does not slow down the arm movements, and the arms do not steal cycles from recognition.

  • Orange ball recognition with a two-class model
  • Owner’s hand recognition for the delivery
  • Approach and grasp with two arms
  • Return to the hand and release of the ball
  • Animated eyes on a small screen and antennas that move with the mood
  • Pre-recorded voice phrases to make the behaviour readable

Arms, guidance and voice: where the real work is

Recognition is only the start of the chain. The robot has to reach the ball without bumping into things, grab it with two arms and then look for the hand. Every step has its own problems: the grasp that slips, the trajectory that gets stuck, the hand that moves while the robot approaches. In fact the longest part of the project was tuning, not training.

The behaviour is enriched by details that serve readability rather than function. The animated eyes on a small screen and the ear-like antennas that move with the mood tell anyone watching what state the robot is in. The pre-recorded voice phrases, generated with ElevenLabs, complete the picture. For anyone who wants to rebuild the project, the starting point is maker Aswinth Raj’s site, where the project is described by its author.

Anyone who wants to try an autonomous robot with computer vision therefore has a path mapped out: two classes, a few hundred photos, a board that separates Linux from real-time control. The rest is mechanics and patience.

Source: https://circuitdigest.com/news/a-300-robot-that-plays-fetch-it-finds-the-ball-picks-it-up-and-brings-it-back-on-its-own

Related products

The post Fetch, the 3D-printed robot that fetches the ball using computer vision appeared first on Open Electronics.

Arduino UNO Q: what you can run on the Linux side with the STM32H5 microcontroller

The Arduino UNO Q shows in concrete terms what you can install and run on its Linux side. The dual-brain architecture combines high-performance computing and real-time hardware control on a single board. The MPU side runs a Linux environment designed for installing familiar open source software, the same tools you would use on a server or on a common SBC. The STM32H5 microcontroller, on the other hand, runs a dedicated Arduino Core on Zephyr RTOS and handles sensors, actuators and critical I/O with deterministic precision. The two parts communicate through an RPC bridge built into the board, with no need for an external Arduino board.

The value of the UNO Q lies precisely in this bridge. Every piece of software running on the Linux side gains direct access to the physical world, without USB cables and without add-on boards. So a home server stops being a closed box and becomes a node that reads sensors and drives actuators.

Debian, OpenCode and the Arduino App Lab CLI on the Linux side

At the base of everything is Debian, the Linux environment that hosts the rest. On this base you install OpenCode and the Arduino App Lab CLI, the tools used to prepare and launch the board’s software. The CLI also simplifies the passage between the Linux world and the microcontroller, because it holds together the two sides of the same project.

The interesting part is the AI agent. An agent running on the board receives a goal, processes the context, calls tools and services and, through the hardware interfaces, turns decisions into actions in the physical world. The reasoning comes from a frontier model via API, but the tool calls run on the device. So the agent does not just answer: it switches on, measures, adjusts. Anyone who wants to start from the code will find everything in the project code repository.

Home Assistant, n8n, Pi-hole, Frigate and an SMB NAS

Concrete platforms run on the Linux side of the UNO Q, each with a precise task. The link with the microcontroller changes the way each one works:

  • Home Assistant: local home automation, which thanks to the microcontroller can read sensors and command relays without third-party hardware.
  • n8n: workflow automation, which can start a software routine and close it on a physical actuator.
  • Pi-hole: the network DNS filter, which runs on the Linux side as on any server and always stays on.
  • Frigate: video surveillance with local analysis, which talks to the microcontroller for sensors and status signals.
  • Local NAS with SMB: file sharing over the network, with the microcontroller able to control power and disk status.

Building the physical part of these examples takes few parts. A Qwiic temperature and air quality sensor connects to the microcontroller side, while a relay and a fan close the loop on a real load. Alternatively, Modulino modules offer a quick way to add I/O without soldering, for example with the kit with UNO R4 WiFi and Modulino modules.

For those who want the board with the accessories already included, the complete Arduino UNO Q kit is the most direct starting point.

Put together, these programs turn the UNO Q into a small server that also speaks to the hardware. Home Assistant and n8n handle the logic, Pi-hole and Frigate cover network and video, the SMB NAS keeps the files. The STM32H5 microcontroller acts as a bridge to sensors, relays and fans, so every automation can end on a real actuator. It is a concrete way to use the dual-brain architecture without adding external boards.

Source: https://github.com/arduino/docs-content-private/pull/1088

Related products

The post Arduino UNO Q: what you can run on the Linux side with the STM32H5 microcontroller appeared first on Open Electronics.

Depth Multitool: turning a USB webcam into a depth sensor

Depth Multitool turns an ordinary USB webcam into an interactive depth sensor. Samuel Alexander’s project estimates the distance of every pixel from a single image, at 20 frames per second. No stereo camera, infrared projector or LiDAR sensor is needed: all the processing happens locally on the NPU of the Arduino VENTUNO Q.

The heart of the system is the Depth Anything V2 Small model, with 25 million parameters. Inference runs on the Qualcomm Dragonwing NPU and takes about 16 milliseconds. As a result, the eight CPU cores of the VENTUNO Q stay free for video capture, interface drawing and audio generation.

336×252 input and three threads to keep up with 20 FPS

The model is configured with a 336×252 pixel input and full floating-point precision. Alexander chose to lower the resolution rather than quantize to 8 bit, because quantization introduced depth artifacts and flattened the near field.

Camera capture, inference and rendering are split across three threads. This way the NPU can start processing the next image while the current result is shown on screen. The stream stays smooth even with a cheap webcam.

A closer look at the hardware

Rebuilding the project takes only a few parts:

  • Arduino VENTUNO Q, with its Qualcomm Dragonwing NPU
  • a common USB webcam
  • a 10-inch display
  • a USB-C power bank for power

The software is developed in Arduino App Lab, the environment that lets you load the model and run it on the NPU.

Heatmap, Slicer, Flood and Sonar: the four depth reading modes

The estimated depth is presented through four interactive modes. Each one reads the same map differently, so the same hardware tells the scene in different languages.

  • Heatmap: the depth map overlaid on the webcam image
  • Slicer: highlights only the objects that fall within a selected depth range
  • Flood: virtual filling of the scene from the background towards the camera
  • Sonar: converts depth into sounds, with low clicks on the left and high clicks on the right, faster as objects get closer
Slicer mode

The Sonar mode is the most surprising, because it turns an optical measurement into an audio signal. The Slicer mode, on the other hand, is the most useful when you need to isolate an object at a certain distance and ignore everything else.

Power draw: 11.8 watts at 20 FPS, 15.2 watts pushing to 30 FPS

Consumption depends on how hard the NPU is pushed. At around 30 frames per second the board rises to 15.2 watts. Limiting the application to 20 FPS and using the NPU’s balanced power mode, consumption drops to 11.8 watts.

This margin makes the project portable: a USB-C power bank is enough to power the board, the webcam and the 10-inch display. What’s more, the drop in frame rate does not compromise interactive use, because the NPU still processes each frame quickly.

Anyone who wants to follow the project’s development will find the details of the work on the NPU and the tests of the four modes on maker Samuel Alexander’s site.

Source: https://projecthub.arduino.cc/samy_alxndr/depth-multitool-on-the-arduino-ventuno-q-75f09d

The post Depth Multitool: turning a USB webcam into a depth sensor appeared first on Open Electronics.

B.L.O.O.M.: the field cyberdeck for nature observation

B.L.O.O.M. (Bridging Local Observations, Openly Mapped) is a field cyberdeck designed to capture nature notes offline. Photos, sketches, annotations and bird songs identified with an AI model all end up in a local SQLite database. When you are back online, a sync button sends the data to the cloud and feeds an open, crowd-sourced archive of local flora and fauna. The project is described in detail on the project page on Hackster.io, which also covers the assembly and software choices.

The brain of the cyberdeck is an Arduino Uno Q, powerful enough to host small AI models locally. All the peripherals connect to the board by cable or Bluetooth. In particular, the 5-inch HDMI screen, the Bluetooth keyboard and mouse, the USB microphone and the USB camera let you capture notes, photos, sketches and bird songs. Connecting the display requires a 6-inch HDMI cable, so a short one, suitable for fitting inside the case without taking up space.

The B.L.O.O.M. cyberdeck out in nature.

The kiosk-mode web app and the Edge Impulse audio model

A local web app in kiosk mode, with Chromium in kiosk mode, shows a minimal landscape interface. From there you can take photos, draw, chat with an LLM and record notes on the spot. The audio AI model is custom and trained through Edge Impulse Studio: it identifies the bird songs picked up by the USB microphone. For each bird species (Blue Jays, Mourning Doves, Cardinal) at least 20 audio examples were downloaded from the xeno-canto dataset. The LLM downloaded onto the Uno via App Lab is Gemma, so the chat also works without a network.

The notes are saved in a local SQLite database. Pressing ‘Sync to Cloud’ sends the data to a Netlify function that converts it into markdown files for the website, built with Astro.js. The version of Arduino App Lab used is 0.9.0. For portable power in the field, a compact power bank for Raspberry Pi covers the same role.

The enclosure, the recycled foam and the components to connect

The enclosure is a reused Lancôme train case, with a hole in the side for the camera and modular shelves made of recycled foam and fabric. Creative reuse here is not an aesthetic detail: it is the structure that holds the screen, the board and the battery together. Rebuilding it takes only a few parts, listed below.

  • Arduino UNO Q as the brain of the cyberdeck
  • 6-inch HDMI cable for the display
  • 5-inch HDMI screen
  • USB microphone for the bird songs
  • USB camera for photos and sketches
  • 5-in-1 USB hub to connect the peripherals
  • power bank for power in the field
  • USB-A to Micro-USB cable
  • Bluetooth keyboard and mouse

On the software side the chain is long but linear: Arduino App Lab for the environment, Edge Impulse Studio for the audio model, SQLite for the database, Chromium in kiosk mode for the interface, Astro.js for the site, a Netlify function for the markdown conversion and Gemma as the local LLM. To replicate the project the basis is the 4 GB Arduino UNO Q in a complete kit, while to record bird songs a USB microphone is all you need.

B.L.O.O.M. in action, ready to capture images.

The interesting point of B.L.O.O.M. is that everything works without a network: recognition, chat, saving. Syncing is a voluntary action, not a requirement. That way the field cyberdeck stays useful even in the middle of a wood, and the data opens up to the world only when you decide.

Source: https://www.hackster.io/agent-hawking-1/b-l-o-o-m-a-community-cyberdeck-for-your-field-notes-8dba4c

Related products

The post B.L.O.O.M.: the field cyberdeck for nature observation appeared first on Open Electronics.

Driving a Sony Car Radio LCD Display with Arduino

Driving the LCD display of a Sony car radio with Arduino is possible. Jose Luis Monteiro proves it on the detachable front panel of a Sony CDX-A250, talking directly to the LC75826W driver. The project gathers reverse engineering notes, the reference sketch and a guide to reproducing the experiment. The starting point is the driver datasheet alone, because the segment mapping is not documented.

The Sony CDX-A250 panel contains the LC75826W LCD driver, listed as IC901 in Sony’s service documentation. The driver exposes a serial interface on connector CN901. The wiring used in the project is direct: DATA-LCD to DI of the LC75826 on pin 11 of CN901 and pin D8 of the Arduino sketch, CE-LCD to CE on pin 12 of CN901 and pin D10, CLOCK-LCD to CL on pin 13 of CN901 and pin D9. The panel’s +B supply comes in on pin 14 of CN901 from an external bench power supply, while the panel ground stays common with the Arduino.

The CCB protocol of the LC75826W driver

The LC75826 uses SANYO’s CCB serial format. Every transfer starts with device address 41H and then sends one of four 72-bit groups, identified by the two DD bits. The groups cover the ranges D1-D52, D53-D104, D105-D152 and D153-D208. The first group also carries the control fields that configure the driver: P0-P3 for segment output or general-purpose selection, DR for LCD bias selection, DN for 200 or 208 segment selection, FC0-FC2 for frame frequency control, OC for internal or external oscillator mode, SC for display on/off and BU for normal or power-saving mode.

The reference code sends every byte starting from the least significant bit. The segment mapping, that is which visible symbol corresponds to which position in the matrix, has to be discovered experimentally because the datasheet does not provide it. The searchOfSegments() routine advances one test state at a time. A button on D2 advances the test, while the serial monitor prints the information needed to identify the current state. The sketch’s serial monitor is used at 115200 baud for debugging and for the segment identification output.

What you need to repeat the experiment

Only a few parts are needed to reproduce the project. In particular, the list includes:

  • a detachable front panel from a Sony CDX-A250
  • an Arduino-compatible board with Uno-style pin numbering
  • a bench power supply to power the panel
  • a button for the segment identification routine
  • the CN901 connector to access the panel signals

Jose Luis Monteiro’s repository collects the reference Arduino sketch and documentation files on the connections, the protocol, the segment mapping, troubleshooting and references. The Sony CDX-A250/CDX-A250EE service manual is version 1.1, dated 2006-01, publication 9-879-865-02. The project is meant to be reusable on other displays based on the same LC75826, so the reverse engineering notes apply beyond this single car radio model.

Anyone who wants to start from an Arduino board for the test bench will find several options in the catalogue. The code and the documentation remain the heart of the project anyway, because the segment mapping has to be redone by hand on your own panel.

Source: https://github.com/emsyscode/lc75826-sony-cdx-a250

The post Driving a Sony Car Radio LCD Display with Arduino appeared first on Open Electronics.

Nuvi: an Arduino UNO Q Desktop Companion

Nuvi is a small, expressive desktop companion, less than 30 cm tall. It wakes up when someone comes close, answers when it is called by name and holds a conversation with the user. It also searches the web, controls smart home devices by voice or with a hand gesture, and reads the room’s temperature and humidity. It was designed by Luca Di Lorenzo, and the board that brings it to life is the Arduino UNO Q.

What stands out is not the conversation itself, but where it runs. The Linux side of the UNO Q runs the artificial intelligence pipeline, the voice engine and the application logic, all on the board itself rather than on a connected PC. So Nuvi is self-contained: you switch it on and it is there.

Two souls on one board: microcontroller and Linux

Arduino UNO Q splits the work in two. The real-time microcontroller side handles the physical control: four servos for the arms and ears, two serial servos for the neck, the display, the sensors and the touch inputs. The Linux side, on the other hand, takes care of the heavy part, that is the artificial intelligence and the voice.

This separation makes practical sense. Movements have to respond immediately, without waiting, and that is why they live on the microcontroller. The conversation can take a few moments longer, so it lives on the processor running Linux. As a result, the arms, ears and head move smoothly while the brain works out the sentence.

  • Four servos for the arms and ears
  • Two serial servos for neck rotation and tilt
  • Display for the animated eyes
  • Temperature and humidity sensors
  • Touch inputs on the head and belly

Gemini to understand, Piper to speak without the cloud

The conversation is based on Gemini, which handles both speech understanding and response generation in a single pass. There is therefore no separate speech-to-text stage: the model does everything at once, and the pipeline stays leaner.

For the outgoing voice, on the other hand, Nuvi uses Piper, a voice engine that runs entirely on the board. So the synthesis does not go through the cloud: the sentence is spoken locally. In particular, it is this choice that makes the robot usable even when the network is poor, at least for the sound side of things.

The animated eyes express different moods. The ears and arms move, the head rotates and tilts, and touching the head and belly triggers a reaction. Finally, purely for fun, there is also a little dance.

What you need to rebuild it: 3D files, electronics and code

Anyone who wants to build a Nuvi starts from the Arduino UNO Q, the heart of the project. The complete kit with accessories includes the board and what you need to start working with it. To drive traditional three-pin RC servos, with power, ground and PWM signal, you then need a dedicated driver stage.

On the sensor side, Nuvi reads the room’s temperature and humidity. Nuvi uses a Modulino Thermo module for the room’s temperature and humidity, while two Modulino Distance modules take care of noticing who is approaching.

The rest is assembly: 3D printing for the body, wiring the servos, connecting the display and the touch inputs. Luca Di Lorenzo’s video shows the project in action, and from it you can see how much work lies behind every single gesture Nuvi makes.

The most interesting part remains the amount of personality you can put into a project based on the UNO Q. 3D files, electronics, code and a step-by-step tutorial are available for anyone who wants to build one. And the result, under 30 cm tall, sits comfortably on a desk.

Source: https://projecthub.arduino.cc/lucadilo/nuvi-ai-desk-companion-bdd30c

The post Nuvi: an Arduino UNO Q Desktop Companion appeared first on Open Electronics.

Smart Mirror: local visual AI turns a mirror into a style consultant

The Smart Mirror turns a mirror into a style consultant. With a tap on Scan your look, a USB camera frames the garment being worn and the system recognises its colour and type, then suggests how to complete the outfit. The example runs on the Arduino VENTUNO Q board and shows how local visual AI can become part of a context-aware retail experience. Here the inference happens on the board, not on a remote server: images never leave the device, so privacy and latency stay under control.

The flow is linear and reads well from start to finish. A USB camera provides a live video stream, and the most recent frame is saved into a shared buffer. When Scan your look is tapped, the last frame is analysed locally on the VENTUNO Q board by the Qwen3-VL model, accessible through the Arduino VLM Brick. The model identifies the main garment and its colour and returns two short sentences: a description of the outfit and a style suggestion.

Two App Lab Bricks and an MJPEG stream to the browser

The result is sent to the browser and shown over the live camera view. The browser displays the live feed through an MJPEG stream exposed by the backend. The application therefore uses two App Lab Bricks: the Vision Language Model Brick and the Web Interface Brick. The first handles frame analysis, the second the page and the stream. The prompt behaviour can also be customised through a single configuration file, prompt.py.

Arduino VENTUNO Q as the compute board

  • USB camera for the live video stream
  • Arduino VLM Brick to access the model
  • Vision Language Model Brick for frame analysis
  • Web Interface Brick for the page and MJPEG stream
  • prompt.py to customise the prompt

Anyone who wants to rebuild the project will find the parts list here is fairly short overall. The VENTUNO Q board is the heart of the system, while the USB camera is the only sensor required. The Qwen3-VL model does not need training: it is used as it is, through the Arduino VLM Brick.

The physical assembly is not described in the example: the system relies on a USB camera connected to the VENTUNO Q board and on a backend that exposes the MJPEG stream. The rest, from the framing to the physical mirror, depends on how you want to build the mount. The software side, on the other hand, is all inside the two Bricks and the prompt.py file.

What changes with visual AI inference running locally

The interesting point is not the individual style suggestion, but where it is computed. The Qwen3-VL model runs on the VENTUNO Q board, so no image of the garment being worn is sent to a cloud service. As a result, latency stays low and privacy is simpler to guarantee: what the camera sees does not leave the mirror. The system also works without an internet connection, because inference is local.

The complete flow can be summed up like this: the camera produces the frames, the shared buffer holds the most recent one, the model analyses it on request and the browser shows the result over the live video. Every step stays on the board or on the local network, and the tap on Scan your look is the only trigger for the analysis. If you want to see how the project is built and which files it uses, the post on the Arduino blog is the place to start.

For those working in retail or in the maker world, this Smart Mirror is a concrete example of how local visual AI can power a complete, real-time user experience. No cloud is needed, no fast connection is needed, no images travelling outside the home are needed. A USB camera, a VENTUNO Q board and two well-chosen Bricks are enough.

Source: https://blog.arduino.cc/2026/09/23/making-retail-smarter-build-context-aware-experiences-with-the-arduino-ventuno-q-board/

The post Smart Mirror: local visual AI turns a mirror into a style consultant appeared first on Open Electronics.

Arduino examples for the 6-colour e-paper display on the reTerminal E1002

Driving a 6-colour e-paper display is not like driving a monochrome panel. Seeed Studio’s reTerminal E1002 carries a 7.3-inch ACeP with 800×480 resolution, and a XIAO ESP32-S3 runs underneath it. Mariusz Jurgielewicz has put together a set of Arduino examples tested on exactly this combination, so newcomers don’t have to reinvent pinout, polarity and refresh sequences.

The practical value of the collection lies in the details the official drivers don’t tell you. The GDEP073E01 panel uses the ED2208 controller and is wired to the carrier through an internal FPC. So the pins are not the ones you’d expect from a breakout module: SCK is on GPIO 7, MOSI on GPIO 9, CS on GPIO 10, DC on GPIO 11, RST on GPIO 12 and BUSY on GPIO 13. Logging is also duplicated across two serials, Serial1 on GPIO 43 and GPIO 44 through the USB-UART bridge, plus the XIAO ESP32-S3’s native USB CDC Serial.

BUSY active-low and SPI clock at 2 MHz

Trap number one is the BUSY polarity. On the ED2208 the signal is active-low: 0 means refresh in progress, 1 means ready. Inverting it locks up the driver or corrupts subsequent writes, and the symptom isn’t a clear error but a panel that stays half-drawn.

The second trap is the clock. The SPI bus runs reliably at 2 MHz, and this also applies to the upload speed set in the Arduino IDE, fixed at 115200. The log serial runs at 115200 baud. Higher frequencies on the internal flex risk clock distortion, with pixel dropouts or corrupted command bytes. Finally there’s the watchdog: during a cold refresh the 40-second timeout can fire, so the sequence has to be handled accordingly.

  • SCK on GPIO 7, MOSI on GPIO 9, CS on GPIO 10
  • DC on GPIO 11, RST on GPIO 12, BUSY on GPIO 13
  • BUSY active-low: 0 refresh in progress, 1 ready
  • Reliable SPI clock at 2 MHz
  • Serial1 on GPIO 43 (TX) and GPIO 44 (RX), plus native USB CDC
  • 192,000 bytes of frame buffer in OPI PSRAM

A full frame buffer of 800×480 pixels at 4 bits per pixel, two pixels per byte, requires 192,000 bytes. It doesn’t fit in the ESP32-S3’s internal RAM, so it has to be buffered in OPI PSRAM. The panel exposes 6 native solid colour fields: black, white, red, green, blue and yellow. So each pixel is not a grey value but a colour index, and dithering has to be planned accordingly.

On the software side the collection covers three driver stacks. The first is Jean-Marc Zingg’s GxEPD2, the upstream one you get from the Library Manager. The second is the Good Display vendor driver. The third is Waveshare’s GUI_Paint graphics framework, sitting on top of Adafruit_GFX. Watch out for one detail: the Seeed_GxEPD2 fork should not be installed, because it conflicts with the upstream GxEPD2.

Besides the display, the examples cover the carrier board’s onboard peripherals. There’s the PCF8563 real time clock and the SHT4x environmental sensor, so a complete project can show the time plus temperature and humidity data without adding external modules. Anyone who wants to rebuild everything from scratch will find Mariusz Jurgielewicz’s repository with the sketches ready to upload.

To work on it you need the Arduino IDE with XIAO ESP32-S3 support, the GxEPD2 library from the Library Manager, and the panel connected to the carrier.

Source: https://github.com/melastmohican/reTerminal-E1002-arduino-examples

The post Arduino examples for the 6-colour e-paper display on the reTerminal E1002 appeared first on Open Electronics.

A DIY laptop built on the ATmega2560: real multitasking on 8 KB of RAM

An ATmega2560 with 8 KB of RAM can support a multitasking desktop environment, complete with games, file management and video playback. That is what Vladimir demonstrated by building a DIY laptop around an Arduino-compatible board with an ATmega2560, the Mega 2560 Pro Mini. The device measures 12x11x3.4 cm and packs a QWERTY keyboard, a 128×64 monochrome display, audio, microSD, an RTC and an 18650 battery into a 3D-printed enclosure. The firmware runs on FreeRTOS and offers real multitasking, with task switching via Alt-Tab. So a video that has been started keeps playing its audio while you play Sokoban.

The architecture of independent tasks is the core of the project. Applications receive events and draw through the UI engine, while the shell handles registration, stacks, switching and events. As a result, adding a new application does not require touching the others. A new task is a class with setup and loop plus a couple of methods for its menu entry and icon.

The UI engine and the applications on FreeRTOS

The interface engine handles forms, buttons, checkboxes, lists, input fields and dialogs. It takes care of key presses, tabbing, redrawing and the events sent to the owning task. On top of it run the ready-made applications:

  • file manager
  • video player
  • music player
  • clock
  • calculator
  • Sokoban
  • Snake
  • Game of Life
  • text editor

The ST7920 display is driven in parallel mode with a custom-written driver and a 1 KB video buffer in SRAM. The graphics functions range from a single pixel to text and XBM images. The AVR microcontroller runs at 16 MHz and everything runs on 8 KB of RAM, half of which is already taken up by global variables. That is why every byte of the buffer counts.

8×8 keyboard, debouncing and a 4-to-16 decoder

The keyboard has 64 keys in total, arranged in an 8×8 matrix that requires two 8-bit ports of the microcontroller. The keys were laid out in an 11×6 rectangle. Scanning happens column by column at hundreds of hertz, with software debouncing. In one revision a diode was added for each key and column selection moved to a 4-to-16 decoder. This way four pins are enough to select a column and the keyboard can expand to 16 columns.

The matrix rows are currently 6, but by reading a whole port of the microcontroller they can be brought to 8. The key labels were printed with a 0.25 mm nozzle. For the audio and memory side, the project relies on components that have a direct counterpart in the catalogue: an audio decoding shield for compressed formats, a microSD card reader with an SPI interface for the files, and a board that combines an ATmega2560 with Wi-Fi connectivity for anyone who would rather start from a different base.

24 fps video and XBM format plus MP3 in a single file

The video player uses a custom format with an XBM stream and MP3 in a single file. This way the player comfortably handles 24 fps video with audio, without keeping more in RAM than needed. The rest of the board is taken up by the RTC and the 18650 battery, which make the device self-contained. The enclosure was machined with a CNC3018 and 3D printed, while the schematics were drawn in EasyEDA.

Anyone who wants to rebuild the project will find the story of the work and the information to recreate it on the project page on Hackaday.io signed by Vladimir. Alternatively, an enclosure for an Arduino Mega can serve as a dimensional reference for the electronics, even though this laptop’s case is printed to measure.

Source: https://hackaday.io/project/206744-avr-laptop

Related products

The post A DIY laptop built on the ATmega2560: real multitasking on 8 KB of RAM appeared first on Open Electronics.