Jump to content

tender

DCC Controlled (PECO) Turntable Project using a Arduino Uno

Recommended Posts

 https://hackaday.io/project/11224-mechaduino thought this may be of interest?, it allows very accurate posistioning along with constant posistion checking effectively turning out stepper motors into 360 degree servos :) reading the various wlak throughs it uses a magnet on the end of the stepper shaft and a magnetic rotarty encoder on the board, the calibration routine producting 16,384 entries for posisioning!

  • Like 1

Share this post


Link to post
Share on other sites
 

 https://hackaday.io/project/11224-mechaduino thought this may be of interest?, it allows very accurate posistioning along with constant posistion checking effectively turning out stepper motors into 360 degree servos :) reading the various wlak throughs it uses a magnet on the end of the stepper shaft and a magnetic rotarty encoder on the board, the calibration routine producting 16,384 entries for posisioning!

 

I bought the sensor AS5048B which makes up this device. $25 on a board which fits on the end of a stepper. It hooks up via the i2c interface and seemed pretty good - repeatable to better than 0.05 degrees. I have it running on a Raspberry Pi. Next move is to hook it up to the arduino which runs the stepper. Then can do a closed loop control system. this should avoid all issues with indexing etc. I obtained the board from ams.com - AS5048B evaluation kit. Note the data sheet has the lsb and msb of the angle register transposed.

Edited by colinc3e

Share this post


Link to post
Share on other sites

 https://hackaday.io/project/11224-mechaduino thought this may be of interest?, it allows very accurate posistioning along with constant posistion checking effectively turning out stepper motors into 360 degree servos :) reading the various wlak throughs it uses a magnet on the end of the stepper shaft and a magnetic rotarty encoder on the board, the calibration routine producting 16,384 entries for posisioning!

 

 

I bought the sensor AS5048B which makes up this device. $25 on a board which fits on the end of a stepper. It hooks up via the i2c interface and seemed pretty good - repeatable to better than 0.05 degrees. I have it running on a Raspberry Pi. Next move is to hook it up to the arduino which runs the stepper. Then can do a closed loop control system. this should avoid all issues with indexing etc. I obtained the board from ams.com - AS5048B evaluation kit. Note the data sheet has the lsb and msg of the angle register transposed.

 

 

This looks like an interesting device. 

Edited by tender

Share this post


Link to post
Share on other sites

it allows very accurate posistioning

I can't see how it can make a stepper motor more accurate than it is if you just count the steps.

 

...R

Share this post


Link to post
Share on other sites

I can imagine that it can improve repeatability, but not accuracy.

 

But, if the stepper doesn't miss steps, it won't do that either.

 

Best

Simon

Share this post


Link to post
Share on other sites

Hi friends! After following this fantastic topic for a long time i decided build my turntable based on original code from Tender. I´m testeing the positioner system and found something strange. On my system, a NCE DCC, it´s working very well. But testing in friend´s layout, which uses a MRC Prodigy Wireless, it don´t work. There is some difference betwen NCE and MRC DCC packet? Someone have or had this problem too?

Thanks for now!

Share this post


Link to post
Share on other sites

Hi friends! After following this fantastic topic for a long time i decided build my turntable based on original code from Tender. I´m testeing the positioner system and found something strange. On my system, a NCE DCC, it´s working very well. But testing in friend´s layout, which uses a MRC Prodigy Wireless, it don´t work. There is some difference betwen NCE and MRC DCC packet? Someone have or had this problem too?

Thanks for now!

I think this is probably due to the way the MRC Prodigy handles the accessory addressing. I'm not familiar with this equipment, hopefully someone will come along and explain in detail.

Share this post


Link to post
Share on other sites

I think this is probably due to the way the MRC Prodigy handles the accessory addressing. I'm not familiar with this equipment, hopefully someone will come along and explain in detail.

I think this too. I searched on internet somethink about MRC packet format to check if there is some particularity about it, but i didn´t found anything helpfull. Just the NMRA packet format. Anyway, thank you about your considerations. I hope someone can help me with this...

Share this post


Link to post
Share on other sites

I think this too. I searched on internet somethink about MRC packet format to check if there is some particularity about it, but i didn´t found anything helpfull. Just the NMRA packet format. Anyway, thank you about your considerations. I hope someone can help me with this...

Some time ago I was playing with an accessory decoder (can't remember which one of hand) but the address it responded to was plus (or minus) one from that expected. Might be worth giving that a try.

Share this post


Link to post
Share on other sites

Some time ago I was playing with an accessory decoder (can't remember which one of hand) but the address it responded to was plus (or minus) one from that expected. Might be worth giving that a try.

thanks for the tip... i will do some tests with that information and will post the results here. I beleieve that someone may have the same problem...

Share this post


Link to post
Share on other sites

is this topic still available for questions?

 

i'm late to the party!

 

Very much so, ask away.

Share this post


Link to post
Share on other sites

thanks. 

 

I just ordered one from Maplins - I wa going to use the web site proto-pic but im too impatient for postage and want to play this afternoon!!!! extra £6 is worth it for me.

 

I have my turn table built, already have a stepper motor - just need to get the arduino hat for it now ( been testing with a raspberry pi adafruit hat ).

 

I like the idea of using it from my NCE power CAB but not sure how to do that yet.

Share this post


Link to post
Share on other sites

Hi tender.

 

Would you be able to help me with one of the following ???

 

1) convert the wiring diagram to a breadboard design

2) convert it to a circuit - i have an etching kit so I can make my own circuit board...

 

Ian.

Share this post


Link to post
Share on other sites

Hi tender.

 

Would you be able to help me with one of the following ???

 

1) convert the wiring diagram to a breadboard design

2) convert it to a circuit - i have an etching kit so I can make my own circuit board...

 

Ian.

 

 

I'll photo the two sides of my breadboard and post later this evening, should be able to work it out from that.

 

Ray.

Share this post


Link to post
Share on other sites

Ian.

 

Here's the photos of the prototype breadboard DCC I/F i made.

 

Component Side:

post-11105-0-53523500-1497212456_thumb.jpg

Red and Black wire at the top are from the DCC track (the extra two Red/Black wires go to the Turntable bridge).

Red and Black Wire at the bottom are from 5v and GND of the Arduino (the extra two Red/Black wires are the 5V supply for the Hall Sensor).

Orange Wire is to I/O 2 on the Arduino.

 

The Green wire from the Hall sensor (not shown here) goes to I/O3 on the Arduino.

 

Copper Side:

post-11105-0-53806900-1497212627_thumb.jpg

Note the 7 cuts in the copper track which can be made with a suitable drill or vero board cutter.

 

(Also see post 8)

Hope this helps.

 

Ray.

Edited by tender

Share this post


Link to post
Share on other sites

hi Ray,

 

Is this the same circuit ( minus the hall sensor ) that you have used above to interface with the DCC signal ?

 

( this shows a circuit that to me looks very simular )

 

http://www.mynabay.com/dcc_monitor/

 

 

It appears to be, its a very commonly used circuit for a DCC interface.

 

Ray.

Share this post


Link to post
Share on other sites

hi Ray,

 

so in effect, the interface listens to the dcc signal, and when it spots a 200 or 201 ID'ed packet to throw a point, it actually turns the turntable ?

Share this post


Link to post
Share on other sites

hi Ray,

 

so in effect, the interface listens to the dcc signal, and when it spots a 200 or 201 ID'ed packet to throw a point, it actually turns the turntable ?

Yep, that more or less what it does, doesn't have to be address 200, you can change it to whatever you like in the Arduino code as long as it's in the accessory decoder range. Later versions 'listen' for a range of addresse for different positions.

Share this post


Link to post
Share on other sites

all.

 

been fiddling around with a breadboard just to see if i can get anything working...

 

after a bit of a head scratcher i realised my connection to the SPROG isn't great - a bit loose and so sometimes looses the signal ( or my sprog 3 is not 100% ok )...

 

 

anyway, here is a dcc_monitor program running!
 

Share this post


Link to post
Share on other sites

all,

 

strange thing seems to be happening......

 

i only get packets picked up if i have my hand near one of the crocodile clips connecting the track dcc signal to the board????

 

if i dont have my hand near it i get no packets picked up????

Share this post


Link to post
Share on other sites

all,

 

strange thing seems to be happening......

 

i only get packets picked up if i have my hand near one of the crocodile clips connecting the track dcc signal to the board????

 

if i dont have my hand near it i get no packets picked up????

What's the setup your using? Have you got the steppertest routine working with the stepper motor?

How are you powering the Sprog and Adafruit motor shield?

 

Sounds like you still have have a doggy joint or or wiring error somewhere.

Share this post


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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.