Shop OBEX P1 Docs P2 Docs Learn Events
Automated Mesh Loom with Basic STAMP--Help Needed! — Parallax Forums

Automated Mesh Loom with Basic STAMP--Help Needed!

jagilmojagilmo Posts: 2
edited 2011-08-17 07:49 in BASIC Stamp
I am trying to run 5 standard servos and send PWM signal to a stepper motor using a BS2. My code is attached and I am having trouble with some of the timing of events. I am getting stuck in my first "GOSUB" loop. Also, the first bit of code where I debug "Card 1 Up/Card 2 down" needs to be continued while the rest of the program is running. In other words, the only time I don't want that particular servo to hold its current position is when I switch the position of the cards. After the cards switch, I will need to run the same bit of code that was run previously with the IF THEN statements and such. If anyone could help with this code, please do. And also if you have any questions, please let me know. Thank you.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2011-08-16 12:45
    Your design is problematic. In particular, when servos stop receiving control pulses, they shut off and, although there's some friction in the gearchain, they may slip substantially and they won't hold their position under load. Steppers will also slip when not either stepping or being held actively in position. Unless you've designed for this, you'll need some kind of external servo controller like the ServoPAL or Propeller Servo Controller which will maintain the control pulse stream when the Stamp is doing something else. Depending on your stepper and how you have it wired, you may need some kind of stepper controller as well.

    Remember that a Stamp can only do one thing at a time. It's sometimes possible to interleave two tasks since servos only need a control pulse once every 20ms to stay on, but, with so many servos and a stepper as well, there's not much time left for other tasks.

    You might want to consider using a Propeller instead of a Stamp since the same servo control driver can be used with pretty much any Propeller board as is used in the Propeller Servo Controller and there are stepper motor drivers also available in the Propeller Object Exchange.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-16 14:05
    jagilmo,

    Welcome to the forum! 'Sounds like an interesting project. Is your loom anything like the one described in this paper?

    -Phil
  • jagilmojagilmo Posts: 2
    edited 2011-08-17 07:49
    Phil,

    Yes, my project is similar to the loom in that paper, although there is a slightly different application to the mesh that I hope to create. I am actually a Clemson grad student myself, and my work is a continuation on the project in the paper you attached. There have been several major adjustments, but the frame of the loom is the same.
Sign In or Register to comment.