Toto's Traversers

Discussion in 'Workshop Benches' started by paul_l, May 6, 2017.

  1. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Hi Paul give it another try mate please. I had it set as private on youtube :facepalm:
     
  2. Gary

    Gary Wants more time for modelling.... Staff Member Administrator

    Messages:
    7,344
    Likes Received:
    3,898
    Joined:
    Dec 5, 2015
    Video worked a treat ! I'm sure you'll iron out any bugs and it will be 100% proficient. :thumbs:

    Cheers, Gary.
     
  3. Toto

    Toto I'm best ignored Staff Member Founder Administrator

    Messages:
    15,419
    Likes Received:
    3,842
    Joined:
    Dec 5, 2017
    Nice job on the traverser. Not too noisy either. :thumbs:
     
  4. Timbersurf

    Timbersurf

    Messages:
    720
    Likes Received:
    436
    Joined:
    Jun 20, 2018
    Looks good Colin, whats the control/switches? I won't be joining in and building one for myself, as it would have to be 10 feet long! :whatever:
     
  5. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Thanks guys.
    The controller at the moment is an Arduino Nano running the control to an Easy Driver stepper motor board using 2 push buttons one forward and one reverse. Each press gives 5 Full rotations.
    Paul_l has kindly :( sent me his Viccy Road software which I will be looking at to run my Traverser via DCC. It looks at first glance to be Rudy's DCC decoder and the stepper controller built into the same code, I may have to pick his brain cell on this one.
    The motor I'm using is a Nemo17 stepper motor with a step of 0.9 degrees running at 1/8th microsteps so it works out at 3200 steps per rotation. I may have to pull it all apart and make some changes as the tracks are 5 complete rotations apart, any more and it's hitting the physical stops. This means the tracks are a little close together, I could do with another full rotation between tracks. I'll have to get longer 8mm rods or put the bearings closer together under the track bed.
    Now where is that other can of worms .......

    This is the code I used for testing:
    #define DISTANCE 3200 // This is the number of steps for one full rotation of the motor shaft.

    int StepCounter = 0;
    int Stepping = false;
    //The pins are setup as per my board and differ from the original code.
    void setup() {
    pinMode(2, OUTPUT); // Step Pin
    pinMode(3, OUTPUT); //Direction Pin
    digitalWrite(2, LOW);
    digitalWrite(3, LOW); // Set LOW runs forward set HIGH runs reverse

    pinMode(11, INPUT);
    pinMode(12, INPUT); // Push button inputs
    }

    void loop() {
    //************************************** Button Detection************************************************
    if (digitalRead(11) == LOW && Stepping == false) // This section checks which button has been pressed and that the motor is not running
    { // It then sets the direction. LOW = Forward and HIGH = Reverse and sets the stepping to true to allow
    digitalWrite(3, LOW); // the stepper to run (below)
    Stepping = true;
    }
    if (digitalRead(12) == LOW && Stepping == false)
    {
    digitalWrite(3, HIGH);
    Stepping = true;
    }
    //**************************************Stepper Run Section************************************************
    if (Stepping == true)
    {
    digitalWrite(2, HIGH);
    delayMicroseconds(100); // This section sends the pulses to the stepper pin on the Easy Driver.
    digitalWrite(2, LOW); // The delay is set for the stepper motor I use yours may be different.
    delayMicroseconds(100);

    StepCounter = StepCounter + 1; // Increases the step counter every pulse.

    if (StepCounter == DISTANCE * 5) //checks to see if the counter has reached 3200 steps or one full rotation.
    { // I have five full rotations between tracks on my track bed hence 'DISTANCE * 5'
    StepCounter = 0; // Resets counter to zero to wait for next button press
    Stepping = false; //Stops the stepping signal to pin 2
    }
    }
    }
     
    York Paul likes this.
  6. Toto

    Toto I'm best ignored Staff Member Founder Administrator

    Messages:
    15,419
    Likes Received:
    3,842
    Joined:
    Dec 5, 2017
    :facepalm: nice light bedtime reading ......... not :avatar:
     
  7. York Paul

    York Paul Staff Member Moderator

    Messages:
    5,827
    Likes Received:
    6,909
    Joined:
    Aug 20, 2017
    Ah but its horses for courses Toto, it didn't mean anything to me either however it could be the very instructions you need one day :thumbup:
     
  8. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Yep you got it right for the code source - Rudy's excellent DCC decoder code, and my stepper cobbled bit added.

    Believe it or not, 8mm bar on the V2 traverser, and they deflect by up to 2mm when the locos are at the one end (admittedly they are Toto's Heljans). To counter this I have fitted bearings secured to the frame under the entry track, that the traverser table rests on, stopping the deflection.

    On Viccy Road, I used 6mm screwed rod for the drive, which has a 1mm pitch, so every 1 full rev the traverser would move 1mm, full steps 1.8 degree (200 steps) or 0.005mm per step so I didn't bother with half stepping etc.
    Now I'm using lead screws with approx a 7mm pitch which at 200 steps per rev is still only 0.035mm per step, so I'm still using full steps.

    As I'm using a screw, it works the same as a worm & wheel, so once the move has completed I switch off the output to stop the motor overheating, and by using full steps, when the out put is switched back on the motor wont move. It's the opening line of the main loop

    void loop()
    {
    static int addr = 0;
    if (stepper1.distanceToGo() == 0) {
    digitalWrite(StepperEnable,HIGH);
    //delay(100);

    .
    .
    . code for reading new positions
    .
    .

    }
    stepper1.run();
    }


    digitalWrite(StepperEnable,HIGH); setting the StepperEnable high turns off the output, thus .......

    if (stepper1.distanceToGo() == 0) this line asks if the distance to travel is equal to 0 - thus we have arrived, then switch off the stepper motor output and check for next move

    or

    just keep moving, and keep reapeating until the if statement is true.

    Paul
     
  9. Toto

    Toto I'm best ignored Staff Member Founder Administrator

    Messages:
    15,419
    Likes Received:
    3,842
    Joined:
    Dec 5, 2017
    No ........ it could be the very instructions that Dundee needs one day. Don't want to make him redundant ...... :avatar: I'm all for full employment .....
     
  10. York Paul

    York Paul Staff Member Moderator

    Messages:
    5,827
    Likes Received:
    6,909
    Joined:
    Aug 20, 2017
    :tophat: I'll stick to my diesel builds... no chance of redundancy in that department for sure.:avatar:
     
  11. ianvolvo46

    ianvolvo46 Staff Member Moderator

    Messages:
    5,364
    Likes Received:
    1,643
    Joined:
    Dec 8, 2015
    Have you spell checked this? :facepalm:
     
  12. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Just out of interest I did :hammer:, good job I didn't let it auto replace :avatar:.
     
  13. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    There must be some weight in these 'Big' trains you peeps play with, I'll try some weight on mine once I've done the mods.
    I'll also try pulling MS1 & MS2 Low for single step this will still give me 400 steps per rotation on the .9 step.
    Also I will configure the enable pin makes sense to keep things cool man.:cool:
    I've actually built the Nano and the Easy Driver onto a pcb and it's all wired up but as usual I built it then read up :facepalm:. I have to work out the pin configurations :hammer:.
    Off to take it apart now catch you later.
     
  14. Colin_W

    Colin_W Full Member

    Messages:
    230
    Likes Received:
    95
    Joined:
    Nov 19, 2016
    Well! what a great day. Some times I really wish when I have a project up and running reasonably well I could keep my hands in my pockets. Misaligned the bearings on the bed and the nut mounting. Back tomorrow and start again. Wasted day :mad:.
     
  15. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    By switching off the output, the motor will barely get warm, even during a busy exhibition Viccy Roads motor was cool to the touch all weekend. When the output was left on you could smell the motor after approx 30 min, and couldn't touch it.

    The lead screw or screwed rod act as a worm and wheel, locking the table in place.

    Paul
     
    Timbersurf likes this.
  16. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Finger extracted and work started on the Mk4 :whatever:

    The all the workings will be mounted on a piece of 12mm MDF, framed with 30mm strips of 12mm ply.
    I've had to modify my motor mount for two reasons.
    1. The 12mm Fully supported shaft & linear bearings are only 40mm in height (a Nema17 motor is 42mm square)
    2. I'm using a larger (read more powerful) motor 48 mm long rather than 32 mm.

    Instead of mounting the motor / bracket on the top side, I'm cutting a hole in the base and passing the motor through from the underside, lowering the motor by 12mm. To accommodate this I've made the mount 80mm wide spacing the mounting holes out further and moved the motor mount flush with the front edge of the base.
    For the lager motor I have increased the base to 80mm long, and increased the size of the side support fillets.

    So it looks like this

    upload_2018-9-15_17-1-50.png

    The printer is now churning away, which will give me time design the linear bearing supports and Lead Screw mounts.

    Paul
     
    Rob Pulham and jakesdad13 like this.
  17. Toto

    Toto I'm best ignored Staff Member Founder Administrator

    Messages:
    15,419
    Likes Received:
    3,842
    Joined:
    Dec 5, 2017
    :scratchchin: just what I was thinking. :whatever:
     
  18. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    3 hours later and the print has completed.

    And the mount for the linear bearings looks like this

    upload_2018-9-16_0-45-50.png

    Luckily I found drawings for the SBR12UU as they are not 40mm square but 40 x 39, with the mounting holes being at 28 and 26 mm centers respectively.

    Time for bed and to start the 3D printer on another job

    Paul
     
  19. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Murphy strikes again ..... :facepalm:

    Started the print off, a quick check and probably not enough filament left on the spool to complete the job.
    Swapped the spool, and not great adhesion to the bed :(, a job for the morning (it was 01:30).

    Up this morning and cleaned out the extruder, and restarted the print job. Now just have to wait

    Paul
     
  20. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Some piccies ....

    On this traverser I'm trying anti backlash nuts on the lead screws, the on on the left is the anti backlash nut, the one on the right is the standard nut.
    Note I haven't noticed an issue with backlash with the standard nut so far.


    The larger motor (black) compared with the older smaller motor.


    And the new bracket



    The bearing bracket


    And how it will be used, the bearing bracket will be attached to the underside of the traverser.


    The second bracket is printing, however I've also produced another version at 160 mm centers for the bearings against the 126mm .

    Now to start on the lead screw brackets.

    Paul
     
    Rob Pulham and jakesdad13 like this.

Share This Page