Interaction Design WikiComputer Vision

Arduino Portenta H7 + Vision Shield

Portenta H7's main processor is the STMicroelectronics dual-core STM32H747 with an on-chip GPU, including a M7 running at 480 MHz and a M4 running at 240 MHz, that can run tasks in parallel. For example it is possible to execute Arduino compiled code along with Tensorflow.js one, and have both cores to communicate with one another. Both processors share all the in-chip peripherals and can run:

The exciting part about Portenta is that you can connect an external monitor to build your own dedicated embedded computer with a user interface. Portenta is ideal for IoT applications, computer vision, robotics controllers etc. especially with Vision Shield LoRa.

There are two ways to use H7 and Vision Shield together, either with Arduino IDE/Edge Impulse CLI or OpenMV IDE. (You can’t use both solutions as they use different firmware) In order to train a ML Model, you need to create a free Edge Impulse account. Edge Impulse is a great platform, which very easily allows to train and export machine learning models on edge devices.

  1. Arduino IDE/CLI + EDGE IMPULSE CLI

In order to run Edge Impulse directly on Portenta please follow this tutorial:

https://docs.edgeimpulse.com/docs/development-boards/arduino-portenta-h7

IMPORTANT! Make sure you flash the firmware properly, as otherwise your system won’t be able to detect the device.

2. OPENMV IDE

  1. Open the OpenMV download page in your browser and download the version that you need for your operating system.

  2. Connect the Portenta to your computer. Make sure you first update the bootloader to the latest version using the File > Examples > STM32H747_System > STM32H747_updateBootloader sketch in the examples menu in the Arduino IDE.

  3. Open the Serial monitor and follow the instruction. Type Y in the text field and press enter to begin the update process.

  4. After updating the bootloader put the Portenta in bootloader mode by double pressing the reset button on the board. The built-in green LED will start fading in and out.

  5. Open the OpenMV IDE.

  6. Click on the "connect" symbol at the bottom of the left toolbar.

  7. A pop-up will show up. Choose “Install the latest release firmware” and click ok.

  8. Portenta's green LED will start flashing while the OpenMV firmware is being uploaded to the board. A terminal window will open which shows you the upload progress. Wait until the green LED stops flashing and fading. Portenta should connect automatically, if not, click on “Connect” again.

  9. Explore the examples in File > Examples >OpenMV

Troubleshooting:

In order to train your first model with Edge Impulse follow this tutorial: https://docs.arduino.cc/tutorials/portenta-vision-shield/vs-openmv-ml#overview