Using the Ping sensor with the Propeller ( Hi Speed counting )
Hi,
I need to count boxes on a conveyor belt.
The speed is about 2 boxes per second.
Do you know if the propeller and the Ping sensor have enough
speed to count the boxes?
You can see the picture attached here .
Thanks.
I need to count boxes on a conveyor belt.
The speed is about 2 boxes per second.
Do you know if the propeller and the Ping sensor have enough
speed to count the boxes?
You can see the picture attached here .
Thanks.

Comments
Reference:
http://www.parallax.com/downloads/ping-ultrasonic-distance-sensor-propeller-code
It seems 16 per second is more than enough.
The enviroment is industrial , there are some elecric motors runing near ( 4 feet) . And do you know how to prevent
electronic noise ?.
In other words , the Ping with the Propeller could work in industrial enviroment or just hobby ?
Thanks again.
A factory environment with conveyors running is a very noisy place at ultrasonic frequencies. That noise can interfere with ultrasonic sensors, giving false readings. I say this from experience, having failed with ultrasonics to measure and count apples using the technology.
-Phil
Phil beat me to it. Much better to use an IR sensor, and one that uses a 40KHz carrier rather than a constant IR source is virtually fool proof.
I started with an infrared sensor :
http://www.ebay.com/itm/Adjustable-IR-Infrared-Sensor-Switch-3-80cm-w-Fixed-Rings-/390670330880?pt=AU_B_I_Electrical_Test_Equipment&hash=item5af5c42c00
But I had some problems with it. Sometimes the sensor start sensing even without boxes on the conveyor belt.
For this reason I thought about the PING sensor alternative but Phil wrotte : "...conveyors running is a very noisy place at ultrasonic frequencies..."
For this reason I will try to use infrared egain , but do you know how to protect it from the industrial noise too.
Do you have some information about it ?
Mark.
Even with IR, the world is a noisy place... so having a device that transmits and receives one frequency eliminates the majority if not all the false positives. Without a modulated IR, heat from lights can make a lot of problems.
Phil seems to have chosen a very expensive industrial option. There are other IR sensors that are quite inexpensive that work with a modulated IR.
Can you clarify what kind of budget you desire for this project? It would narrow down suggestions.
-Phil
-Phil
After reading your posts It seems carrier frequency or modulation is important.
I have and old sensor a friend gave to me some years ago , I found it at the web yestarday , but how do you know
if this BM200-DDT has carrier frequency or modulation ?
I have just one BM200-DDT and I am testing it at home now , it works fine, but home is not a noisy place.
http://products.autonicsonline.com/item/photoelectric-sensors/light-common-type-photoelectric-sensors-bm-series-/bm200-ddt?
Mark
BTW, using a reflective sensor may be the wrong choice for this application. Typically they only have a range of a few inches, and it may be that cardboard IR reflectivity is not sufficient for even that distance.
I need just 10 inches (or less) range.
Do you know if BM200-DDT could work fine with the Parallax Propeller microcontroller ?
here is the link:
http://products.autonicsonline.com/i...es-/bm200-ddt?
Thanks.
-Phil
Here is the link again:
http://products.autonicsonline.com/item/photoelectric-sensors/light-common-type-photoelectric-sensors-bm-series-/bm200-ddt?
As to interfacing to the Prop, it should be easy: the ouput is open-collector, so just pull it up to 3.3V with a 2.2K resistor.
-Phil
But, how I can "pull it up to 3.3V with a 2.2K resistor"
Do you have some information about this ?
Is it like the attached picture , with R=2.2K ?
Thanks,
But, again, use a thru-beam sensor, not a reflective one. With a reflective sensor you risk two kinds of error: 1) missing a box entirely, and 2) counting the same box twice.
For optimum reliability, you can use two thru-beam sensors spaced half a box width apart. The outputs will be in quadrature with each other, so if a box backs up slightly then resumes forward motion, it won't get counted twice. Also, if someone waves their arm through the beams, it won't get counted as a box.
-Phil
Is the resistor (at your last attachemt ) 2.2 K ?
It seems I have to send a connetion to the +3.3volts of the voltaje regulator of the Propeller
, and the +12 volts power suply and R Must be 2.2K resistor
Is this correct ?
Thanks again. I will test.
PS: If I have problems I will try thru-beam sensor.
PS2: I thought you will not post because it is late , I was waiting your post , thanks.
The open-collector output of the sensor only pulls down (to 0V). This gives you the luxury of selecting the high voltage by choosing which level to tie the pull-up to. By tying it to the Prop's Vdd level, you automatically get compatibiloity with the Prop's inputs.
BTW, my very first industrial application was counting boxes in an apple-packing plant. It was not easy! Based upon that experience, I can only further advise this: keep the leads between the sensor and Propeller short!
-Phil
I tested the sensor and it works fine.
The Propeller is near the sensor ( 3 feet) .
But:
I have to send the data to a PC. The problem I have is about the distance between the Propeller
and the PC it is about 100 feet. I add the prop plug to the Propeller and I am converting the serial to the RJ45 I tested at home and it works fine
but It has been impossible in the real work.
Perhaps the noise , I don't know.
I will continue working and I will tell you if I have succes , thanks.
-Phil
I will do the job with RS422.
But I don't understand about "RS422 comms with your twisted-pair".
Is the standard cable used at offices ( 15 feet aprox. ) to join to the Net called twisted-pair, or twisted-pair cables are
used for RS422.
In other words:
Is it important a twisted-pair cable or a non twisted-pair cable. Must be twisted to use with RS422 ?
And how I can twist the cable , I have to twist at the end of the cable ? ( Do you have an schematics to understand it ? )
Sorry , I am a little confused.
thanks.
but do you know if the individual wire must be crossed like the pictures ?
You can see at picture 1 of 7 , that the first position of connector 1 is joined with the third position of the connector 2.
Then , picture 2 = 2 joined with 6
Then , picture 3 = 3 joined with 1
Then , picture 4 = 4 joined with 4
Then , picture 5= 5 joined with 5
Then , picture 6 = 8 joined with 8
....
...
Is this ok ?
Thanks.
RS422 uses differential signals. By twisting the wires with the signals together, you insure any noise received by one wire is also received by the other. Since the noise will be on both wires of the differential pair, it can be cancelled out. (I think I got most of that right. I'm mostly just spouting back what I've read on the forum.)
It is alittle difficult to understand to me.
So, I have to use a twisted cable and I have to crossover cables near the connectors like the pictures ?
Do you have something to read or a a link to an schematic picture ?
Thanks
Right on Duane.
Markuster, both signals (+ and - , also shown as A - B and Y - Z need to use the two wires in a single pair as shown in the attached diagram. The problem with pre-made ethernet cables is that the pinouts of the connectors are not straight forward. That is why a lot of industrial and building automation equipment uses screw terminal strips. If you want to use off the shelf ethernet cables you need to take the wiring of the crossover cable into account when you connect the RS422 transmitters and receivers to the female RJ45 connectors. The attached diagram shows the typical wiring.
PS Using off the shelf cables is a good idea and well worth the minor inconvenience of dealing with the crossover wiring.