Jump to content
 

DCC Controlled (PECO) Turntable Project using a Arduino Uno


Recommended Posts

Hi Bryan.

Good luck with the build. Plenty of help on here if you run into a problem. Keep us updated as you progress.

Ray.

Thanks Ray, the bits have all arrived: -

post-3433-0-85656200-1432147269_thumb.jpg

This is the prospective recipient of the drive, although it doesn't look very different I have chopped over 40mm off the length of the deck: -

post-3433-0-60056400-1432147270_thumb.jpg

  • Like 3
Link to post
Share on other sites

Hi to everybody, I was recently pointed to this forum by another member. I have been playing around with the Arduino & stepper motors for a while now, and recently purchased a Walthers 90' TT, non motorized, with the intention of DCC control via Arduino & stepper motor; so this thread has been very, very helpful. I am using the large gear supplied with the TT, as I am using a miniature 12 wire slip ring to supply power/control to the bridge. The main reason I am posting, is that I have a Digitrax system, and would like to use that as the connection to the "DCC - Arduino Turntable Interface" diagram from post #8. I would be very grateful if someone could tell/show me what needs to be changed to allow connection to the Loconet bus.

 

Thanks in advance,

Barry from Goolwa

South Australia

Link to post
Share on other sites

Hi to everybody, I was recently pointed to this forum by another member. I have been playing around with the Arduino & stepper motors for a while now, and recently purchased a Walthers 90' TT, non motorized, with the intention of DCC control via Arduino & stepper motor; so this thread has been very, very helpful. I am using the large gear supplied with the TT, as I am using a miniature 12 wire slip ring to supply power/control to the bridge. The main reason I am posting, is that I have a Digitrax system, and would like to use that as the connection to the "DCC - Arduino Turntable Interface" diagram from post #8. I would be very grateful if someone could tell/show me what needs to be changed to allow connection to the Loconet bus.

 

Thanks in advance,

Barry from Goolwa

South Australia

If you don't want to do peer to peer over the loconet then you can use the railsync lines as the DCC input to the opto-coupler in post 8, no changes needed.

If you want to do some reporting or status over the loconet then you would need to feed the data lines into the opto-coupler and will also need to add a bit of circuitry to send loconet messages, fairly simple just a resistor, fast transistor and a pin on the arduino.

 

See the bits connected to pin 2 of schematic in http://www.locobuffer.com/LocoIO/LocoIO.pdfas example of Tx from the cpu.

Link to post
Share on other sites

  • 2 months later...

Hi, just a quick question. Is the Adafruit Digital I/O 2 pin enabled?, as I could not see it mentioned in the sketch in Post #17, only the I/O 3 pin.

 

 

Barry

Not used in the non-DCC test sketch in post 17 as it is the DCC RX pin.

It is defined in post 48 during setup() via the decoder setup call;

      DCC.SetupDecoder( 0x00, 0x00, kDCC_INTERRUPT );

kDCC_INTERRUPT is defined as pin 2 in the DCC library.

Link to post
Share on other sites

OK, thanks for that. I was having problems with the sketch for one DCC address, but the multiple DCC address's sketch has worked. Not sure why the single address sketch did not work, will print out both files and compare.

 

Thanks again, Barry

Link to post
Share on other sites

Hi Ray,

Wonder if you could help me solve a problem with my code for the "DCC Test". When I try to Verify the test routine I get the following error:

I have the DCC Test sketch in C\stew\My Documents\Arduino.

and AccelStepper, Adafruit_Motor_shield_V2_Library_master and dcc_decoder_v4 in 

C\Stew\My Documents\Arduino\Libraries.

It works fine up to adding the DCC Test, The stepper motor runs the Turntable Test Fine, but this has got me beat. I'm not much good at coding so forgive my ignorance. I hope you or one of your commrades can help me.

Thankyou in advance.

post-26646-0-49958400-1438611006.jpg

Link to post
Share on other sites

Hi StewMac,

 

I had this problem a few months ago after installing the latest Arduino IDE. Basically the 'DCC_Decoder.h' library is using some syntax which has now been deprecated, so it no longer parses correctly for compilation. The community needs to have the 'DCC_Decoder.h' modified so that it uses the newer syntax for defining this constant.

 

You can get round this by installing an older version of the Arduino IDE, version 1.0.6 works for me, go to the Arduino web page, downloads and look for older versions. Hope you get it sorted.

 

Cheers, Mark.

Edited by Vonzack
Link to post
Share on other sites

Hi StewMac,

 

I had this problem a few months ago after installing the latest Arduino IDE. Basically the 'DCC_Decoder.h' library is using some syntax which has now been deprecated, so it no longer parses correctly for compilation. The community needs to have the 'DCC_Decoder.h' modified so that it uses the newer syntax for defining this constant.

 

You can get round this by installing an older version of the Arduino IDE, version 1.0.6 works for me, go to the Arduino web page, downloads and look for older versions. Hope you get it sorted.

 

Cheers, Mark.

Mark, Your bloods worth bottling my friend. I reinstalled Version 1.0.6 on my XP and it works like a charm. I can't thank you enough, I was convinced it was something I had done and I'm pleased it wasn't.

I have to thank Ray for this post as I've been looking for this for quite a while now and only stumbled on it by accident a few weeks ago. So thankyou Ray for an absolutley brilliant post.

Cheers from down under

Stew

Link to post
Share on other sites

Sorry to muck you about a bit but I checked the MynaBay libs and they have been fixed since my original download a while back. 

"prog_char" references have been changed to "char PROGMEM"

So just download and install the current DCC_Decoder library and all should be good with newer IDEs (my 1.6.5 compiles ok).

 

From here:

https://github.com/MynaBay/DCC_Decoder

Link to post
Share on other sites

  • 2 weeks later...

Hi: All; I have built the turntable project using a Peco N gauge turntable, and it works excellently, however I have made some changes to the drive mechanism, instead of a direct drive I have modified the bridge to run on ball races, and magnetically linked the bridge to a revolving plate under the turntable well, so that the bridge has a smooth motion and can easily be removed to clean the well, it also means that it the turntable mechanism cannot be damaged by tiny or clumsy hands rotating the turntable bridge.

However I have now set up my layout to use RR&Co Train Controller 8 Gold  and am having problems in operating the turntable with the TC8 software, has anyone used this software to control the turntable ?, I can manually operate the turntable using just addresses via the USB LocoNet.

I would be most appreciative for any help.

Link to post
Share on other sites

  • 4 weeks later...

Hello friends,

 

This is a very inspiring topic and I am going to try it with an N scale peco turntable.

 

The bits are on the way.

 

I have 0 programing and electrical knowledge so if I will do it then anyone will be able to do it.

 

I will keep you updated and if I ask some "basic" questions I apologize in advance.

 

Thank you,

Lucian

 

LE: I forgot to mention the bits cost me not more than 50 EUR from Aliexpress (including cables, pcb and breadboard, power supply). I didn't include the rubber mountings and turntable.

If anyone wishes to start this project and doesn't mind the long waiting time, it might be worth it to look on Aliexpress.

 

I downloaded the libraries and the code compiles ok. For now I just stare at it :)

Edited by luciansima80
  • Like 4
Link to post
Share on other sites

  • 4 weeks later...

Hello,

 

I build it and I am at the stage where I test with address 200.

 

Everything seems to be going great, however I have a question. When the motor stands still it emits a continuous beeeeeep. Is there a way to make it quiet?

 

And another question to be sure I got the wiring of the motor correct. When it initializes should it move clockwise or counter clockwise?

 

Thank you,

Lucian

 

LE: I used the latest code and the noise is gone. It's great. Still I am curious about my other question, currently it is turning counterclockwise. Thank you.

 

Here is the video

 

sorry for the bad quality

Edited by luciansima80
  • Like 1
Link to post
Share on other sites

Hi all

Can anybody assist me please, I've had a change of layout design and now only have 2 roads to and from the TT. I'd like if possible for it to turn anti-clockwise each time, from the 6 'o' clock position (the head being at 12) so the head rotates back round to the 7 and then slightly on again to the 6 'o' clock when instructed to.

Do I leave out the first set of instructions in the sketch regarding myStepper2 'forward' and the first set in the 'position' instructions ( the 'moveTo' )

Like Lucian, mine also sits and makes a high pitched noise when at rest

Any help would be greatly appreciated.

Thank you

Link to post
Share on other sites

Hello,

 

Please help me with a small issue.

I've put the motor on my PECO N scale turntable and the precision is a little bit bad. If i reset the arduino and i turn the table in a position i have marked previously, there is a difference the size of a rail width.

 

I have increased the speed and acceleration in the code and i will reduce them to see how it is acting.

 

I also want to ask you about the hall sensor, how it should he positioned? In line with the magnet? Higher or lower? Farther or closer?

 

It is also not the same one as in this tutorial, it is this one

 

2015 Hot 5 Pcs 3144 Hall Effect Sensor Magnetic Detector 4.5-24V

http://g04.a.alicdn.com/kf/HTB1DStWKXXXXXbxXpXXq6xXFXXXI/2015-Hot-5-Pcs-3144-Hall-Effect-Sensor-Magnetic-Detector-4-5-24V.jpg

http://www.aliexpress.com/item/2015-Hot-5-Pcs-3144-Hall-Effect-Sensor-Magnetic-Detector-4-5-24V/32262974675.html

 

Do you think it is ok or do i need a different one?

 

Thank you,

Lucian

Edited by luciansima80
Link to post
Share on other sites

Hi Lucian

 

I used one of these from eBay

http://www.ebay.co.uk/itm/Arduino-Hall-Effect-Sensor-Switch-Module-in-UK-AVR-ATMega-PIC-/262037437709?hash=item3d02a5fd0d:g:eK0AAOSwrklVdMUs
Link to post
Share on other sites

 

Hi Lucian

 

I used one of these from eBay

http://www.ebay.co.uk/itm/Arduino-Hall-Effect-Sensor-Switch-Module-in-UK-AVR-ATMega-PIC-/262037437709?hash=item3d02a5fd0d:g:eK0AAOSwrklVdMUs
 

Hi, thank you. It seems to be almost same to what i used.

 

In the meantime i found the problem. I build the turntable incorrectly, the deck was touching the well making it very hard to move in some places.

 

I also installed the servo and now i am very happy with it.

 

I will also try the screen and buttons.

 

This is a very helpfull topic and i thank you all for such a great tutorial.

Link to post
Share on other sites

Thanks Ray, the bits have all arrived: -

attachicon.gifIMGP2300.JPG

This is the prospective recipient of the drive, although it doesn't look very different I have chopped over 40mm off the length of the deck: -

attachicon.gifIMGP2299.JPG

Hi Bryan

Sorry it's of topic but how did you connect up to the rails on the table so you are able to turn the table without twisting the wires.

Link to post
Share on other sites

Hi Ray

The Peco TT has two plungers that make contact with a split ring underneath the deck and the Dapol/Airfix version you need to obtain a similar set up but in flat brass with wipers to conduct up to the rails ( think I have the kit somewhere )

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...