Jump to content
 

DCC Controlled (PECO) Turntable Project using a Arduino Uno


Recommended Posts

Just outside Folkestone

 

The one I got is the standard size motor on a cylindrical epicyclic gearbox with a ratio of 99.something. I think it was £17 or so.

 

There are some photos and descriptions in my PD and Arduino threads - links below. Give me a shout if you need anything particular.

 

Best

Simon

Link to post
Share on other sites

  • RMweb Gold

all,

 

gave it a try last night and it makes such a difference. No massive vibrations, and a very smooth movement.

 

Hello Ian,

 

I am pleased you have success with your motor/gearbox combo. I take it that the motor you used initially was different from the one Ray used in the original project. Do you think that had any bearing on the performance? I have the same Mercury motor which Ray used. My magnet has arrived but yesterday I twisted my knee so grovelling around under the layout is not advisable until it has recovered.

 

Geoff

Link to post
Share on other sites

all,

 

gave it a try last night and it makes such a difference. No massive vibrations, and a very smooth movement.

 

 

I didn't have any problems with vibrations using micro stepping with a 1.8deg/step stepper motor , are you using the Addafruit motor shield or the A4988 chip?

 

Edit:

​opps, just read your post 401, maybe its something to do with the A4988 chip? Anybody else having this problem?

Edited by tender
Link to post
Share on other sites

  • 2 weeks later...

well, my turntable is progressing, although it still has a few issues...

 

i have a flexi coupler between the stepper/gearbox and the shaft from the turntable, but there seems to be alot of play in it meaning that a few microsteps dont always result in movement !

 

i might replace it with a solid coupler as i see no benefit with a flexi.

 

you live and learn.

 

I also discovered that my NCE powercab had a setting which was basically repeating packets to locos and accessories meaning that my event handler was firing twice !

Link to post
Share on other sites

well, my turntable is progressing, although it still has a few issues...

 

i have a flexi coupler between the stepper/gearbox and the shaft from the turntable, but there seems to be alot of play in it meaning that a few microsteps dont always result in movement !

 

i might replace it with a solid coupler as i see no benefit with a flexi.

 

you live and learn.

 

I also discovered that my NCE powercab had a setting which was basically repeating packets to locos and accessories meaning that my event handler was firing twice !

 

Are you sure it's not backlash in the gearbox that's causing the problem, this was the driving element that made me go for a direct drive stepper motor to eliminate problems with backlash. The flex coupling i used has no torsional give.

 

Ray.

Link to post
Share on other sites

i have a flexi coupler between the stepper/gearbox and the shaft from the turntable, but there seems to be alot of play in it meaning that a few microsteps dont always result in movement !

One way to deal with backlash is to impose some friction on the turntable so it will stay where it is put and then build into the code the extra steps it needs to take when there is a change of direction. With  bit of experimentation it should be possible to eliminate the effect of backlash with software.

 

...R

Link to post
Share on other sites

If I wanted to avoid using micro stepping by increasing the 200 step/rev of the stepper with a gear ratio (16:1 should be sufficient) I would go down a toothed pulley and belt arrangement to avoid the backlash.

I've seen this used on a very expensive commercial turntable system.

Link to post
Share on other sites

  • RMweb Gold

Hello Ray and Ian,

I have just started to move onto the next step and immediately I have run into a snag. The program for testing out the Hall effect switch arrangement will not upload.I would appreciate your further assistance as I am definitely hanging onto the life raft now!

I have attached a screen shot of the arduino programme report.

 

Thanks

 

Geoff

 

post-224-0-03168300-1501855477_thumb.png

Link to post
Share on other sites

  • RMweb Gold

Ray, Ian, a further question, and I feel foolish asking this, but for example if I start the stepper test how do I stop it? I cannot find any command which stops it or presumably any other test I might be able to run.

 

Thanks.

 

Geoff

Link to post
Share on other sites

  • RMweb Gold

Hello Ray and Ian,

I have just started to move onto the next step and immediately I have run into a snag. The program for testing out the Hall effect switch arrangement will not upload.I would appreciate your further assistance as I am definitely hanging onto the life raft now!

I have attached a screen shot of the arduino programme report.

 

Thanks

 

Geoff

 

attachicon.gifScreenshot 2017-08-04 14.41.04.png

 

Further to the above post, I have tried to solve this by hopefully ensuring I have all the correct files/ libraries set up but since I don't really know what I am doing it could all be wrong. However here are some further screen shots. I will be very grateful if someone can help me resolve this. 

 

Thank you in anticipation.

 

Geoff

post-224-0-22474500-1502189252_thumb.png

post-224-0-36386800-1502189097_thumb.png

Link to post
Share on other sites

Hi Geoff.

Sorry for not getting back sooner, been offline for a few days.

 

Looks from your last screen shots that the Accelstepper.h file is missing. It's something i missed out when doing the original posts but was picked up by PhilNE in post 23.

 

You need to download an install the files from here:

 

https://github.com/a...it/AccelStepper

 

Hope this helps.

 

Ray.

Link to post
Share on other sites

  • RMweb Gold

Hi Geoff.

Sorry for not getting back sooner, been offline for a few days.

 

Looks from your last screen shots that the Accelstepper.h file is missing. It's something i missed out when doing the original posts but was picked up by PhilNE in post 23.

 

You need to download an install the files from here:

 

https://github.com/a...it/AccelStepper

 

Hope this helps.

 

Ray.

 

Hello Ray, far from you apologising it should be me for being so inept at this. I picked up on the file you mentioned and thought I had installed it but clearly there is something amiss still. Here is a screen shot of the list of files I have,

 

Geoff

post-224-0-80779900-1502195848.png

Link to post
Share on other sites

Hi Geoff

I've just checked the Arduino file structure of my PC installation.

Try this.

 

Move the Accelstepper-master directory and all its content up one level so its appears under the libraries directory and remove the -master from the directory name so is just 'Accelstepper'

 

Ray.

Link to post
Share on other sites

  • RMweb Gold

Hi Geoff

I've just checked the Arduino file structure of my PC installation.

Try this.

 

Move the Accelstepper-master directory and all its content up one level so its appears under the libraries directory and remove the -master from the directory name so is just 'Accelstepper'

 

Ray.

 

Thank you Ray . I will give that a go and report back. May I bother you with some further questions please. Currently when I power up the set up it launches into the stepper test and will continue indefinitely until I disconnect the power. How do I stop it? Also, should I succeed in getting this working how is the Arduino powered without the laptop hooked up to it?  Also, sorry about this, I have a spare wire connected to the DCC interface board which is connected to the circuit marked 'reset' on the diagram. Do I need this and if so how should it be connected to the Arduino, through a switch or directly to the board? Sorry to keep asking but this really is uncharted territory for me.

 

Many many thanks.

Geoff

Link to post
Share on other sites

  • RMweb Gold

Thank you Ray . I will give that a go and report back. May I bother you with some further questions please. Currently when I power up the set up it launches into the stepper test and will continue indefinitely until I disconnect the power. How do I stop it? Also, should I succeed in getting this working how is the Arduino powered without the laptop hooked up to it?  Also, sorry about this, I have a spare wire connected to the DCC interface board which is connected to the circuit marked 'reset' on the diagram. Do I need this and if so how should it be connected to the Arduino, through a switch or directly to the board? Sorry to keep asking but this really is uncharted territory for me.

 

Many many thanks.

Geoff

 

Me again Ray. I have done as you suggested but I still get the same outcome.

 

Geoff

post-224-0-09522500-1502200228_thumb.png

post-224-0-32429700-1502200250_thumb.png

post-224-0-27565700-1502200269_thumb.png

 

Link to post
Share on other sites

Hi Geoff.

 

Yes, same outcome but now for a different reason. 

 

You need to move the 'Utility' folder up one level so it sits in the 'libraries' folder as before.

 

I suspect you will get another error when you move on to the DCC routines but we'll deal with that when we get there.

 

Ray

Link to post
Share on other sites

Hi Geoff.

 

Having just looked at my PC i'm  not so sure about the above.

 

If you still get the same error or similar message can you post a screen shot of the 'utility' folder contents.

 

Ray.

Edited by tender
Link to post
Share on other sites

  • RMweb Gold

Hi Geoff.

 

Having just looked at my PC i'm  not so sure about the above.

 

If you still get the same error or similar message can you post a screen shot of the 'utility' folder contents.

 

Ray.

 

Hello Ray, yes same again I am afraid. I seem to have messed up big time.

 

Are these the screen shots you need?

 

Thank you again for all your help.

 

Geoff

post-224-0-36121000-1502220241.png

post-224-0-53782700-1502220269.png

post-224-0-18579100-1502220292.png

post-224-0-18884100-1502220313_thumb.png

Link to post
Share on other sites

OK Geoff.

I can see what has happened. The turntable test routine is looking for a file 'Adafriut_PWMServoDriver.h' and the latest download reincarnation of the AdaFruit routines have renamed it to 'Adafriut_MS_PWMServoDriver.h'

 

So you have two choices.

1. change the line in the Turntable Test routine by inserting the '_MS' part to the include statement.

2. rename the two files removing the '_MS' part of the filename from the utility folder

 

I'd give 1. a try first. (You my have to also move the 'Utility' folder back to the Adafru...Library.)

 

Ray.

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