Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

bar code reader is it possible???

Status
Not open for further replies.

mai_elec

New Member
hi
is it possible to make simple think works as barcode reader to design lables and the reader,
what sensors i need??
 
lol
i mean i don't wanna sth complex just sth trivial (sth=something)what do you suggest?

and the label how can i make a lable and the led will recognise it?????
 
lsn
can we make sth just stupid like make holes for example 4 holes so 16 different things and if the hole is empty i mean so by using sensor for light if there is light soo it's 1
or not?
plz suggestions

sorry my english is not good
 
lsn
can we make sth just stupid like make holes for example 4 holes so 16 different things and if the hole is empty i mean so by using sensor for light if there is light soo it's 1
or not?
plz suggestions

sorry my english is not good
Punch cards and paper tape used to work this way. Maybe punch two rows of holes. On row has a hole in every position and serves as a clock to tell the circuit to look for a hole. If there is a hole in the other row it is a zero and no hole a one (or the other way around).

The circuit would be simple. Just a shift register with the detector for the clock hooked to the clock and the data hooked to the other. The output of the shift register would hold the binary number on the tape/card. Just be sure to clear the shift register prior to reading a card.

Does that make sense.
 
ok i read maybe ten time but i want to make lables so it will be for example on the book so i gess how the sift registor and all these things will help i don't know maybe i am a bit stupid and also what do you mean with clock hocked?and the detector will detect holes?why the 2 rows?
 
First it does not have to be holes. It could be dark and reflective stripes. Instead of looking for light seen through the hole you look for reflected light. Modern bar code readers work by reflection.

I am talking about a Serial-in, parallel-out shift register. Read this.

The row of holes with a hole in every position (clock row) tells the circuit when to check for a hole in the other row.
Lets say the holes were arranged like this where 0 is a hole.
Code:
 0 0 0 0    ---->  XC
     0 0     ----> XD
XC and XD are the phototransistors that look for light. As the tag move right the rightmost top hole will be seen by XC (clock sensor). This causes the shift register to shift in (see) a 0 because the rightmost lower hole is under XD.

As the tag moves right it will see a second hole/zero for the second clock and no zero/hole for the 3 and 4th clock so they will be a 1.

The shift register now contains 1100



Does that help.
 
yes now i get it.but if i but the lable on the the things the photo sensors will still work?
so what i need is sensors and xd will cause the paralel registor to have 1100 and i will connect it to pic for example port a to be digital input and by a function i can convert it to desimel andd send it to serial port and use the number as i want?is this will work?

i want to ask about the first raw which will be clock raw soo how by hardware will it tell the registor to check i know the photorist at each hole it will be zero so how the clock will work am uderstand your idea but i just think how?when there is hole check it

can i make photorist xc zero with invertor will be 1 and to the clock???????
 
You can get barcode readers cheap, surplus, plug into your PC. Software to print labels can also be found on the web, free. I've got an older version of CorelDraw, that prints barcodes. Sorry, it's just kind of a pointless waste of time and money, when you can get something common, ready built, for cheap or even free.
 
Harvey is right unless the point in making one is to learn. For some reason I tend to see that motivation even when it is not there. If you do build this it will be crude compared to what you can buy.

You did not say you were going to use a PIC with it !

If so you do not need a shift register. The PIC can read the info in a bit at a time. I do not know what computer language you use so I will try to make this understandable.
Connect one IO pin to a phototransistor and place it over the clock row. Lets use RB1
Connect another IO pin to a 2nd phototransistor and place it over the data row. Lets use RB0

Code:
untested code in c
// read 4 bit from bar code
// port bits go low when light is seen
main void(main)
{
  unsigned char bitNum;
  unsigned char result = 0;  // 1 byte of data

  for(bitNum=0;bitNum<4;bitNum++) // read 4 bits
  {
    result = result << 1; // shift result 1 bit left
    while (PORTB & 0x02);  // Wait for RB1 to detect light
    result = result + (PORTB & 0x01);  // add in data bit RB0
  }
  // 4 bit number is in result
  while(1);  // done so loop here
}
 
yes i know but infact i dn't know if i can get it in my city i live in palestine west bank so i dn't if i could have one other reason is that it's not a comercial application it's my first project on pic for university and i want to make app using pic to measure wight at the same time read the code send it to pc to data base sth simple soo i will ask if i could have cheap barcode readrr ok but in case if not
 
i can make just a button i push it when i want to start using barcodereader and so it makes an interrupt and this function will be the interupt subrotine and when i move my hand to read label the rb0 and rb1 values will change GREAT


for the weight it's just sensor for weight it will measure the weights interrupt and then i will send serialy to pc


am sory maybe i mention sth simple but it's my first course with pic realy thank you
 
Status
Not open for further replies.

Latest threads

Back
Top