Toto's Traversers

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

  1. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    Thanks Colin - just downloaded the file, as a temporary measure I may have to follow your lead and use a Mega for the extra inputs.

    When you start on the next version, try the Accelstepper library - this gives a few neat tricks - acceleration / deceleration (automatically worked out for you), and a moveto command, allows you have a current position, and move to the final position, the library will do all the calculations of distance, direction and acceleration / deceleration.

    Thanks again for the sketch

    Paul
     
  2. Colin_W

    Colin_W Full Member

    Messages:
    165
    Likes Received:
    37
    Joined:
    Nov 19, 2016
    Hi Paul I was using the Accelstepper initially but after my old laptop was stolen for some reason I couldn't get the circuit to run, so I rewrote the program. On reflection I suspect I may have had the 'enable' or the 'sleep mode' pulled high. The homing section worked fine but the main drive wouldn't. :( I will get back to it though.
    Here's a pic of the basic circuit.
    Col
    Traverser circuit.JPG
     
  3. Colin_W

    Colin_W Full Member

    Messages:
    165
    Likes Received:
    37
    Joined:
    Nov 19, 2016
    A couple more pictures of the Arduino and the Toti's in situ and the panel. The + and -5volt supply is to the right of the Toti board. Arduino.jpg
    IMG_20181031_131047098.jpg IMG_20181031_131102293.jpg
     
    paul_l and Rob Pulham like this.
  4. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    mmmmmmmm ..... lots of food for thought
     
  5. ianvolvo46

    ianvolvo46 Staff Member Moderator

    Messages:
    4,381
    Likes Received:
    764
    Joined:
    Dec 8, 2015
    Personally I suspect its a defective Newts eyelid or possibly a stray hair of Bat fouling things up .. or it could need a spell check

    Ian vt :scratchchin:
     
  6. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    So after a meeting of the platform1mrc scottish brains trust on Saturday at Elgin (Colin W, RedPiperBob and myself), we didn't fix the issue :facepalm:, but believe it to be the result of different versions of the DCC Library, Accel Library and Arduino software (that's what I get for borrowing the bosses laptop).

    The traverser was converted back to manual control, and functioned well all weekend.

    The result is that I will now make the ability to go manual a "feature".

    The 600mm lead screw needs shortening and supporting at the baseboard edge.

    For the support I created a bracket to hold a 22x8x7 bearing

    upload_2018-11-7_17-5-36.png

    upload_2018-11-7_17-6-57.png

    And printed with the bearing fitted


    I now need to mark the shaft for size, strip it out and cut to length, then reinstall the shaft and bracket.

    Paul
     
    jakesdad13, Colin_W and Ron like this.
  7. Colin_W

    Colin_W Full Member

    Messages:
    165
    Likes Received:
    37
    Joined:
    Nov 19, 2016
    That looks pretty, meanwhile back in the slave shed I finally have the homing button running from any point without having to do a reset. So now I've moved on to running it with an 'auto' function. It WILL (eventually :thumbup:) detect an incoming train and select a clear track to berth it without pushing the button....maybe :lol:
     
  8. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    may the force be with padawan ..... but best to keep the force to only 5V for the Arduino
     
  9. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    A little further progress

    The shaft was refitted into the motor and the length marked up with insulation tape


    And cut to length with a dremel, thought at first I was making great progress only to find the carbide disk was wearing out at about the same pace I was cutting through.

    Then fitted into place.


    Now just need to open the outer hole to accommodate the handle when required - but that's for another time


    Paul
     
    jakesdad13 likes this.
  10. redpiperbob

    redpiperbob Full Member

    Messages:
    295
    Likes Received:
    211
    Joined:
    Aug 19, 2016
    Hi Paul
    Sorry to here you did not resolve the traverser problem.
    As you know I am working on a rivetter and the code I use is similar to yours .
    If you want an copy I can email it to you.
    I am also working on the DCC problem.
    My code uses the serial.available function to read the input (number of rivits and distance between)
    but it would be easy to change to number of steps to next stop.
    Not had much time since Elgin but I hope to get back on to it next week.
    Be seeing you
    Bob
     
  11. Brian A

    Brian A Full Member

    Messages:
    44
    Likes Received:
    55
    Joined:
    Jun 12, 2019
    Hi Paul,

    Great work on the traverser. I am in the process of building a traverser for my O gauge layout. I have put the traverser on drawer runners and aiming to run dual NEMA 17 with lead screws each end. I just ordered stepper motors and related hardware and a Nano DCC Turntable shield to drive it all.

    This is my thread:

    https://platform1mrc.com/p1mrc/index.php?threads/anderson-barracks-o-gauge-1944-uk.4272/#post-69981

    I am new to Arduino but have plenty of coding experience, but a bit rusty.

    Cheers

    Brian
     
  12. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    Good luck, it fun - I think :avatar:.

    It's been a while since I last played on the traversers, but the fully supported rails are the way ahead.
    With redundancy / early retirement looming ever closer, I may get time to complete the Mk4, and either rebuild the Mk2 to use supported rails, or build Mk5 to be long enough to take a Class 24/25/26/27 plus 2 Mk1 coaches and maybe a box van. I have plenty of time as Toto hasn't got the loco kits to market yet :whatever:.

    I will also be testing the TB6600 Stepper drives I purchased last December, and maybe move over to the Arduino Mega as the control device, as Toto would rather have local control of the traverser, then a few mins later comments on how great it is being able to remote control the m from any where on the layout, the Mega's additional ports will allow me to have LCD screens local and DCC control (I hope - it's been that long since I fudged the program, that I can't quite remember what / why I did certain things :facepalm:)

    Paul
     
  13. Brian A

    Brian A Full Member

    Messages:
    44
    Likes Received:
    55
    Joined:
    Jun 12, 2019
    That TB6600 looks the business. I think I will need a second stepper driver to drive my second motor.

    One question why did you put the 6mm ply between the tracks on the traverser?

    I have conditioned myself and have been training others in another club that visits regularly to use DCC for points. I have about 80 points on the OO layout and not a control panel in site. We use WiThrottle/Engine Driver to do all the point changes, or when using Train Controller it does the points for us.

    Cheers

    Brian
     
  14. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    Ah ..... my table saw can cut plywood straighter than I can lay track, so at the outer edges I have used strips 12.5mm (ish) wide, then 25mm strips between the tracks.
    This gives straight tracks with a consistant distance between tracks, so if multiple entry / exit roads are required, they should align up.

    Simples (well it has to be for me to grasp it).

    Paul
     
    steve likes this.
  15. Brian A

    Brian A Full Member

    Messages:
    44
    Likes Received:
    55
    Joined:
    Jun 12, 2019
    Paul,

    Love your work. It’s great to see traversers that are DCC and automated and WORK!!

    Given me lots to think about.

    I am up to track laying so will pinch you idea to help me lay the tracks.

    Thanks

    Brian
     
    steve likes this.
  16. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    Glad to of help, a constant pitch between tracks helps when you start to program the moves between tracks.
    When you determine the difference between the tracks in either steps or parts of (micro-stepping), and have these as a reference from the zero position, then if you change the entry position to the traverser from the layout, then all you need to do is establish the distance from the entry road to the zero position, the rest is then simple maths (and a lot of trial and error :avatar:).

    From the MK3 traverser, this may become more apparent, the entry road is moveable / replaceable, and my thoughts are to make the traverser table interchangeable, to allow me to swap the table and entry road for maybe an OO version, all that would be required is to keep the appropriate values in a lookup table, selecting the correct one depending on the layout / traverser table connected, possibly using DIP switches to select the correct one. This is one of the reasons I'm looking towards trying a Mega, for the additional inputs and EEROM/RAM capacities.

    Regarding micro-stepping, I have tended to avoid it, my reasoning is, I don't tend to have traverser permanently in motion, so once the move has completed I disable the drive. As I use whole steps, the stepper motor stops at a full step, and is less likely to move when the drive is enable again. That plus, a 200 step/rev (1.8 degree per step) nema 17 combined with a 8mm pitch lead screw will move 0.04mm per step (8mm/200 = 0.04 mm per step) or a 400 step/rev (0.9 degree per step) would move 0.02mm per step, I think for rail approx 2mm wide I think 50 steps (200 step per rev) or 100 steps (400 steps per rev) is pretty fine amounts of adjustment.

    Paul
     
  17. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    Going back to Toto's request for local control as well as remote (via DCC), I have been doing a little research, and decided to use a LCD touch panel as the local control. This however will use up most of the Uno\Nano's I/O pins, so I have decided to move up to an Arduino Mega. This will give consdiderably more I/O pins, additional com ports and larger memory for the program.

    I have ordered up some 2.4" LCD touch screens via ebay - eta mid september, as well as a couple of Mega clones due at roughly the same time. Giving me a little time to start and look at the ports on the mega and plan them out.

    I will keep you posted.

    Paul
     
    Andy_Sollis likes this.
  18. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    Just to elaborate a little further on the differences

    Arduino Mega uses an ATmega2560 microcontroller which has:

    256K Bytes of In-System Self-Programmable Flash.
    8K Bytes RAM.
    4K Byte Internal SRAM.

    Arduino Mega board has:

    54 digital I/O pins, of which 14(D0 to D13) can be used as PWM outputs.
    16 analog input pins, which can also be used as digital I/O pins, adding to the existing 54 digital I/O pins.
    4 serial communication lines(pins D0, D1, and from D14 to D19).


    Arduino Uno uses an ATmega328p microcontroller which has:

    Flash Program Memory: 32 kbytes.
    EEPROM Data Memory: 1 kbytes.
    SRAM Data Memory: 2 kbytes.

    The Arduino Uno board has:

    14 digital I/O pins, of which 6 (D3, D5, D6, D9, D10, and D11) can be used as PWM outputs.
    6 analog inputs, which can also be used as digital I/O pins, adding to the existing 14 digital I/O pins.
    Only one serial communication line (D0, D1).

    That's the differences, however shields designed for the UNO will fit and can be used on the Mega.
    To use a sketch created for the Uno, all you need to do is select the correct board in the Tools menu, then validate the code before uploading the sketch to the Mega.

    I will need to check all the connections required for the Touch screen and the stepper motor driver to ensure the correct type of ports are available, this may need a bit of lateral thinking, as I have a feeling they could be trying fight over the same ports :facepalm:. These things are sent to test us :scratchchin:

    Paul
     
    Andy_Sollis likes this.
  19. Chatty

    Chatty Full Member

    Messages:
    105
    Likes Received:
    50
    Joined:
    Mar 23, 2018

    Good Morning Paul

    I haven't seen you mention this site https://dronebotworkshop.com/ so I am not sure whether you are aware of it.

    It does have a segment on using Arduino and a touch screen.

    Rather than building a layout I have spent my time (too much) on this site and building Arduino projects and am just about to commence building a robot.

    Too many toys, too many toys.....

    Kind regards

    Geoff
     
    Andy_Sollis likes this.
  20. paul_l

    paul_l Staff Member Administrator

    Messages:
    6,579
    Likes Received:
    1,746
    Joined:
    Dec 5, 2015
    Thanks Geoff, looks like I've got homework :thumbs:

    Paul
     

Share This Page