Jump to content
 

cambriancoaster

Members
  • Posts

    137
  • Joined

  • Last visited

Profile Information

  • Location
    Staffordshire
  • Interests
    Cambrian Coast Railway in the latter days of steam.
    West Coast Main Line in Staffordshire & Cheshire.

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cambriancoaster's Achievements

441

Reputation

  1. Phil: Many thanks for posting the superb photos of Rhyd-y-Clafdy - they are really impressive. On another topic I would appreciate it if you could let me know how you obtained the excellent Cambrian Coast Express headboard. I am also in need of your advice for constructing bracket signals for Pwllheli! Best wishes CC
  2. Phil: I'm absolutely delighted to see that you have taken the plunge and started a thread for "Ellesmere" on RMWeb. It looks to be a fantastic layout and I'm very much looking forward to seeing it "in the flesh". It is a real bonus that we will be able to keep up to date on its progress with this thread. Perhaps, now that you have got to grips with posting on RM web, you could be tempted on starting a topic for Rhyd-y-Clafdy - your original iconic Cambrian layout. Best wishes CC
  3. Derek A really fascinating topic and read - please keep the posts coming. It seems that we have quite a lot in common too. Like you I took an ONC/HNC in Chemistry and then did a degree in the subject at about the same point in time (I started my career as a Lab Assistant at ICI in 1955). We are also currently facing an identical challenge in constructing a turntable for our layouts. Mine is a GWR 55ft table - the deck of which has been built from a Mercian Models brass kit. If you are interested you can view it on my own topic: Pwllheli next stop. My wife thinks I am spending far too much time on it! So I am looking forward to your updates and experiences with keen anticipation. Best wishes CC
  4. Hi: Immediately after posting my previous post I noticed that I have written in the paragraph just below the sketch: This sketch is set for clockwise and anticlockwise movements for 160, 45, 135 degrees and nudge. It should of course read: This sketch is set for clockwise and anticlockwise movements for 180, 45, 135 degrees and nudge. Apologies CC
  5. Hello Ray, Southern Way and everyone I have been away for a few days and haven't had the opportunity to post the sketch for my version of the Arduino/Stepper motor turntable controller before now so I am taking this opportunity to do so. Before I post it I thought I would include a few images of the connections between the pushbutton panel and the Adafruit Motor Shield. This is a view of the underside of the turntable and you can see the stepper motor and shaft coupler connecting to the turntable shaft, and also the Adafruit Motor Shield (mounted on top of the Arduino) with its connections to the pushbutton panel. Behind the stepper motor is a DCC Specialities auto polarity reverser. All these items are mounted on a turntable sub base which is attached (using four dome headed screws and wing nuts) to the main baseboard. The simple pushbutton panel used to control the turntable. The buttons are basic push to make pushbuttons though in this case used in push to break mode. The rear of the pushbutton panel with the Adafruit Motor Shield and the connections between them. There are eight pushbuttons in my configuration and a single (red wire) from each button goes an appropriate i/o pin on the motor shield. In the Arduino sketch below you will see these are wired to pins 4 to 11. The black wire is from the ground pin on the motor shield and connects to the copper tape on the panel (which then acts as the common ground for all the buttons) . And here is the Arduino sketch I have constructed to control the turntable. I have tried to keep this as simple as I can and have annotated it heavily to remind me what I did when I come to look at the code in the future and have forgotten everything I learnt about C++ coding for the Arduino! /* This sketch is for an Arduino Uno micro controller equipped with an Adadfruit Motor Shield and will drive a stepper motor directly connected to a model railway turntable. The inspiration and many of the ideas behind this sketch came from the thread: http://www.rmweb.co.uk/community/index.php?/topic/78578-dcc-controlled-peco-turntable-project/ started by Tender on 12-Nov-2013 */ /* The shaft of the Stepper Motor is directly connected to the turntable shaft with a shaft coupler (note: for this example a Mercury Stepper Motor SM42BY0011-25 was used). The sketch requires the Adafruit_Motorshield v2 library - downloadable from https://github.com/adafruit/Adafruit_Motor_Shield_V2_Library and the AccelStepper library with AFMotor support https://github.com/adafruit/AccelStepper The sketch will only work with Adafruit Motorshield v2. for the Arduino Uno. It not work with v1 shields*/ /* set the system up to include the following libraries:*/ #include <AccelStepper.h> #include <Wire.h> #include <Adafruit_MotorShield.h> #include "utility/Adafruit_PWMServoDriver.h" /* Create the motor shield object with the default I2C address Or, create it with a different I2C address (say for stacking) Adafruit_MotorShield AFMS = Adafruit_MotorShield(0x61); Connect a stepper motor with 200 steps per revolution (1.8 degree per step) to motor port no.2 (M3 and M4) */ Adafruit_MotorShield AFMS = Adafruit_MotorShield(); Adafruit_StepperMotor *myStepper1 = AFMS.getStepper(200, 2); // you can change these to DOUBLE or INTERLEAVE or MICROSTEP! void forwardstep1() { myStepper1->onestep(FORWARD, MICROSTEP); // sets forward mode at 3200 steps per revolution (0.1125 degree per step) } void backwardstep1() { myStepper1->onestep(BACKWARD, MICROSTEP); // sets backward mode at 3200 steps per revolution (0.1125 degree per step) } AccelStepper Astepper1(forwardstep1, backwardstep1); // use functions to step void setup() { Serial.begin(9600); // sets up Serial library at 9600 bps for a serial monitor connected to the Artduino Serial.println("Stepper test for turntable"); // prints the comment between the "" on the serial monitor when starting. AFMS.begin(); // create with the default frequency 1.6KHz //AFMS.begin(1000); // OR with a different frequency, say 1KHz Astepper1.setMaxSpeed(50.0); // sets the maximum rotational speed of the stepper in steps per second. // (the value of 50 will rotate the turntable for a full revolution // in about 3200/50 seconds (i.e around 64 seconds). Astepper1.setAcceleration(10.0); // The following commands set I/O pins numbers 4 through 11 on the Arduino/Adadfruit to a nominal 5V: pinMode(4, INPUT_PULLUP); pinMode(5, INPUT_PULLUP); pinMode(6, INPUT_PULLUP); pinMode(7, INPUT_PULLUP); pinMode(8, INPUT_PULLUP); pinMode(9, INPUT_PULLUP); pinMode(10, INPUT_PULLUP); pinMode(11, INPUT_PULLUP); } void loop() { int PinState4=digitalRead(4); if (PinState4==LOW){ Serial.println("rotating 180 degrees clockwise"); Astepper1.setCurrentPosition(0); Astepper1.moveTo(-1600); Astepper1.run(); Astepper1.runToPosition();} int PinState5=digitalRead(5); if (PinState5==LOW){ Serial.println("rotating 180 degrees anticlockwise"); Astepper1.setCurrentPosition(0); Astepper1.moveTo(1600); Astepper1.run(); Astepper1.runToPosition();} int PinState6=digitalRead(6); if (PinState6==LOW){ Serial.println("rotating 45 degrees clockwise"); Astepper1.setCurrentPosition(0); Astepper1.moveTo(-400); Astepper1.run(); Astepper1.runToPosition();} int PinState7=digitalRead(7); if (PinState7==LOW){ Serial.println("rotating 45 degrees anticlockwise"); Astepper1.setCurrentPosition(0); Astepper1.moveTo(400); Astepper1.run(); Astepper1.runToPosition();} int PinState8=digitalRead(8); if (PinState8==LOW){ Serial.println("rotating 135 degrees clockwise"); Astepper1.setCurrentPosition(0); Astepper1.moveTo(-1200); Astepper1.run(); Astepper1.runToPosition(); } int PinState9=digitalRead(9); if (PinState9==LOW){ Serial.println("rotating 135 degrees anticlockwise"); Astepper1.setCurrentPosition(0); Astepper1.moveTo(1200); Astepper1.run(); Astepper1.runToPosition(); } int PinState10=digitalRead(10); if (PinState10==LOW){ Serial.println("rotating nudge clockwise"); Astepper1.setCurrentPosition(0); Astepper1.moveTo(-2); Astepper1.run(); Astepper1.runToPosition(); } int PinState11=digitalRead(11); if (PinState11==LOW){ Serial.println("starting nudge anticlockwise"); Astepper1.setCurrentPosition(0); Astepper1.move(2); Astepper1.run(); Astepper1.runToPosition(); /* delay(100);} */ } } This sketch is set for clockwise and anticlockwise movements for 160, 45, 135 degrees and nudge. You will see (digital reads 10 and 11) that I have set the nudge value for 2 steps which means that a single push of a nudge button will advance the stepper just 0.225 of a degree. If a more precise nudge factor is needed you can always set this to 1 (i.e. each step is 0.1125 degrees). Keeping a finger on a nudge button will result in the table turning continuously (but slowly) until you take the finger off the button. In this way you can correct any misalignment (should it occur) by eye. There are 14 i/o pins on the motor shield which would allow you to set up 14 different movements. I hope this all helps the general discussion on the topic but if you have any queries please let me know and I will do my best to answer them. Regards CC
  6. Hello Ray & Everyone It is a while since I posted anything on this topic because I wasn't making much progress. However in the last few weeks I have been much more successful. As mentioned in previous posts I don't really understand the DCC library functions used in the sketches, and so, not wanting to become an electronics engineer, I have persevered with an alternative strategy which sets road positions by the difference in steps (or if you like the angle) between them. In this variant the rotation of the table is governed by simple push-to-break pushbuttons directly wired to the input/output terminals on the Adafruit Motor Shield. The I/O pin states on the shield are defined as INPUT_PULLUP which means that they are set as high (i.e.5V). The push buttons are each wired to an input terminal and to a common ground. When a button is depressed the Arduino notes that the input is now low, sets the current position of the stepper motor as zero, and then rotates the turntable the number of steps predefined for that input (e.g. 1600 steps for 180 degrees, 400 steps for 45 degrees etc.). I am very pleased to say it now works fine as you can see from this video taken of my turntable test track which I have just posted on UTube: I hope you like it. As my version is now not DCC controlled and doesn't use a PECO turntable I am wondering whether I ought to start a different thread for it? Best wishes CC
  7. Hello Clarkis Nothing special - I just use the Silhouette Studio (version 3) rectangle drawing facility, adjust the rectangle to size and, where applicable, use the copy/paste facility to produce any duplicates (of windows, doors etc.). Its all very easy and its surprising what you can accomplish in an evening. Regards CC
  8. Hello Neil Thanks for the kind comment. The frame elements between the panes are about 0,5 mm in width (equating to a prototype 1.5 inches in 4 mm to the foot scale). They are cut from 10 thou styrene. If I try and reduce the width below 0.5 mm the window elements tear during the cutting process.. Best wishes CC
  9. Hello Clarkis & JCL Here are images of my first attempts with the Silhouette Cameo/Studio combination. They are the start of what I hope will ultimately be a low relief block of shops for my Pwllheli layout (see http://www.rmweb.co.uk/community/index.php?/topic/60560-pwllheli-next-stop/) for more details. Prototype shops Walls are constructed from 20thou styrene Doors and window frames from 10thou styrene Windows from 10thou glazing Signage from 10thou styrene. Best wishes CC
  10. Hello Ray and Polly I enjoyed meeting you both at Stafford last weekend. Camel Quay is a super layout and I was very impressed with it and its operation - especially the hands free shunting. Congratulations are due to you both. I only hope that my efforts are ultimately half as good. Best wishes CC
  11. Andy Y

    1. yorkie_pudd

      yorkie_pudd

      is going to grow dreadlocks with a ponytail ....?

  12. Thanks Jason and to everyone else who has contributed to this fascinating thread. You have convinced me enough to purchase a Silhouette Cameo cutter. This arrived just before Christmas. Although I haven't powered it up yet I intend to use it to help construct buildings for my Pwllheli layout (see Pwllheli next stop thread) So now the learning curve and hard work begins..... Best wishes CC
  13. I have recently posted a video of Phil Greaves' Rhyd-y-Clafdy layout onto Utube which I thought you might like to view. To my mind Phil's layout is a superb portrait of the proposed extension of the Cambrian Coast Railway to the north coast of the Llyn Peninsula as it might have been in the early 1960s. CC
  14. Hello JB: I am afraid it will only work with V2 of the motor shield. I suggest you deal directly with the manufacturers Adafruit Industries (USA). Their website is at: www.adafruit.com The specific link to the motor shield (v2) is: www.adafruit.com/product/1438 However they do have an agent in Argentina: www.openhacks.com I hope this helps you. Regards CC
  15. Hello Alan: I obtained my stepper motor from Proto-pic for £13.32 (including VAT). The following link should take you directly to the stepper motor at their website: http://proto-pic.co.uk/stepper-motor-with-cable/ (Note you might have to copy and post the above web address into your Browser). I also got my Arduino Uno and Adafruit Motor Shield from them, Best wishes CC
×
×
  • Create New...