element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • 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 Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
  • Settings
Internet of Things
  • Technologies
  • More
Internet of Things
Blog Tiny QR Code Reader from Useful Sensors
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Internet of Things to participate - click to join for free!
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 5 Nov 2023 7:36 PM Date Created
  • Views 4195 views
  • Likes 12 likes
  • Comments 8 comments
  • qr code reader
  • tiny code reader
  • useful sensors
Related
Recommended

Tiny QR Code Reader from Useful Sensors

ralphjy
ralphjy
5 Nov 2023

I bought a Useful Sensors Tiny Code Reader from Sparkfun https://www.sparkfun.com/products/23352 back in September, but as always have been too busy to try it out until now...

The Tiny Code Reader (TCR) is the second Useful Sensors product   I had posted about their Person-Sensor last December.  Like the Person-Sensor, the TCR is pre-configured to run out-of-the-box.  And it is designed to be not modified or updated.  

The TCR is a basic QR code reader that works best with simple QR codes (20 characters or less), but its hard size limit is 254 bytes.  

It uses an RP2040 MCU, an image sensor, and some flash memory.  The TCR-Datasheet does not provide any detail on the image sensor and is focused on describing the I2C interface and mechanical details.  There is a QWIIC connector provided for ease of interface.

imageimage

And the TCR comes in a tiny box.

image

Useful Sensors provides sample code for common development platforms - CircuitPython, MicroPython, Arduino, RPi Pico (C), Microbit, and Badger 2040.

https://github.com/usefulsensors/tiny_code_reader_docs/tree/main

The TCR powers up running the QR detection model and indicates status via an LED.  It flashes blue while scanning, green when a valid QR code has been detected, and red when there was an error decoding the QR code.  The LED can be disabled via a configuration register.

I have a Xiao RP2040 with a QWIIC connector, so I thought that would be a simple way to test the TCR.  As Murphy would have it, that did not work with the Arduino example code.  To be fair, I haven't used this particular Xiao much and it's probably a problem with the version of the board library I'm using having an issue with I2C.. I didn't want to spend much time debugging, so I switched to using a Xiao SAMD21 that I've used with I2C a lot.  I put it on an expansion board to use the Grove connector to hook up the I2C.

image

And, of course, that worked fine.  I did find that it does take a bit of fiddling around to get it to read.  It has a 110 degree field of view, so it's probably more of a distance issue depending on the size of the QR code.

I went to the Wikipedia QR code website and tried reading some QR codes off the monitor screen.  I have a short video.  I started with the wikipedia URL code, then a WiFi code.

Then further down the page there are examples of different QR code versions with increasing complexity.

image

It did pretty well with Versions 1 and 2.  Did less well with 3 and 4. And would not read 10 and 25.

This makes sense as the number of characters increases rapidly with code complexity (version).

image

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

Then, to test my use case I generated and printed a couple of QR codes.  I just used the Vistaprint QR code generator.

Here is a demo of that.  The larger QR code image that I started with was harder to get the reading distance correct.

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

Looks like a good solution for getting simple configuration information into a project.  Not too bad for a $7 sensor.

  • Sign in to reply
  • DAB
    DAB over 1 year ago

    Nice little unit.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • scottiebabe
    scottiebabe over 1 year ago

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • e14phil
    e14phil over 1 year ago in reply to shabaz

    QR Code Air Gap Semaphore Communication.  :D 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • shabaz
    shabaz over 1 year ago in reply to mp2100

    Pure speculation, but I think it may be related to the camera resolution or lens quality, because a 254 character QR code is quite detailed. Maybe they had difficulty making the capture reliably much beyond that level, or temporarily storing the image data at high enough resolution for decoding it.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • mp2100
    mp2100 over 1 year ago

    I’m surprised the hard limit for a QR text is 254 bytes.  The rp2040 has a lot of RAM.  Maybe there’s a limitation somewhere else in the board.

    • Cancel
    • Vote Up 0 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 © 2025 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

  • X
  • Facebook
  • linkedin
  • YouTube