Best sensor IR for counting cigarette butts

Hello !

I search a sensor to count a cigarette butts, and I don’t know which one to use :confused:

Can you help me please ?

Hello @Virgil!

Could you explain in more detail what you need to do?

Hi @geraldinebc15

Sorry for the late response !

I have to count the number of cigarette ends passing a sensor

Hello again,

No problem!

Well, it seems that you have it figured out, as you pointed in the diagram, you need an Infrared Sensor!

A great option would be this one:

Let me know if that one could work for your project.

Good evening! Thank you for your reply.
The range of this infrared detector is 1cm, I need a range of 6cm minimum.

Is it possible ?

Hi @Virgil,
there are other detectors in the shop. If necessary you can use the laser photo switch with a range of 65 meters!
But a single sensor might not cover the whole drop area and a sensor array would be best?

Indeed, I think that a single sensor will not be enough to detect the entire surface. I am thinking of opting for a network of sensors.

I plan to take this one: QTRX-HD-15 RC do I need a converter? cables?

Yes, that sensor array should work for your project.

You will need a microcontroller to read the data acquired by the sensor, for example, an Arduino for which there is already a library:

And here you can find how to use the sensor (for the RC type check page 4)

Alright, thank you so I will try with this detector, I will keep you posted.
Does it work with a Raspberri Pi?

If you get the A-type version you’ll need an ADC as this version outputs an analog voltage, if you get the RC-type version you won’t need an ADC (so you can use the RPi directly). However, there are no Python libraries available so you would have to write your own code. The only project I found using this type of sensor with an RPi is this one but the source code isn’t posted

Maybe an ADC is overkill and a small FET-driver would be enough. @Virgil only needs a 0/1 signal.
The cigarette butts reflectivity won’t produce the best signal, since they are light colored, matt surface and cylindric or odd-shaped. The QTR sensor states 10mm for best range and max. 50mm. Not the best setup for the required min. 60mm range.

Why not just figure out the average weight of a cigarette butt and weight the daily harvest? There are counting scales for that purpose, they even do the math for you :wink:
It’s only for statistics or not?

Another option is to mount Piezo microphone(s) under the funnel surface. Every butt landing on the funnel surface creates a sharp signal on the Piezos. Use it as an interrupt signal.
They’re using them for 3D printers ( surface mapping and height adjustment)

1 Like

Hello, the number of cigarette butts collected is very important! I don’t have the right to make mistakes

Which option do you think would be best to use?

From the picture and your description, I only have a rough idea of the project.
It seems to me, if the throat of the funnel would be smaller, your problems counting butts reduces too. ( I still have to grin, when I write butts)

Okay with a row of sensors that would be fine too?

If you can put it on the long side of the funnel throat and narrow the throat to a minimum acceptable depths it gets better. Narrow it too much and the cigarette butts might get stuck.

There’s still the problem with the low IR-reflectivity of the butts.

If you had a row of light-emitters (could be a simple LED-strip) on one side and a row of receptors on the other, that would be perfect.
Then a butt would only have to interrupt the light beam instead of reflecting it.

Okay, using the same sensors?

If you find an LED strip with IR light…
Also the logic will be inversed. The counter should trigger when one of the sensors (or more)
is off

1 Like

Okay, so if I use this sensor

with an infrared led bar in front it would be?

I can’t guarantee that. Since IR isn’t IR. You’d have to find a sender with the right wavelength.
But with two arrays it would probably work. One works as sender, the other (with disabled sender) would be the receiver.
But I don’t know, if you can disable the sender? Maybe by removing the inline resistor?

Hello, I think I have a solution! The Pixy 2 camera allows you to recognize objects of different shapes and colors. If I do a counter as soon as she sees a butt pass in front of her camera.