Shop OBEX P1 Docs P2 Docs Learn Events
Need Advice and Suggestions — Parallax Forums

Need Advice and Suggestions

JamesDoughertyJamesDougherty Posts: 48
edited 2009-02-05 21:30 in General Discussion
Hello Everyone, I would greatly appreciate any advice or suggestions.

The Story
I do contract work for a local company and handle all of their programming. This company get's hired out by other companies that don't have full-time IT/Programmers to do the IT/Programming for them (so essentially I am a contractor for a contractor; yeah). Anyway, we just finished a year long project for them and now there are wanting another project done. This company does all of the produce for restaurants, stores, etc. and sells tomatoes, potatoes, etc. The owner decided he wants real-time statistics about the places operations. All of their equipment is custom built SBC's from China and Taiwan. They want all of the statistics out of these machines and more... They want to be able to count the number of produce going through the line too. Since the machine does not count the pieces going through I have to design something to do it for them. Getting the data out of the machines is still up in the air as we only see an RS232 out on the touchscreen and that is it. We are going over later to see what data, if any, is being outputted so that is not really a concern and I will let the company I work for handle that one. The problem/suggestion I have is...

The problem
What is the most efficient way to count boxes (for example) going down an assembly line? There are numerous ways, but they seem adamant on the one in particular. You can use IR (anything that breaks the beam), you can use some kind of photoeye, etc. They do not like any of these; and have very valid reasons for it as well. One of the biggest things if false positives. They don't want an employee to run their hand in front of it to fake the numbers. Since this is for productivity tracking the IR and photoeye could be out of the question. Here are the things I am thinking about and I have went over them with the company and they seem to like it. I would send you a picture of the machines, but they are strict. No cameras, no cell phones, etc. behind any doors period (and you are escorted everywhere).

(They want all of these incorporated)

1) Color Sensor - All of their boxes will have a certain hue to them. This will tell us if it is a box and not someones gloves, shirt, etc. passing through.
2) Pressure Sensor - When a box rolls over there will be pressure applied. When the box leaves the pressure will subside and we know a box just passed.
3) Heat Sensor - Only accept things that are below (say) 60 degrees (they work in a fridge so it's plausible). This will tell us if someone is trying to wave their hand in front of the sensor or not.
4) BS2 to drive it all.

My question is this: Is something like this a good idea or what would you change about it.

Suggestion
I want to use Parallax's 90 degree heat sensor. Is there a way to concentrate this FOV to pinpoint a very small area (like a reflector)? I don't want it to pick up someone walking by and have it disable the machine or something.

My concern is what is to keep someone from grabbing a box and keep passing it through? Should I have some kind of threshold for counting the boxes? If the belt is moving a x speed then there should be y amount of time before passes +/-z threshold? This will keep someone from quickly passing a box back and forth, but there is no way to fool proof it. I would imagine that if we applied those sensors and thresholds we could tell if someone was trying to fake the numbers.


I'm sorry for rambling, but I just want to make sure before I go spending hundreds of dollars on something that it may work. If it doesn't work I am out of the money freaked.gif


BTW: Once I have it designed how would I go about getting the circuit board done? They are going to test it on one machine and when everything works out fine they are going to add it to 5 more machines here and some more down in Texas. I looked at ExpressPCB and they look pretty good.


Thank you so much in advance; I really do appreciate it.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
James Dougherty

Ariel Productions
http://www.arielproductions.com/

Comments

  • UghaUgha Posts: 543
    edited 2009-02-02 18:11
    Well you just have to accept you can't make a foolproof system.

    If someone wants to trick it, they will find out a way... you just have to figure out what the most likely ways of bypassing the counter are, and prevent those.

    A bit more info first... do the boxes have barcodes on them? If so is each barcode unique for each box? Do they have numbers that are unique for each box?

    Will each box be absolutely uniform in size, shape and weight?

    Also, is there a camera monitoring the workers? If so its unlikely they will keep passing through the same boxes. A hand perhaps, but not something as large
    as a box.
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-02 18:16
    If they're adamant on using particular types of sensors, it's their choice, just be sure to document their requirement so that, if it doesn't do what they want, you don't get blamed.
    1) Color sensor - seems reasonable. TAOS has some good color sensors. They have a frequency output and you'll have to do some experimenting with them under various lighting conditions and color variations to see how quickly they can respond.
    2) Pressure sensor - this is as much a mechanical issue as an electrical / sensor one. I don't know enough about this area.
    3) Heat sensors are relatively slow. Parallax now sells a 10 degree view IR heat sensor
  • JamesDoughertyJamesDougherty Posts: 48
    edited 2009-02-02 18:49
    @Ugha - I know, that is why they are wanting to use these sensors. They want to get it pretty accurate that if someone does try to fool the system they will know. For instance, if there is steady production and all of a sudden a spike in production happens then it is a safe bet someone was tampering with it. Also, over time they can take a mean average of the daily production and be able to tell as well because there would be an abnormal rate in production and I could red flag that.

    As far as the other question go, there are no barcodes and nothing really unique about a box; they can even be different sizes as well. If they wanted to get that technical then I could use a magnetic proximity sensor, but then every box would have to have a magnet and even then it could easily be fooled. RFID tags could work as well, but that would require every thing that goes through that line to have a tag on it, which could get quite expensive. This would guarantee uniqueness though and I could also check for duplicate tags. I am not 100% sure if they have camera's or not, but I would be willing to bet they do since the place has tight security.

    @Mike - We were just throwing around ideas and that is what we came up with and that is what they are expecting now. We had a recorded conference call so I hope they don't try to come back and say something [noparse]:)[/noparse] The major problem at this point is they stated it has to be done by March... Hardware design, RS232 to Ethernet (pumps all of the information to a server), SQL server, real-time reports, web interface, SSL secured server to host the data, etc. in a month...

    Do you think that sensor can be concentrated like I asked in the original post? Meaning have the detection in a pin point area?

    Thank you both for your input.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • Mike GreenMike Green Posts: 23,101
    edited 2009-02-02 18:59
    The heat sensor has a 10 degree field of view. It's not "pinpoint", but it's a small area a foot or two away. The color sensor would need some sort of mask to limit its field of view further. Read the documentation on the IR sensor. There's a little discussion on the problems created by a too narrow field of view.

    Personally, I think you're trying to get too much "new" stuff done in too short a timeframe. I think the deadline will have to slide some or the project will otherwise fail (to work or to work properly).
  • JamesDoughertyJamesDougherty Posts: 48
    edited 2009-02-02 19:20
    @Mike - Thanks, I will check up on those. It sounds like you understand what I am trying to avoid though. I would like to keep everything on a straight narrow FOV so I don't get false positives. I wonder if I could put "horse blinders" on it and force it to narrow the FOV (not really pinpoint, but just narrow it to <3 degrees?)? I wonder if Parallax can chip in to let me know if this is possible or not...

    Trust me, the deadline not by choice LOL. I went Friday and had a meeting with them and after they got done explaining everything he looked at me with a grin and said, "Oh by the way... the owner wants it done by March". Gotta love owners. I figure as long we get something up to show them we are making progress we will be fine. They have no project plan, no 100% definite plans, etc. so it's practically impossible unless I worked night and day on it. I would if I could, but I have customers of my own that need taken care of.

    Thanks for all of the help Mike.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • UghaUgha Posts: 543
    edited 2009-02-02 19:56
    There's a problem because if the size, shape and weight of the boxes are not consistant, it doesn't leave much room for measuring pressure (which is your best bet).

    Here's what I recommend with your march deadline...
    A boxed-in sections of the conveyor belt (if there is one) where a person would actually have to lay on the belt to reach the sensors inside.
    A pressure sensor reading the weight and a temp sensor that triggers when weight is detected.

    Tell them the color sensor will have to wait, or talk them out of it. It's unreliable, hard to calibrate and expensive.

    If there was an absolute max size for the boxes, you could use two IR sensors inside the enclosed section to measure the approx size of the box to ensure it
    is indeed a box. This might be your best bet if you can get them to agree to IR sensors.

    With the approx size and the weight you can "guess" if the same box is being passed one after another. If two or three boxes with the absolute same size and
    weight pass through then you know that they are running the same box through over and over.

    Also if there's a conveyor belt, you can calculate in the speed of the belt and make an even better guess.
  • JamesDoughertyJamesDougherty Posts: 48
    edited 2009-02-02 20:25
    @Ugha - The reason they are not all the same size is because the machine it is going on is a tape machine. Here is part of their email about what they want:

    It is our desire to measure:
    * Cycles from the bagger
    * Over weight and under weights off of the check weigher
    * Boxes through the tape machines
    * All of which must be measured per blend/recipe/program

    The third one is the one I have to get done for this part. The bagger is on a different machine and I will have to do something similar for it too. The under weights/over weights is on the same belt that I will be placing the pressure sensor on. It's a high moving belt so I am hoping the components can handle the speed. I would hate to suggest to slow the belt down, but there is a possibility it may have to. A couple of their customers is Wendy's, Aldi's, etc. so there are thousands of boxes going through there a day.

    I talked to them about the IR (first thing I suggested as well) and he didn't like the idea. However, I may be able to still incorporate them as an extra measure some how. One thing I could do is find out what they're biggest and smallest boxes are and their heaviest and lightest boxes are (on average) and go from there as well. They do have that over weight/under weight thing so I could just look at what the threshold on that is and go from there.

    They want to watch the price, but at this point they are spending a lot of money too. The last they were talking they had a $100,000 budget on this project so I would like to spend a little extra money and a little extra time and get them a decent system going.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • SRLMSRLM Posts: 5,045
    edited 2009-02-03 02:41
    I think the RFID tags are your best bet. It's the only way to distinguish between one box and another, and to tell if a box starts looping. What about this implementation?

    Place the tag (credit card size) in a plastic pocket on the side of the box before any sort of processing begins. Variations could include placing it on the bottom, or making a little hanger and placing it over the lip of the box. Scan the box as it goes through production, recording information as necessary(such as weight and fullness). At the end of the line, right before it is to be loaded onto the truck, slip out the RFID tags. Take them to a 'dereferencing room' where each tag is scanned to indicate that it is returned to the free store. Tags are free to go back into the system.

    Of course, you can make little changes in efficiency here and there, but that's the general idea. It would probably be even easier than the other possibilities, only slightly more expensive, and more reliable.
  • JamesDoughertyJamesDougherty Posts: 48
    edited 2009-02-03 02:59
    @SRLM - Hey bud whats up? Nice to hear from you again. I was thinking about that and I think I will run it off of him tomorrow, but it may get too expensive. Just for the readers and tags alone it would cost thousands of dollars, which would take a good chunk of our budget. Not only that, they may think it's inefficiant because now you would need someone just for inserting and removing the tags (since there are thousands of packages going through a day). That is the reason I have not mentioned it to him yet, but I will at least run it by him so he can't say I didn't explore all possibilities. Do you think the RFID reader would keep up with it? If those boxes are moving at a decent rate then the RFID reader may be too slow. I remember from our little test with the PIR/RFID it took a good second to process the tag. Anyway, I will try it because I still think it's a good idea.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    James Dougherty

    Ariel Productions
    http://www.arielproductions.com/
  • SRLMSRLM Posts: 5,045
    edited 2009-02-03 03:34
    I was thinking more of a commercial oriented reader (not hobby oriented like parallax's). I'm sure that you could find tags for as little as 50 cents a piece, and there are probably commercial readers that can read several tags a second.

    The problem (as I see it) is that workers may try to steal product from the boxes. They may do this in one of two ways: pop a whole box off the line, and have a second box go through twice. They may steal individual product from the boxes. Since each box may be a different size, you cannot compare weight to some threshold to fix this problem.

    Correct on the problem?

    Therefore, for the first problem, you must identify each individual product container. The cheapest would probably be some sort of unique printed feature (like a barcode), while the most expensive would be permanently tagging each box. A temporary in factory tag would fall in the middle.

    For the second problem, you need to identify the baseline weight of each box. Therefore you need to be able to distinguish one box from it's neighbors, leading to the same solution as problem one.

    Another solution may be to have a real of barcodes about the size of price tags, and have those mechanically applied to each box at the beginning of the production line, and the tag scanned as it goes onward. Cheaper initial cost, higher long term cost since the tags are consumables.

    Of course, all this is based on the problem of employee theft. True problem, or did I mis-construe?
  • UghaUgha Posts: 543
    edited 2009-02-03 12:55
    I agree with SRLM, a barcode is really your absolute best bet.

    Combined with barcode you can test weight and approx size of the boxes (with two irs) and if your client insists, heat detection.

    You could always use stickers with barcodes on them, have a simple machine apply them as the boxes run past (much less expensive than designing an inking/drying machine).
  • Carl HayesCarl Hayes Posts: 841
    edited 2009-02-03 18:23
    Oh, by the way, the owner wants it done by March.· He didn't say which March?· Along about next May you could assure them, It will be done by March.

    More seriously, I think I'd advise them, as their consultant, that March 2009 is an unrealistic goal and a setup for failure.· If they insisted on March 2009, I'd walk.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    · -- Carl, nn5i@arrl.net
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2009-02-03 18:36
    If the conveyor has a roller section, a reflective photosensor mounted between the rollers and pointed upwards might be a good, simple solution. These sensors can be obtained with narrow sensing ranges, and all boxes sitting on the rollers will be the same distance away from it. By contrast, a hand waving above that range will not be detected. One possible issue to deal with is the accumulation of paper dust on the sensor optics, since they're pointed upwards. A small blower (either electric or derived from the plant's compressed air supply) should be adequate to ameliorate this issue. Multiple sensors could be used to warn of sensor malfunction/blockage and/or to detect small boxes on one side of the conveyor or the other.

    -Phil
  • uxoriousuxorious Posts: 126
    edited 2009-02-03 19:36
    Any way you can integrate with the box taping machine so that the sensor data is only considered valid by the BS2 when the taper is in a cycle?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ~~ dRu ~~
  • DufferDuffer Posts: 374
    edited 2009-02-04 15:56
    Can you add an enclosed section to the processing line or enclose an existing section? The boxes go into one end of the section and come out the other. The counting goes on inside the enclosed section using a simple beam break system. The employees can't get to the sensor to "fool" it and taking a box off the end of the section and putting it back into the front of the section to get higher counts·would be pretty obvious if the enclosed section was 10-15 feet long. What the employees can't see or touch, they can't tamper with.

    Duffer
  • $WMc%$WMc% Posts: 1,884
    edited 2009-02-05 00:18
    This sounds like FOOD GRADE material to Me,
    So their has to be some kind of "LOT" number,Date code ,ETC. to satisfy the USDA, DEPT. of Agriculture, or some other GOVT. office.
    This will make the material in the process more unique

    I understand about trade secrets and You need to be careful on Your descriptions, But a little more info would help.

    I take it that this material is going to blend tanks or some other process to make a specific product and that it is quality assurance thats the issue here?

    _________$WMc%_____________

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    The Truth is out there············································ BoogerWoods, FL. USA
  • Nick McClickNick McClick Posts: 1,003
    edited 2009-02-05 21:30
    Maybe a different perspective -

    It's always tempting to measure everything about a business, but it isn't always useful. My first question is, "What business objective are they trying to meet with this data?". My second question is, "What will this information empower you to do?". Something along the lines of, "Don't measure what you can't change, don't change what you can't measure".

    It may be the case that there's an easier place in the production cycle to measure that metric. Or that there's nothing actionable in the metric. Personally, I appreciate it when a contractor challenges my assumptions because it shows that they're interested in my success, not just my money.

    If that's all vetted, my thought would be to measure indirectly - say from monitoring tape usage from the taping machine, or rotation on a roller. Depends what the configuration is, but it would likely be more reliable.

    But, if they're worried about their employees cheating them, there might be bigger problems [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Gadget Gangster - Share your Electronic Projects - Sign up as a Designer and get a free 4-pack of Project Boards!
Sign In or Register to comment.