Plastic Bottle Counter Sensor with interface to PC

J

Thread Starter

Jake Rog

I would like to use your professional opinion in assisting me in possible advice and direction on the project that I am working on. I would like to build a Plastic Bottle Line counter that would count how many bottle went through a specific point with multiple sensors on a single line. This most likely would be photoelectric sensors that would be placed in strategic locations on the line that would read a count as a break in a light beam. The sensors should be connected to PC for interface via RS-232 and there should be software/program that would read the output from sensors and write the count/data to a file.

Potentially we have plants that have as many as 25 lines at one single plant that will need as many as 4 or 5 sensors per line. To save money, if possible, I would like to interface the sensors directly to RS-232 on PC running Linux. I realize that I might have to have multiple PCs per plant as you can only get so many RS-232 ports per PC, but I would like to minimize that number if possible.

After implemented a line worker should be able to use a web interface to select a bottle type to run on that particular line and start the counting process. A PC in a centralized location will then pickup the data from all of the line PC’s from all of the plants via already existent network and store the results in a SQL Server to provide Management reports and data.

Do you have any ideas or suggestions for me? I can use all the help you can provide to me. Thank you so much for taking your time to read my e-mail.


Regards,

Jake Rog
 
R
Jake:

I would recommend you to use a small PLC to interfase your sensor to the PC.

If there are several lines per plant, and at a considerable distance from one another, you can use remote input modules on a control network, and so you will concentrate your data on a single device.

Then, to develope a interfase for the PC to read PLC realtime information, and in the very same interfase, use a ADO ActiveX to write directly to your SQL Server, which you can use also for queries.

There are some PLC's with open communications protocols, so you don't have to spend money on I/O Servers or OPC's.

I have made similar app's with very good results.

you can contact me direclty :

musta_maakkara(at)hotmail.com
 
F

Frank Prendergast

Since you did not mention how fast the bottle line would be flowing I would suggest using PLC's.
You could go with a distributed PLC approach where every PLC would be a high speed counter.
Thus the PLC would handle the high speed counting potential.
Then use Ethernet as the network to gather the data back to whatever you need.
This would assure:
1. Never missing bottle counts.
2. Use an open Ethernet network that can interface to many devices.

Just my personal opinion.
Frank Prendergast
 
D

David Wooden

Hello Rog:
I think you will need a little more intelligence between the sensor and the PC. If your bottles are moving quickly and your sensor is transmitting
serially, you will miss pulses. There are several serial I/O interfaces available, or you could use a low end PLC. Another advantage to the PLC is
that you could use only one PC to talk to all of them. Another option would be to use a data acquisition board in the PC to connect directly to your sensors. This would eliminate the serial port altogether, allow many sensors per PC, and give you more freedom in programming your system.
 
C

Curt Wuollet

Hi Jake

> I would like to use your professional opinion in assisting me in
> possible advice and direction on the project that I am working on. I
> would like to build a Plastic Bottle Line counter that would count how
> many bottle went through a specific point with multiple sensors on a
> single line. This most likely would be photoelectric sensors that would
> be placed in strategic locations on the line that would read a count as
> a break in a light beam. The sensors should be connected to PC for
> interface via RS-232 and there should be software/program that would
> read the output from sensors and write the count/data to a file.
>
> Potentially we have plants that have as many as 25 lines at one single
> plant that will need as many as 4 or 5 sensors per line. To save money,
> if possible, I would like to interface the sensors directly to RS-232 on
> PC running Linux. I realize that I might have to have multiple PCs per
> plant as you can only get so many RS-232 ports per PC, but I would like
> to minimize that number if possible.
<clip>

To minimize cost, I suggest that you wire these directly to a DIO card in the PC. Digital sensors without serial capability are going to be cheaper, and it's simple to get and read 128 or more inputs on a single card. it requires at most, 2 wires per sensor and that is less than the
minimum for 232. If you select sensors that work at TTL levels so they can go directly to the card, this would be a very inexpensive setup. If for some reason you need 24V, (e.g. noise immunity) that adds to the cost quite a bit, but I have artwork for a card that provides
optoisolation and 24V-TTL conversion at least cost. It's free. The DIO cards are available from Measurement Computing, (nee Computerboards) at
about a buck a point, and I can point you to the OSS drivers.

You could also use some sort of data concentrators that watch a group of sensors and send the results via the serial port, but that would be more complicated and expensive. One 232 port for each sensor would be about the most expensive way to go. But if you want to do that, the easiest way would be to find a 232 counter module that takes the sensor as the count input.and sends the count on demand. These can be reset across the wire as well. That way the serial speed wouldn't limit your line speed.

Which is least cost and easiest really depends on how sensors are grouped and the distances involved. If the distances aren't huge and there aren't conflicting factors, one Linux PC can easily watch a lot of sensors unless your bottles are really flying. I have done this sort of thing and would be happy to help if we keep it on the list so all can benefit. How does that sound?
What's you max line speed? How many counts per second would we see? That is the major determinant in how complicated it would need to
be. We have to read all ports at at least twice that speed and at least once in the dark time for any sensor and once between bottles

Regards

cww
 
R

Robert McDonald

Of course another option is a series of counter modules similar to what advantech produce in the ADAM4000 series. Then link these modules via RS232 back to your pc which monitors the counts. These modules can be daisy chained onto a single RS232 line for up to 32 (from memory) modules. So will save cost there plus each module can
cater for multiple digital signals.

regards,

Robert McDonald
[email protected]
Tristar Electrical
 
Check small PLCs on single board at FF electronic from Finland.

You can install the PLC in your box etc.
 
M

Mark Lochhaas

I believe there are many ways this application could be solved. Never assume. Having said that, I am going to assume that this data collection is for production stats. So this is not 'mission critical' and can afford to be low cost sacrificing some robustness.

Often this type of process is very high speed and can be a challenge both for the sensor and the speed of data acquisition. Your first issue will be the sensor. It probably will be a photo, and you will need one that discriminate at the maximum line speed. One small manufacturer who makes small, high speed, cost effective, highly discriminating (even clear glass) photo sensors is Tri-tronics. Even with the lowest cost sensors this will be one of the most expensive aspects of your application.

These sensors could be produced very high frequency digital input data. The data acquisition speed will be your next challenge. You need a device that will be compatible with your sensor, will be able to accumulate data ( counter module ) and will be able to communicate this count periodically to a host program in the local computer. It is possible to purchase a variety of software programs that would be able collect this data and pass it up stream to your SQL database. But, this can also easily be accomplished with a small program written in house for your Linux based PC.

If a commercial industrial software package is selected, you should select the data collection hardware ( counter module ) to be compatible with the software and the sensor. However, if you are going to write your own software I recommend you select data collection hardware that will be easiest to work with from your program, will interface with your selected sensor, and will be the most economical solution. Probably RS-232 will nto offer the most economical approach. You may want to consider an RS-485 multi-drop network to the modules requiring only one port on your PC or modules that hang on Ethernet. Frequently modules hanging on RS-485 talk an ASCII protocol making programming reasonably simple. Ethernet modules may present a bit more challenge to the programmer but if Ethernet cabling is already in place on the plant floor it may prove to be the most economical.

mcl
 
Top