Go Down

Topic: Object counter « counting box » (Read 3184 times) previous topic - next topic

DaveEvans

And add a capacitive sensor to the chute.

wvmarle

The IR sensors pictured are proximity sensors ,not break beam sensors. They work basically with opposite principles: break beam reacts to the absence of a beam because it's blocked by an object that's in the way; the proximity sensor reacts to the presence of IR light as it's reflected by an object in front of the sensor.

With those bags I think the first will work better: if the beam is reflected away, the proximity sensor will still not see it. Experimentation is needed, for sure.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Nagaro

#17
Apr 12, 2019, 08:01 am Last Edit: Apr 12, 2019, 08:03 am by Nagaro
Thanks for all these replies.

Now i have 3 questions for you :

- what is the maximum distance that a ir proximity sensor can detect ?

- can i mount both ir sensors together to build a break beam sensor (like the picture from dougp) ?

- what is the added value to have a capacitor ?

dougp

- can i mount both ir sensors together to build a break beam sensor (like the picture from dougp) ?
That exact configuration probably will not work.  You need to know whether the sensors are modulated.  If they are, each sensor is looking for its own light beam and others will be out of sync.  You could try a corner cube reflector and a single sensor to make a retro-reflective sensor but I believe you'd have more success - and less fuss - using something made for the purpose.  You might have to do some level translation but the sensor will be reliable.

Don't forget, you have to come up with a way to mount whatever you decide on.  Commercial offerings are amenable to a wide variety of mounting options.

Some additional reading material.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

wvmarle

- what is the maximum distance that a ir proximity sensor can detect ?
Depending on the actual sensor up to a few meters. The one pictured, 10-20 cm or so, but it depends highly on the object, the incident angle and the level of ambient IR.

Quote
- can i mount both ir sensors together to build a break beam sensor (like the picture from dougp) ?
A proximity sensor looks for the presence of an IR signal, a break beam sensor for the absence. If you would place two proximity sensors opposite one another they would not give any signal: when there's no object presence they see the transmitted IR of the opposite emitter, when there's an object they see the reflected IR of their own.

If you want to go the break beam route, get a break beam sensor.

Quote
- what is the added value to have a capacitor ?
Depends on where (both from an electrical and physical standpoint) exactly in your circuit you plan to add one, what value, and maybe even what type of capacitor it is.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Nagaro

Ok, thank you.

I think i have enough info now to start building the project, and come back with a feedback and probably more questions :-)

wvmarle

Good luck!
Hope to hear about the result.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

DaveEvans

#22
Apr 12, 2019, 07:29 pm Last Edit: Apr 12, 2019, 07:30 pm by DaveEvans
My (mostly tongue-in-cheek) suggestion was to add a capacitive sensor, not a capacitor.  That would add a third sensor (probably) capable of sensing a plastic bag sliding by it.  While you're at it, you could also try a laser proximity sensor. :)

All types of sensors may be confounded by two or more bags hitting nearly at the same time or sliding down the ramp together.  Unless you can somehow guarantee that the bags will be separated by a "large enough" gap, your software will have to be capable of distinguishing between sensor data for one bag and multiple bags.

Nagaro

#23
Apr 12, 2019, 07:38 pm Last Edit: Apr 12, 2019, 07:39 pm by Nagaro
Yes, you're right, a capacitive sensor might also work.
The good thing is that all your suggestions gave me several potential solutions. I'll start from mine (proximity sensors), and move to other ones if this one is not good enough.

For the time gap, as it will be launched by people using this box, they are anyway limited physically to a certain speed. And i guess this speed is lower higher than what the arduino can process. But this will be part of the test :-)

See you soon, for more concrete news :-)

wvmarle

A capacitive sensor will NOT detect a plastic bag passing by. Non-conductive materials are generally not detectable by such as sensor.

It may however detect the metal bits in the jewellery, depending on how much metal is in there and how sensitive it is. It also requires a capacitor that is designed to detect proximity, not touch.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

DaveEvans

A capacitive sensor will NOT detect a plastic bag passing by. Non-conductive materials are generally not detectable by such as sensor.
<>
 
Quote
Capacitive sensors are used for non-contact detection of metallic objects & nonmetallic objects (liquid, plastic, wooden materials and so on).
http://www.fargocontrols.com/sensors/capacitive.html


wvmarle

Of course plastic does affect the electric fields.
A little.
If there's enough plastic.
Covalent bonds in the plastic will help a lot.
Thin polyethylene bags? Won't work.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Nagaro

#27
Apr 13, 2019, 10:12 pm Last Edit: Apr 13, 2019, 10:17 pm by Nagaro
Hi,

I've started to build the circuit, and i'm facing the 1st issues i didn't think about.
With the 7-segment with 3 digits, i'm using 11 pins on the arduino. Then with the 3 buttons (reset, +1, -1), and the ir sensors, it's minimum 4 pins additionnal (and more if i use more IR sensors...). But the arduino only has 12 pins available.
I was checking on the internet, and i found a way to reduce the amount of pins used for the 7-segments from 11 to 7 pins, using a 7447.
https://www.youtube.com/watch?v=Z4tmelKKGfw
But it would still be ready sharp for amounts of pins.

- is the 7447 solution good, or is there a most recent way to do it, or easier or cheaper ?

- is there a way to reduce even more the amount of pins needed, that they all fit on the arduino without any restrictions ?

For information, i'll be using an Arduino Nano (i don't have any other), but i guess it will be enough for this.

Thank you,

dougp

The MAX7219 display driver is mentioned often here.  It's a serial interface requiring only three Arduino  I/O pins.
Everything we call real is made of things that cannot be regarded as real.  If quantum mechanics hasn't profoundly shocked you, you haven't understood it yet. - Niels Bohr

No private consultations undertaken!

Nagaro

#29
Apr 13, 2019, 11:27 pm Last Edit: Apr 15, 2019, 07:44 am by Nagaro
Sounds great.
I've checked on google, and found a tutorial on how to configure it (plaisirarduino.fr or https://thecustomizewindows.com/2017/11/arduino-max-7219-cng-basic-circuit-led-7-segment-displays/)
I just bought on ebay the MAX7219CNG.

I'll use a 10kOhm resistor, but not yet the 2 capacitors proposed (it seems like it's only to have a more stable signal, so it will be in phase 2 for all improvements :-) )

Also : i had to buy a new 3-digits 7-segment, as mine was Anode and it seems like the MAX7219CNG only accepts Cathode. Too bad :-(

I'll try to build the circuit on Fritzing, to document all of this, and also start checking the Arduino code.

Go Up