element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Programmable Logic
  • Challenges & Projects
  • Project14
  • Programmable Logic
  • More
  • Cancel
Programmable Logic
Blog VidorScout - MKR Vidor 4000 Mobile Robot: Intro
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Programmable Logic requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: jomoenginer
  • Date Created: 23 Jun 2019 6:43 AM Date Created
  • Views 1415 views
  • Likes 9 likes
  • Comments 6 comments
  • programmablelogicch
  • mkr_vidor
  • mkr vidor 4000
  • fpga
  • mobile robot
  • arduino vidor
Related
Recommended

VidorScout - MKR Vidor 4000 Mobile Robot: Intro

jomoenginer
jomoenginer
23 Jun 2019

Overview

 

VidorScout is an autonomous mobile robot that uses Sensor Fusion which combines camera vision, Time of Flight Sensor data and IR Sensors to identify objects for both avoidance and for object identification. The camera sensor can also be used for QR code identification to identify that an object has been labeled correctly or as a waypoint with autonomous navigation.  The Arduino MKR Vidor 4000 Development Board will be used to take advantage of the on board SAMD Microcontroller and Intel Cyclone 10 FPGA capabilities. A 5MP OV5647 Camera sensor will be used to capture real-time images to be output via the Vidor HDMI port as well as for analysis.   A closed Maze will be used to demonstrate the functionality of the bot.

 

Related Posts

VidorScout - MKR Vidor 4000 Mobile Robot: VidorBitstream compile

VidorScout - MKR Vidor 4000 Mobile Robot: Camera QR Code Recognition

VidorScout - MKR Vidor 4000 Mobile Robot: Assembly and Test

 

Hardware

Feature Detail
Brain Arduino MKR Vidor 4000
ToF Sensor

Adafruit VL53L0X Time of Flight Distance Sensor - 30 to 1000mm

Camera MakerFocus Raspberry Pi3 Camera IR Fisheye Wide-Angle 175 Degree Camera 5MP OV5647 Webcam Built-in IR-Cut
Motor Driver Adafruit DRV8833 DMAX98357A
Motors 2 x DC Gearbox Motor TT Motor 200RPM Tire Wheel DC 3-6V for Arduino
Audio Out Adafruit I2S 3W Class D Amplifier Breakout
Mic Adafruit I2S MEMS Microphone Breakout – SPH0645LM4H
Lights ACROBOTIC 1m 60-Pixel Addressable 24-Bit RGB LED Strip (White PCB), WS2812B (WS2811)
Chassis Expanded PVC for Robot Base

 

 

Software

 

Application Purpose
Arduino IDE Build and load code to the MKR Vidor 4000
Visual Studio Code Offline coding edits
Intel Quartus Prime Lite Edition v18.1 Sythesis of HDL designs
Nios II Command Shell Build design configuration and create ttf files for installing to the board.
VidorFPGA IP Blocks for Vidor FPGA
VidorPeripherals Libraries for controlling Vidor Peripherals
VidorGraphics Libraries for creating Vidor HDMI graphics
VidorBitstream FPGA files associated with the Vidor examples
USBBlaster Emulation of Intel USBBlaster programmer
WiFiNina WiFi connection from Vidor

MKR Vidor 4000 First Steps

 

Prior to getting started with the MKR Vidor 4000, it is best to ensure the Arduino has the latest Vidor 4000 Libraries and BoardManger files.

 

Manage Libraries

 

To check the Libraries, from the top menu of the Arduino IDE:

 

1. Select Sketch->Include Library then  select Manage Libraries.

image

 

  2. From the Library Manager window, type in vidor in the search bar to get a list of Vidor 4000 related libraries.

      The main libraries are:

  • USBBlaster
  • VidorGraphics
  • VidorPeripherals
  • WiFiNINA

image

 

   3.  Update or install the appropriate libraries

 

Boards Manager

 

  To check the Boards Manager, from the Arduino IDE

   1. Select Tools->Board and click on Boards Manager

image

 

  2. Type "vidor" in the search bar to get a list of related board libraries.

      The current options are:

  • Arduino SAMD Beta Boards (32-bit ARM Cortex-M0+)
  • Arduino SAMD Boards (32-bit ARM Cortext-M0+)

image

 

  3. Update or install the appropriate board files.

 

BootLoader

 

  To update the MKR Vidor 4000 BootLoader:

   1. From the Arduino IDE menu, select File->Examples then SAMD_BootLoaderUpdater->UpdateBootloader

    image

 

  2. This will open the UpdateBootloader Sketch.

  image

 

  3. Build and load the UpdateBootloader Sketch and then open the Serial Monitor to complete the update

image

 

  4. The following message will be seen in the Serial Monitor

Type 'Y' in the upper command input and hit Enter
//////////////////////////////

Welcome to the Arduino SAMD bootloader updater
----------------------------------------------

Checking if bootloader requires an update ... bootloader is NOT running the latest


Would you like to proceed with updating it? (y/N)

WARNING: DO NOT UNPLUG the USB cable during the update!!!

Updating bootloader ...

0.00%
6.25%
12.50%
18.75%
25.00%
31.25%
37.50%
43.75%
50.00%
56.25%
62.50%
68.75%
75.00%
81.25%
87.50%
93.75%
100.00%

The bootloader was successfully updated \o/

Your board will now start blinking in joy :)

 

 

Firmware Update

 

To update the Firmware on the MKR Vidor 4000, I'll just reference a previous post of mine that outlines how to do this on the MKR WiFI 1010 but the process should be the same with the Vidor 4000.

MKR WiFi 1010 - Enable BLE Support

 

 

Vidor 4000 Example

 

Once the board has been updated, select an Vidor example to ensure the board is working.

Here I have selected the VidorGraphics->VidorDrawLogo as an example but with some modifications.

Code:

#include "VidorGraphics.h"
#include "Vidor_GFX.h"

Vidor_GFX  vdgfx;

void setup() {
  Serial.begin(9600);

  // wait for the serial monitor to open,
  // if you are powering the board from a USB charger remove the next line
  while (!Serial);

  // Initialize the FPGA
  if (!FPGA.begin()) {
    Serial.println("Initialization failed!");
    while (1) {}
  }

  delay(4000);
  Serial.println("Fill Rect!");
}

void loop()
{
  /**
  *  Draw an Arduino logo
  */

  // Fill the screen with a white background
  //vdgfx.fillRect(0,0,640,480,vdgfx.White());
  vdgfx.fillRect(0,0,1680,1050,vdgfx.White());


  /**
  *  The library allows drawing some basic elements to the view, like circles, rectangles, lines
  */  

  /*
  vdgfx.fillCircle(225,225,100 ,vdgfx.lightBlue());
  vdgfx.fillCircle(415,225,100 ,vdgfx.lightBlue());
  vdgfx.fillCircle(225,225,90 ,vdgfx.White());
  vdgfx.fillCircle(415,225,90 ,vdgfx.White());
  vdgfx.fillRect(175,220,100,10 ,vdgfx.lightBlue());
  vdgfx.fillRect(365,220,100,10 ,vdgfx.lightBlue());
  vdgfx.fillRect(410,175,10,100 ,vdgfx.lightBlue());
  */
  /**
  *  To draw a text we can use the classic functions like write() and print()
  *  Text size, color and position can be changed using the .text subclass
  */
  vdgfx.setFont(5);
  vdgfx.text.setCursor(200,130);
  vdgfx.text.setAlpha(255);
  vdgfx.text.setSize(3);
  //vdgfx.text.setColor(vdgfx.lightBlue());
  vdgfx.text.setColor(vdgfx.darkTurquoise());
  vdgfx.println("element");
  vdgfx.text.setCursor(385,130);
  vdgfx.text.setSize(3);
  vdgfx.text.setColor(vdgfx.redOrange());
  vdgfx.println("14");
  
  vdgfx.setFont(5);
  vdgfx.text.setCursor(215,370);
  vdgfx.text.setAlpha(255);
  vdgfx.text.setSize(3);
  //vdgfx.text.setColor(vdgfx.lightBlue());
  //vdgfx.text.setColor(vdgfx.darkTurquoise());
  vdgfx.text.setColor(vdgfx.Black());
  vdgfx.println("Project");
  vdgfx.text.setCursor(376,370);
  vdgfx.text.setSize(3);
  //vdgfx.text.setColor(vdgfx.redOrange());
  vdgfx.text.setColor(vdgfx.yellowGreen());
  vdgfx.println("14");

  while (1) {
  }
}

 

I made some edits to the Vidor_GFX code to add more colors

 

Vidor_GFX.h

   uint32_t darkCyan();

   uint32_t darkTurquoise();
   uint32_t redOrange();
   uint32_t yellowGreen();

 

Vidor_GFX.cpp

uint32_t Vidor_GFX::darkCyan() {

 return Color(0x00, 0x8B, 0x8B);
}

uint32_t Vidor_GFX::darkTurquoise() {
 return Color(0x00, 0xCE, 0xD1);
}

uint32_t Vidor_GFX::redOrange() {
 return Color(0xFF, 0x81, 0x00);
}

uint32_t Vidor_GFX::yellowGreen() {
 return Color(0x8E, 0xAA, 0x31);
}

 

 

This produces the following image from the HDMI connection:

image

 

Next Step - Download the FPGA files and build and load them to the board via the Arduino IDE.

  • Sign in to reply

Top Comments

  • jomoenginer
    jomoenginer over 3 years ago in reply to aabhas +3
    Yeah, I tried using the Raspberry Pi camera, the NoIR in particular, but had no luck. I posted on a on going thread on the Arduino MKR Vidor 4000 forum regarding this and did not get a response, so I gave…
  • aabhas
    aabhas over 3 years ago +2
    jomoenginer We're you able to use the camera with the mkr vidor board , I tried once but it didn't work. Can we use raspberry pi camera v1 or V2 with mkr vidor ,well it works fine with raspberry pi. BTW…
  • DAB
    DAB over 3 years ago

    Good start,

    I look forward to seeing this design built out.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jomoenginer
    jomoenginer over 3 years ago in reply to aabhas

    I listed the description of the OV5647 camera that I am using and the Arduino Enable Camera example lists the Omnivision OV5647 camera as being used.  If you use a camera module that has a OV5647 sensor you should be fine. The older V1 Raspberry Pi camera used the OV5647 sensor where the newer v2.x use the Sony IMX219, so the older RasPi cameras should work but not the newer ones without changing the code in the associated Arduino library and perhaps the FPGA code.

    I'll leave it to you to do the research to find a sutable camera for your purposes.

     

    Link to comparison between v1 and v2 RasPi Cameras

    https://www.raspberrypi.org/documentation/hardware/camera/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • aabhas
    aabhas over 3 years ago in reply to aabhas

    jomoenginer

    BTW can you accept my following request ,as I wanted to learn some things so that I can message you personally .

    Thanks

    Aabhas Senapati

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • aabhas
    aabhas over 3 years ago in reply to jomoenginer

    I have two raspberry pi camera one is a noir version by Kuman

    And other is official raspberry pi , so can official rpi camera be used .

    Can you send link of the camera which you used.

    Thanks

    Aabhas Senapati

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • jomoenginer
    jomoenginer over 3 years ago in reply to aabhas

    Yeah, I tried using the Raspberry Pi camera, the NoIR in particular, but had no luck.  I posted on a on going thread on the Arduino MKR Vidor 4000 forum regarding this and did not get a response, so I gave up for now.  I opted to purchase a MakerFocus Fisheye Wide-Angle 175 Degree Camera 5MP OV5647 Webcam instead which matches the sensor used in the VidorEnableCam and VidorQrRecognition.  This seems to work pretty good and this camera offers better low light capabilities which plays into the project I am building.

     

    I'll see if I can get back to the RasPi Cam again at a later time.

    • Cancel
    • Vote Up +3 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube