0
\$\begingroup\$

I'd like to assess how difficult/doable is to create a barcode reader from scratch or what alternatives there are.

The application is an automated storage and retrieval system. There are containers that each have a unique code and the goal for the barcode reader is to scan the container and identify which one it is. For this reason, the reader is short range (probably 2-5 cm away from the container). The containers are also relatively small (6cmx3cm3cm). Changes can be made though.

First, I was naively thinking that one can just buy a laser that emits and detects signals controlled by an arduino. However, I have struggled to find such product.

Then to make barcode reader from scratch would require using an photo-emitter, then a photo-detector and logic (an MCU such as arduino) for the two of them to communicate. I found this project that has a diagram, but the parts they used are obsolete and a lot of links to other resources are broken. Although they share their experience and mention it was a challenge plus it didn't really work all that well.

I also searched here and it seems most people buy a handheld scanner and interface it with the arduino. That solution would not work for me because the handheld device is just too bulky, and the ones that aren't bulky are expensive. The budget for the scanner is about $50 (50 US dollars).

For this project, the barcode only needs to identify 8 containers. I think that makes it easier.

I'd like to hear people's opinions whether this project is doable or not/alternatives/maybe point out some misconceptions I have, etc. I am not an electronics expert, but like to think that I am somewhat competent and have reasonably decent foundations. If anyone can share a circuit diagram would be amazing (I have not found any project that has circuit diagrams other than the project I shared).

Edit:

I will include more details to make the question more clear. Also, it is true I asked for an opinion, but I have seen other questions that ask for opinions/recommendations here such as this one, and really many others. If my question is completely off-topic, I'll delete it.

Requirements and diagram:

It is a circular disk that rotates controlled by a servo in the middle as illustrated; the dot indicates the reader (barcode, RFID or whatever reader). A) is the initial state when all containers are inside. B) is the state after container 1 and 3 have been removed; for a container to be removed, the user selects which container, then the disk rotates where the dot is and the container can be removed. Finally, the user is done using container 3. They put it where the black dot is, then the sensor should read it and detect is it container 3, then it rotates so that the empty slot is by the door.

The reader (black dot) was envisioned to be underneath the container in initial position 0.

enter image description here

\$\endgroup\$
5
  • \$\begingroup\$ Just use a raspberry pi with a camera \$\endgroup\$
    – TQQQ
    Feb 9, 2022 at 5:16
  • \$\begingroup\$ You could just buy the same modules/components they use to make the handheld scanner, or it might be cheapest to buy a handheld scanner and put it in a suitable case. I don't think it makes sense to try making your own from scratch, there is more to it than electronics, there's mechanical mirrors doing the scanning and of course firmware to decode different bar code standards to bits or numbers. Just use ready made modules, or RFID tags, or interface a camera and read the code from camera image. \$\endgroup\$
    – Justme
    Feb 9, 2022 at 5:23
  • \$\begingroup\$ Metrologic may sell the modules as subassemblies (at least they did when I looked into this some years ago.) \$\endgroup\$ Feb 9, 2022 at 5:35
  • \$\begingroup\$ questions seeking an opinion are off topic here \$\endgroup\$
    – jsotola
    Feb 9, 2022 at 6:23
  • 1
    \$\begingroup\$ Your question doesn't explain what your motives and requirements are for doing so. It then asks for opinions. Please note that it's a Q&A site, not a discussion forum and not a free design house or online personal tutorial. You may be better off on an electronics discussion forum instead. \$\endgroup\$
    – TonyM
    Feb 9, 2022 at 6:54

2 Answers 2

2
\$\begingroup\$

Don't do it yourself. Buy ready product. Developing software for barcode reader even for one fixed type will cost you some hundred hours - 200h minimum. 1 hour of software development costs $50. Software part will cost minimum $10000 plus cost of hardware.

"the reader is short range (probably 2-5 cm away from the container)" - it's perfect task for RFID reader. There are lots of cheap RFID readers on market. If I get you right, storage containers are parts of storage system (they are not packages/boxes) so you can easly change barcode on container to RFID tag.

\$\endgroup\$
1
  • \$\begingroup\$ It is a design, so it can be modified. I edited the question adding more details on how the project was envisioned. \$\endgroup\$
    – Schach21
    Feb 9, 2022 at 17:14
1
\$\begingroup\$

Bar codes are not just a matter of passing a laser over a series of variable spaced black lines and expecting something readable. If memory serves me there are multiple coding formats, start bits,stop bits. In order to read bar code data it requires the scanner which sweeps the beam across the bar code and the software to interpret the code. A UPC code scanner would not natively scan a QR code because they are distinctly 2 different formats and vice versa. If a bar is damaged or missing the scanner will not read the code. If the code is on a label and it is rippled or folded around a package it will not read the code.

I think trying to contruct a bar code without doing a lot more research would be a nightmare,

\$\endgroup\$
2
  • \$\begingroup\$ Is looks like the OP can control what barcode scheme is used. So there shouldn't be a problem trying to decode many different types. \$\endgroup\$
    – Simon B
    Feb 9, 2022 at 10:13
  • \$\begingroup\$ @SimonB yes, I can control what barcode scheme is used. \$\endgroup\$
    – Schach21
    Feb 9, 2022 at 17:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.