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

Reading A Massive Amount Of Inputs With The Propeller

13»

Comments

  • idbruceidbruce Posts: 6,197
    edited 2012-10-03 16:46
    jmg
    By front, do you mean 'pushed against' by the next-sold packet, or on the front-end of he spring ?

    I was thinking of placing a strain gauge at the front end of the spring.

    However, since I wrote that, I have been looking at a couple of patents pertaining to electronic fish scales. In the one that I am currently looking at, they have a variable resistor. I have not read the patent, but from one of the images, it appears that it is nothing more than a rod riding against a coil of resistance wire.

    However, it is accomplished, it must be cheap and reliably accurate. When I started on this quest, I did not realize just how expensive it would be. It has to be affordable for cost justification. Additionally, I also think that the end result should not interfere with the use of the storage rack or be that noticable.

    Bruce
  • idbruceidbruce Posts: 6,197
    edited 2012-10-03 16:52
    @jmg

    On another item:
    A front sense would also need to ignore the Up/Down spikes around any removal

    The whole sensing system would remain idle until a count was needed. The propeller on the front of the tray would simply monitor the receiver side of the IR transceiver at the back of the tray. Upon a reception, a count would be taken and transmitted back to the other IR transceiver. By doing it this way, battery consumption could be kept down to a minimum.

    Bruce

    EDIT: In other words, upto the second or minute inventory count would not be necessary, just one to four times a day.
  • idbruceidbruce Posts: 6,197
    edited 2012-10-04 08:18
    To Those That May Be Interested
    UPDATE:

    Since I never stocked cigarettes, I was really just doing a bunch of guessing. And since I was tired of guessing, I spent some time talking with the friendly manager at the local gas station, during which time I wrote down a brief description of the setup, such as rows, columns, etc... Prior to today, I wondered if the cigarette holding trays were spring loaded, and today I discovered the answer was yes. In addition to that discovery, the manager gave me an old, spring loaded tray to toy around with. YIPPEE

    Having thought about this for a couple days, I think I now have a decent plan developing. Considering these trays are spring loaded, I should be able to use some sort of strain guage as mentioned and linked to earlier by Mike G, at which point, he linked to a project of Phils, which can be found here: So here are my thoughts.
    • Since each tray holds on average 4 - 5 columns of cigarette packs, with each column being spring loaded, I propose placing a strain gauge at the front of each column, all of which are connected to a battery powered propeller which is mounted to the front of the tray for easy battery replacement. Additionally, at the rear of each column, an IR transceiver is secured, which is also connected to the battery powered propeller which is mounted to the front of the tray.
    • Behind each IR transceiver, of each column, another IR transceiver is placed, all of which are remotely connected to another propeller board for polling tray column counts according to the strain put on the strain gauge. Numerous boards will be connected this way.
    • Numerous Propeller boards each having a predetermined amount of IR transceivers attached, will be connected to each other for serial communication.
    • The end of the line of the chained Propellers will be attached to the PC.
    I think that would be the ticket.

    After having what I consider a fairly good idea pertaining to an all around solution, I did a small cost analysis based upon some of the information above. Although I have not stated it anywhere else in this thread, the gas station that I visited had an approximate number of 1280 columns to inventory. According to my previous ideas, I do not believe this is even reasonable to monitor. For example, let's assume the initial cost of $4 to monitor a column, for sensors and such, that would be an inital investment of $5120 just for sensing, and that is not including backup circuitry.
    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.

    Time to think outside the box.

    Bruce
  • CircuitsoftCircuitsoft Posts: 1,166
    edited 2012-10-04 11:01
    Go grab a small computer and a webcam, and start messing with OpenCV. There should be identifiable marks on the columns you can work against, and machine vision is really pretty good for finding/counting consistent things like cigarette boxes.
  • MicksterMickster Posts: 2,694
    edited 2012-10-05 05:00
    Kinect or Leap would be my first avenue.

    Mickster
  • BeanBean Posts: 8,129
    edited 2012-10-05 06:07
    Sounds like a very long slide pot would be ideal. If it existed. If not maybe one could be contructed cheaply.

    Bean
  • potatoheadpotatohead Posts: 10,261
    edited 2012-10-05 07:47
    How about a long strip with absolute encoding printed on it?
  • idbruceidbruce Posts: 6,197
    edited 2012-10-06 02:49
    I just ordered a Sharp IR sensor and cable from Parallax. There is a software, electronics, and uC developer in Ausralia that claims these sensors can provide accurate measurements within a few millimeters, and he provides source code for several different Sharp IR sensors. Of course the software will have to be reversed for the SPIN cycle, but I intend to give it a try.

    Here is a couple of links to videos he has presented of testing and using some Sharp IR distance sensors:

    http://www.youtube.com/watch?v=Uw9Os4-Tewk&feature=plcp
    http://vimeo.com/15162561

    EDIT: In addition to the Sharp GP2Y0A21YK0F IR distance sensor that I ordered from Parallax, I am also ordering the Sharp GP2D120XJ00F IR distance sensor from another source. Since making this post, I have found a lot more information pertaining to Mark Harris's IR distance sensor reading software. This link will take you to a wide variety of software for reading various Sharp IR distance sensors. Of course the software will need reverse engineering to enable the software to run on the Propeller chip, but it is a start toward accurate distance reading with Sharp IR distance sensors.
  • jmgjmg Posts: 15,173
    edited 2012-10-06 15:02
    Bean wrote: »
    Sounds like a very long slide pot would be ideal. If it existed. If not maybe one could be contructed cheaply.

    For long distance measuring, the item is called a String Potentiometer
    Basically a spring return spool, on a multi-turn pot, (or encoder) with cord/string/stainless wire

    http://en.wikipedia.org/wiki/String_potentiometer

    For this application, the IR sensor sounds better, as fractional mm are not needed, and any 'string' can get tangled...
  • frank freedmanfrank freedman Posts: 1,983
    edited 2012-10-06 16:35
    Hey Bruce,
    These spring loaded trays have a front edge to keep the packs in place, hold price info etc. Consider reflective ir again. Mount the sensor behind the edge, with enough drive to see the pack when it is up close and when removed there will be a period when there would be no reflection until the next pack slides into place. Or mount a photo receptor only so that it "sees" light only when the pack is pulled out or new one inserted. Most stop and robs are pretty garishly lit up so no need for a light source.
    Frank

    Added:
    You could always use a microswitch to detect the removal. Also for either method, indication of removal longer than n reads could be used to indicate empty tray condition.
  • idbruceidbruce Posts: 6,197
    edited 2012-10-06 23:45
    Frank

    Think of the IR distance sensor mentioned above like a long distance reflective sensor. Monitoring the packs coming off the front, is not the key, because I am sure that the inventory counts are done to prevent theft by employees, because many times these racks are behind the counter.
  • MicksterMickster Posts: 2,694
    edited 2012-10-07 04:50
    idbruce wrote: »

    Of course the software will need reverse engineering to enable the software to run on the Propeller chip, but it is a start toward accurate distance reading with Sharp IR distance sensors.

    For such a dedicated application, why bother? Couldn't you simply calibrate it and create a LUT?

    IF (ADC_Sig < X ) AND (ADC_Sig >Y) THEN Carton_Count = Z


    Mickster
  • idbruceidbruce Posts: 6,197
    edited 2012-10-07 06:35
    @Miskster
    For such a dedicated application, why bother? Couldn't you simply calibrate it and create a LUT?

    IF (ADC_Sig < X ) AND (ADC_Sig >Y) THEN Carton_Count = Z

    Well, I could do it that way, but I don't particularly like the idea of using tables, however, I may endup doing just that. Either way, I will still need a comparison similar to what you wrote above. There is merit to the subject of reusable code. As mentioned in another thread, PropGCC uses 64 bit double data types, and since I have messed with C++ quite a bit, I believe learning PropGCC will not be that difficult and translating the code to PropGCC should be quite easy. If I translate it, then the code will not be application specific, and I can then use the code for any type of project that may use Sharp IR distance sensors. For instance, Mark Harris's code gives measurements on the fly, so according to what I have read, you could either move the sensor or a tracked object fairly rapidly, and have a pretty accurate distance reading without tables or calibration.

    But thanks for your input, and like I said, I may end up doing it the way you suggested.

    Bruce
  • veluxllcveluxllc Posts: 30
    edited 2012-10-07 20:37
    idbruce wrote: »
    A sliding potentiometer, just measure resistance. That is stretching the imagination.

    Hey guy. I have a massive amount of experience in this industry. We need to talk offline, I think we can help each other...


    Marc
Sign In or Register to comment.