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
Personal Blogs
  • Members
  • More
Personal Blogs
Ralph Yamamoto's Blog Arduino Nano 33 BLE Sense with OV7670 Camera
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 12 Sep 2021 9:06 PM Date Created
  • Views 3808 views
  • Likes 7 likes
  • Comments 2 comments
  • image classification
  • arduino nano 33 ble sense
  • ov7670
  • tinyml
  • edge impulse
Related
Recommended

Arduino Nano 33 BLE Sense with OV7670 Camera

ralphjy
ralphjy
12 Sep 2021

I've been looking for a camera board that I could use with the PSoC 62S2 dev board for the Low Power IoT challenge.  This dev board does not have a dedicated camera interface and I haven't seen any examples using a camera.  vlasov01 suggested that I look at the Edge Impulse example that uses the Arduino Nano 33 BLE Sense with the OV7675 camera: adding sight to your sensors .  This is the same hardware used in the arduino-tiny-machine-learning-kit minus the shield that provides the camera connection.  I could only get an OV7670 quickly from Amazon, so I decided to try that.  It appears that the OV7670 is essentially the same as the OV7675 - just a slightly larger sensor, but with the same VGA (640x480) resolution with 2 fewer pins on the header (the pins are NC anyway)..

 

I probably should have spent a bit more time thinking about the interface.  I am planning to use an E-Ink display shield with the PSoC 62S2 as I mentioned in my getting stated post: Low Power IoT Design Challenge - Getting Started .  With that shield installed, there are only a few pins available on the Arduino Header:

image

and pins not on the Arduino header are pretty much consumed by the dev board peripherals.   The OV7670 (and OV7675) use 14 GPIO pins in addition to the I2C pins, so this camera won't be viable for my project.

 

Good news is that the OV7670 is really inexpensive (2 for $8.99) and I should be able to use it with my Nano 33 BLE Sense board and the Edge Impulse and Arduino tinyML tutorials.  Don't want to go down a rat hole, but thought I'd give it a quick look.

 

Without the Arduino Tiny Machine Learning shield, the hookup is a little painful - needs 18 jumper wires to a solderless breadboard image.

Here's the hookup diagram and connection table for the OV7675 from the Edge Impulse site (Pins 19 and 20 are 17 and 18 on the OV7670).

image

image

 

And here's my unit hooked up.

image

 

 

The Edge Impulse setup has been pretty well covered in other posts, so I won't go into any detail here.  Basically, to set up data capture you download firmware for your device and scripts are provided to flash the device.  Scripts are provided for Windows, Linux and Mac.

image

 

After flashing the device, you just need to run the edge-impulse-daemon to connect the device to your Cloud Dashboard.

image

 

 

Here is the Data Acquisition view in the Dashboard

image

 

 

There's a lot of latency getting the image to the Dashboard and I see a lot of motion artifacts probably due to the rolling shutter on this sensor.  The firmware is set up for 2 different Camera resolutions - QQVGA (160x120) and a smaller 128x96 format.  I expect that's because the higher resolutions are too slow for this data acquisition method.  I chose to use the lowest resolution to reduce the latency.

image

 

 

Here's a quick clip that shows the latency and motion blur:

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

 

I'll design a simple image classification model to test how well inferencing works with this setup.  I think because of the motion artifacts, that I'll use static images.  I'll post about that later.

 

I also noticed that edX has an online HarvardX course on Deploying TinyML that uses the Arduino Tiny Machine Learning Kit: https://www.edx.org/course/deploying-tinyml .  I think that I'll check that out.

  • Sign in to reply

Top Comments

  • vlasov01
    vlasov01 over 1 year ago +1
    Nice post! PSoC 62 is Arduino shield compatible. So in theory it should support OV7670 too, And please consider using black/white images for your ML model There is an example for Arduino OV7670 doesn't…
  • ralphjy
    ralphjy over 1 year ago in reply to vlasov01 +1
    Thanks for the Coursera link. I took the previous course by Shawn Hymel as well. PSoC 62S2 should support the OV7670, but I wanted to use the EPD display at the same time and that's the issue with available…
  • ralphjy
    ralphjy over 1 year ago in reply to vlasov01

    Thanks for the Coursera link.  I took the previous course by Shawn Hymel as well.

     

    PSoC 62S2 should support the OV7670, but I wanted to use the EPD display at the same time and that's the issue with available pins. 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • vlasov01
    vlasov01 over 1 year ago

    Nice post!

     

    PSoC 62 is Arduino shield compatible. So in theory it should support OV7670 too,

    And please consider using black/white images for your ML model There is an example for Arduino

    OV7670 doesn't have FIFO. It may explain challenges with the quality.

     

    I've taken a similar course on Edge Impulse from Coursera and it was good. They have another one Computer Vision with Embedded Machine Learning . It starts today and you may like it as well.

    • Cancel
    • Vote Up +1 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