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 & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • 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
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • 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
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Legacy Personal Blogs Third Year Systems Project - 5 : Bar code Scanner Design Challenge
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: djfraz
  • Date Created: 30 Oct 2017 11:10 AM Date Created
  • Views 275 views
  • Likes 1 like
  • Comments 0 comments
Related
Recommended

Third Year Systems Project - 5 : Bar code Scanner Design Challenge

djfraz
djfraz
30 Oct 2017
    • Code numberAllergy (colour)
      0000No allergy
      0001Red
      0010Green
      0100Blue
      1000Yellow
      0011Orange
      0101White
      1001Black

image

 

For the Project we need to be able to read a card code determine the Allergen of the person. To read the bar code we are going to use a Sharp IS471F Light detector which has circuitry built in to operate the infrared led and process whether the light is on or off. So just connect the IR Led up and its ready to go.

 

The challenge for designing this, is that we only want to use the one chip to read the card, and that the card will be swiped through. Think of a magnetic card reader, that how we want it to operate. The main design issue will be that customers can swipe their cards at various rates and this will give various pulse width for the output

imageimage

 

Above the image on the right is a slow pass with the card, the right is a quick pass with the card. Card value was 1111, as a test.

At the moment I am prototyping with an arduino uno, but the final build will need to be embedded on the MBed. Since i am not sure what will convert easily from Arduino to C++, I need to try and program the arduino as basically as possible (if that makes sense).

 

My first thought was to use the pulse width of the high pulse (when there is a cut) compared to the Low Pulse. This would appear to work for a couple which i have tested with., at least for the single bit values.

0001 Card Slow Passimage

If i measure the Low pulse at the start, it is ~272ms and the first high pulse is ~20ms. Dividing them, is ~14 since we have double the slots, let me quickly explain. As the card uses 5mm spacing between the slots and the slots are also 5mm wide we have eight slots in total, but only four carry data. Therefore we have twice the number slots. Not the best description, sorry.

 

So taking the 14 and dividing it by two, we have 7. So seven empty slots before the high. So therefore the 8th bit is High, again divided by two, the forth bit is high. producing 0001, or Red.

 

I am going to be testing out this  with more cards and trying to adapt it to multi bit cards, then implementing it onto my arduino for testing outputting the card code data via the serial terminal.

  • Sign in to reply
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 © 2026 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