A previous project described the construction of test-rigs, based on Arduino microcontroller hardware, 4D Systems touchscreens and Totem chassis. These were design to be connected to a computer running various free or low cost software development packages. These included code-free tools for programming instrumentation and control circuits, and allow rapid prototyping of devices and graphical user interfaces by non-programmers - e.g. biological scientists (https://www.hackster.io/jim-haseloff/programmable-test-rig-part-1-d7df62).
(i) A PC connection allows use of the visual development software to interactively develop machine operation and interfaces, but some of the software (e.g. 4D Systems Workshop4) requires a Windows operating system. For MacOS users, this requires use of emulator software.
(ii) During operation, more complicated instruments might require a connected PC in order to effectively manage data storage, display or communication.
This project is an attempt to exploit newly available, low-cost x86 hardware, that allows the further integration of accessible PC software and local computing infrastructure with novel programmable devices.
2. Choice of micro-sized x86 computerI looked to identify a compact, low-power, low cost computer board that was capable of running a package of no- and low-code development software, and which could be mounted with other hardware. Four systems were tested: a Latte Panda single board computer, a Rock Pi X board, Seeeduino Odyssey Blue and a NUC format Beelink micro PC.
Latte Panda 1.0 specifications: Processor: Intel Cherry Trail Z8350 Quad Core, 2M Cache, up to 1.92 GHzOperation System: Pre-installed Windows 10Ram: 4GB DDR3LStorage Capability: 64GBGPU: Intel HD Graphics, 12 EUs @200-500 Mhz, single-channel memoryOne USB3.0 port and two USB 2.0 portsWiFi and Bluetooth 4.0Built-in Arduino Co-processor: ATmega32u4Video output: HDMI and MIPI-DSIOnboard touch panel overlay connectorSupports 100Mbps EthernetGPIO:6 GPIOs from Cherry Trail processor20 GPIOs from Arduino Leonardo6 Plug and play Gravity sensor connectorsPower: 5v/2ADimension of board: 88 * 70 mmWebsite: https://www.lattepanda.com
Rock Pi X specifications:64bit Quad Core X86 Processor - Intel Atom x5-Z8350 Cherry TrailQuad-core processor @ 1.44 GHz / 1.84 GHz (Turbo)Intel Gen8 HD graphics @ 500 MHzMemory LPDDR364bit dual channel LPDDR3@1866Mb/s, 1GB/2GB/4GB optionalStorage eMMC module (Optional industrial compatible high performance eMMC module, 16GB/32GB/64GB/128GB available)μSD card (μSD slot supports up to 128 GB μSD card)Display HDMI 2.0 up to 4k@30Audio 3.5mm jack with micHD codec that supports up to 24-bit/96KHz audio.Wireless 802.11 ac wifi, Bluetooth 4.2 with on board antenna and external antenna support.USB USB 3.0 OTG X1, hardware switch for host/device switch, lower oneUSB 2.0 HOST X3Ethernet GbE LAN GbE LAN with Power over Ethernet (PoE) support40-pin GPIO expansion header2 x UART, 2 x SPI bus, 2 x I2C bus, 1 x PCM/I2S, 1 x SPDIF, 2 x PWM, 1 x ADC, 6 x GPIO, 2 x 5V DC power in, 2 x 3.3V DC power in, RTC with battery connector for optional time backupPower: USB PD, support USB Type C PD 2.0, 9V/2A, 12V/2A, 15V/2A, 20V/2A.Qualcomm® Quick ChargeTM: Supports QC 3.0/2.0 adapter, 9V/2A, 12V/1.5ASize 85mm x 54mmWebsite: https://wiki.radxa.com/RockpiX
Seeduino Odyssey Blue specificationsProcessor: Intel® Celeron® J4105 (Frequency: 1.5 - 2.5GHz)Coprocessor: Microchip® ATSAMD21G18 32-Bit ARM® Cortex® M0+Graphics: Intel® UHD Graphics 600 (Frequency: 250 – 750MHz)Memory: LPDDR4 8GBStorage: External 128GB SSDWireless: Wi-Fi 802.11 a/b/g/n/ac @ 2.4/5 GHz HT160Networking: Intel® I211AT PCIe Gigabit LAN, Supports Wake-On-LAN, Supports PXEAudio: Microphone + headphone Combo ConnectorUSB 2.0 Type-A x2, USB 3.1 Type-A x1, USB 3.1 Type-C x1Video Interfaces: HDMI2.0a: Up to 4096x2160 @ 60Hz 24bpp / DP1.2a: Up to 4096x2160 @ 60Hz 24bppExpansion Slots: M.2(Key B, 2242/2280): SATA III, USB2.0, UIM; M.2 (Key M, 2242/2280): PCIe 2.0 ×4; Micro SD card Socket; SIM Card Socket; SATA IIIBuilt-in TPM (2.0)Power: DC Jack 5.5/2.1mm or Type-C PD; DC Jack input: 12-19V DC; Type-C input: 15V DCDimensions: 130x120x50mmWebsite: https://www.seeedstudio.com
Beelink T45 specificationsCPU: Intel® Apollo Lake Pentium® Processor N4205 (4 cores, 2M Cache, 1.5GHz up to 2.60GHz)Graphics: Intel® HD Graphics 505DDR: 8GBStorage SSD: 128GBWireless LAN: 2.4GHz + 5.8GHz WiFi 802.11 b/g/n/ac bluetooth 4.0 (Intel 3165)Software OS: windows10, ubuntu12V-1.5A 18W CertificationInput: 100-240V AC, 50/60Hz, Output: 12V 1.5ADimension: 119 x 119 x 17.7mmWeight: Only Device 0.34 kgWebsite: http://www.bee-link.com
Each of the boards arrived with preinstalled copies of Windows 10. A keyboard, mouse and 4K monitor was plugged in for testing. The boards were connected to the net by WiFi and ethernet cable. Development software (XOD, Workshop4) and benchmarking software (Geekbench5, Disk Benchmark) were installed. The Latte Panda board has an embedded Arduino Leonardo microcontroller, and the Odyssey Blue has an embedded SAMD21 Cortex M0 (Arduino compatible) microcontroller.
The Latte Panda was supplied without a heatsink, and without this, the processors overheated and were automatically throttled. A Startech copper heatsink and fan assembly was attached with heatsink adhesive, and this kept CPU temperatures under 40ºC, even under heavy load. The Rock Pi X board was fitted with a custom passive heatsink, which kept CPU temperatures up to 70ºC under heavy load. The Odyssey Blue and Beelink T45 are fitted with relatively efficient heatsinks and fans.
The tiny Beelink case incorporates a forced air design for cooling the main circuitry - shown in the diagram below, taken from the Beelink website. Air is drawn into the case fron underneath and directed across a finned heatsink that sits over the circuit board.
On the basis of experience and published accounts, minimum specifications of 4GB RAM and 32 GB were set in order to support the running of Windows 10-based development software in these micro PCs - and this governed the choice of hardware. The systems were loaded, checked to support Windows 10 apps at 4K resolution. Differences in speed of program loading and user interaction were noted. Benchmark software was run on the systems, and is summarised in the table below:
The two Intel Atom based systems with 4GB RAM and slower disk systems showed slower loading and sluggish interactivity. Although capable of running the required software systems at 4K resolution, use required a patient approach. To be fair, the boards weren't intended to be full desktop replacements. Some tweaks to the operating system or provision of faster disk access might make these more useable - especially the Rock Pi X. However the higher specification Celeron-based machines provided adequate performance. The Odyssey Blue is a integrated solution that provides the x86 board in a chassis, along with embedded Raspberry Pi and Arduino compatible co-processors. The Beelink T45 lacks any co-processor, but is part of a new class of PC that follows the Intel NUC format, with a 4" square motherboard. The availability and capacity of cheap NUC PCs is increasing, and these look to be attractive prospects for low-cost instrumentation.
4. Connecting to programmable Arduino devicesEarlier experience with standalone test-rigs for development of Arduino-based devices (https://www.hackster.io/jim-haseloff/programmable-test-rig-part-1-d7df62) indicated scope for some some improvements. There are a number of new boards that retain the advantages of the Arduino UNO format, including compatibility with existing development environments (e.g. XOD) and availability of a wide range of compatible hardware, such as shields. I chose to experiment with the Seeeduino V4.2 and Seeeduino Cortex-M0+. The Seeduino V4.2 is powered by an ATmega328P microcontroller (standard for the UNO), and provides 3 Grove connectors and 3.3V/5V compatibility. The Seeeduino Cortex-M0+ board is powered by the ATSAMD21 microcontroller chip, and provides additional benefits:
(i) More powerful - runs at 48MHz (vs. 16MHz), 256KB (vs. 32KB) flash memory, 32KB (vs. 2KB) RAM, 12 bit analogue-digital converter (vs. 10 bit), USB-C connector, and 3 Grove ports with access to two additional hardwired serial ports.
(ii) Work with Biomaker projects has demonstrated the benefits of using touchscreen interfaces for building sophisticated control and display systems. Further, 4D Systems gen4 LCD touchscreens can be programmed code-free using their Workshop4 Visi-Genie platform. Arduino UNO compatible boards have only one hardware serial port (hence the name). This is used for programming the Arduino board, so generally a touchscreen is connected through digital ports configured as an additional software-defined serial port. In contrast, the Seeeduino Cortex-M0+ board allows use of two additional hardware UART serial ports. This allows the communication between the board and screen to run at full speed (600, 000 bps), rather than the slower, software-limited speeds. This relieves problems due to the need for higher bandwidth due to screen updates.(https://wiki.seeedstudio.com/Seeeduino-Cortex-M0)
(iii) The gen4-µLCD screens could be connected directly to either of the two "spare" serial ports and 5V, GND connectors available on the Cortex-M0+ board. This allowed simpler connection, and sidestepped the need for a dedicated shield adapter, such as the 4D Arduino adapter (https://4dsystems.com.au/4d-arduino-adaptor-shield-ii).
Programming of the Seeeduino Cortex-M0+ is supported in the Arduino IDE and XOD, using board descriptions provided by Seeed (). The required board definition can be downloaded and installed in the /user/xod/__packages__ folder.https://wiki.seeedstudio.com/Seeed_Arduino_Boards/https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json,
XOD-generated code runs directly on the ATSAMD21 processor on the Seeeduino Cortex-M0+ board. There do appear to be some glitches, where uploads may need to be repeated twice, as the COM port connection may not be recognised correctly in the first instance. Further, the debug mode is not returning messages from the ATSAMD21 yet.
4D Systems have updated the gen4-µLCD Arduino library and provided support for inherent and internal screen widgets, as well as the regular external widgets (GCI, Graphics Composer Image). CGI widgets are stored on a µSD card. The two new classes allow code for user interface elements to be directly loaded into internal memory, avoiding the need to deal with µSD card swapping.
Internal (PmmC) widgets provide a way to deliver high quality graphical widgets without using any external memory storage device. This type of widget is generated during runtime by executing widget functions included in the PmmC. This widget type is ideal for standalone applications that requires light graphics. Internal Widgets requires a small amount of program space to store widget parameters. This reduces that amount of useable code space for the project. If the project will require a huge amount of code space and multiple widgets, it is highly advisable to use regular GCI widgets instead.
(Paraphrasing 4D Systems technical information): The gen4-µLCD screens contain highly integrated and configurable custom processors. The internal architectures are constructed of high level functional blocks that are controlled and supervised by EVE (Extensible Virtual Engine). EVE is a proprietary, high performance virtual processor engine with an extensive byte-code instruction set optimised to execute compiled 4DGL programs. This provides a single unified platform for implementation across a variety of architectures. The combined blocks of EVE, the built-in graphics and library functions and the low level drivers, make up and define the personality of the touchscreen devices. This is referred to as the Personality-module-micro-Code or PmmC for short.
Inherent widgets are stored on banks of on-chip flash memory. Use of this class of widgets requires use of the PRO version of Workshop4. There is more information about the behaviour of the different widget classes at: https://forum.4dsystems.com.au/node/73272
XOD librarysupport. Without access to the paid-for Workshop4 PRO, most users, will prefer to use internal widgets if they want to avoid use of a µSD card. Matt Wayland has produced two XOD libraries that provide support for both internal and inherent widgets. https://xod.io/libs/wayland/4d-ulcd-internal-widgets/https://xod.io/libs/wayland/4d-ulcd-inherent-widgets/
6. Demonstration programThe x86 boards were loaded with XOD and Workshop4, with appropriate drivers. A simple test program was built in XOD. It was designed allow the output from a potentiometer (via a pot node), set to a value between 0.1 and 10 via a map node - to set the rate of a square-wave oscillator node. Reading of the potentiometer was regulated by a clock node which pulsed each 10 msec. The frequency of the oscillator was used to set the rate of flashing of an led node. A 4D Systems gen4-LCD 32DT screen was connected to a serial port on the Arduino boards. In the case of the ATSAMD21 board, it was attached directly to the UART-2 serial port, and run fast at 600, 000 baud.
The widgets on the gen4-µLCD 32DT touchscreen, were composed in 4D Workshop4, and consisted of a gauge, slider, LED and numerical display. These were separately programmed as regular GCI widgets (loaded onto a µSD card) or as internal widgets (loaded directly into screen memory, along with the controller code).
In addition, two of the x86 boards include embedded Arduino compatible microcontrollers (an Arduino Leonardo on the Latte Panda SBC, and an ATSAMD12 chip on the Odyssey Blue) - with suitable headers provided on the x86 board. In these cases, the XOD code was tested on the internal as well as externally plugged Arduino-compatible boards, as shown below for the Odyssey Blue. Generally, the embedded microcontrollers worked as expected, and these could be useful for particular designs, but suffered from poorer accessibility to IO pins and incompatibility with standard Arduino Uno shields.
I settled on the Beelink T45 (or equivalent) as a suitable PC device that can handle a full suite of no-code programming tools, high resolution screen, licensed version of Windows 10 and range of options for connectivity and expansion. It combines the benefits of being compact and relatively low cost (the device shown below was available for £109, albeit discounted), and there are number of similar devices on the market.
The next challenge will be to experiment with compact chassis variants for these components. (TBC)
Comments
Please log in or sign up to comment.