Silicon ChipFirst Look at the Arduino MKR Vidor 4000 - March 2019 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: We all deserve a right to repair
  4. Feature: Medical, Health and First Aid Smartphone Apps – Part 2 by Dr David Maddison
  5. Project: Ultra low noise remote controlled stereo preamp, Pt.1 by John Clarke
  6. Product Showcase
  7. Project: Our new DAB+ Tuner with FM and AM – Part 3 by Duraid Madina & Tim Blythman
  8. Serviceman's Log: My father, the ultimate "serviceman" by Dave Thompson
  9. Project: Touch controlled all-diode checker and plotter by Tim Blythman
  10. Review: First Look at the Arduino MKR Vidor 4000 by Tim Blythman
  11. Project: Versatile Trailing Edge Dimmer – Part 2 by John Clarke
  12. Feature: El Cheapo Modules 23: Galvanic Skin Response by Jim Rowe
  13. Vintage Radio: Astor HNQ Mickey 4.5 valve radio by Fred Lever
  14. PartShop
  15. Market Centre
  16. Advertising Index
  17. Notes & Errata: Tinnitus & Insomnia Killer, November 2018; Stationmaster, March 2017
  18. Outer Back Cover

This is only a preview of the March 2019 issue of Silicon Chip.

You can view 34 of the 104 pages in the full issue, including the advertisments.

For full access, purchase the issue for $10.00 or subscribe for access to the latest issues.

Articles in this series:
  • Medical, Health and First Aid Smartphone Apps - Part 1 (February 2019)
  • Medical, Health and First Aid Smartphone Apps - Part 1 (February 2019)
  • Medical, Health and First Aid Smartphone Apps – Part 2 (March 2019)
  • Medical, Health and First Aid Smartphone Apps – Part 2 (March 2019)
Items relevant to "Ultra low noise remote controlled stereo preamp, Pt.1":
  • Low-Noise Stereo Preamplifier PCB [01111119] (AUD $25.00)
  • Input Switching Module PCB for the Low Noise Preamplifier [01111112] (AUD $15.00)
  • Input Selection Pushbutton PCB for the Low Noise Preamplifier [01111113] (AUD $5.00)
  • Universal Voltage Regulator PCB [18103111] (AUD $5.00)
  • PIC16F88-I/P programmed for the Low-Noise Stereo Preamp with Six Input Selector [0111111M.HEX] (Programmed Microcontroller, AUD $15.00)
  • PIC16F88-I/P programmed for the Low-Noise Stereo Preamp [0111111B.HEX] (previously 0111111A.HEX) (Programmed Microcontroller, AUD $15.00)
  • Firmware and source code for the Low-Noise Stereo Preamplifier [0111111B.HEX] (previously 0111111A.HEX) (Software, Free)
  • Low-Noise Stereo Preamplifier PCB pattern (PDF download) [01111119] (Free)
  • Low-Noise Stereo Preamplifier Input Switcher PCB pattern (PDF download) [01111112] (Free)
  • Low-Noise Stereo Preamplifier Input Selector Pushbutton PCB pattern (PDF download) [01111113] (Free)
Articles in this series:
  • Ultra low noise remote controlled stereo preamp, Pt.1 (March 2019)
  • Ultra low noise remote controlled stereo preamp, Pt.1 (March 2019)
  • Ultra low noise remote controlled stereo preamp – Part 2 (April 2019)
  • Ultra low noise remote controlled stereo preamp – Part 2 (April 2019)
Items relevant to "Our new DAB+ Tuner with FM and AM – Part 3 ":
  • DAB+/FM/AM Radio main PCB [06112181] (AUD $15.00)
  • Dual Horizontal PCB-mounting RCA sockets (white/red) [RCA-210] (Component, AUD $2.50)
  • PCB-mount right-angle SMA socket (Component, AUD $3.00)
  • 465mm extendable VHF whip antenna with SMA connector (Component, AUD $10.00)
  • 700mm extendable VHF whip antenna with SMA connector (Component, AUD $15.00)
  • PCB-mount right-angle PAL socket (Component, AUD $5.00)
  • Short Form Kit for the Micromite Plus Explore 100 (Component, AUD $75.00)
  • Case pieces for the DAB+/FM/AM Tuner (PCB, AUD $20.00)
  • Firmware (BAS and HEX) files for the DAB+/FM/AM Radio project (Software, Free)
  • DAB+/FM/AM Radio main PCB pattern (PDF download) [06112181 RevC] (Free)
Articles in this series:
  • DAB+ Tuner with FM & AM and a touchscreen interface! (January 2019)
  • DAB+ Tuner with FM & AM and a touchscreen interface! (January 2019)
  • Build-it-yourself DAB+/FM/AM radio (February 2019)
  • Build-it-yourself DAB+/FM/AM radio (February 2019)
  • Our new DAB+ Tuner with FM and AM – Part 3 (March 2019)
  • Our new DAB+ Tuner with FM and AM – Part 3 (March 2019)
Items relevant to "Touch controlled all-diode checker and plotter":
  • Diode Curve Plotter PCB [04112181] (AUD $5.00)
  • 2.8-inch TFT Touchscreen LCD module with SD card socket (Component, AUD $25.00)
  • STFU13N65M2 650V logic-level Mosfet (Component, AUD $10.00)
  • Matte Black UB3 Lid for the Multi Diode Curve Plotter (PCB, AUD $5.00)
  • Firmware (.ino sketches) for the Multi Diode Curve Plotter (Software, Free)
  • Multi Diode Curve Plotter PCB pattern (PDF download) [04112181] (Free)
  • Multi Diode Curve Plotter box cutting diagram (PDF download) (Panel Artwork, Free)
Items relevant to "Versatile Trailing Edge Dimmer – Part 2 ":
  • Touch and IR Remote Control Trailing Edge Dimmer Main PCB [10111191] (AUD $10.00)
  • Touch and IR Remote Control Trailing Edge Dimmer Mounting PCB [10111192] (AUD $10.00)
  • Touch and IR Remote Control Trailing Edge Dimmer Extension PCB [10111193] (AUD $10.00)
  • PIC12F617-I/P programmed for the Touch and IR Remote Control Trailing Edge Dimmer [1011119B.HEX] (Programmed Microcontroller, AUD $10.00)
  • Hard-to-get parts for the Touch and IR Remote Control Trailing Edge Dimmer (Component, AUD $20.00)
  • Infrared receiver parts for the Touch and IR Remote Control Trailing Edge Dimmer (Component, AUD $12.50)
  • Firmware (ASM and HEX) files for the Touch and IR Remote Control Trailing Edge Dimmer [1011119A.HEX] (Software, Free)
  • Touch and IR Remote Control Trailing Edge Dimmer PCB patterns (PDF download) [10111191-3] (Free)
  • Warning label for the Touch and IR Remote Control Trailing Edge Dimmer (PDF download) (Panel Artwork, Free)
Articles in this series:
  • Versatile Trailing Edge Dimmer with Touch Plate & IR (February 2019)
  • Versatile Trailing Edge Dimmer with Touch Plate & IR (February 2019)
  • Versatile Trailing Edge Dimmer – Part 2 (March 2019)
  • Versatile Trailing Edge Dimmer – Part 2 (March 2019)
Items relevant to "El Cheapo Modules 23: Galvanic Skin Response":
  • Sample code for El Cheapo Modules 23 - Galvanic Skin Response (GSR) (Software, Free)
Articles in this series:
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 1 (October 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 2 (December 2016)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules From Asia - Part 3 (January 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules from Asia - Part 4 (February 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 5: LCD module with I²C (March 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 6: Direct Digital Synthesiser (April 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules, Part 7: LED Matrix displays (June 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo Modules: Li-ion & LiPo Chargers (August 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo modules Part 9: AD9850 DDS module (September 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules Part 10: GPS receivers (October 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 11: Pressure/Temperature Sensors (December 2017)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 12: 2.4GHz Wireless Data Modules (January 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 13: sensing motion and moisture (February 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 14: Logarithmic RF Detector (March 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 16: 35-4400MHz frequency generator (May 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo Modules 17: 4GHz digital attenuator (June 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo: 500MHz frequency counter and preamp (July 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El Cheapo modules Part 19 – Arduino NFC Shield (September 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 20: two tiny compass modules (November 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El cheapo modules, part 21: stamp-sized audio player (December 2018)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 22: Stepper Motor Drivers (February 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules 23: Galvanic Skin Response (March 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Class D amplifier modules (May 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: Long Range (LoRa) Transceivers (June 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • El Cheapo Modules: AD584 Precision Voltage References (July 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • Three I-O Expanders to give you more control! (November 2019)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: “Intelligent” 8x8 RGB LED Matrix (January 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • El Cheapo modules: 8-channel USB Logic Analyser (February 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules (May 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • New w-i-d-e-b-a-n-d RTL-SDR modules, Part 2 (June 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital Volt/Amp Panel Meters (December 2020)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: Mini Digital AC Panel Meters (January 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: LCR-T4 Digital Multi-Tester (February 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD chargers (July 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: USB-PD Triggers (August 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 3.8GHz Digital Attenuator (October 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 6GHz Digital Attenuator (November 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: 35MHz-4.4GHz Signal Generator (December 2021)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • El Cheapo Modules: LTDZ Spectrum Analyser (January 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • Low-noise HF-UHF Amplifiers (February 2022)
  • A Gesture Recognition Module (March 2022)
  • A Gesture Recognition Module (March 2022)
  • Air Quality Sensors (May 2022)
  • Air Quality Sensors (May 2022)
  • MOS Air Quality Sensors (June 2022)
  • MOS Air Quality Sensors (June 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • PAS CO2 Air Quality Sensor (July 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Particulate Matter (PM) Sensors (November 2022)
  • Heart Rate Sensor Module (February 2023)
  • Heart Rate Sensor Module (February 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • UVM-30A UV Light Sensor (May 2023)
  • VL6180X Rangefinding Module (July 2023)
  • VL6180X Rangefinding Module (July 2023)
  • pH Meter Module (September 2023)
  • pH Meter Module (September 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 1.3in Monochrome OLED Display (October 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 16-bit precision 4-input ADC (November 2023)
  • 1-24V USB Power Supply (October 2024)
  • 1-24V USB Power Supply (October 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 0.91-inch OLED Screen (November 2024)
  • 14-segment, 4-digit LED Display Modules (November 2024)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • The Quason VL6180X laser rangefinder module (January 2025)
  • TCS230 Colour Sensor (January 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)
  • Using Electronic Modules: 1-24V Adjustable USB Power Supply (February 2025)

Purchase a printed copy of this issue for $10.00.

“Hands On” review by Tim Blythman NEW FROM MKR VIDOR 4000 This newest Arduino FPGA board sports a 48MHz 32-bit processor with 256KB flash and 32KB RAM, extra flash and RAM, onboard WiFi and Bluetooth, HDMI video output and camera interface connectors, a battery charge controller, cryptography chip and a large field programmable gate array (FPGA). It can be plugged directly into a breadboard for experimentation. A rduino boards are very popular and have spawned many clones and copies. There is no doubting the attractiveness of the ATmega328-based Uno and its other 8-bit relatives such as the Mega and Nano (both described in the December 2018 issue; see siliconchip.com.au/Article/11335). But the Arduino company has not stood still and they continue to release even more powerful boards. The Arduino MKR Vidor 4000 is their latest product. They have released quite a few boards since the Uno, but none have reached the same level of popularity. Many of the newer boards, such as the Due, now use 32-bit ARM processor rather than the 8-bit AVR chip, and the MKR (short for “maker”) series of boards have also changed to a more compact, siliconchip.com.au breadboard friendly pin layout. These new chips have a 3.3V maximum supply voltage and have 3.3V I/O levels, compared to a typical 5V for the AVRs. The newer boards have many extra features compared to the Uno/Nano/ Mega, especially for wireless communications, as it is expected that these development boards will be used in “IoT” (Internet of Things) type applications. Vidor details The Vidor’s main processor is a Microchip ATSAMD21 (ARM Cortex-M0+ processor), with 256kB of FLASH memory and 32kB of SRAM. It operates at 48MHz and has 22 I/O pins. As mentioned above, these I/Os have a 3.3V swing. It has 12 pulse-width modulation (PWM) outputs, seven inputs to the analog-to-digital converter (ADC) and Australia’s electronics magazine a single 10-bit digital-to-analog converter (DAC) which can be routed to a specific pin. It can also operate as a USB device or host. There’s also an 8MB RAM chip and 2MB flash memory chip on the board, in addition to the central processor’s internal memory. The Vidor includes a U-BLOX NINA W10 WiFi/Bluetooth module. This is a variant of the ESP32 IC, the bigger brother of the ESP8266 (described in the April 2018 issue; see siliconchip.com. au/Article/11042). This contains an embedded 32-bit microcontroller which could, on its own, be programmed by the Arduino IDE. The same WiFi/Bluetooth module also appears on the new Uno WiFi Rev2 board, released around the same time as the MKR Vidor 4000. The Uno WiFi Rev2 retains the clasMarch 2019  71 NINA W10 WiFi and Bluetooth Module 10CL016 FPGA GPIO Header 2MB FLASH IC 32.768kHz Watch Crystal Battery Connector Reset Tactile Switch Mini PCI-E Connector (board edge) Micro USB Socket MIPI Camera Connector Green LED Type D MicroHDMI Socket GPIO Header CryptoAuthentication IC 8MB RAM IC SAMD21 Processor J3 Header Like many recent Arduino boards (and unlike the early ones), it’s built almost entirely from surface-mount devices. This view shows the top side of the PCB and identifies major components. Both of these labelled photos are shown significantly over size (for clarity – actual PCB size is only 83 x 23mm, as shown inset at right). sic Uno form factor but uses the slightly more powerful ATmega4809 8-bit processor. That would be a good one to use if you are familiar with the Uno and need the WiFi feature but not any of the other features of the Vidor. Helpfully, the Vidor pin numbers are printed on the side of the headers, including alternative pin functions (eg, SPI and I2C) as appropriate. This is necessary because there is little room on the top of the PCB itself for pin designations. Most of the pin designations are also printed on the underside of the board. The main components of the board are highlighted in the adjacent photos. Items of note include the TI BQ24195LRGET battery charger IC and the Microchip ATECC508A Crypto-authentication IC. The ATECC508A provides hardware acceleration of AES and oth- er secure network connections such as TLS, and is connected to the micro via an I2C bus. The battery charger IC connects to the USB port and can detect the USB host’s charging capability. The IC also connects to the ATSAMD21’s I2C bus for charge control and monitoring. The underside of the board also sports two unpopulated headers. There is a space for a six-pin 0.1-inch pitch header and a ten-pin 0.05-inch pitch header. Both of these sets of pads are routed to the ATSAMD21, for access to the Serial Wire Debug (SWD) and JTAG debugging/programming interfaces. Onboard FPGA But the most unusual feature of this Arduino board is that it incorporates an Intel Cyclone 10CL016 FPGA. The Mini PCI-E Connector (board edge) FPGA is hooked up to most of the board I/O pins, as well as the micro HDMI socket and the MIPI camera connector. This FPGA gives the MKR Vidor 4000 capabilities beyond a plain microcontroller, but perhaps not quite as advanced as a fully-fledged computer. A Field Programmable Gate Array is an array of logic gates (like practically any logic IC or even microcontroller) which is programmable after it has left the factory (ie, “in the field”). Being an array of gates, in effect, everything on an FPGA happens in parallel, rather than in a serial, oneat-a-time fashion as is the case with microcontrollers. This means that FPGAs are great for digital signal processing, such as audio and video compression/decompression, and even AI-like tasks such as image recognition. Voltage Regulator IC Battery Charger IC JTAG Header Serial Wire Debug (SWD) Header Similarly, here is the underside of the board with maor components identified. 72 Silicon Chip Australia’s electronics magazine siliconchip.com.au Fig.1: the board profile for the Arduino MKR Vidor 4000 can be found by searching for “vidor” in the Arduino IDE’s Boards Manager window. Fig.2: we recommend installing these three libraries to use with the MKR Vidor 4000. There don’t appear to be any third-party libraries specific to the Vidor just yet. In theory, given enough internal gates, an FPGA can provide the functionality of just about any digital IC, and in fact, FPGAs are often used in the design stage of ASICs (application specific integrated circuits), including some CPUs, to test the design before the final chips have been manufactured. What that means in practice is that the FPGA can be reprogrammed to provide different hardware functions depending on what is needed for the project at hand. In terms of complexity, programming an FPGA is a step above programming a microcontroller. But with the Vidor 4000, you don’t usually need to worry about that. The Arduino integrated development environment (IDE) contains pre-compiled FPGA software or “IP blocks” which are loaded into the flash memory during the upload process. Just like libraries, they provide functions that can be controlled from the Arduino program but do not need to be understood at a deep level. Out of the box, the FPGA provides access to the HDMI and camera features on the board, amongst others. But what the FPGA adds in broad terms is peripherals. It is possible to use the FPGA to access extra PWM, I2C, SPI and UART channels, and these peripherals can be configured to operate on any I/O pin. At the moment, Arduino libraries for the MKR Vidor 4000 may configure the FPGA, splitting some of the tasks between the main processor and the FPGA. While the concept of IP blocks does siliconchip.com.au not sound like it is consistent with the open-source ethos that the Arduino software is known for, the process for creating IP blocks is open-source. However, as yet, few people are creating open-source IP blocks. We understand that soon it will be possible to create more features for the FPGA using a web interface and cloud-based compiler, although this will likely be in a very different language to the usual Arduino IDE. It is expected that contributed IP blocks will greatly expand the usefulness of the MKR Vidor 4000. Information about creating IP blocks can be found at: https://github.com/vidor-libraries/VidorBitstream Getting hold of a Vidor board Before we could try the Vidor out, first we actually had to get one, which turned out to be a bit harder than expected. When we ordered our MKR Vidor 4000 board from element14, we were required to complete an import declaration, stating that we would not reexport the unit, nor use it in chemical, biological or nuclear weapons and that the unit would not be supplied to a military end user. Unfortunately, this meant that we had to put aside our plans for world domination. Having completed the declaration, we received the unit not long after. Besides the board itself, we got a small sheet of Arduino stickers in the box and a product guide with warranty and RoHS-compliance information. If you are familiar with the Uno, the first thing that will strike you is how Australia’s electronics magazine small the Vidor is. It’s about half the size of the Uno and is fitted with two rows of stackable headers. We attached the unit to a 400-hole breadboard to avoid damaging the pins underneath. Software As with other Arduinos, to program the MKR Vidor 4000, you need the Arduino IDE software. This includes a code editor, compiler and upload tools. Although there is some basic example code available for the MKR Vidor 4000, we would suggest some experience with a simpler board (such as an Uno) before trying to work with the MKR Vidor 4000. We are currently using Arduino IDE version 1.8.5, which appears to be the same version as shown in many of the MKR Vidor 4000 examples. Although no version number is given as a minimum requirement for working with the Vidor, you need version 1.6.4 or later to use the Boards Manager tool (which we highly recommend for ease of use). The IDE can be downloaded from www.arduino.cc/en/Main/Software but there is also an online-only version of the IDE which you can access at https://create.arduino.cc/ (you need to create an account on that website before you can use it). Once the IDE is installed, the MKR Vidor 4000 Board Profile needs to be installed. The Boards Manager (found under the Tools → Board → Boards Manager... menu) is the easiest way to do this. Inside the Boards Manager, search for “vidor” (see Fig.1), click on the March 2019  73 Fig.3: this shows the output of “VidorTestSketch”. It lists which IP Blocks are currently loaded into the FPGA. The list includes support for numerous peripherals. option shown and click install. This can take a while, as the entire SAMD21 toolchain needs to be installed. Under Windows, this also installs the MKR Vidor 4000’s USB drivers. For macOS and Linux, no drivers are needed. Once the Board Profile is installed, we recommend adding some of the Vidor-specific libraries as well. These can be installed using the Library Manager (found under Sketch → Include Library → Manage Libraries…). Again, simply search for “vidor”. We suggest you install the Vidor-Peripherals, VidorGraphics, and WiFiNINA libraries – see Fig.2. The USBBlaster library is a tool used for updating the FPGA if you are devel- Fig.4: an I2C scanner sketch shows two devices on the board that are pre-connected to the I2C bus. These are the Cryptoauthentication IC (0x60) and battery charge IC (0x6b). oping your own IP Blocks, and is otherwise not needed. Adding some extra hardware We’re intrigued by what can be achieved by adding a camera to an Arduino board, but there isn’t much information about what cameras will work, except that camera needs to plug into the board’s “MIPI” connector. Since this connection appears to be the same as the commonly available Raspberry Pi cameras; we tried one and it worked fine. The camera we used has “Rev 1.3” printed on it. These flexible flat cables (FFC) can be fiddly to plug in. Ensure that the contacts on the camera cable face down (towards the Vidor PCB), push the cable in as far as possible and then squeeze the black and brown halves of the connector together. The Vidor also has a Micro-HDMI (type D) socket, so to connect to a monitor, you will need a Micro-HDMI to full-size HDMI adapter, or a suitable cable. What can it do? Now let’s look at what we can do with all this extra hardware. There are a few example sketches that are installed along with the aforementioned libraries. The WiFi examples are numerous, but we won’t delve into these; the WiFi capabilities of this board are similar to many other boards. In fact, given that the WiFi function is supplied by an ESP32 compatible module, the capabilities and interface will be practically identical to the ESP32 based boards that can Above: the output of the “VidorDrawLogo” sketch on an HDMI monitor. The display has a resolution of 640 x 480. Right: the “VidorQrRecognition” sketch can identify and mark, but not decode, QR codes. 74 Silicon Chip Australia’s electronics magazine siliconchip.com.au be programmed by the Arduino IDE. There are six distinct examples provided within the two main Vidor libraries. The examples can be found under File → Examples → VidorGraphics and File → Examples → VidorPeripherals. They only appear when “Arduino MKR Vidor 4000” is selected in the Tools → Board menu. You may need to scroll down if you have a lot of libraries or boards installed. Having loaded an example sketch, select the correct serial port from the Tools → Serial Port menu and then press Ctrl-U to compile it and upload it to the Vidor board. One thing we found with the examples is that they all include the line: while (!Serial); This means that the Serial Monitor needs to be opened before the program will proceed. For these examples, it worth having the Serial Monitor open to watch the sketch report what it’s doing, but we were surprised to see the basic HDMI example fail to output video just because we had not opened the Serial Monitor yet. We tried the “VidorDrawLogo” example first. It displays the Arduino logo displayed on an attached HDMI monitor. Interestingly, a much clearer version of the logo can be seen for about a second before this; it appears that the Vidor has its own splash screen built in, too. While hardly extraordinary, this is a great example of how simple it is to drive an HDMI monitor. If you have previously used any graphics type displays with the Arduino IDE, the drawing commands will be familiar. Although basic, we expect people will use this feature to create video games. We tried the “VidorEnableCam” sketch next. It takes the video stream from the camera and displays it on the HDMI monitor. Next, we tried the “VidorQrRecognition” sketch. We found a QR code and held it in front of the camera. The result is seen in the adjacent photo. It appears that this sketch will detect a QR code, but not decode it. The three marker points are found and flagged with a cross, but the code does not have any means of decoding QR codes. This would be a handy tool for an Arduino board to have (being able to siliconchip.com.au read linear barcodes would also be useful), but it seems to be just a proofof-concept. Still, the ability to overlay graphics over a camera stream raises some exciting possibilities for video processing. We did not try the “VidorNeoPixelMatrix” (for driving serially addressable RGB NeoPixels) or “VidorEncoder” (for reading quadrature encoders) examples, but the intent of these demos is clear. Both these tasks require very tight timing considerations to work correctly. By offloading these duties to the FPGA, the main processor can focus on doing what it needs to do, but without needing to deal with time-critical peripherals directly. The final example is named “VidorTestSketch”. It demonstrates using both the central processor and FPGA to control the I/O pins and shows some information about the IP blocks in the FPGA – see Fig.3. for the FPGA, and we may see a future IP Block providing this feature. Further experiments Verdict While the “VidorQrRecognition” example shows that it is possible to process video data with the MKR Vidor 4000, inspection of the source code shows that there is no easy way to access the contents of the camera video stream. The video processing is done using the FPGA and so is hidden in the IP Block. While it’s possible to lay graphics over the camera stream using regular Arduino code, manipulating and interacting with the video appears to be out of reach at the time of writing. One example of the potential use of such processing would be to perform chroma key processing of video. Also known as “green screen” or “blue screen”, this involves replacing the colour-coded background of a video stream with a different image. For pixels that match the key colour (ie, blue or green, depending on the implementation), the background image or video is shown instead. You would be familiar with this effect from its widespread use in TV weather broadcasts. If we could read the contents of the camera stream, then it would be a simple case of checking each pixel and displaying the foreground or background as appropriate. This would actually be an ideal task The Arduino MKR Vidor 4000 looks like it’s a very capable device but it’s a pity that so much of its power is locked up in the “black box” of the FPGA IP Blocks. This means that the examples provided don’t really demonstrate what it is capable of. Having said that, being able to draw reasonably high resolution (for an Arduino) graphics to an HDMI display is an excellent feature in its own right. We expect that as more people develop IP Blocks, we will see some great applications for the Vidor. An FPGA is well suited for highly parallel tasks such as image recognition and it will be interesting to have such a feature available on something smaller than a fully-fledged computer or small-board computer (SBC) like the Raspberry Pi. Just as the multitude of third-party libraries has made the Arduino ecosystem so flexible, we hope that the community will create some great libraries for the FPGA side of this board as well. The Arduino MKR Vidor 4000 is available from Mouser Electronics with free delivery. Australia’s electronics magazine On the bus We also noted that the battery charge IC and crypto-authentication IC are connected to the I2C bus of the ATSAMD21. We ran an I2C scanner sketch to see if there were any other devices. The results are shown in Fig.3. According to the datasheets, the device at 0x6B is the battery charge IC, and the device at 0x60 is the Crypto-authentication IC. The specs of the battery charge IC indicate that it is a switchmode device operating at 1.5MHz with an adjustable charge current of up to 2.5A and efficiency up to 92%. It can operate from 5V USB power or 3.9-17V DC. It also provides a boost regulator which can be used to provide a 5V rail from a single-cell lithium-ion battery and a host of other charge management and power management features. See: https://au.mouser.com/new/ arduino/arduino-mkr-vidor-4000/ and https://au.mouser.com/ProductDetail/ Arduino/ABX00022 SC March 2019  75