Barcode Scanner (SD card/Database)

Hi,

Just to give a little background information on my project;

Current components:

Aim of the project:

  • To produce a device (using arduino only) that is able to read the barcode of items and lookup further information on that item (looking at a database that is stored locally, ideally on an SD card), that is then displayed on an LCD screen. (Overall this device replicates the functionality of barcode scanners in supermarkets that display all information on a screen)

Current progress:

  • Barcode scanner connected correctly and working via a USB host shield (code used is working and is able to display the barcode on a 20x4 I2C LCD screen)

  • SD card adapter is functioning (able to see that the SD card is connected correctly and works as I was able to read and write to a file saved on the microSD)

  • LCD works perfectly (able to display barcode/SD/random information)

Problems & required help:

  • I am currently stuck at creating the database that will be used to lookup information on the items scanned. What is the best tools and method for creating such a database and is it feasible if the database is only expected to hold information regarding 20-30 items?

  • Another issue is that my SD adapter module and LCD screen display, both require 5v's. So to get both components working at the same time, I would need to share the 5v pin located on my Arduino uno. What is the best way of having both connected? I have read that I can either use a breadboard (which to me makes it more awkward at keeping the device compact/small) or by twisting 2 cables together, where 1 will attach to the SD adapter and 1 to the LCD screen, and attaching the other end to the 5v pin.

Any suggestions/help is greatly appreciated!
If I have missed any key information out, please feel free to let me know and I'll be sure to reply.

Thank you.

P.s. Regarding any code samples, I didn't find it relevant to post as my questions revolve around areas I have still not yet completed/covered but if required, I am happy to share.

twisting wires together for a real world product?
that would be a NO
solder

database on SD card with a text file
you can test out the speed easily enough by writing a simple sketch taking input from SerialMonitor pretending to be a barcode scanner

Dopeye:
Hi,

  • Another issue is that my SD adapter module and LCD screen display, both require 5v's. So to get both components working at the same time, I would need to share the 5v pin located on my Arduino uno. What is the best way of having both connected? I have read that I can either use a breadboard (which to me makes it more awkward at keeping the device compact/small) or by twisting 2 cables together, where 1 will attach to the SD adapter and 1 to the LCD screen, and attaching the other end to the 5v pin.

Any suggestions/help is greatly appreciated!
If I have missed any key information out, please feel free to let me know and I'll be sure to reply.

Thank you.

P.s. Regarding any code samples, I didn't find it relevant to post as my questions revolve around areas I have still not yet completed/covered but if required, I am happy to share.

Hi,
Welcome to the forum.

Forget about making it small/compact at this stage, just get the proof of concept/prototype working.
Trying to make your prototype tiny is only looking for problems as your first evolution needs to be serviceable for you to make your changes and trouble shoot.

Thanks for the great first post too, very basic and informative about what you want to do.
Makes evaluating your project so much easier.

Tom... :slight_smile:
PS. Sorry I have no experience with barcode reading and storing, but your subject heading should be enough to attract attention. If you like add SD Card to the subject line.

ieee488:
twisting wires together for a real world product?
that would be a NO
solder

database on SD card with a text file
you can test out the speed easily enough by writing a simple sketch taking input from SerialMonitor pretending to be a barcode scanner

Okay I'll definitely avoid the twisting of wires then! I suppose the breadboard is my best bet?
And when you say 'SD card with a text file', are you saying I should make the database using a simple txt file and try to read info that way? If so, reckon you could put an example of how I would get the barcode info to match its corresponding item information?

Thank you for the quick reply!

TomGeorge:
Hi,
Welcome to the forum.

Forget about making it small/compact at this stage, just get the proof of concept/prototype working.
Trying to make your prototype tiny is only looking for problems as your first evolution needs to be serviceable for you to make your changes and trouble shoot.

Thanks for the great first post too, very basic and informative about what you want to do.
Makes evaluating your project so much easier.

Tom... :slight_smile:
PS. Sorry I have no experience with barcode reading and storing, but your subject heading should be enough to attract attention. If you like add SD Card to the subject line.

I think you're completely right, with the time scale I have left I need to just get the concept working!
And thank you, I've used this site a lot throughout my project so I've learnt from others to get the first post right ^^ (just changed the title)

I appreciate the fast response from both of you!

Dopeye:
Okay I'll definitely avoid the twisting of wires then! I suppose the breadboard is my best bet?
And when you say 'SD card with a text file', are you saying I should make the database using a simple txt file and try to read info that way? If so, reckon you could put an example of how I would get the barcode info to match its corresponding item information?

You should be able to find examples online.

Dopeye:
Okay I'll definitely avoid the twisting of wires then! I suppose the breadboard is my best bet?

a breadboard is okay for debugging but I would never use it for a real world project

ieee488:
You should be able to find examples online.

a breadboard is okay for debugging but I would never use it for a real world project

I have honestly looked long and hard for examples online but there isn't a single piece of solid documentary on the question at hand so if you have any useful examples, that would be very appreciated (including the actual method/tool you would use, i.e. SQLite, etc)

And regarding the breadboard, what would you suggest for a real world project? (again I'm after as much useful tips/help you can give)

Thank you

Hello there Dopeye, how was your project doing?

My set-up is the following:

Board -> Arduino Uno, attached with USB Host Shield and on the shield I have attached SD Card Module

My goal is to save the scanned barcode to the SD. And here is my progress.

  1. Barcode only. Set-up is Arduino Uno with USB Host Shield but without SD Card - works perfectly
  2. SD Card only. Set-up is Arduino Uno with USB Host Shield and SD Card attached to the USB Host Shield but without the barcode scanner - works perfectly

But when I try to combine both Barcode Scanner and SD Card Module on a USB Host Shield nothing works... the barcode scanner fails to start.

Before, I have this project successfully working and after a few months I have reviewed it and now nothing works.