Shop OBEX P1 Docs P2 Docs Learn Events
Conveyor based color sorter — Parallax Forums

Conveyor based color sorter

mbdurbinmbdurbin Posts: 1
edited 2011-01-27 00:12 in BASIC Stamp
I'm working on a school project. Building a conveyor based color sorter. I'm sorting starbursts. The starbursts pass under colorpal where color will be sensed. They travel down the conveyor and our blown off the belt by a solenoid valve that opens at the appropriate time. The problem I forsee is when I have multiple of the same color on the belt at the same time. I need to figure out how to write some sort of FIFO where the first of a color on the belt wont be forgotten as soon as the next hits the belt. Any help would be greatly appreciated!

Comments

  • FranklinFranklin Posts: 4,747
    edited 2011-01-26 20:58
    Show us what you have so far. How are the chips lined up on the belt and at what spacing?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-26 21:18
    One way to do this is with a simulated shift register. When a candy of the appropriate color is detected, you OR a 1 into a variable. For each increment of conveyor movement, you shift the variable left by one. Whenever a one bit reaches a position in the variable corresponding to the solenoid, you activate it. If you have several solenoids for different colors, you can have a variable for each one, and they all get shifted in unison. The only difference is the bit position corresponding to each solenoid. If your conveyor is very long, you may need to string several variables for each color together to accommodate the length, but the basic principle remains the same.

    -Phil
  • bsnutbsnut Posts: 521
    edited 2011-01-27 00:12
    I am going to expand Phil's point. I like to keep my systems simple as possible.

    What you can do, is to use diverting gates for each of your colors of candy and it can be combined what the air blass. This means, when you have 5 of the same colors of candy the gate will say diverted to that color of candy. By, using the gates it saves the air blasses for single piece of candy.
Sign In or Register to comment.