Sensor for label

Hi everyone

May I ask for Sensor types that suitable to detect label in the roll.
I would like to detect every gap between label in the roll to stop motor
one by one when paste on object.

Now, I try to use TCRT5000 module, but analog value is not so difference
maybe becuase of thin object.

My project is label applicator and I also try to search a sample project,
but can't find relate topic.

Hope to see your suggest.

Thank you very much.

You need to experiment - you maybe able to pass light through the gaps and detect it on the other side of the label , or detect reflected light from it

Thank you Hammy!
I try to do as your suggest to use LED light pass through the gap and sensor on other side.
The analog value are difference about 4-5 but there are unstable.
Sometime analog value on label 145 on gap 140 sometime on label 150 on gap 145.
I use code if to detect by gap value but unstable value cannot running for long term.

Can you suggest for the example code? or anyone can help me!

Then try reflection instead, may work better.

Don't limit yourself to visible - IR and UV may also give very different results. Maybe the label fluoresces even in UV.

Sorry for long time to update.
I try to use LDR sensor and opposite side with LED.
It’s worked!
But I want to make code to control motor to feed label as sequence below.
1)Object sensor detected the object
2)Delay until to label position
3)turn on motor (use LED instead of motor)
4)Label sensor detected the gap between label
5)stop motor
6)Delay until object out of sensor

I found problem, the program run not proper.
-LDR cannot fast detected the gap !
-motor run more than one time if label sensor pass the gap to label!
Please advise me, I have to finish this project.
Thank you very much @wvmarle for your advise.

my code below

int objectsensor;  //Infraled sensor
int labelsensor;             //LDR sensor
int motor=2;
int LED=3;
void setup() {
  // put your setup code here, to run once:
objectsensor = analogRead(A1);
labelsensor = analogRead(A2);
pinMode(motor,OUTPUT);  //V in motor (use LED)
pinMode(LED,OUTPUT);     //LED opposite side with LDR sensor
}

void loop() {
 
digitalWrite(LED,HIGH);      // on LED at beginning
if(objectsensor < 100){       //detected object
  delay(500);                      // wait untilto label position
  digitalWrite(motor,HIGH); // turn on motor
  if(labelsensor < 50){        // detected gap between label
  digitalWrite(motor,LOW);  // stop motor
  delay(1000);                   // wait until  object out of sensor
  }
}
}

Get a faster detector such as a phototransistor instead of an LDR. LDRs are quite slow.

I have tried phototransistor, but the analogvalue not much difference and unstable. (diff around 5 and sometime value may overlap when I specific value in function “if”).

I’m not sure my code is good or not, because when I reduce the delay value, then sensor can detect faster.

Please advise.

What you need to do to be able to get help:

  • post latest code
  • post details of the current setup
  • post details of the phototransistor used (type number)
  • post a complete schematic of your wiring (not Fritzing, real schematic drawing).

Dear wvmarle,

Thank you for your reply.

What you need to do to be able to get help:

  • post latest code >>My latest code would be get your help.

  • post details of the current setup >> analog range value for label sensor is about 50-55 for TCRT5000 and 55-200 for LDR

  • post details of the phototransistor used (type number) >> TCRT5000 module but current use LDR module


  • post a complete schematic of your wiring (not Fritzing, real schematic drawing).>>can you see image

manosutirit:

  • post latest code >>My latest code would be get your help.

Code... also called "sketch" in Arduino parlance.

  • post details of the current setup >> analog range value for label sensor is about 50-55 for TCRT5000 and 55-200 for LDR

That's a proximity sensor; should do the job. Does it work with other objects? Difference in value to say your table top?

If not: check wiring. Make sure you can sense distance with that sensor. Make sure you don't have stray IR sources which will affect it.

  • post a complete schematic of your wiring (not Fritzing, real schematic drawing).>>can you see image

That's not a schematic drawing. It's a Fritzing style drawing. We don't care how things look like, just how they're connected. And that's not clear from that image.

Some photos of the actual setup would also be helpful.