Jump to content
 

geoff

RMweb Gold
  • Posts

    381
  • Joined

  • Last visited

Everything posted by geoff

  1. My goodness, 60021 was passing through Northamptonshire en-route from Oxwellmains to West Thurrock on the 14th, see post 2348 in the fall and rise of the 60s. I wonder how many miles these locos cover in a month? Geoff
  2. I wonder how many drivers are required to work this train? A long distance run for a Colas class 60. IMG_4849 by Geoffrey Robinson, on Flickr 60021 leads the 6L44 20:28 OXWELLMAINS LAFARGE COLAS - 13:06 WEST THURROCK SIDINGS FHH down towards the Glendon Iron Coy. bridge on time at 09:45 on Thursday 14 September 2017.
  3. Chaz, for many years I used a Lokprogrammer on a MacBook pro with Parallels to give the Windows environment. In fact it worked more seamlessly than on a windows machine. I eventually bought a refurbished windows laptop for my railway because I have an old windows based programme I use for train scheduling and the cost of updating Parallels to allow me to update my MacBook was prohibitive, far more than the windows laptop. Further comment about your iPad mini; should you wish to use the jmri free software for programming you will not be able to use your iPad as they do not run Java which is necessary for the jmri software to operate. Geoff
  4. I picked up the following today from a local railway interest site I use. Geoff Kettering station I have just called in to the station on my walk with the dog and there is a planning application from network rail to the council for partial dismantling of the canopies on the station for the electrification of the line. Copies can be seen at the council office in bowling green road ,it does not say which platforms - watch this space .
  5. Robin, thank you for taking the time to look into this. Since I started on this project completely ignorant of Arduino, Adafruit motor shields, stepper motors and their application I felt I had to go with the original parts lists with which Ray started the thread. I now have a turntable which I can use and which seems to operate reliably for what I require so I am content to go with what I have. But my journey to this end and the other projects which have come up in the thread have no doubt enriched and enlightened anyone who has used the thread to further their own plans and for that I am grateful to all who have contributed. Thanks again. Geoff
  6. Robin, mine is an Adafruit Industries Motorshield v2.3, DC motor, stepper and servo control for Arduino. Geoff
  7. This thread has certainly thrown up some interesting snippets of information about the products which have been used. I received no documentation with my stepper motor and was very surprised and concerned when I discovered how hot it became with prolonged use. When looking for the information about connecting the motor shield to the Arduino I didn't see any mention of an adjustable current limiter. It must be that darned small print that I just cannot see even with my new glasses. We live and learn. Thanks to all who have contributed I have a useable turntable now. I am very grateful for all the time and effort people have given over to this project and in particular with helping me get mine working. Geoff
  8. Hello CFJ, Yes I understand that the motor is not locked in place if it is released. In practice I find the table does not move when running locos on or off and so far I have found that it works reliably using that method and I don't have to fret about the temperature of the motor. Ray has said he might investigate further when he gets time and he has given up so much time helping me with this already. If there is another sketch which will help to keep the motor cool while providing the quality of operation we are currently getting I am sure we would all appreciate finding out about it. Thank you for contributing to the thread. Geoff
  9. Ray, I managed to nip up to the railway this evening and make the alterations to the sketch and they work just fine. I tried them first with the computer hooked up and then with the link jumper in place and the power to the Arduino and everything worked as you predicted. Thank you very much indeed. Geoff
  10. Gosh, that was fast Ray. I will give that a go tomorrow sometime. Thank you once again. Geoff
  11. Good evening Ray, I have arrived at position settings which give consistent alignment, with or without a loco on the table. They are 1078 and 2706, someway off a difference of 1600 but they work. I then went on to testing the alignment with the motor powered down and that worked fine. Following that I shut down the Arduino software on the computer and the turntable continued to operate consistently. Finally I disconnected the usb connection, inserted the jumper link and powered the two boards from the Arduino power socket and that also worked nicely. The only negative, from my point of view, was that powering down the Arduino to swap the connections meant that the turntable moved to the sensor position on powering up again. That is not a major issue I guess. Since I worry about the temperature of the motor I would like to be able to disconnect the power to the motor when I am not turning a loco so would it be feasible to remove the jumper link and tap off the power to the Arduino board and take a supply to the motor shield via a switch so that I can leave the Arduino powered up and just energise the shield when I want to turn a loco? Once again I need to thank you and Ian for all the help and guidance you have given me with this project. Geoff
  12. Thanks Ray. I will give that a go tomorrow sometime and report back. Geoff
  13. Ray, I am putting you to an awful lot of trouble. Thank you so much for bearing with me. Geoff
  14. IMG_4838 by Geoffrey Robinson, on Flickr37800 beats its lone path through Harrowden junction on its way back to Leicester from Bletchley running as 0xxx 15:12 BLETCHLEY T.M.D. - 18:14 LEICESTER L.I.P 84 minutes early at 15:42 on Thursday 24 August 2017. Geoff
  15. Hello Ray, Below is the sketch I am using. I hope it is essentially the one you posted but with a different DCC address of 400 and the values which align the turntable with my approach track. Of course it is always possible that I have inadvertently altered something accidentally when making the the changes I needed, or indeed not changed something I needed to change. Thank you again for giving this so much time and effort. Geoff DCC_Test //////////////////////////////////////////////////////////////////////////////// // // DCC Turntable Control Test Routines (Accessory Address 200) #include <DCC_Decoder.h> #include <AccelStepper.h> #include <Wire.h> #include <Adafruit_MotorShield.h> #include "utility/Adafruit_MS_PWMServoDriver.h" ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Defines and structures // #define kDCC_INTERRUPT 0 typedef struct { int address; // Address to respond to } DCCAccessoryAddress; DCCAccessoryAddress gAddresses[1]; //////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////// // // Adafruit Setup Adafruit_MotorShield AFMStop(0x60); // Default address, no jumpers // Connect stepper with 200 steps per revolution (1.8 degree) // to the M3, M4 terminals (blue,yellow,green,red) Adafruit_StepperMotor *myStepper2 = AFMStop.getStepper(200, 2); // you can change these to SINGLE, DOUBLE, INTERLEAVE or MICROSTEP! // wrapper for the motor! (3200 Microsteps/revolution) void forwardstep2() { myStepper2->onestep(FORWARD, MICROSTEP); } void backwardstep2() { myStepper2->onestep(BACKWARD, MICROSTEP); } // Now we'll wrap the stepper in an AccelStepper object AccelStepper stepper2(forwardstep2, backwardstep2); ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Decoder Init // void ConfigureDecoder() { gAddresses[0].address = 400; } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Basic accessory packet handler // void BasicAccDecoderPacket_Handler(int address, boolean activate, byte data) { // Convert NMRA packet address format to human address address -= 1; address *= 4; address += 1; address += (data & 0x06) >> 1; boolean enable = (data & 0x01) ? 1 : 0; if( address == 400 ) { Serial.print("Basic addr: "); Serial.print(address,DEC); Serial.print(" activate: "); Serial.println(enable,DEC); if( enable ) { stepper2.moveTo(1106); } else { stepper2.moveTo(2706); } } } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Setup // void setup() { Serial.begin(9600); AFMStop.begin(); // Start the shiel //configure pin3 as an input and enable the internal pull-up resistor pinMode(3, INPUT_PULLUP); //read the sensor (open collector type) value into a variable int sensorVal = digitalRead(3); //set stepper motor speed and acceleration stepper2.setMaxSpeed(30.0); stepper2.setAcceleration(20.0); // stepper2.moveTo(800); // if near reference point move away sensorVal = digitalRead(3); while (sensorVal == LOW) { sensorVal = digitalRead(3); forwardstep2(); delay(50); } // step forward to sensor index point while (sensorVal == HIGH) { sensorVal = digitalRead(3); forwardstep2(); delay(50); } DCC.SetBasicAccessoryDecoderPacketHandler(BasicAccDecoderPacket_Handler, true); ConfigureDecoder(); DCC.SetupDecoder( 0x00, 0x00, kDCC_INTERRUPT ); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // Main loop // void loop() { static int addr = 0; //////////////////////////////////////////////////////////////// // Loop DCC library DCC.loop(); //////////////////////////////////////////////////////////////// // Loop Stepper stepper2.run(); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
  16. Good morning Ray, I tried your settings and many others but all gave the same result, when the turntable reverses it stops short. I spent several hours trying to fine tune it but the end result was always that it stopped short when turning in the reverse direction. In the end I was so concerned about the temperature of the motor that I packed up for the evening. I have, as far as I can tell, eliminated any significant friction, any that remains is there for the turntable test which it performs perfectly and consistently. If you have seen my reply to Ian you will have read all this so I apologise for repeating myself. When the system is shut down I find that the turntable stays nicely in position just with the inertia of the motor so is there a way to build into the programming a command to cut the motor power at each stopping position and then restart it for the next move? I wonder too what would be the effect of setting a second stopping command, as in for a second track, to over come the short stopping on the reverse turn? Alternatively is it practical to have the turntable turn in one direction only? Sorry for so many questions. Regards Geoff
  17. Hello Ian, Yes I sussed that out eventually and I have it sorted now. I have just spent 3 or 4 hours trying Ray's suggested settings and many others and always when the table reverses it stops short of the mark by about 6mm. It responds accurately to the first two command but of course then it is only going forwards but on the third command to return to the original position it stops short. That applies wherever in the circle I try it yet oddly it executes the Turntable Test, oscillating between two positions, perfectly. Anyway I am going to give it a rest for now before the motor catches fire. Even though Ray assured me they run hot when micro stepping I am a little concerned, it is way too hot to touch. As far as my motor is concerned there seems to be sufficient inertia inbuilt to hold the turntable in position, certainly when it is not powered I can drive locos on and off with no issues so I wonder if the programme can be adjusted to cut the power when the table has reached the assigned position. Geoff
  18. Hello Ray, I have sorted the Arduino starting with the turntable test. I waited until I had uploaded the DCC Test and then closed the Turntable Test. I shut down the Arduino software and then restarted and it came up with the DCC Test ready to go. The turn table always starts from the sensor and on the 'C' command will line up exactly if I put in the right value, around 1106, it will then rotate 180 degrees, value +1600 on the 'T' command and line correctly but when I again send the 'C' command it will stop half a track width, 9mm, short, my layout is EM gauge. I can replicate this with a variety of values around the 1100 and 2700. I will give your suggested values a go tomorrow if I get the chance. I have checked for friction points and cannot find any so far. Thank you. Geoff Geoff
  19. Hello Ray, I am back on dry ground after a week aboard a narrow boat. Thank you for your reply. I did run the turntable test and this was working accurately and reliably, however, this test only had the turntable operating in a different sector of the whole circle to that which the table turns through when running the DCC Test. Your reassurance that the motor will run hot because of the continuous power required foe micro stepping was helpful as I wondered if it was because of a mechanical load on the motor. I realised the different values should be 1600 apart, the figures I quoted were just where I finished up trying to sort out why it wouldn't make the full 180 deg. turn. I will look to see if I can find any possible friction points in the operating section which might be causing the problem. When I power up the Arduino it always starts up with the Turntable Test. Should that be over written by the DCC Test? Once again thank you for your continuing help with this. Geoff
  20. Good evening Ray, Well after the euphoria of yesterday evening this evening's session has been disappointing. But first the good news. The power connection via the Arduino coax socket and jumper plug works fine so that will be my normal running setup. The less good news is that although I can set it to align with the approach road on the first command © and rotate through 180deg with the second command (T) and line up nicely, when I send a further © command the motor reverses, not an issue, but stops short by about 3 or 4 rail widths. I have tried many combinations of settings but all to no avail. I suspect it is probably a mechanical issue, too much friction in one direction but I have not yet been able to resolve it. A couple of other things puzzle me. When I first power up the set up I have to upload the programme before I can use the turntable. Does the Arduino not keep the last operation in its memory ready to use as soon as it is powered up? The motor always starts off rotating anti-clockwise, not an issue, but after the first two commands just turns back and forth through 180 deg. with each command, it never just continues round to the next stop. In its self that is not an issue, I am just curious as to what I should expect. Finally, the motor does seem to get very hot but that might be because of friction in the turntable, oh and when I run a loco on, thus loading the deck, the motor is not able to rotate fully to either position. I think that confirms there to be some significant frictional problems with the turntable. I have never been very impressed with this turntable kit but at the time it was the only one available for the size I wanted, 50ft if I remember correctly. I have attached some screen shots to show what it looks like on a Mac and where things end up. Also there are a couple of shots showing the DCC test sketch and the step settings I was using. I understand 180 deg equals 1600 steps so why does the sum of the two settings not equal 3200? Anyway, we are off on holiday on Saturday so I doubt I will do any more work on it until we get back and then I might have to consider a major rebuild. Thank you again for all your help. At least we know that the set up works in principle. Geoff
  21. Good morning Ray, Thank you for that, I will have a go at it this evening I hope. I am glad I could make a small contribution to the thread and I will try to post some screen shots to show where all the technical bits finished up on a Mac. Many thanks. Geoff
  22. Well after burning the midnight oil I have a working turntable, albeit with some mechanical issues I need to think about. It took a little head scratching to get the DCC test to work because again the ' _MS_ ' was required in the preamble and then I struggled for some reason to get programme into the correct place in the 'Libraries'. Anyway it all works nicely from my Digitrax DT402. It took me some considerable time to get to the appropriate values to line up with the approach track and it is fine now provided I don't allow it to reverse. There is some friction in one direction which I think results in a few steps being missed so I will have to try to resolve that. Otherwise the Arduino is all working just as it should. My two remaining questions are how can I power the Arduino so that I do not have to have the MacBook hooked up to it? Can I put the 12v supply into the Arduino jack and use the jumper link on the Adafruit shield, or does that work in reverse using the jumper link to power the Arduino from the Adafruit shield? the second question concerns the reset wire from the DCC interface which is currently not connected to anything. Should it be connected to the Arduino and if so would that be through a switch? Ray, thank you for the time you have given over to help me with this. I would not have been able to make this work at all without your help and support. Thank you too to Ian and Robin for your input to help me in my struggle with this. I knew it would not be plain sailing and that was one of the reasons for tackling it, to keep the "little grey cells" exercised. Thank you all, it has been challenging but have enjoyed it. Geoff
×
×
  • Create New...