Shop OBEX P1 Docs P2 Docs Learn Events
Reading A Massive Amount Of Inputs With The Propeller — Parallax Forums

Reading A Massive Amount Of Inputs With The Propeller

idbruceidbruce Posts: 6,197
edited 2012-10-07 20:37 in Propeller 1
Hello Everyone

If you had to read the state of 2000 photodiodes or phototransistors with a propeller and transfer these states to a PC, how would you approach such a task?

Bruce
«13

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-09-28 09:36
    Are you looking for analog or digital output? How fast do you need to be able to read them? What are the requirements that demand discrete parts rather than, say, a CCD or CMOS photoarray?

    -Phil
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 09:51
    @Phil
    Are you looking for analog or digital output?

    Since I want to send the states to a PC, I assume that I would want the output to be digital, but I am really not sure. At the current point, I am thinking of just getting the data to the PC.
    How fast do you need to be able to read them?

    If the number of inputs is indeed 2000, I would like to be able to read them all within a period of 15 seconds. However, I do not know if this is an overbundance of time, or if I am being unrealistic.
    What are the requirements that demand discrete parts rather than, say, a CCD or CMOS photoarray?

    To be perfectly honest, I will have to look up CCD and the CMOS photoarray. However, if I had to guess, the main requirement is spacing. With discrete parts, PCBs could be fabricated with the appropiate spacing.


    Bruce
  • StefanL38StefanL38 Posts: 2,292
    edited 2012-09-28 09:58
    Hi Bruce,

    as you haven't written any details about your project I can do only a wild guessing.

    2000 inputs is really much. What kind of a project needs so many inputs?
    First of all I would think about how the number could be reduced.

    A solution depends largely on how the photodiodes are geometrically configured to each other

    Glasfibers that "watch" each point and then collect them on a CCD-camera

    if you need to detect only light/nolight always 8 photodiodes build an 8 bit DAC that is read by a 12 bit ADC
    So this would require 2000 / 8 / 8 = 32 MCP3208

    a 64 x 32 matrix build with propellr-chips or with shiftregisters

    2000 / 8 = 250 8bit shiftregisters
    2000 / 16 = 125 16 bit I²C-IO-Expanders
    2000 / 30 = 67 propeller-chips

    as a PC is involved looking for a PCI/USB-64bit -Output card and a PCI/USB-32bit Input-card to build a 64 * 32 bit matrix

    If one or two cameras can watch all the lightsources at the same time a PCI-card for video-input and a picture-recognition software

    If all the light-sources are configured geometrically in a regular spacing a mirror mounted on a stepper-motor that rotates in small steps to reflect the light towards a single photosensor


    best regards
    Stefan
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-09-28 09:58
    idbruce wrote: »
    @Phil



    Since I want to send the states to a PC, I assume that I would want the output to be digital, but I am really not sure. At the current point, I am thinking of just getting the data to the PC.
    Just an on or off indicator? Like something passed point 1, go wait for it to pass point 2?


    If the number of inputs is indeed 2000, I would like to be able to read them all within a period of 15 seconds. However, I do not know if this is an overbundance of time, or if I am being unrealistic.
    Are the events happening sequentially or randomly? Can more than one set of events be going on at the same time? For example, something triggered station #17 and something triggered station #1542.

    This is like high-tech 20 questions! :smile:
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-09-28 10:02
    Hi Bruce;
    idbruce wrote: »
    Since I want to send the states to a PC, I assume that I would want the output to be digital, but I am really not sure. At the current point, I am thinking of just getting the data to the PC.
    Still not clear.
    I assume by "digital" one is looking for a simple High or Low for Light or dark on the photo diodes.
    Is this so?

    BTW, without using a camera this is not an easy task. Not that the camera is easy either.

    Duane J
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 10:15
    Okay, I did not want to divulge this information, but I guess I will share my concept to a certain point, because there are many different possible applications, and perhaps agrressive designers and sales people can make a mint.

    In many retail locations, there is certain inventory that is counted on a shift by shift basis or on a daily basis. My concept applies to flat panel packaging that must be counted at least on a daily basis. The concept is to space photodiodes or phototransistors according to center to ceter of predetermined package sizes. If light is present, then there is no package, and if light is not present, then add one to the package count. The idea is to use surface mount discrete packages on top of a PCB, which is then applied with some type of coating, with cutouts around the discrete devices, so that the upper surface will have a flat plane so that items can slide across the sensor surface without damage occuring.

    In my current view of things, the sensors will be in a column type fashion, with a ribbon connect on the end to plug into some type of motherboard.
  • RobotWorkshopRobotWorkshop Posts: 2,307
    edited 2012-09-28 10:17
    You may want to look at some of the schematics for Pinball machines since I believe they usually deal with a lot of inputs on the playfield.

    Robert
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-09-28 10:34
    Phototransistors could be arranged switch-matrix fashion. You'd have a 100-output shift register exciting one row of phototransistor collectors at a time, and 20 pulled-down inputs to collect the column data from the emitters -- or whatever N x M = 2000 combination tickles your fancy.

    -Phil
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 10:37
    Well, does the idea sound feasible and perhaps profitable?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-09-28 10:49
    Well, does the idea sound feasible and perhaps profitable?
    'No idea. I'm not a marketing guy.

    -Phil
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 10:58
    Just thinking out loud....

    Let's suppose there 2,000 items of a specific type of inventory that must be counted on a daily basis, and the average count time is 10 minutes. Let's say that a business operates 365 days a year, and since the federal minimum wage is $7.25, it would cost a business $441 annually in wages alone, not mentioning insurance and other employee expenses. Now if this inventory must be counted on a shift by shift basis, with 3 shifts per day, that would bring the total up to $1323 per year for inventory count of this particular item. And of course this cost would also go up for other employees above the minimum wage range.

    Now let's say the whole system cost the prospective client about $4000 for parts, installation, and software training. Within three years, the system would pay for itself. I don't know if that would be a fast enough turnaround on the investment for the client, but it may be worth some inquiry.
  • groggorygroggory Posts: 205
    edited 2012-09-28 11:07
    idbruce wrote: »
    Well, does the idea sound feasible and perhaps profitable?

    I had a similar idea a few years ago for a busy bar. The trick is making it idiotproof and able to change as packaging and things change. Changes need to be able to be completed by the staff, not by you.

    It's a neat idea, but the usage of it is tricky.

    As to the previous comment of matrix'ing the inputs or something..I highly recommend this. Can you ever worked with a device with HUGE number of inputs over long cable runs? I have. The connectors are ridiculous, the cables are bulky, the problems when a wire is pinch cut or something is horrible to diagnose.

    If you wanted to move forward with this design I would make each of your object detection circuits (or at least group) have a little intelligence and then ride on a 2 or 3 pin addressable bus. That way the physical wiring can be simple.

    The best thing I can recommend if you want to make this a usable and profitable product is to make it a universal fit. Don't design so close to your exact idea of where it's going to be used that you make it a specialized and niche product.

    Another thing to consider is long term support. You need to make this design simple enough that when it breaks in 5 years they can easily get it fixed.

    Get what I'm saying?
  • PublisonPublison Posts: 12,366
    edited 2012-09-28 11:17
    Bruce,

    I guess we are not reading Bar Codes?

    Jim
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 11:17
    @groggory

    I have been thinking about this all morning long, and the different possibilties. I am thinking along the lines of a few niche products, as well as employee configurable items.

    I agree, there must be long term support and the item should be able to be easily repaired or reconfigured.

    Bruce
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-09-28 11:18
    Think about this method:

    Tape small patches of "Retro Reflective" material, similar to the stuff 3M puts on stop signs, under or behind where the product is stored. Using a camera with a bright light encircling the camera lens looking back toward the storage area. Each patch should be a bright spot in the image.

    Note, there should be reference spots arranged around the storage area to help in calibrating the locations in the image so even if the camera is moved the relative locations of the product patches in relation to the reference patches will be constant.

    Of course all product patches must be visible to the camera but that should be doable.

    I'll leave the camera convolution software up to the software gurus.

    Duane J
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 11:20
    @Jim

    During my early morning musings, I conceived a portable device that would first read a bar code and then inventory would be taken, something along the lines of a wand with several sensors for reading package presence.

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 11:25
    @Duane

    I believe that idea has a lot of merit, however, in the instance which got me started with this idea in the first place, there just is any room for cameras and such. There are racks and racks of the product. But I do believe your idea is very good for fast easy reference of floor areas. Bitmap matching would probably be a breeze.

    Bruce
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-09-28 11:37
    Long ago, I worked in a gas station that sold cigarettes and part of shift change was counting them and RESTOCKING them. It took maybe 10 minutes. You got good at counting and seeing groups of 10. This time is used for inventory, restocking and fixing up the point of sale displays. I'm not seeing the benefit in counting point of sale display items since you still need to do the restocking, rearranging and other manual functions. We did the same with candy and pop also - all told maybe 20 minutes. But that was long, long ago modern employees may not be up to the mental challenges.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-09-28 11:39
    I don't know;
    idbruce wrote: »
    @Duane
    I believe that idea has a lot of merit, however, in the instance which got me started with this idea in the first place, there just is any room for cameras and such. There are racks and racks of the product. But I do believe your idea is very good for fast easy reference of floor areas. Bitmap matching would probably be a breeze.
    Bruce
    Cameras can be very small with high resolution today.

    Even multiple cameras have got to be much cheaper than 2000 sensors and the wiring. Say $1 per station not to mention the cost of installing these sensors. This is where the real cost is.

    The multiplexing thing would be a breeze. But the connections would not.

    Duane J
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 11:41
    @Rick

    Okay, I guess it must have been obvious, cigarette package counting was the idea behind this concept :) Thin little circuit boards with ten sensors and a connector on the back for cabling.

    Bruce

    EDIT: Gas stations galore
    EDIT: I was thinking of cabling similar to the white flexible cables that can be found in CDROMs, VCRs, etc..... With each sensor PCB having a cable that went to a motherboard.
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-09-28 12:01
    Here is another sensor method.

    I use bi color,GREEN/RED, SMT LED packages.

    If you flash the GREEN LED the RED LED responds to the reflected light nicely and discriminate from the stray ambient light especially if the GREEN is flashed for only a short but bright pulse. The pulsing and sensing can be incorporated into the decoding matrix.

    OK, I didn't try this yet with BLUE/GREEN ones but I imagine the GREEN sensor half would generate quite a bit more voltage, possibly enough to directly drive a logic input pin on a CMOS shift register.

    (It would be better if we could get bi color with both the same color. I suppose this could be done if the quantities were large.)

    Duane J
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 12:02
    @mindrobots
    I'm not seeing the benefit in counting point of sale display items since you still need to do the restocking, rearranging and other manual functions.

    Do a count before restocking and after stocking. The benefit will be the time saved in counting. Counting certain items, such as cigarettes, would really benefit, because they are arranged in an inline fashion. Additionally, cigarette display and variety has changed a lot in twenty years. There are some retail outlets that have a vast amount of cigarettes and varieties.

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 12:05
    @Duane

    What about a flexible PCB with photosensitive circuitry built into the circuit board? Would such a thing be possible?
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-09-28 12:06
    @idbruce,

    I'm not one for crushing dreams or innovations, build a prototype wand and go for it!! If it doesn't work for cigs, some other application may jump out at you!!
  • Duane C. JohnsonDuane C. Johnson Posts: 955
    edited 2012-09-28 12:21
    Take a look at one of my as yet failed products:

    B-Lites.com
    Motorcycle handel bar control ilumination.
    The blue ones are surface mount LEDs on thin flexible substrate with a plastic over mask and 3M double sticky tape on the bottom.

    Pretty much what you are looking for.

    Don't forget the lighters, energy drinks, and any other junk they sell.

    Also, you can sell added value by tallying buying time and location in the store.

    Or the same for POS at grocery stores.
    The possibilities are endless.

    Duane
  • kwinnkwinn Posts: 8,697
    edited 2012-09-28 14:23
    Ah, now I see what your other post was about.

    The only practical ways I can see to do this would be a camera, which has already been suggested, or by weight. If the items are on a rack, shelf, or in a display container with load sensors then weight can be used to determine the quantity.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-09-28 14:29
    For stuff that's stacked vertically and dispensed from the bottom, a Ping))) sensor up top would do the job, too.

    -Phil
  • kwinnkwinn Posts: 8,697
    edited 2012-09-28 15:42
    How about a piece of retroreflective tape at the back of each column of cigarettes and a hand held led/sensor stick with one led per pack. Each led would flash once starting with the top one and several paralleled sensors would be used to count the number of flashes.
  • idbruceidbruce Posts: 6,197
    edited 2012-09-28 17:00
    @kwinn and Phil

    May I ask why you do not believe light sensors would do the trick?

    Bruce
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2012-09-28 17:26
    'Not saying it wouldn't work, but I would be inclined to investigate less cumbersome solutions first.

    -Phil
Sign In or Register to comment.