Shop OBEX P1 Docs P2 Docs Learn Events
Automatic box dimension measuring — Parallax Forums

Automatic box dimension measuring

I've started a project to create a device to measure the dimensions of a shipping box.
Here's a little background... I help part time with a local company that does internet auctioning and ultimately they need to ship numerous packages. As you can probably imagine the items being sold / shipped can vary in size, weight and shape. They do as much recycling as possible with the boxes they receive and other sources etc. so finding a box that is just right can sometimes be a challenge. 
So next after all the items are packed the boxes need to be measured, weighed and rate quoted with USPS and UPS. Tedious and time consuming with 30 - 60 packages. 
So my idea is to create a square frame with an additional vertical frame. One side of each frame would have an infrared LED spaced 1" apart and the opposite side would have an infrared receiver spaced the same. The box would be placed on the scale squarely with the frame and then each axis would be scanned. The scanning would be done one transmitter/receiver pair at a time in each axis using shift registers. The Propeller would figure out when each beam is interrupted then uninterrupted and calculate the dimension for that axis. 
The IR would be modulated at ~38KHz so as not to be influenced by lights etc.  
Next the weight is acquired from the scale and then using a Raspberry Pi (hopefully) the data can be inserted in the rate quoting API's from USPS and UPS along with the customer info parsed earlier from the Auction software.
Any comments / suggestions?
I received my 595's and 165's today to start building my prototype. The framework is made using 3/4" PVC.
960 x 720 - 33K
948 x 385 - 15K

Comments

  • ercoerco Posts: 20,255
    Nice. You could also use just 3 PING ultrasonic sensors. Very accurate when calibrated.
  • Don MDon M Posts: 1,647
    Nice. You could also use just 3 PING ultrasonic sensors. Very accurate when calibrated.

    How accurate are they?
  • I'd be wary of using ultrasonics anywhere that you've got conveyor or other industrial-type noises. I once tried ultrasonics for measuring fruit in a packing plant. But the conveyor noises caused too many false returns for it to be successful, and I gave it up.
    -Phil
  • DomanikDomanik Posts: 233
    edited 2015-07-06 20:38
    You might want to consider how much time this will actually save.  I’d estimate one box can be manually weighed, measured and four data values entered in about 15 seconds.  By automating you’d still be positioning the box, hitting capture, etc., which might take 5 seconds.  Multiplying by 30 - 60 results in a daily time savings of less than 15 minutes.
  • Don MDon M Posts: 1,647
    You might want to consider how much time this will actually save.  I’d estimate one box can be manually weighed, measured and four data values entered in about 15 seconds.  By automating you’d still be positioning the box, hitting capture, etc., which might take 5 seconds.  Multiplying by 30 - 60 results in a daily time savings of less than 15 minutes.


    The real savings in time will be the automating rate quoting portion online. Now it's done manually entering customer info, dimensions, weight, etc. The measuring and weighing of the box is just a smaller piece of the whole puzzle. 
  • ercoerco Posts: 20,255
    I'd be wary of using ultrasonics anywhere that you've got conveyor or other industrial-type noises. I once tried ultrasonics for measuring fruit in a packing plant. But the conveyor noises caused too many false returns for it to be successful, and I gave it up.
    -Phil

    "Fruit and machinery do not mix." Cal Hockley, Titanic
  • PublisonPublison Posts: 12,366
    edited 2015-07-06 22:53
    Where are the Robotics Forum?
    Time to change the SIG. :)


  • kwinnkwinn Posts: 8,697
    edited 2015-07-06 23:11
    If you want to minimize components or propeller pins you could output the 35KHz signal to each axis in turn and sum the x, y, and z signals for each position ( 1", 2", 3", etc). Saves a lot of 165's and 595's at the cost of a quad op amp and 3 resistors per inch for each axis.
  • Don MDon M Posts: 1,647
    Nice. You could also use just 3 PING ultrasonic sensors. Very accurate when calibrated.

    Erco you have me rethinking here. If it would work it would save a boatload of development time. The weigh scale is 12" x 14" my concern would be if there is a box smaller than the outside dimensions of the scale can the beam be aimed reliably to measure the box and not the scale?
  • Or would the laser range finders work well too?
  • kwinnkwinn Posts: 8,697
    Don, what is the size of the largest box you want to measure?
  • Don MDon M Posts: 1,647
    Don, what is the size of the largest box you want to measure?

    With UPS & USPS you are limited to a certain length and girth value which I believe is around 108". That being said probably 32 - 40" in any direction? I built a PVC framework that is 40" square and has a 40" high frame up and over the middle just for starters. 
    The problem I'm having at the moment using Pings is to get the beam up high enough over the scale but yet be able to measure a box maybe 1 - 2" high laying on the scale. Can the beams from the pings be reshaped or focused? I'm trying that now with some cardboard. 
    1024 x 576 - 380K
    1024 x 576 - 321K
  • You may want to consider the Sharp IR range finders (sold by Parallax and others)  or a LIDAR Lite [url=http://]https://www.sparkfun.com/products/13167[/url]  
    John Abshier
  • Don MDon M Posts: 1,647
    Here's a few more pics... and the box does measure about 8".
    1024 x 576 - 130K
    1024 x 576 - 302K
    1024 x 576 - 344K
    1024 x 576 - 232K
  • GordonMcCombGordonMcComb Posts: 3,366
    edited 2015-07-07 20:33
    Many boxes won't be big enough to present a large profile for reliable measurement on all faces with ultrasonic. You'll be reading the scale instead, or who knows what, without very careful placement -- and maybe luck.  Most ultrasonic sensors, including the Ping, have a pretty wide beam spread. 
    Someone will be there to put the box on the scale, right? And move it around, right? How about an electronic tape measure. You could build it for about $10, if not less. It's half-manual/half-automatic, and works on the same principle as a wheel encoder.
    Two buttons: Reset and read. Press reset, draw the tape along the W, H, and D of the box, then press Read (really, an I'm done signal). Takes 5-7 seconds total for all three dimensions. Your microcontroller reads the increments off the bottom of the tape that you've put there. Accuracy could easily be down to 1/4" if you'd like, though most shippers round up to the nearest inch.
    If you really want to go with optical or ultrasonic, create some lightweight cardboard or plastic pieces to line up against of the box. This presents a large and unmistakable area for the sensor. Take off the 1/4" thickness (or whatever) of the cardboard or plastic. Yes, it's somewhat manual, but so are a lot of the other aspects of this -- human loading and all that.
  • kwinnkwinn Posts: 8,697
    Don, I hope the pings or one of the other distance sensors work out for you. Five sensors are a lot easier to work with than the 117 ir led and detector pairs you would need to cover a 40x40x40 inch volume.

    I was involved with building a "touch" panel for a 42" inch tv display several years back and it was quite a challenge. There were 48 rows and 88 columns, each of which required an ir led and ir detector. It consisted of 17 led and 17 detector PCB modules. Each emitter module had 8 leds and a '595, each detector 8 ir receivers and a '597.
Sign In or Register to comment.