Jump to content
 

DCC Controlled (PECO) Turntable Project using a Arduino Uno


Recommended Posts

Hi Simon, no the hardware is the same.  Some others have used a different Stepper Driver to the Adafruit Motor Shield but that will require a modified Arduino Sketch to my original postings. You might note that post 512 has an updated sketch which removes power from the stepper after reaching it's position but that only works for a 180 single road turntable. I'll update the 4 road sketch and post here shortly.

 

Keep us posted on your progress.

 

Ray.

Hi Ray, I've just connected everything up, uploaded the sketch and it all seems to work very well, although I might have a little bit of unwanted friction that I need to address. As I'm still getting to grips with understanding the sketches, could you possibly post a copy of the 4 road sketch please?

 

Cheers, Simon

Link to post
Share on other sites

Hi Ray, I've just connected everything up, uploaded the sketch and it all seems to work very well, although I might have a little bit of unwanted friction that I need to address. As I'm still getting to grips with understanding the sketches, could you possibly post a copy of the 4 road sketch please?

 

Cheers, Simon

Hi Simon, have you tried the original sketches on page 1? I've not had time to do the new 4 road that cuts power to the motor as yet, only a single road. I'll try and get it done by the end of the week.

 

Ray.

Link to post
Share on other sites

Well I've done the easy part, me thinks, but really lost with the software side, and reading the latest post, going with the A4988 version doesn't seem to be the best route, but that what I've got at the moment.   So this is what my hardware looks like so far. The gear ratio works out at 53.91:1, I think. 60T/16T and 236T/16T.  I do need some help with the sketch do I just load "DCC_Fully_Working_with_Parking_Sensor.ino" and then compile? I have attached the two libraries (DCC_Decoder_master and AccelStepper) to the arduino but not sure what to do or copy next? Also to test do I just upload the "speed_vibration_harmonics_test.ino" to run the speed tests?

 

Any help greatly appreciated.

 

post-32808-0-35122300-1509750495_thumb.jpg

post-32808-0-19705600-1509750503_thumb.jpg

post-32808-0-81200000-1509750510_thumb.jpg

post-32808-0-96844000-1509750518_thumb.jpg

post-32808-0-32059500-1509750530_thumb.jpg

post-32808-0-05708500-1509750543_thumb.jpg

post-32808-0-18727500-1509750562_thumb.jpg

236T/16T

post-32808-0-64428600-1509750611_thumb.jpg

60T/16T

 

 

 

 

 

 

Link to post
Share on other sites

 

 

avrdude: stk500_getsync(): not in sync: resp=0x00

 

 

and have no idea what that means?

That usually means that the Arduino IDE cannot communicate with the Arduino board. Check that you have selected the correct serial port and the correct type of Arduino board in the Tools menu.

 

You might also get that message if you are trying to upload to a board with an Uno, Nano or Mega and if you have some other hardware connected to Pins 0 and 1

 

...R

Edited by Robin2
Link to post
Share on other sites

Hi Jorgan202,

All the sketches I have posted use the Adafruit stepper motor board, others on here have used the A4988 stepper driver and adapted the sketches to suit. Hopefully they will be able to assist you with their sketches.

Link to post
Share on other sites

I tried to upload the Speed Test, but got the following comment once it had uploaded;

 

 

 

 

 

and have no idea what that means?

 

Hi Jorgan.

 

In the IDE, under the Tools Menu, -> Board - what is it set to? its most likely set to "Arduino Uno / Genuino"

 

Make sure this says "Arduino Nano"

 

In terms of sketches, PM me, or email me on support@dccinterface.com and ill be more than happy to help.

Link to post
Share on other sites

I have also been looking to update the Adafruit shield code, to get the motor to turn off ( not hold using the coils ) in an attempt to stop the high pitch whine.

 

 

 

 

Hi Ian,

 

We already did this in post 502 with an update in post 512 to tidy up the code, but its always nice to see how others are developing the software to suit their needs. And thanks for posting the A4988 code. Funnily enough i ordered a chip yesterday.

 

Ray.

Edited by tender
Link to post
Share on other sites

Hi Ray,

 

Yes, your right. I must have totally missed that post. I'm really sorry to have duplicated it. 

 

great mind etc etc.

 

No problem Ian, like i said, its good to see what others on here are doing.

The A4988 arrived today so i must try and find time to put it to use.

Link to post
Share on other sites

Just to say a big thank you to the great help from Ian Jeffery and along with the posts and sketches from Ian and Tender, I now have a fully functioning Peco turntable using all the hardware as described on the first page of this extremely long thread, which I only discovered recently. My T/T stops at 4 different roads, and the motor powers down each time, leading to a nice quiet life!

 

Thanks guys.

  • Like 1
Link to post
Share on other sites

Just to say a big thank you to the great help from Ian Jeffery and along with the posts and sketches from Ian and Tender, I now have a fully functioning Peco turntable using all the hardware as described on the first page of this extremely long thread, which I only discovered recently. My T/T stops at 4 different roads, and the motor powers down each time, leading to a nice quiet life!

 

Thanks guys.

 

Hi Simon,

 

Good news,  could you post a copy of your Sketch. I've yet to modify the original 4 road sketch for power down, if you've already done it I'm sure others would like to see it also.

Link to post
Share on other sites

Just to say a big thank you to the great help from Ian Jeffery and along with the posts and sketches from Ian and Tender, I now have a fully functioning Peco turntable using all the hardware as described on the first page of this extremely long thread, which I only discovered recently. My T/T stops at 4 different roads, and the motor powers down each time, leading to a nice quiet life!

 

Thanks guys.

Could I ask that you perhaps summarise what you purchased to make it work and then what code you used plus some instructions on the build and configurations to help those of us joining this thread rather late?

 

There is a lot of advice here lasting a couple of years and I am certainly not clear on which bits have worked and which have not :( I wouldn’t want to start doing a similar project without gaining from the combined experience :)

 

Many thanks

Link to post
Share on other sites

Could I ask that you perhaps summarise what you purchased to make it work and then what code you used plus some instructions on the build and configurations to help those of us joining this thread rather late?

 

There is a lot of advice here lasting a couple of years and I am certainly not clear on which bits have worked and which have not :( I wouldn’t want to start doing a similar project without gaining from the combined experience :)

 

Many thanks

 

just sent you a PM.

Link to post
Share on other sites

Could I ask that you perhaps summarise what you purchased to make it work and then what code you used plus some instructions on the build and configurations to help those of us joining this thread rather late?

 

There is a lot of advice here lasting a couple of years and I am certainly not clear on which bits have worked and which have not :( I wouldn’t want to start doing a similar project without gaining from the combined experience :)

 

Many thanks

 

 

The Original Project hasn't changed much since conception on pages 1 and 2. Theres a new function been added recently that shuts down power to the motor when not being used to avoid an annoying hum. The drivers for the Adafruit Motor Shield have been updated but that doesn't impact on the project apart from a small name change required in the 'include', but it's all documented above in the last few pages.

 

A few people have used a different Stepper Driver (A4988) but i have not tried this as yet so can't comment on its performance compared to the Adafruit Shield.

Also Ian Jeffery has made available some PCB's, one for the DCC interface that i used VEROboard for (order from DCCinterface.com).

 

If you have any questions/problems just post on here and I (or some others here) will help.

 

 

 

I'm also working on an update to be able to program the 'roads' with a couple of push buttons rather than 'hard coded' in the sketch. Will post the sketch for that as soon as i am happy with the code.

 

Ray.

Link to post
Share on other sites

HI Bart! didnt know you were on here too.

 

you should update this thread with your pictures too as you have 3d printed your own motor mount ?

 

Hi Ian, 

 

Yep i'm on here cause this is how i found out about your board :-)  

I just got it working in the initial steps. thinking about how and which sensor i'm going to mount for the home position.

 

Ok if you don't mind a lot of pictures. 

 

I'm re-engineering a Fleischman/marklin turntable to work with a stepper. Mainly because i don't like the sound of the damn thing .

 

So i drilled out the post and the first ring.

37304066964_89214a6620_z.jpg

 

Machined an axle from a piece of aluminum with the intention to have it supported on 3 bearings. 

24161517688_92c55c24f2_z.jpg38013101711_7546afc07c_z.jpg

 

Then designed a motor mount to be 3d printed. Here i put already the stepper under it. 

38077485776_29893a693a_z.jpg26347286379_7655c156c2_z.jpg

 

And connected it together. You can also see Ian's board in the picture

37414704144_6409abae51_z.jpg

 

I'm still waiting for the coupler between the axle to arrive. But first test are very promising. 

 

 

Bart

  • Like 1
Link to post
Share on other sites

Bart,

 

That looks amazing.....

 

How much did it cost to make the mount do you think? Do you think you could make others? with a different PCD for the screw ?

 

on the peco turntable, i have screwed a plywood board to the bottom, the same side as the TT, through the 3 "Drain" covers.

 

Ian.

Link to post
Share on other sites

Hi Ian, 

 

Yep i'm on here cause this is how i found out about your board :-)  

I just got it working in the initial steps. thinking about how and which sensor i'm going to mount for the home position.

 

Ok if you don't mind a lot of pictures. 

 

I'm re-engineering a Fleischman/marklin turntable to work with a stepper. Mainly because i don't like the sound of the damn thing .

 

So i drilled out the post and the first ring.

37304066964_89214a6620_z.jpg

 

Machined an axle from a piece of aluminum with the intention to have it supported on 3 bearings. 

24161517688_92c55c24f2_z.jpg38013101711_7546afc07c_z.jpg

 

Then designed a motor mount to be 3d printed. Here i put already the stepper under it. 

38077485776_29893a693a_z.jpg26347286379_7655c156c2_z.jpg

 

And connected it together. You can also see Ian's board in the picture

37414704144_6409abae51_z.jpg

 

I'm still waiting for the coupler between the axle to arrive. But first test are very promising. 

 

 

Bart

 

Wow, that's a big 3D print. I was thinking of making a 3D drilling template and motor mount for the Peco turntable to make construction easier, but its currently another job on the 'to do' list.

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...