Shop OBEX P1 Docs P2 Docs Learn Events
Industrial Application, need some starting-point suggestions — Parallax Forums

Industrial Application, need some starting-point suggestions

peter.steelepeter.steele Posts: 16
edited 2011-02-18 20:17 in General Discussion
First off, I have some experience with Basic Stamps - I have the "what is a microcontroller kit" but haven't played with it in a few years. I don't think I'll have any real trouble getting back into PBASIC, and I'd like to stick with what I know.

I work for a company that manufactures something that is in effect a fairly wide strip of thin plastic. It comes off the manufacturing line as a double-wide strip that needs to be split into two separate strips before it gets rolled up. The knife that does the splitting is currently fixed, with minor adjustments available. However, the strip of plastic tape does not - and cannot be made to - track in a perfectly straight line across the knife.

I made the mistake of mentioning the idea of using a microcontroller and a servo to control the knife, so now I've been tasked with designing the system to do it.

This PDF file shows a basic arrangement of what I'm envisioning. The knife carrier will ride on the two rails, and a lead screw will drag the thing left and right. I'm planning on using a continuous rotation servo and a toothed belt to operate the lead screw.

Assembly1.pdf

The area that I need the suggestions is the whisker sensors. What I'm thinking right now is using a couple of potentiometers, with a horn on them. One side of the horn will have a whisker, the other will have a spring connected to the pin above, to pull the whiskers back toward the center. The whiskers will press against the side of the tape, and the microcontroller will compare the output of the resistors to determine how far off-center the knife is, and correct the error using the servo.

So, there's a couple questions, I guess.

1. Is there a pre-made sensor that will do this? All the available whiskers that I've seen seem to be basically a momentary on/off type, more for obstacle detection in a robotics application.

2. Which stamp should I be using? I'd prefer not to mess with an external ADC, but I can't recall whether or not the stamp that I had on my kit had an internal ADC.

3. Is there a better way that anyone can think of to do this? I thought about one of the line-following setups, like what you'd use to keep a robot or a toy car following a marker line or a piece of electrical tape, but it seems like those bounce back and forth between the edges, rather than staying centered. I also considered a camera, but unfortunately there's a price issue - and a programming skill level issue - with that.

4. Am I just an idiot for trying this in the first place? :)


Thank you for any suggestions!
«1

Comments

  • ctwardellctwardell Posts: 1,716
    edited 2011-02-17 10:35
    Peter,

    How rigid is the plastic?

    It sounds like the whiskers may cause a tearing problem or may wrinkle the edges of the plastic.

    I'm thinking an optical solution may be better, is the plastic opaque?

    C.W.
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 10:42
    The plastic is fairly rigid - it's 8 - 12 mils, stretched very tight. The whiskers won't tear or wrinkle it at all.

    The tape is opaque - it's black, medium gloss. Optical would be great, but there's variation in the width of the tape ... how would I work the centering? I thought about using photoresistors / LEDs, but it seems like that would only find the edges ... and if there's a width variation that blocks both sides (or gets too narrow for the sensor) the knife would get lost altogether.

    What would you recommend for optical?

    Incidentally, the tape is a nominal 3 5/8" wide where it hits the knife.
  • ctwardellctwardell Posts: 1,716
    edited 2011-02-17 11:06
    Peter,

    The whisker idea may be OK then, but I'm think using rotational optical encoders instead of potentiometers because most potentiometers would tend to get noisy and wear out with that type of use.

    An alternative might be something like this:

    http://www.parallax.com/Store/Sensors/ColorLight/tabid/175/CategoryID/50/List/0/SortField/0/Level/a/ProductID/566/Default.aspx

    I'm not sure if the stamps are really fast enough for this application.

    How fast might the plastic drift off center and how precise does the system need to be?

    C.W.
  • ctwardellctwardell Posts: 1,716
    edited 2011-02-17 11:20
    Peter,

    I suppose this may be a silly question...

    Is there any possibility of just having the knife assembly freely slide from left to right with rollers at each edge of the assembly instead of the whiskers. This assumes the plastic stays close to the nominal width.

    C.W.
  • davejamesdavejames Posts: 4,047
    edited 2011-02-17 11:24
    Peter - how fast is the tape moving as it hits the knife?

    And, I don't consider you an idiot for attempting this :smile:

    DJ
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 11:25
    The tape drifts back and forth perhaps a quarter inch, maybe three-eighths, each way, max. The tape is running through at about 150 feet per minute, more or less. (A 2000 meter roll takes about 45 minutes to complete.) (Yes, I know we're mixing metric and Imperial. It's a strange setup here.)

    Drift is fairly slow. The oscillation has maybe a 3 to 5 minute periodicity, depending on the machine and how badly worn the rollers are. Some machines may be a little longer. Even with all brand new rollers - which will never happen - the tracking is not and will never be perfect - there's too many separate pieces of machinery which share no common reference point except the floor (which is not entirely even) and the tape itself.

    (And no ... unfortunately aligning everything isn't an option. Bosses would rather throw band aids and gadgets at it rather than actually solving the problem the right way.
  • sam_sam_samsam_sam_sam Posts: 2,286
    edited 2011-02-17 11:26
    I made the mistake of mentioning the idea of using a micro-controller and a servo to control the knife,.....> I did this once my self so I know what you mean

    so now I've been tasked with designing the system to do it. .....> I have to tell you something I learn allot about Basic Stamp programing by doing that project

    Even with all brand new rollers - which will never happen - the tracking is not and will never be perfect - there's too many separate pieces of machinery which share no common reference point except the floor (which is not entirely even) and the tape itself. ...> I had laugh at this I work on something like where not even the new part made work right

    The tape drifts back and forth perhaps a quarter inch, maybe three-eighths, each way, max....> if this the case why have an optic sensor array
    LED      Diode  LED.................> how ever wide you need it  you would have to make this your 
                                                              self but this should not be that hard to do 
    Diode     LED    Diode
    


    Am I just an idiot for trying this in the first place? NO NOT at all You will learn allot by doing this project

    I also considered a camera, but unfortunately there's a price issue I can Understand this

    - and a programming skill level issue - with that. We can help with this part of it Feel free to ask away

    One thing that you might not thought of
    and it this if you change the cutting knife. position as your wide strip of thin plastic move back and forth this change the width of the strip of thin plastic will not always be the same it might be close and maybe better than what you have now
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 11:29
    ctwardell wrote: »
    Peter,

    I suppose this may be a silly question...

    Is there any possibility of just having the knife assembly freely slide from left to right with rollers at each edge of the assembly instead of the whiskers. This assumes the plastic stays close to the nominal width.

    C.W.


    The tape is pretty tough stuff, but the pressure needed to drag the knife back and forth will cause the tape to roll up on the side rather than pulling the knife. I've been trying to think of a purely mechanical way to do this, too.
  • ctwardellctwardell Posts: 1,716
    edited 2011-02-17 11:50
    The tape is pretty tough stuff, but the pressure needed to drag the knife back and forth will cause the tape to roll up on the side rather than pulling the knife. I've been trying to think of a purely mechanical way to do this, too.

    Just had to check, I've been accused of using a nuke to boil an egg...

    A simple approach would be a photo interrupter on each side, spaced so both both are un-interrupted when centered. If the left sensor is interrupted, move left, right move right, neither interrupted sit still...

    C.W.
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 11:55
    ctwardell wrote: »
    Just had to check, I've been accused of using a nuke to boil an egg...

    A simple approach would be a photo interrupter on each side, spaced so both both are un-interrupted when centered. If the left sensor is interrupted, move left, right move right, neither interrupted sit still...

    C.W.


    Too much variation in width ... the sensors would have to be adjusted constantly.

    I'm actually really liking the linescan idea, but it looks like a heavy programming load ...


    Also, and I just thought of this, this needs to be a standalone unit. I can't tie up a PC for this, and power to the unit will likely be interrupted frequently, so I need the memory to be non-volatile. How much of a problem will that be?
  • ctwardellctwardell Posts: 1,716
    edited 2011-02-17 12:01
    The power issue should not be a problem, the stamp or anything else I would see being used has non-volatile memory.

    How much variation do you expect in the width of the plastic?
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 12:07
    ctwardell wrote: »
    The power issue should not be a problem, the stamp or anything else I would see being used has non-volatile memory.

    How much variation do you expect in the width of the plastic?


    Depends on a couple things. The basic variation is going to be inconsistency in the manufacturing process. A blown extruder sends a tube of hot plastic up, which wraps around a rolling die head that embosses some stuff on it and ... well, never mind, but the air pressure inside the tube (or balloon, if you will) is controlled by a really shoddy PLC, and that affects the width of the tape by up to a quarter of an inch or so. Then there's different molds, which create different size tape, so there's some intentional variations as well. Different size tapes can be up to an inch different. I can't make a different cutter version for each mold, because the molds are changed out depending on what the customers are ordering. The cutter has to be able to handle whatever types of tape get put through it.

    As to the memory - good. I couldn't remember whether the memory on a Stamp was volatile or not. It was probably 2005 or so the last time I played with my kit.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-17 12:21
    The TSL1401-DB combined with a MoBoStamp-pe would be plenty fast to keep up with the drift, and it's easy to locate the center of the tape with it, using the downloadable AVR firmware driver. For best contrast, I would recommend backlighting the tape so you have a nice black subject on a light background to work with. A fluorescent tube would be adequate for this task.

    Some questions:

    1. What's the maximum tape width?
    2. What's the maximum "wandering" range?
    2. What are your tolerances for center accuracy?
    3. What kind of interface do you require to the centering mechanism?

    -Phil
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 12:26
    The TSL1401-DB combined with a MoBoStamp-pe would be plenty fast to keep up with the drift, and it's easy to locate the center of the tape with it. For best contrast, I would recommend backlighting the tape so you have a nice black subject on a light background to work with. A fluorescent tube would be adequate for this task. Some questions:

    1. What's the maximum tape width?

    Variable, based on what mold and how well / poorly the air pressure controller works. Probably up to 4" maximum. I just finished reading through your nice long thread about this gadget - the one where the extrusions were discussed - and I have plenty of vertical clearance to get a decent focal length.
    2. What's the maximum "wandering" range?

    1/4 - 3/8 inches or so.
    2. What are your tolerances for center accuracy?

    Hopefully 1/16" or better. I'd like 1/64", but I don't really see that as completely necessary.
    3. What kind of interface do you require to the centering mechanism?

    I was planning on just using one of the Parallax / Futaba continuous rotation servos to drive the lead screw.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-17 12:32
    I don't see any issues, then. With, say, a 5" field of view, your interpolated precision is about 0.02". The servo could be driven using a PWR-I/O-DB plugged into the other MoBo socket. The extrusion kit sold by Parallax has all the cutouts you need for both daughterboards.

    -Phil
  • ctwardellctwardell Posts: 1,716
    edited 2011-02-17 12:40
    I had not noticed the MoBoStamp-pe until I was looking through the line scan camera PDF, those look pretty nice.
    I think Phil's suggested platform may be a good way to go. You should be able to get within 1/32" assuming the camera is focused for a 4" tape width and the camera is mounted to the moveable head.

    C.W.
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 12:43
    I don't see any issues, then. With, say, a 5" field of view, your interpolated precision is about 0.02". The servo could be driven using a PWR-I/O-DB plugged into the other MoBo socket. The extrusion kit sold by Parallax has all the cutouts you need for both daughterboards.

    -Phil


    Okay, so I'd need:

    -Linescan camera

    -Motherboard

    -Power Supply

    -Servo


    And then just assorted bits and pieces and pigtails to connect them, right? Programming will be the only major issue at that point? How difficult is the programming ... like I said, it's been a few years since I played with PBASIC, and even then I didn't do much more than the projects in the book and a few ideas I had that expanded on that somewhat. The motherboard is programmed through the USB port, right?

    Also, how much drift is there likely to be, over time, with a setup like this? Will I need to have any provision for on the fly calibrations?


    I think the enclosure will just be machined into the main body of the assembly. I'm probably going to just use something like UHMW. It's rigid enough and easy to mill. Put the motherboard and power supply in one of the side rails, next to the servo.
  • PliersPliers Posts: 280
    edited 2011-02-17 13:02
    I built two of these. They worked well. It drives a DC motor (attached to the lead screw). No computer.
    album.php?albumid=34&attachmentid=78404

    If you know basic electronics, this would be easy to copy.


    The purpose is to keep a roll of material aligned in a machine. It watches both edges and keeps it in the center.
    A brief description.
    J1 connects to that power supply shown to it's right.
    J2 Connects the left laser and sensor (photo resistor).
    J3 Connects the right laser and sensor (photo resistor).

    The op amp commands the motor CW and CCW to keep the sensor level balanced.
    J4 is for manual control
    J5 is for the limit switches.
    J7 is another photo resister.

    I'm not a professional just a successful hack.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-17 13:14
    And then just assorted bits and pieces and pigtails to connect them, right?

    Yes.

    Programming will be the only major issue at that point? How difficult is the programming ...

    The AVR firmware includes functions for locating the left and right edges. Just average those two readings, and you've got the center position.

    The motherboard is programmed through the USB port, right?

    Right.

    Also, how much drift is there likely to be, over time, with a setup like this? Will I need to have any provision for on the fly calibrations?

    Assuming your mechanical setup is rigid enough, there should be no drift in the sensing over time. If there's vibration, I would recommend taping the lens to its holder, once you've adjusted the focus. There could be drift in the servo's null setting with time/temperature. But your program should be able to adjust for this on the fly.

    I think the enclosure will just be machined into the main body of the assembly. I'm probably going to just use something like UHMW. It's rigid enough and easy to mill. Put the motherboard and power supply in one of the side rails, next to the servo.

    The two daughterboards should be plugged directly into the MoBo. The whole unit then becomes the camera/controller. Cables required: cable from power adapter to PWR-I/O-DB, cable to servo, USB extension cable to MoBo (optional if the assembly is easy to reach for programming/debugging). That's why I like the extrusion, since it makes for a tidy, compact package. If you need more environmental protection, you could put it in a plastic box with a clear lid, like this one:

    attachment.php?attachmentid=78406&d=1297977132

    One thing you should ascertain before jumping in with both feet is that the servo has enough torque to turn the leadscrew.

    -Phil
    800 x 600 - 51K
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 13:16
    Pliers wrote: »
    I built two of these. They worked well. It drives a DC motor (attached to the lead screw). No computer.
    album.php?albumid=34&attachmentid=78404

    If you know basic electronics, this would be easy to copy.


    The purpose is to keep a roll of material aligned in a machine. It watches both edges and keeps it in the center.
    A brief description.
    J1 connects to that power supply shown to it's right.
    J2 Connects the left laser and sensor (photo resistor).
    J3 Connects the right laser and sensor (photo resistor).

    The op amp commands the motor CW and CCW to keep the sensor level balanced.
    J4 is for manual control
    J5 is for the limit switches.
    J7 is another photo resister.

    I'm not a professional just a successful hack.


    Interesting. Only problem with this for my application is that it requires a known constant width. It does give me some ideas to try playing with in another part of the process, though ... Thanks.
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-17 13:26
    The AVR firmware includes functions for locating the left and right edges. Just average those two readings, and you've got the center position.

    Okay, that makes me feel a little better.
    The two daughterboards should be plugged directly into the MoBo. The whole unit then becomes the camera/controller. Cables required: cable from power adapter to PWR-I/O-DB, cable to servo, USB extension cable to MoBo (optional if the assembly is easy to reach for programming/debugging). That's why I like the extrusion, since it makes for a tidy, compact package. If you need more environmental protection, you could put it in a plastic box with a clear lid, like this one:

    Well Smile. I'd really prefer to have the motherboard in the stationary part of this lash-up, but I'm still in the early part of the design, so I guess I can adjust.

    One thing you should ascertain before jumping in with both feet is that the servo has enough torque to turn the leadscrew.


    What did Archimedes say? Something about being able to move the world, if he had a good enough gear ratio? :)


    Time to start the design in earnest now! Thanks for all the help, guys! I'll probably still have more questions and issues as I go along ...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-17 13:32
    The reason the sensor board needs to be plugged directly into the Mobo is that the interface is partly analog. A long cable would be an invitation to noise problems, especially in an industrial environment. But, hey, the MoBo is only 2.75" x 1.35" small. :)

    -Phil
  • Kevin WoodKevin Wood Posts: 1,266
    edited 2011-02-17 17:17
    I think that a small stepper motor would be a better choice than the servo. And I'm surprised that nobody tried to upsell you on the Propeller. :)
  • $WMc%$WMc% Posts: 1,884
    edited 2011-02-17 19:53
    I'm seeing it hard to maintain a constant width on the bulk tape.
    '
    Wouldn't it be easier to make the tape a hair wider and use 3 knives. Recycling the left and right drops?
    '
    drop TAPE TAPE drop
    ' _^________^ ________^_
  • PliersPliers Posts: 280
    edited 2011-02-18 02:15
    I forgot, you are moving the knife. Not the Media.
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-18 07:54
    Kevin Wood wrote: »
    I think that a small stepper motor would be a better choice than the servo. And I'm surprised that nobody tried to upsell you on the Propeller. :)


    A stepper would probably be a better choice, but more complicated. If I wind up having to build enough of these for all the lines - there's 18 lines - then I'll probably look into doing that. But, for now, I'll just try it with a servo and some mechanical advantage via belts.

    Re: Propeller ... I think that'd be a little bit of overkill. One Propeller would probably be able to run the entire production line, everything. It's something to think about later on, actually ... perhaps use a Ybox or something, be able to replace almost the whole setup.

    $WMc% wrote: »
    I'm seeing it hard to maintain a constant width on the bulk tape.
    '
    Wouldn't it be easier to make the tape a hair wider and use 3 knives. Recycling the left and right drops?
    '
    drop TAPE TAPE drop
    ' _^________^ ________^_



    It would be easier if it was just a flat solid piece of plastic ... but it's not. It's called tape because of how it looks, even in the catalogs, but it's actually a sort of hose that just lays flat and looks like a ribbon. Can't cut the outside.




    Pliers wrote: »
    I forgot, you are moving the knife. Not the Media.


    Yeah. :/ But ... there's a rolling machine involved in this process too, and that moves back and forth while the tape feeds in at a single point, to make a nice tidy roll. I've been thinking about some of the possible applications there. Right now it uses a pair of magnetic influence sensors to adjust the limits of its travel.



    Oh - another question. Are the I/O capabilities of the 2pe motherboard in addition to the daughterboard slots or including them? I will probably need a couple limit switches and an LED or two...
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-18 08:28
    The I/O available on the MoBo is limited to the DB sockets. Each socket owns 6 pins and shares two pins with the other socket, for a total of 14 (6 + 6 + 2). Of the six dedicated pins, two are owned by the sockets's AVR (and can be analog in -- 10-bit ADC -- or plain I/O), two are common to the AVR and the Stamp (and can be PWM out -- 8-bit, 37.5 KHz -- or plain I/O), and the remaining two are Stamp-only, pulled up to Vdd (and can work with the Stamp's I2C commands). The shared pins also connect to the Stamp only and are pulled up to Vdd. Finally, there is a bicolor (R/G) LED on the MoBo that's under program control. It's located on the end opposite the USB connector.

    The PWR-I/O-DB board (typically plugged into socket "A") has six 3-pin headers consisting of Gnd/+5V/Sig (i.e. a servo header arrangement). You can use one for your servo, and the other five are available for whatever. The SIG pins connect to the DB's dedicated pins, not to the pins hsared with the other DB.

    -Phil
  • peter.steelepeter.steele Posts: 16
    edited 2011-02-18 08:42
    The I/O available on the MoBo is limited to the DB sockets. Each socket owns 6 pins and shares two pins with the other socket, for a total of 14 (6 + 6 + 2). Of the six dedicated pins, two are owned by the sockets's AVR (and can be analog in -- 10-bit ADC -- or plain I/O), two are common to the AVR and the Stamp (and can be PWM out -- 8-bit, 37.5 KHz -- or plain I/O), and the remaining two are Stamp-only, pulled up to Vdd (and can work with the Stamp's I2C commands). The shared pins also connect to the Stamp only and are pulled up to Vdd. Finally, there is a bicolor (R/G) LED on the MoBo that's under program control. It's located on the end opposite the USB connector.

    The PWR-I/O-DB board (typically plugged into socket "A") has six 3-pin headers consisting of Gnd/+5V/Sig (i.e. a servo header arrangement). You can use one for your servo, and the other five are available for whatever. The SIG pins connect to the DB's dedicated pins, not to the pins hsared with the other DB.

    -Phil


    Okay, then that should take care of the limit switches.

    The PWR-I/O board, that's not switched, right? You plug it into the mobo, put power to it, and everything's ready to go?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-02-18 08:58
    The PWR-I/O board, that's not switched, right? You plug it into the mobo, put power to it, and everything's ready to go?

    Correct. It has an onboard reg and a 1000uF cap for the +5V that goes to the 3-pin headers. The Vin from the power connector also goes to the MoBo, whose onboard regulators provide its own +5V and Vdd.

    The MoBo has a jumper header to select between USB and external power. You'd use the external setting in this case. The PWR-I/O board has a jumper that connects the power input socket to Vin. You could connect an on/off switch to this if you like.

    -Phil
  • pacmanpacman Posts: 327
    edited 2011-02-18 13:39
    $WMc% wrote: »
    I'm seeing it hard to maintain a constant width on the bulk tape.
    '
    Wouldn't it be easier to make the tape a hair wider and use 3 knives. Recycling the left and right drops?
    '
    drop TAPE TAPE drop
    ' _^________^ ________^_


    I would urge you to consider this option if it is viable (the recycling that is).

    Many years ago, the company i was with tried the "find the middle" method with fiber cement sheeting (fibro by another name - but without the asbestos). It was a pain. But using the "oversize" method we were able to consistently achieve correct width boards - We would cut the the sheets whilst they were wet and the offcuts were put back into the process.

    Worked VERY well.
Sign In or Register to comment.