Arduino, and Mechanical Movement of Objects - a Newbie Question

Hey there;

Oh, that guy? His name is Goldberg; Rube was his grandfather. :grin: There are a couple of styles of swifts. The umbrella swift opens and closes like an umbrella, and the yarn wraps around the parts that cross. The Amish swift is like a large, wooden plus sign that sits on a table, and has a number of holes drilled part way into all four arms for pegs so as to accommodate varying sized skeins. Yarn can be wound onto or from either of these styles. There is also a weasel . It's a tall, narrow box on 4 short legs, and a wooden gear system inside. Attached to the front of the box is a hub with 6 or 8 spokes radiating from it, and each of these has a fixed dowel attached to the ends at 90 degree angles. One of the spokes has a dowel at about it's midway point, also at a 90 degree angle, and serves as a crank. The weasel is best for winding only, as it isn't adjustable like the other two. However the mechanism inside counts rotations and when some number is reached, "pop goes the weasel".

There are, of course, variations on all of these. The pedal-powered swift is not among them, and is a unique sort of device to be sure. It doesn't appear to be adjustable, occupies a considerable amount of floor space as compared to the other three, and is bound to make all passers by at the county fair's sheep to wool contest smile. With the exception of the steam, any of the other swifts will do the same thing. The in-line steamer is aimed at de-kinking the unraveled sweater yarn, I think. Some folk take a more pedestrian approach when they wash it.

The gadget I'm messing with isn't a swift. It's meant to split a 4 ply yarn into two 2 ply yarns, or four 1 ply yarns. The lady I'm making it for was my high school art teacher a whole bunch of years ago. She has struggled for years with a degenerative form of arthritis, and leaves her wheel chair only for moments at a time. The splitter I'm making is designed to sit between the arms of her chair on her lap. She has spent days hand splitting the yarn from a single sweater. There are at least two large improvements I still want to make, but she's down to about 3 hours now to split the plies of a sweater. I'd like to cut that in half again.

Yay! That makes me feel even better about offering help! :slight_smile: Good on you helping this lady out.

I think I have some questions above to answer...

Dave_Burrows:
Howdy, Retroplayer;

That threaded rod idea is one I've also been contemplating. Using your illustration labels with C being the output gear, A the idler, and B the driven gear, would you use the threaded rod as the axle for A, or B? The "hooks" are currently made from 18 gauge stainless wire, hardened by heating over a gas range, and quenched in water; I'll try 14 ga. or 16 ga. next, but it would be easy enough to add a loop or two to extend below the present rod to a threaded rod.

Your nuts...where might I find those, and by what name? I haven't had any luck with locating them, but they sound perfect. Since I don't want for either the steel rod the steel rod, nor the threaded rod to move due to the hooks that connect them, I'm thinking of adding a 4th gear to the array. It will be below, and between A & B, and if I go this direction, the threaded rod will be it's axle, as well as the pivot point for A & B.

I haven't worked out yet what to make the trip levers from, nor how throwing the lever will move the bar that connects A & B. One step at a time. I appreciate the exchange of ideas. My thanks to both of you!

I assume that you are asking about the "nuts" I am talking about and not trying to comment on my sanity (either is valid)? Geez... I forget what they are called. Let me look. Ahh... ball screws and ball nuts (that doesn't sound like a safe search at work) : Ball Screws - Engineering Data - Roton Products, Inc.

cncmentor.com gives you an inside view of a complex one. It wouldn't be too difficult to make a simple one. You just need some way to "capture" the bearrings and they need to be the right size to fit within the threads. The reason this cutaway is using a deflector is because it is using a complete ring of bearrings and it needs a way to pop them into the track as it spirals. With just two or four bearrings offset, you don't need to do that. This isn't a great picture, but it does show what the bearring capture of something simpler would look like. http://www.heli-tek.com/ball-nuts.php

Hope that helps.

Well, let's see... your crank is rotating the spool and we want to synchronize with the spool. So I would tap a feed of the spool axel for the driven gear (you could even reverse my drawing, the important part is that when a gear spins, the gear meshed with it will spin in reverse. So, the only magic is putting a gear in-between to reverse it again.) You would never hook up anything to the idler axel (or it wouldn't be called an idler.) It is always just meshed with the driven gear. In one direction, it just spins freely -- idling, in the other, it meshes with the output gear. You can swap the input and output gear, it doesn't really matter. But I would put the threaded rod on the output gear in my drawing since that is fixed. The other two gears are going to be mounted on a pivoting mechanism. You simply toggle that mechanism up or down to change which gear meshes directly with the output shaft.

To trigger it when it reaches the endstops, I would put something on your nuts that trip the lever. I would run the lever all way along below the rod. If you do it right, you could even adjust the endstops as desired for the different spool widths you talked about. I am envisioning two wedges that bump each other and create a quick motion... I will have to think on it some and draw something up.

BTW, it sounds like you appreciate mechanisms as much as I do. I always observe how machines work and am enchanted especially with automata. I am not a mechanical engineer (an electrical engineer actually), just lots and lots of observation.

I do have a cool book that I can recommend: Mechanisms and Mechanical Devices Sourcebook

Thousands of different mechanisms diagrammed and explained. Maybe I will find some pictures in my copy that will help.

This site is also good for viewing animations of many mechanisms:

Awesome site! And right on the first page is a "traverse roll used in yarn winding machines" lol! And THAT was the helix screw thingy I was talking about before. See how it reverses automatically?

:slight_smile:
I was hoping you'd see it.

jabbado:
:slight_smile:
I was hoping you'd see it.

Saved the link to my favorites. Thanks for sharing it! I could picture that mechanism in my head because I have seen it before on coil-widing machines, but couldn't remember how it reversed direction.

The only limitation to it is that the OP mentions variable widths. This could be solved with a square shaft that he can slide on different lengths of these at different points depending on how many piles he is trying to make and how wide.

Retroplayer:
The only limitation to it is that the OP mentions variable widths. This could be solved with a square shaft that he can slide on different lengths of these at different points depending on how many piles he is trying to make and how wide.

I think it's can be simpler than that. Just have a long shaft with the spirals milled all along it. Then you put "stops" along the shaft where required. Bit hard for me to explain but if the stops are just either side of a "X" part of the spirals it basically turns that location into the end of the shaft and causes the cam follower to reverse at that point.

Yep. Great suggestion. I can see that. Stops that clamp on at different points.

jabbado:
I think it's can be simpler than that. Just have a long shaft with the spirals milled all along it. Then you put "stops" along the shaft where required. Bit hard for me to explain but if the stops are just either side of a "X" part of the spirals it basically turns that location into the end of the shaft and causes the cam follower to reverse at that point.

If you have spirals cut in both directions, there will be a cross-over every time they meet. How do you ensure that the follower keeps going across these rather than reversing?

If I am understanding him right, the stops have the < and > groove to them to redirect the follower into the other track.

Retroplayer:
If I am understanding him right, the stops have the < and > groove to them to redirect the follower into the other track.

Yes.

Retroplayer:
If I am understanding him right, the stops have the < and > groove to them to redirect the follower into the other track.

Yes, but it's not the ends I'm asking about - it's the crossing points in the middle. When the grooves cross what's to stop the follower from changing direction? At the end of the track there's only one option and the follower has to change direction. But at the intermediate crossing points, there are two options and nothing to prevent the follower from taking either of them.

PeterH:

Retroplayer:
If I am understanding him right, the stops have the < and > groove to them to redirect the follower into the other track.

Yes, but it's not the ends I'm asking about - it's the crossing points in the middle. When the grooves cross what's to stop the follower from changing direction? At the end of the track there's only one option and the follower has to change direction. But at the intermediate crossing points, there are two options and nothing to prevent the follower from taking either of them.

oh... the follower is long enough that it touches both sides even at the crossing points so it stays on the track it is on. And the tapers on the end of the follower are designed to allow it to flip angle at the ends. The shape of the follower is actually the most important part of the mechanism.

Retroplayer:
oh... the follower is long enough that it touches both sides even at the crossing points so it stays on the track it is on. And the tapers on the end of the follower are designed to allow it to flip angle at the ends. The shape of the follower is actually the most important part of the mechanism.

I imagine something like that would be required, but I'm struggling to follow how that would enable you to adjust the end points i.e. have a spool that has a crossing point that can optionally be 'blocked off' to make the follower reverse at that point. If the shape of the groove and follower make it possible for the follower to reverse at that point, what prevents it from reversing even when the crossing is not 'blocked off' iyswim? It seems to me that for this to work, the turning points at the ends need to be a different shape to the crossing points in the middle. Maybe there's a devious way round that, but I can't figure it.

I think I see what you are asking...

Because of the length and shape of the follower, it cannot follow the cross tracks. It requires the leading edge of the follower to bump against an edge to toggle it in the other direction. The end stops provide this edge that bumps it and toggles it. Notice the taper on the edges. They touch nothing at all while following the track until they hit the end points.

Or am I still not understanding your concern?

I just pulled my baitcasting reel apart and the cam follower looks like this (crap pic):

You folks are awesome-fantastic-brilliant-and-generous! Thanks for all these ideas. The one I think is most elegant is also probably the lease accessible to me, that being the rod with spiraling, machined grooves. In addition to finding someone to do the machining at a price I could afford, that one poses another thing to figure out. Splitting even one ball of yarn creates a couple of grams of lint. Lint, and grease don't play well together; they make a sticky mess.

I'm leaning toward some variation of the threaded rod. Parts are cheap, and ubiquitous, If I mess up, or make some revision, I'll still have more to have at it again. The threaded rod presents the same grease/lint issue, and I haven't resolved that.

I don't know if you noticed, but in the video, there's a dangling gadget that looks like a toilet paper holder holding a ball of yarn, and it's rotating. It rotates to remove some varying amount of twist in the yarn, but I've been stopping to spin it manually every 15 or 20 seconds. There's now a little 12v. DC motor up there. One problem is that I need a 4" or larger pulley above the yarn ball holder, but I'm wondering if there's a way to edit the sketch so that I can adjust it as needed more easily than I can now. It seems to reach maximum RPMs well before the potentiometer reaches it's extreme. That sketch follows.

#include <EEPROM.h>

// Maurice Ribble 
// 2-4-2010
// http://www.glacialwanderer.com/hobbyrobotics
// Open Source, licensed under a Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by-sa/3.0/)
// Compiled with Arduino Software 0017 (http://arduino.cc)

// This program reads an input potentiometer and uses that value to set a motor controller's direction and speed.

// REVISIONS:
// Initial Version

// Frequency for updating motor
#define UPDATE_HZ   100

// Define digital/analog pins
#define BUTTON_PIN        2
#define MOTOR_ENABLE_PIN  3
#define MOTOR_IN1_PIN     4
#define MOTOR_IN2_PIN     5

#define DIAL_APIN         0

// Positions that different data is stored in eeprom
#define EEPROM_DIAL_LOW  0
#define EEPROM_DIAL_MID  1
#define EEPROM_DIAL_HIGH 2

enum { BUTTON_PRESSED=0, BUTTON_NOT_PRESSED=1 };

// Globals
unsigned long g_dialLow;
unsigned long g_dialMid;
unsigned long g_dialHigh;

void setup()
{
  int button;

  //Serial.begin(9600); // open hw serial for debugging

  pinMode(BUTTON_PIN, INPUT);
  pinMode(MOTOR_ENABLE_PIN, OUTPUT);
  pinMode(MOTOR_IN1_PIN, OUTPUT);
  pinMode(MOTOR_IN2_PIN, OUTPUT);

  // Default values  
  digitalWrite(MOTOR_ENABLE_PIN, LOW);
  digitalWrite(MOTOR_IN1_PIN, LOW);
  digitalWrite(MOTOR_IN2_PIN, LOW);

  button = digitalRead(BUTTON_PIN);
 
  // If the button is pressed during startup enter a special mode to set the min, max and mid dial readings
  // Should only need to do this once (unless you change the the potentiometer is changed)
  if (button == BUTTON_PRESSED)
  {
    waitTillAllButtonsReleased();                   // debounce
    g_dialLow = analogRead(DIAL_APIN);              // save low speed position
    
    button = digitalRead(BUTTON_PIN);               // wait for button to be pressed again
    while(button == BUTTON_NOT_PRESSED)
    {
       button = digitalRead(BUTTON_PIN);
    }
    
    waitTillAllButtonsReleased();                   // debounce
    g_dialHigh = analogRead(DIAL_APIN);             // save high speed position
    
    button = digitalRead(BUTTON_PIN);               // wait for button to be pressed again
    while(button == BUTTON_NOT_PRESSED)
    {
       button = digitalRead(BUTTON_PIN);
    }
    
    waitTillAllButtonsReleased();                   // debounce
    g_dialMid = analogRead(DIAL_APIN);              // save middle speed position

    eepromWriteInt(EEPROM_DIAL_LOW, g_dialLow);    // save dial position references to eeprom
    eepromWriteInt(EEPROM_DIAL_MID, g_dialMid);
    eepromWriteInt(EEPROM_DIAL_HIGH, g_dialHigh);
  }
  else
  {
    g_dialLow  = eepromReadInt(EEPROM_DIAL_LOW, 0, 1023);  // read dial position references from eeprom
    g_dialMid  = eepromReadInt(EEPROM_DIAL_MID, 0, 1023);
    g_dialHigh = eepromReadInt(EEPROM_DIAL_HIGH, 0, 1023);
  }
}

void loop()
{
  unsigned long dialVal = analogRead(DIAL_APIN);
  long percentOn;
  unsigned long usTotal = 0;
  unsigned long usOn = 0;
  unsigned long usOff = 0;
  int forward;

  if (g_dialHigh > g_dialLow)
  {
    if (dialVal >= g_dialMid)
    {
      forward = 0;
      percentOn = 100*(dialVal-g_dialMid)/(g_dialHigh-g_dialMid);
    }
    else
    {
      forward = 1;
      percentOn = 100*(g_dialMid-dialVal)/(g_dialMid-g_dialLow);
    }
  }
  else // g_dialHigh < g_dialLow
  {
    if (dialVal <= g_dialMid)
    {
      forward = 0;
      percentOn = 100*(g_dialMid-dialVal)/(g_dialMid-g_dialHigh);
    }
    else
    {
      forward = 1;
      percentOn = 100*(dialVal-g_dialMid)/(g_dialLow-g_dialMid);
    }
  }
  
  if (percentOn <= 5)  // Turn motors off when they are close to off
  {
    percentOn = 0;
  }
  else if (percentOn >= 95)  // Turn motors full on when they are close to full on
  {
    percentOn = 100;
  }
 
  usTotal = 1000000/UPDATE_HZ;
  usOn = usTotal*percentOn/100;
  usOff = usTotal - usOn;

  if (forward)
  {
    digitalWrite(MOTOR_IN1_PIN, HIGH);
    digitalWrite(MOTOR_IN2_PIN, LOW);
  }
  else
  {
    digitalWrite(MOTOR_IN1_PIN, LOW);
    digitalWrite(MOTOR_IN2_PIN, HIGH);
  }

  if (usOn)
  {
    unsigned int msOn = usOn/1000;
    usOn %= 1000;
    digitalWrite(MOTOR_ENABLE_PIN, HIGH);
    if (msOn)
      delay(msOn);
    if (usOn)
      delayMicroseconds(usOn);
  }

  if (usOff)
  {
    unsigned int msOff = usOff/1000;
    usOff %=1000;
    digitalWrite(MOTOR_ENABLE_PIN, LOW);
    if (msOff)
      delay(msOff);
    if (usOff)
      delayMicroseconds(usOff);
  }
}

////////////////////////////////////////////////////////////////////////////////
// Helper functions
////////////////////////////////////////////////////////////////////////////////

// Writes an integer to eeprom
void eepromWriteInt(int addr, int val)
{
  addr *= 2;  // int is 2 bytes
  EEPROM.write(addr+1, val&0xFF);
  val /= 256;
  EEPROM.write(addr+0, val&0xFF);
}

// Reads an integer from eeprom
int eepromReadInt(int addr, int minVal, int maxVal)
{
  int val;

  addr *= 2;  // int is 2 bytes
  val = EEPROM.read(addr+0);
  val *= 256;
  val |= EEPROM.read(addr+1);
  val = constrain(val, minVal, maxVal);
  return val;
}

// Wait for all the current button presses to end (handles debouncing buttons)
void waitTillAllButtonsReleased()
{
  while(1)
  {
    int i;
    int button;

    // Need to sample many times to makes sure the button isn't currently bouncing
    for(i=0; i<100; ++i)
    {
      button  = digitalRead(BUTTON_PIN);
      delayMicroseconds(10);
    }

    if (button == BUTTON_NOT_PRESSED)
    {
      break;
    }
  }
}

I've harvested a lot of plastic gears, several stepper motors, and other cool toys. There has been discussion about a lever toggling the direction of rotation of the shaft that will move the "hooks". Right now, I'm imagining something that will be better illustrated than described with words. I'll post that sometime this afternoon.

You all gave me so much food for thought. I am very grateful.