N Scale 3D Printed Turntable with a Controller...

Sumner Mar 8, 2021

  1. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    This is the start of my turntable build that will hopefully work with the roundhouse ( HERE ) but could also be used with a different roundhouse or by itself. It is a 3D print. As I write this I have the bridge done and the hand controller also finished (at least all but the bottom of it). The turntable will be operated by a stepper motor, stepper motor controller, two Arduino Unos (or clones) and a handheld controller.

    This is my first attempt at using any of these. I did program some in the early 80's so getting back into that. Of course the code used then isn't what is used with the Arduino. The internet is a huge help and I've found a lot of the basic code I need and have been merging it together and adding my own. I'll go into the controller on a following page but have it almost all working. Still need to add the code that will index it back to the 'In Track' at any time. The rest of the indexing will be done manually using the hand controller. The stepper motor allows really slow rotation when needed and I think I'm going to enjoy aligning the table tracks with the roundhouse tracks more so than if all of that was automatic indexing.

    On this page I'll start with pictures of the bridge. As I write this I'm working on the decking that will go on top of the bridge and will consist of the walkways, track and a small control shack along with railings and overhead lighting. Post if you see this on a forum or email if you have questions (contact20 (at) purplesagetradingpost (dot) com if you have questions and I'll try and answer them I'll post the build files on my thingiverse.com account when I have them all finished (will be a while).

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    I first saw the printed circuit strips shown above and following pictures on Jens decoder install of an ESU LokSound micro v5 in his Kato GS-4 on nscale.net ( HERE ) and lots of good ideas in that install besides the strips.

    I could see a lot of potential for using the strips in decoder installs but also in other applications. I looked for them on eBay and some of the China sites but couldn't find ones that were exactly the same. He is in Denmark and ordered them from Germany but they don't export them to the U.S.. He was so kind and ordered some and mailed them over to me. Hopefully a more local source becomes available.

    [​IMG]

    [​IMG]

    I'll try and report back when this experiment is finished. LighthouseLEDs sells the small bridge rectifiers and says they work well for converting DCC current into DC current for things like LED's. They are cheap there and their freight is very reasonable and I got them very quickly so can recommend them. I hope to hide them and the associated resistors down inside the turntable bridge and run magnet wire up to LED'S above the turntable for nighttime illumination, although they will be on any time the track is powered on the turntable. I only ordered a 4 wire slip ring electrical connector (a mistake) so can't power them from below.

    At the moment I'm using two of the four wires for track power that will be turned off and reversed via the hand controller. The other two wires will go to a LED in the control shack on the table and to one or two pulsing LED's that will pulse light when the table is rotating as warning lights. The one in the control shack will go off during that (don't want to night blind the operator there). With some code work with the Arduino's I was able to control both sets of lights with just two wires but also the reason only one can be on at a time. Also the reason for the two Arduino's is they need to be doing two different jobs at the same time and I'm not good enough to figure out how to do that with one Arduino. They are cheap so I took the easy way out and have the two talking to each other to both rotate the table and control the lights at the same time. More on all that on a subsequent page.

    [​IMG]

    [​IMG]

    Above and ( HERE ) is a YouTube of the turntable operating via the Arduino's. I now have it operating the the handheld control and will get that up soon.

    When I have all the print files done I'll post them on my thingiverse.com account ( HERE ).

    More on my site here and I'll have a number of additional pages there on the rest of the turntable and how it is controlled with the parts and Arduino sketches....

    http://1fatgmc.com/RailRoad/Turntable/Turntable-Index.html

    Sumner
     
    Kurt Moose, ajkochev, sd90ns and 6 others like this.
  2. SLSF Freak

    SLSF Freak Staff Member TrainBoard Supporter

    1,519
    1,467
    52
    Cool, I've been waiting for this thread! (y) I've been thinking forever of doing a 3D printed turntable but I have too many plates spinning right now so I shall live vicariously through you, sir. Looking forward to the progress...

    Cheers -Mike
     
  3. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    I think I'm done with all the code for the two Arduinos. The turntable uses two Arduino's, a stepper motor, a stepper motor driver, hall effect module, pair of 2 relay modules (for track polarity) and a 3D printed hand controller.

    The hand controller controls rotation direction by a pushbutton on each side for clockwise and counter-clockwise rotation that starts and stops with the push button. A pot to control rotation speed. There is also a small toggle that changes the polarity of the turntable track when needed. Another button that turns the light in the control 'Shack' on the table on/off. A finally button that any time it is pushed the table automatically indexes back to the 'In Track' to the table. All other indexing is manual.

    Here is a video testing the 'auto indexing' feature...



    Time to get back to finishing the design and print files for the turntable and the pit,

    Sumner
     
    Chris Hall and BNSF FAN like this.
  4. sd90ns

    sd90ns TrainBoard Member

    946
    995
    35
    How about trying your hand at an N-Scale printed Transfer Table?

    The only one I know of is the Brawa offering and it is iffy in its operation.

    On the bright side, it sounds like bricks-in-a-blender when running, so there's that.
     
    Sumner likes this.
  5. ajkochev

    ajkochev TrainBoard Member

    193
    486
    20
    Love this! Been hoping you'd make one and it looks awesome. I'm hoping you will consider doing a 5 inch version as well for a smaller branchline layout.
     
  6. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    We will see. Let me try and get this one done. Probably not too hard to scale down the bridge and maybe the deck on top of it but probably a fair amount of time to re-do the pit and pit circular track and pit floor. You could probably do that. I hope to have all that 3D print in sections but one could probably just scratch build it pretty quickly.

    Once I have this working I need to move on and actually start the layout and get some track down since it is warming in the shop ;),

    Sumner
     
  7. Keith Ledbetter

    Keith Ledbetter TrainBoard Member

    279
    195
    12
    @Sumner you are doing some awesome work! I will definitely hit you up for the code etc in a couple months. You also inspired me to get a 3d printer so my ender 3 is now up and running printing away. So many things I want to make ;)
     
  8. cpr_fan

    cpr_fan TrainBoard Member

    41
    30
    17
    DM me an email address if you would like a copy of the code I use for the Kato turntable. You would be able to reuse a lot of it.
     
  9. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    This is the deck for the turntable and consists of 4 parts. The inner 2 hold the track and have locator tabs on their bottoms. You will glue two of these together. Then there are 2 outer decks. One has a single platform on it for a ladder that will go down into the pit on the same this side of the table. It attaches to one side of the previously glued together pieces. There is also a deck that glues onto the other side. It also has a ladder platform but also has a platform for a small control building that I call the 'Shack'.

    These four pieces can be glued together after being printed. I would not glue these to the bridge at this point. Wait until they have at least been prepared for paint or have been painted. Also you will probably need to make holes or channels for any wiring to the 'Shack' or to overhead wiring if you are going to have any. I plan on a light in the 'Shack' and also for an overhead flashing light that will come on when the table is turning. Both controlled by …..

    [​IMG]

    …. the hand controller. There will also be overhead lighting that comes on any time there is track power to the table.I feel the pictures below are pretty self-explanatory, it not get a hold of me.

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    [​IMG]

    When I have all the print files done I'll post them on my thingiverse.com account ( HERE ).

    More pictures on my site here ....

    http://1fatgmc.com/RailRoad/Turntable/page-2.html

    Sumner
     
  10. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    Finished the 'Shack' for the turntable today....

    [​IMG]

    Hopefully there will be an LED inside of it. I left room and a hole in the bottom for the wiring.

    [​IMG]

    I threw this last picture in of the 'Shack' on the table to show that a filament printer can produce some pretty amazing detail. Note that the building in the picture if you are viewing this on a computer monitor is quite a bit larger than viewing the real thing from 12 inches or so. I just bought an AnyCubic Photon Mono and look forward to seeing how it prints the building. I'm sure it should be better but the downside is that it isn't large enough to print the turntable itself. If I wanted a resin printer that could print the table I'd be up in the $800-$900 range.

    The Ender 3 Pro is under $250 and will remain my go-to printer. Since I designed these parts the first prints weren't the final ones. I've printed the bridge a couple times and the table parts 2-4 times each and this building twice and the roof 4 times and still might change some of the items. I could do all of this with the printer a couple feet from the computer in the living area of the house with no smell and no cleanup after each print. I'd keep that in mind if you are considering buying a printer and want to get into design work. If you will only be downloading finished objects from the internet and won't be going through the design process and what you want fits the build area of a smaller resin printer then that might be the type of printer that will work for you.

    A few more pictures of the 'Shack' here....

    http://1fatgmc.com/RailRoad/Turntable/page-2.html

    Sumner
     
  11. Chris Hall

    Chris Hall TrainBoard Member

    188
    410
    11
    Looking really good! nothing beats a project that has multiple design and build components using lots of different techniques and skills.

    I'm the other way around, I have a resin printer but will be adding a Ender 3 pro to my collection soon. the bigger build area is a must if you are looking to print your own buildings and structures, and the resin is great for high detail, small objects.
     
    Sumner likes this.
  12. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    Chris I bet you will love the Ender in addition to the resin printer. A good example of there is no one tool that is best for all jobs. I've had the same problem with welders and machine tools. Eventually got an assortment of both :)

    [​IMG]

    You can decide if you want to use a center deck between the rails or not.

    [​IMG]

    Sumner
     
    Last edited: Mar 23, 2021
  13. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    On this page I'll outline how I'm controlling the turntable. You could use whatever method suits you. The following is fairly complex but very doable for anyone who has done much in the way of working with Arduino's and basic wiring. I wrote two sketches to work with two Arduino Nano's. This was my first experience programming/coding in about 40 years and that was in basic and also my first try at putting an Arduino to work. I pulled parts of other people's sketches/programs and tied them together with some of my own code. I tested with Uno's but went to the Nano's for their reduced size and cost and also like the terminal adapters that they plugged into for their convenience in running the wiring.

    The Arduino's are controlled by .....

    [​IMG]

    …. the hand controller. There will also be overhead lighting that comes on any time there is track power to the table.

    The two Arduino's that are used are connected and interact to some degree. The one on the right below controls the table's rotational direction, speed and can index the table to the 'In' track. To move the table to all the other tracks you manually index the table but it allows for very low rotational speeds since a stepper motor is used for the rotation of the table.

    NOTE: Be aware that the two Arduino's are orientated differently on the board to help with the way the wiring runs. Their vertical orientation is reversed.

    The Arduino on the left below controls a light in the control 'Shack' on the table and also turns on a flashing warning light when the table is in motion (the 'Shack' light goes off when the warning light is flashing.

    [​IMG]

    Between the two Arduino's is a prototype PCB which I'll talk about next. On the left side of the board are 2 two channel relays. You can reverse the polarity of the track on the table using the hand controller which activates the relays using one of the Arduino's. One might be able to use only one but I went with two to make sure there was no shorting when the polarity is changed and they cost less than $4.00 each. These can run off the power from the Arduino but for a few dollars I used an inexpensive Buck Converter to power them with 5 volts.

    Below the Buck Converter that produces 5 volts is another Buck Converter that I spent a couple dollars more on that has a display on it showing the output voltage. For power I'm using a 14.5 volt brick power supply I had. The Stepper Motor Driver on the bottom right works on 9-42 volts so the brick power supply powers it and also the Buck Converter with the display. That Buck Converter steps the 14.5 volts down to 9 volts to power the two Arduino's and also the Buck Converter that steps the voltage down to 5 volts for the relays.

    On the bottom right is the Stepper Motor Driver that drives the stepper motor and can step the table into 6400 individual steps per revolution. I had never used a stepper motor or driver but there isn't too much to it. You'll see that the wiring is pretty simple and the sketch running in the one Arduino does all of the controlling of the motor.

    [​IMG]

    I used a little prototype board to mount the few components that are needed. There are two blocking diodes and two resistors on the lower left side that are needed for the LED's on the table for the 'Shack' lighting and the flashing warning light that activates when the table is in motion. The remainder of the resistors or pull-down resistors for various control circuits activated via the hand controller. The cable is a nine connector cable that I bought off Amazon ( HERE ). If the link doesn't work google Jameco Valuepro SC9-25 Multi-Conductor Cable.

    I used a 4 foot piece between the controller and the board and another shorter piece that I pull the wires from to keep the colors the same from the resistors to the Arduino's. It was cheap enough that I got some extra for future projects.

    [​IMG]

    Above you can see the power wires and how they were run from component to component and also to terminal/solder pads. I designed the terminal/solder pads and printed them with the Ender 3 Pro. I'll get the files up on my thingiverse.com account at some point. I'm really happy with how they worked and also how the different wire clamps I designed and printed worked. I'll get those files up also at some point also.

    Below a ways you'll find wiring diagram but on it I didn't include the 'power in' and the buck converter wiring and other power wiring so use the above for that if you go this route. All of the components are pretty cheap on Amazon or eBay. You can find the stepper motor driver ( Usongshine Stepper Motor Driver TB6600 ) for about $12.00. Nano's are under $5 each. Same for the relays and buck converters.

    [​IMG]

    Above all of the wiring is finished. It looks complicated but only took a few hours. Start with all the power wires and then move to one Arduino at a time and work your way through it wire by wire.

    DCC track voltage enters at the bottom left but I assume this would also work for straight DC?? Power out to the track on the table is at the upper left. Next to the track voltage output is the terminal connector where you connect the wires that go to the 'Shack' light and the flashing warning light. Note that you only need these two wires that run to the table for the two lights. When the power flows one direction through the two wires one light is activated and when the polarity is reversed the other light comes on if activated by the hand controller.

    The 'power in' comes in at the bottom right from the 14.5 volt power supply brick I had. You could use about any voltage from 10-12 volts up to whatever the first buck converters will handle. My power supply is 3 amps but I have the stepper motor driver set for 1 amp (1.2 amp peak) so I believe that a 2 amp power supply would be adequate.

    Above the stepper motor driver is a terminal pad for the three wires that go to the Hall Effect Sensor that is used if you want to have the auto indexing to the 'In Track'.

    The cable from the hand controller comes in by the cable at the upper right and wires to the prototype circuit board.

    [​IMG]


    Above one can see how the power wires and the Arduino control wires connect. Also connecting on the side of the stepper motor driver is the cable going from the driver to the stepper motor that rotates the table. This wiring is also pretty straight forward.

    [​IMG]

    Above you can see the terminal/solder pads. I designed the terminal/solder pads and printed them with the Ender 3 Pro. I'll get the files up on my thingiverse.com account at some point. I'm really happy with how they worked and also how the different wire clamps I designed and printed worked. I'll get those files up also at some point also.

    [​IMG]

    Above is the wiring for the hand controller. The red wire is 5 volt positive that needs to run to all of the push button switches and the toggle switches and pot. You can daisy chain it any way that work for you. I'll also have the print files up to print the hand control enclosure. One could also make one out of something else.

    [​IMG]

    Above is a view of the hand controller wiring. Sorry, I didn't use a common red color for the 5v+ that runs to all the switches and the Pot. I use scraps I had left over. The 5v+ comes in as the red wire that goes to the middle contacts of the toggle just to the right of the yellow push button switch. From there it daisy chains to all the other switches and the Pot. The gray 5v- comes in and goes to the bottom contact on the Pot. The brown connects to the center post of the Pot and is the only analog input from the controller to the one Arduino.

    [​IMG]

    Above is the basic wiring diagram. I tried to stay as close to the wire colors that are shown above as I could. Most of the hand control wires go to pull-down resistors. I used the same wire coloring from the resistors to the Arduino's by pulling the same wires from a short section of the cable.



    Above and ( HERE ) is a YouTube of the turntable operating via the Arduino's as a test before constructing the hand controller enclosure.



    The video above or ( HERE ) illustrates how the auto-indexing to the 'In track' works.

    When I have all the print files done for the turntable and other parts I'll post them on my thingiverse.com account ( HERE ).

    You can find the above info and the rest of the turntable build here...

    http://1fatgmc.com/RailRoad/Turntable/Turntable-Index.html

    Sumner
     
    Last edited: Apr 11, 2021
    newt749 and Chris Hall like this.
  14. Chris Hall

    Chris Hall TrainBoard Member

    188
    410
    11
    That is awesome, I love it! If I had the room on my layout I would build one myself.

    Those terminal solder pads are a great idea, wish I had thought of something like that when I started.
     
  15. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    Getting closer...

    [​IMG]

    [​IMG]

    [​IMG]

    Still have the main pit wall to go but think it is about ready to print. Then it is detail for the bridge deck like handrails and an overhead lighting structure. Lots of painting but I can see the light at the end of the tunnel.

    I'll soon get more pictures up of the main base that is under the pit bottom shown above. The slip ring with the wiring attaches to it along with tabs to hold the main pit wall and the platform for the stepper motor. The pit bottom shown above will get more detailed scenery.

    http://1fatgmc.com/RailRoad/Turntable/Turntable-Index.html

    Sumner
     
    gmorider, newt749 and SLSF Freak like this.
  16. Bruceg503

    Bruceg503 TrainBoard Member

    66
    31
    6
    can you put a piece of metal (like the metal in old wood rulers) on the pit rail for power to the bridge track?
     
  17. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    That might be an option but in my case the pit rail is printed so non-conductive and in N scale I wouldn't be able to add anything to it very easily. I did consider taking flex track and cutting it down the middle and bending it and use it. I did that to a short piece but wasn't happy with the results but that could be an option for someone.

    Also the wheels on the bridge in my case don't turn and I run the bridge slightly off the pit rail so they and the rail are just for looks. The slip ring I'm using is the best option in my view. I just wired the table and I'm getting ready to try it with the control panel and handheld control. So very close to finishing this. I have some other obligations for the rest of the week but hope to finish this up next week.

    Sumner
     
  18. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    I'm finally about done with the N scale 3D printed turntable that will be used with the 3D printed roundhouse at some point. Here is a video I put together of the main features....



    I still need to make and print handrails for the deck and the platform at the top of the arch above the loco. Also need the electrical connector at the top of the arch where power comes in to the table on a real turntable along with ladders from the bridge down into the pit. There is also a piece of decking that goes between the rails that is done and not shown. I'll add it at the end as it covers the wires to the track and who knows I might need to access them before I install the turntable. I probably won't do any of the other small detail parts until it is time to install the table since they might be easy to break.

    At some point I'll get these up on my thingiverse.com account here...

    https://www.thingiverse.com/sumner/designs

    I'll also be adding pages to the build for the turntable when I find the time showing how the turntable goes together....

    http://1fatgmc.com/RailRoad/Turntable/Turntable-Index.html

    Sumner
     
    Last edited: May 6, 2021
    AlbertK, Chris Hall, gmorider and 2 others like this.
  19. SLSF Freak

    SLSF Freak Staff Member TrainBoard Supporter

    1,519
    1,467
    52
    There are so many things I love about this project, probably some things that may go unnoticed but beyond the turntable design, all the parts you designed and printed like the wire clips, board mounts, and the thought that went into the electronics, the handheld controller, and then the design considerations for how the turntable parts go together. Just a super cool project all around! Inspiring work, Sumner!

    -Mike
     
  20. Sumner

    Sumner TrainBoard Member

    2,841
    5,995
    63
    SLSF Freak likes this.

Share This Page