Toto's Traversers

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

  1. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    There here - I ordered 4 of the wee fella's (I do have three traversers - so far).


    With a screen size of approx 60 x 40 mm.

    It's an arduino shield that will sit on top of either a Uno or Mega.


    and notice the microSD card slot at the base, I have a few idea's for this.

    Paul
     
    Rob Pulham likes this.
  2. Toto

    Toto I'm best ignored Staff Member Founder Administrator

    Messages:
    15,419
    Likes Received:
    3,842
    Joined:
    Dec 5, 2017
    Does it buy pints ?
     
  3. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Not now the bank accounts empty :facepalm:

    But maybe by Friday ...........

    Paul
     
  4. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Wow 4 years later .................

    Life goes on and like most of the Bosses jobs list you can only punt them into the long grass for so long before it bites you in the ****.

    My local club's new N gauge has had a few issues so will not be ready for the Clubs exhibition in October - so I've been asked to bring Another Bridge - oh :facepalm:

    A few transport repairs carried out - stored vertically for 4 years in a spare room infront of a set of wardrobes was probably not the best idea. But then I only got planning permission for a couple of weeks :whatever:.

    Apart from it not working Toto's other main gripe was he didn't like using the DCC controller and or JMRI to control the traverser, he wanted more local control.

    I tried to fix the existing program - coffee costs were mounting and I was getting knowhere.

    Time to cut my losses - and start from scratch - looked at the sketch, and thought Forget that.

    So I looked through the multiple versions to try and find one that I could follow - 4 years ago is pre-covid when I actually worked for a living and had some idea of what I was doing, definately older and not wiser.

    Found one that I hope is similar to the version installed on the Mk2 traverser.

    Stripped out all the DCC code - definately commited now - some would it was due years ago.

    The intension was to make as few alteration to the board design as possible as that worked on the MK2 without issue.

    Plan 1

    Small form factor operating panel (may even be portable rather than fixed)
    Oled display for showing status and track selection
    Rotary encoder switch to choose between tracks, then press the knob to select the track.

    The rotary switch has 5 connections - +ve, -ve, Switch, Data B (or DT) and Data A (or CLK).


    Got the above to work, however was too sensitive, to move the track by one you needed to mid notch, and when added to the main program (sketch), it never picked up the changes.
    Further research, recommended using 2 interupts, which on the uno / nano is ports 0, 1, 2 & 3 - Damn. Ports 0 & 1 are the serial connection, so already in use, and port 2 is connected to the Opto-isolator for the DCC decoding routines. If I was making this again then I may do it Rotary switch only, but I aint touching that side of the board as it works.

    Plan 2

    Small form factor operating panel (may even be portable rather than fixed)
    Oled display for showing status and track selection
    Push buttons to toggle between tracts and another to select the track to move to.

    Now I have used 3 push buttons
    1- Left hand Button - decrement track value
    2 - Middle Button - Select track to move to
    3 - Right hand Button - increment track value

    As I only have 4 tracks and currently only one end of the traverser is in use, then a single button would have been sufficient - just three clicks away from any track. However I am wanting to keep the design flexible and easily transferable to a bigger project - you never know.

    The OLED screen is an I2C device - just four wires +ve, -ve, SCL (Clock) & SDA (Data)

    Ok first change, my homing pin was using D18 (A4) - it was convinient, but D18 is the I2C SDA pin, so a move to D14 (A0)
    Final list is ..........................

    D4 - Output Big Easy Driver (DR) Direction
    D5 - Output Big Easy Driver (ST) Step
    D6 - Output Big Easy Driver (EN) Enable
    D7 - LED output
    D8 - LED output
    D14- Home Switch (A0)
    D15- Push button - (A1)
    D17- Push button Select (A2)
    D16- Push button + (A3)
    D18- SDA I2C for Oled Screen (A4)
    D19- SCL I2C for Oled Screen (A5)

    Now I would like to say it twas a doddle, but shear incompitance and ignorance prevailed

    Everything was programmed in and not producing complie errors - eventually :facepalm:

    But nowt appeared to happen.
    I could see the inputs on screen, but no matter how many times I pressed the buttons the state didn't change.

    The answer was only three lines lower, but I had added so many serial.Print statements to try and fault find the issue I couldn't see it.....:hammer:

    pinMode (pb1,INPUT);
    pinMode (pb2,INPUT);
    pinMode (pb3,INPUT);


    pinMode(home_switch, INPUT_PULLUP);

    I hadn't added the INPUT_PULLUP to the definition of the pushbuttons, just as an input. The effect is the pullup option puts 5V via a high resistor to the input, so it is held at 5V (or VCC which should be 5V or near as damit). The switch will ground it when pressed. I was getting spurious readings / values as the voltage fluctuated above 0.
    The downside is the logic is then reversed - when the switch is open (not pressed) then the inut is HIGH (1), when the switch is pressed - closed then the input is LOW or 0.

    So we know have

    pinMode (pb1,INPUT_PULLUP);
    pinMode (pb2,INPUT_PULLUP);
    pinMode (pb3,INPUT_PULLUP);



    pinMode(home_switch, INPUT_PULLUP);

    Next up what do with the results

    pb1State = digitalRead(pb1); // Reads the "current" state of the pb1 - Decrement counter
    pb3State = digitalRead(pb3); // Reads the "current" state of the pb3 - Increment counter
    pb2State = digitalRead(pb2); // Reads the "current" state of the pb2 Select

    if (pb1State == 0 && pb3State==1){
    counter=counter -1;
    if (counter < 1) counter =4;{}
    }
    if (pb3State == 0){counter=counter+1;
    if (counter > 4) counter =1;{}
    }

    oledDisplayCounterValue();
    if (pb2State==0){
    NewPosition = counter;
    Serial.print("Move to Position: ");
    Serial.println(NewPosition);
    oledDisplayMoveToText();

    Anything that starts with oled.........

    Are seperate routines (something else I've needed to learn :whatever:) for displaying values on the oled display

    The versions are still having effects on the program especially the enable/disable outputs,

    pinMode(StepperEnable,OUTPUT); //Set pin D6 for output
    digitalWrite(StepperEnable, HIGH); // Turn off stepper outputs until needed

    Everytime I try and use this from the original program, I get to use it once as either HIGH (disable) or LOW (enable), but then I cant change the value so the stepper out is either permanently off or on.
    There are newer commands

    stepper1.disableOutputs();

    but I can't get it to work either.

    However I now have a working traverser

    and the dongle looks like this


    Just need design and print a cover, oh and make another for the other traverser.

    Paul
     
    pjd, Andy_Sollis and Rob Pulham like this.
  5. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    To refine the ugly cable connection on the left, I have just ordered up these

    upload_2023-9-17_14-23-35.png

    6 x ethernet sockets, as I used an ethernet cable to create existing cable extension cable for the dongle it should do.
    I will need to bell out the connectons to make sure the wire hookups align, but hey I have a crimping tool so can make up a custom cable if required.

    Paul
     
    pjd, Andy_Sollis and Rob Pulham like this.
  6. Andy_Sollis

    Andy_Sollis Staff Member Moderator

    Messages:
    3,954
    Likes Received:
    3,743
    Joined:
    Aug 4, 2018
    It's all go.. ! great to see some progress again. Tom's gone very quiet, is he joining you ? (Bit far to volunteer some help sadly)
     
  7. Gary

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

    Messages:
    7,350
    Likes Received:
    3,899
    Joined:
    Dec 5, 2015
    Bugger all that electro-wizardry, I'd go for a manual traverser ! At least the only thing that could go wrong would depend on how much you drank the night before... :facepalm:

    Cheers, Gary.
     
  8. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    That's a common problem - often exacerbated by Toto's curry selection.

    The bit I like about the DCC control, is when there are only 2 of you operating, the fiddle yard(s) can be setup with 3 trains each, and one person can operate the layout on thier own.

    The MK2 traverser, just powered it up and worked first time - I'm as shocked as anyone.

    Paul
     
    Last edited: Sep 20, 2023
    Gary and York Paul like this.
  9. Gary

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

    Messages:
    7,350
    Likes Received:
    3,899
    Joined:
    Dec 5, 2015
    Yes, we all know about Toto's curry selection... I shared a room with him.... :avatar::avatar:

    Cheers, Gary.
     
    Andy_Sollis likes this.
  10. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    This old chestnut again

    Mods carried out to the controller


    But it needed some form of protection - another Fusion project I feel

    A rough mockup of the circuit board was created - i'm sure I could have found the actual components - but that would have been too sensible.

    upload_2024-1-4_0-9-8.png

    The base was created

    upload_2024-1-4_0-11-28.png

    And without the circuit board

    upload_2024-1-4_0-12-43.png

    And finally the lid

    upload_2024-1-4_0-14-3.png

    The buttons are separate items and sit within a square recess on the underside of the lid, to stop them rotating

    upload_2024-1-4_0-18-42.png

    upload_2024-1-4_0-17-20.png

    The button just rests on the push button

    upload_2024-1-4_0-16-31.png

    Just need to slice the models and do a test print

    Paul
     
  11. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    And sliced and ready to print

    upload_2024-1-4_9-27-49.png

    The round bit is a RJ45 (8P8C - ethernet) keystone faceplate which will be fitted to the baseboard side. Allowing the controller to be disconnected. For exhibition use I should make a second controller as a spare.

    Will have to warm up the printers and resin, so maybe later.

    Paul
     
  12. gormo

    gormo Staff Member Administrator

    Messages:
    6,036
    Likes Received:
    4,244
    Joined:
    Dec 5, 2015
    Good idea to make up a spare controller Paul...:thumbs:
    Remember Murphy`s Law :scratchchin:
    :tophat:Gormo
     
    Andy_Sollis and paul_l like this.
  13. Andy_Sollis

    Andy_Sollis Staff Member Moderator

    Messages:
    3,954
    Likes Received:
    3,743
    Joined:
    Aug 4, 2018
    :scratchchin: Interesting… keep us posted!
     
  14. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    3 hours print time - so fourish, hopefully Amazon will have delivered the RJ45 keystones by then so assembly and testing can take place.

    And I can create some space - a 4ft 6in x 2ft lump on the workbench don't 'alf cramp cramp your style

    Paul
     
    Rob Pulham and Andy_Sollis like this.
  15. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Estimated print time of 2h 30m, actual time 3h 7m


    Couple of issues - support failiures on the corner of the ethernet port and bottom right hand corner also on the top plate.

    Cured and cleaned up. A taper reamer opented up the push button holes, and the rough edge of the pcb cleaned up. Now a snug fit


    Assembled


    The screw threads were modeled in fusion and printed without issue - worked without having to run a M3 tap through.


    Cable even fits


    Just need to get the drill out to recess the mounting plate for the RJ45 keystone connector, in the side of the traverser.


    Due to the layout of the traverser support table I will need to trim the top 5mm off the mounting plate.

    You will see later .......

    Paul
     
  16. Jim Freight

    Jim Freight Full Member

    Messages:
    1,137
    Likes Received:
    930
    Joined:
    Sep 9, 2019
    Impressive functional detail, mind you, judging by the details you lads put into your 7mm models with resin printing the threads were well within the capabilitites of your printer.
    Presumably with resin printing you don't suffer the curse of shrinkage that much :scratchchin:

    Jim :)
     
    Andy_Sollis likes this.
  17. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    Hi Jim

    We get expansion and shrinkage on the same print :headbanger:

    Holes tend to print undersize 0.6mm is probably the smallest vertical through hole I'd try and print, if you are slightly over-exposing the resin, then the hole will tend to fill up.
    Horizontal holes can be printed smaller.

    It's all about balancing the exposure - which is effected by temp, the resin likes to be between 25 & 30 C, below 20 and the viscosity really starts to change. Some of the newer high speed resins are very runny, so may be better suited to printing in colder climes.

    Over exposing the print blooms beyond the edge so grows in size.
    Under exposing the print gives more acurate prints but they're more likely to delaminate or just fall off.
    Now we are talking 10ths of a second difference, throw in varying temps then most of us lean towards a little over exposure.

    On the plus side, if making masters for casting, and you know the shrinkage values for the mould making and casting processes you can scale the print accordingly, far easier than having to sculpt a new master.

    Regarding the threads created in fusion - be careful there are two variations

    upload_2024-1-5_14-44-48.png

    You need the Modeled selected otherwise its a non-printable texture.
    As I was tapping into a blind hole I also selected Full length.

    Paul
     
  18. Jim Freight

    Jim Freight Full Member

    Messages:
    1,137
    Likes Received:
    930
    Joined:
    Sep 9, 2019
    Hi Paul, eek, sounds like joining parts with screws is worse for resin prints than for filament prints.

    Resin model parts I have bought always strike me as being rather brittle.

    So although I can tap PLA or ABS for very light duties, I can (and prefer) to use self tapping screws (with a prepared hole or just straight in) or if absolutely necessary use threaded brass inserts without the fear of splitting occuring.

    Jim :)
     
    Andy_Sollis likes this.
  19. paul_l

    paul_l Staff Member Administrator

    Messages:
    9,866
    Likes Received:
    5,929
    Joined:
    Dec 5, 2015
    I normally would print a hex hole 0.2mm oversize and glue a 6BA/8BA or M3/M4 nut in place
    But recently bought some of the brass inserts, unlike with ABS or PLA I can't heat them and push in, I'll be using super glue or epoxy to glue them in.

    Paul
     

Share This Page