Sputtering start to a new layout

Stephane Savard May 24, 2018

  1. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    Thanks in2tech! If you're happy with your little layout it shouldn't matter. Mine is more permanent, but I'm finding all the mistakes that I made as I build it. The grades are too steep, there's really too much track, tunnels are annoying, and the trackwork is suspect at best. But I'm forging ahead with the problems and just chalking them up to learning. Who knows, if I ever build a second layout once this is "finished", at least I'll have a better idea of what not to do. I enjoy just building stuff, and this table is just that, a huge excuse to play!


    Okay.. so I took the wheels off the GMD-1 yesterday and re-gauged them all. First time around, I widened the gauge until there was no side to side play in the NMRA gauge. Ick. Yeah that doesn't work. The locomotive was choppy through the turnouts, catching on everything. So re-gauged again, this time with a little side to side give in the gauge. Aha! Now the GMD-1 runs nicely through the turnouts, and stalls less often. But still can't make it across some turnouts, especially at slow speeds.

    But I know what's wrong.

    First, I'm sorry for the quality of the pictures. They suck.

    IMG_20201224_095514815.JPG

    So I started running the GMD-1 in the future mine tracks. Easier to take pictures and see what's going on. Up above, we see the GMD-1 has stalled. The rear truck is on the turnout's frog, so no electrical pickup there. But what of the front truck? It's clear and on rail that I know to be good!

    IMG_20201224_095453023.JPG

    There!!!! See the fuel tank? it bottomed out on the rails. most frogs on the Atlas turnouts dip a bit below the level of the rails. So as the truck rolls over that frog, the fuel tank hits the rail. It doesn't help that the fuel tank is mounted ever so slightly crooked on the frame.

    Okay, so it's barely touching! why should this matter? This next photo shows the final straw...

    IMG_20201224_095822799.JPG

    With the fuel tank bottomed out, the front truck lifts off the track. The rear wheel looks fine, but I guess the locomotive needs more than just one axle picking electrical contact.

    So yeah, if I run quickly through the turnout, it makes it across. But I can't run at yard speeds. I wasn't moving this loco at tie-by-tie speed. Re-gauging the wheels helped, but it still dies fairly often.

    Now here's my biggest problem...

    exploded.png

    On the Rapido website, they have an exploded view of the GMD-1. The fuel tank is held on by a screw, and the only way to get to it to to completely disassemble the frame. I mean completely! I don't think I have a choice at this point. But I'm really apprehensive about doing this and ending up with broken bits or something the runs terribly.

    The idea of course would be to reseat that fuel tank so that it is perfectly level and give it every chance of not bottoming out on the rails.

    Any other ideas?
     
    Last edited: Dec 24, 2020
  2. RailMix

    RailMix TrainBoard Member

    1,248
    2,564
    48
    I just found your video and found it very interesting. Comparing to your initial posts, progress has been excellent, especially considering the learning curve involved and the application of technology in terms of electronics and 3D printing. It is apparent that you have also given considerable thought to scene composition and I'm guessing that, in terms of scenery, this will be a very interesting layout when finished. The sheer cliffs will be dramatic and the river meandering through the layout will be a great scenic focal point. Very nice.
    Have also noted your problems with locomotives. That is, as In2tech pointed out, sad. For the cost of them, we should have the right to expect better quality. I was particularly surprised that Intermountain would produce something that shabby.
     
    Last edited: Dec 24, 2020
    Stephane Savard likes this.
  3. Sumner

    Sumner TrainBoard Member

    1,029
    1,139
    26
    Good detective work.

    Looking at the parts looks like the single screw isn't in a good place being at an end and not in the middle. Looks like there are tabs on the other end. Do they go up into slots? Any chance they do and they are hung up on the sides of the slots? If so maybe they can be snapped into place without a teardown?

    Good luck,

    Sumner

    P.S. Look at the grades as a good thing. They give you reason for more 'helper' engines and a stop to pick them up before going up the grade.
     
    Stephane Savard likes this.
  4. Mike C

    Mike C TrainBoard Member

    1,672
    181
    39
    I would just take a file to the tank . Work a little at a time till it goes through the turnouts .....Mike
     
    S t e f a n likes this.
  5. KeithUKN

    KeithUKN New Member

    4
    0
    1
    Hello to all in USA from England - hope things get better for us all next year!
    I have been wondering about using a Nano for automating a reverse loop and this thread has been really helpful - thanks Stephane.
    I am using servos to operate my points, not solenoid switch machines; any ideas how I could get the Nano to operate a servo please?
    I am using a 12 channel servo board called Megapoints which uses an on/off switch input to control point servos, so I could use a single on/off output from the Nano, but better if the Nano could give a signal (PWM?) to drive the servo directly so I get an 'extra' channel on the Megapoints board.
    Cheers
    Keith in England
     
  6. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    Hey, welcome Keith!

    I've not played much with servos and the Arduino, however I remembered that the "Getting started with Arduino" kit I have had an exercise for building a "mood cue", a little circuit that moves a servo according your mood. Ahh, a quick search found it online... https://programminginarduino.wordpress.com/2016/03/01/project-05/ ...not sure if this will help, but at least it's a start for controlling a servo with the Arduino.

    However, you might also want to read about some railroad related projects in the MRH magazine. If I remember the article correctly, it may have some servo related stuff too. https://model-railroad-hobbyist.com/magazine/mrh2016-12-dec/arduino

    This is basically how I taught myself the basics of Arduino, a couple of Arduino "getting started" kits, online articles and google help a lot. Though probably helps that I already have knowledge of programming and scripting from my job.
     
  7. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    Tiny update time!

    I've not done much on the layout at all, and didn't open up the GMD-1 yet to fix the fuel tank. But on the other hand I did adjust the wheel gauge on both Dash 8-40CMs. Turns out the gauge was too tight and now, after adjustment, they no longer short when crawling through turnouts! :D:D:D

    They're now my best running locos on the layout, far surpassing even the Kato, and I can crawl them through the yard, and run beautifully throughout the entire layout. I did notice that one of the gears on a forward axle had a broken tooth though! No idea how I broke it, but turns out that's why this particular loco was clicking when running. I found someone on this board that had extras and he's sending me some replacement axle/gear assemblies. So I'm super happy right now!
     
  8. KeithUKN

    KeithUKN New Member

    4
    0
    1
    Stephane,
    I have got you sketch running (sort of) in a Uno simulator on my PC.
    I have also been looking at the IR sensors you used, and I think the types I use already will be OK. These give a digital 0V/5V output, but give a low level when covered; your sensor connection diagram suggests to me a high level output when the sensor is covered - is this correct please? If so, I can change my sensors to operate as break-beam so they give a high when the beam is broken.
    I'm slowly learning about Arduino, I am a MERG member and there are a series of 'Beginner's course' videos on their site. I have also been watching a site on Youtube - 'Rudy's fun with Arduino' which has been very helpful.
    Keep Safe, and keep building!
    Cheers
    Keith
     
  9. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    Hi Keith - In my case, I hooked up the IR sensors to the Analog pins. Instead of just a high/low (on/off) reading, they get converted to a number between 0-1023. If the sensor is fully saturated with IR light, the reading will be close to 1023. When no IR light is detected, theoretically, it should be 0. However it's never 0. The IR light is being bounced off the sides of the rail and the environment which "pollutes" the reading. When uncovered, the value I get is about 40. If a black car (or truck) passes over the sensors, the reading goes up to 120 or so. A white tank car shoots it right up to 300! White reflects IR light much more than black.

    But it's not perfect, and in a second iteration of the code, I made the main and diverging "minimum detection value" different. I guess the IR sensors aren't perfect, and some are a lot more sensitive than others.

    This is the latest code...

    Code:
    /*
      IR detection, turnout control
    
      Stephane Savard
      December 19 2020
    */
    
    #define MAIN 1
    #define DIVERGING 2
    
    const int mainRelayPin = 2;
    const int divergingRelayPin = 3;
    
    const int mainTogglePin = 4;
    const int divergingTogglePin = 5;
    
    const int mainLEDPin = 7;
    const int divergingLEDPin = 8;
    
    const int mainIRSensorPin = A0;
    const int divergingIRSensorPin = A1;
    
    const int mainIRDetectionValue = 200;
    const int divergingIRDetectionValue = 100;
    
    // variables:
    int previousState = -1;
    int currentState = MAIN;
    
    // the setup function runs once when you press reset or power the board
    void setup() {
      delay(3000);
     
      pinMode(mainTogglePin, INPUT_PULLUP);
      pinMode(divergingTogglePin, INPUT_PULLUP);
     
      pinMode(mainIRSensorPin, INPUT);
      pinMode(divergingIRSensorPin, INPUT);
     
      pinMode(mainLEDPin, OUTPUT);
      pinMode(mainRelayPin, OUTPUT);
      pinMode(divergingLEDPin, OUTPUT);
      pinMode(divergingRelayPin, OUTPUT);
     
      digitalWrite(mainLEDPin, LOW);
      digitalWrite(mainRelayPin, LOW);
      digitalWrite(divergingLEDPin, LOW);
      digitalWrite(divergingRelayPin, LOW);
     
      Serial.begin(9600);
    }
    
    // the loop function runs over and over again forever
    void loop() {
     
      // read input pins
      int mainIRValue = analogRead(mainIRSensorPin);
      int divergingIRValue = analogRead(divergingIRSensorPin);
      int isMainToggled = (digitalRead(mainTogglePin) == LOW);
      int isDivergingToggled = (digitalRead(divergingTogglePin) == LOW);
    
      //Serial.print("Main: ");
      //Serial.println(mainIRValue);
      //Serial.print("Diverging: ");
      //Serial.println(divergingIRValue);
     
      // Set MAIN or DIVERGING
      if (mainIRValue > mainIRDetectionValue){
        currentState = MAIN;
      }
      else if (divergingIRValue > divergingIRDetectionValue){
        currentState = DIVERGING;
      }
      else if (isMainToggled){
        currentState = MAIN;
      }
      else if (isDivergingToggled){
        currentState = DIVERGING;
      }
     
      if (currentState != previousState){
        previousState = currentState;
        
        switch (currentState) {
          case MAIN:
            Serial.println("Set MAIN");
            
            // turn diverging led indicator off
            digitalWrite(divergingLEDPin, LOW);
            
            // turn main led indicator and relay on; relay is only
            // turned on momentarily to prevent burning out the coil.
            digitalWrite(mainRelayPin, HIGH);
            digitalWrite(mainLEDPin, HIGH);
            delay(150);
            digitalWrite(mainRelayPin, LOW);
            break;
          
          case DIVERGING:
            Serial.println("Set DIVERGING");
            
            // turn main led indicator off
            digitalWrite(mainLEDPin, LOW);
            
            // turn diverging led indicator and relay on; relay is only
            // turned on momentarily to prevent burning out the coil.
            digitalWrite(divergingRelayPin, HIGH);
            digitalWrite(divergingLEDPin, HIGH);
            delay(150);
            digitalWrite(divergingRelayPin, LOW);
            break;
          
          default:
            // do nothing.
            break;
        }
       }
    
       delay(100);
    }
    Note that the delay right at the beginning of "setup" only exists for my layout. I have two reverse loops, and therefore use two Arduinos. The turnouts are hooked up to a Capacitive Discharge Unit. So in one Arduino, I put a delay of 1000, the second has a delay of 3000. That way when I turn on the layout, the turnouts don't reset to main at the same time.

    enjoy!
     
  10. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    There might be a bit of a pause in layout updates while I play with a new toy!

    IMG_20201229_130942491.JPG

    I sorta upgraded my Anycubic Photon to a younger model with bigger... build plate :D
     
    drbnc, Sumner and BNSF FAN like this.
  11. in2tech

    in2tech TrainBoard Member

    768
    811
    36
    Can we see the new toy in action at some point? Looks cool, is that the liquid thingy? Technical term :)
     
    BNSF FAN likes this.
  12. BNSF FAN

    BNSF FAN TrainBoard Supporter

    7,296
    12,922
    123
    Looks like a really cool new toy. (y) Would be interested in knowing how the resin smell level is with this one.
     
  13. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    Good day in2tech!

    Yes, well, "in action" is about as exciting as watching paint drying. Whir of fans, and the occasional up and down motion of the build plate. :D

    However, yes, I will be posting some results of various prints I make for my railroading stuff. Though right now, I'm only running some test prints and dialing in the correct cure times. I want to make sure the machine is running perfect and has no uncorrectable flaws before the return period for Amazon runs out. Also looking at different slicers since it appears Chitubox and Anycubic are no longer buddies - Chitubox has yet to support the Mono X. Really, I could still use Chitubox, save the STL and use the included slicer to well, slice the model. But I occasionally take a look at the new software that comes out and see if I like it better than what I'm used to. This is a perfect time to do so!

    The main reason I bought the Mono X is the size. It's sort of a mid-sized resin printer, or liquid thingy printer if I use the correct technical term :D:D. The old Photon printer printed at roughly 120mm x 60mm by 150mm. This new printer gets 192 x 120 x 245! Much better for n-scale, especially when printing small buildings. The fact that it prints three times faster doesn't hurt either.

    In the n-scale part of the forum, there is someone that printed a caboose using this same printer model. Check that out! My prints will hopefully be looking good like that!
     
  14. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    BNSF Fan: the resin smell is not really the problem of the printer. It's the resin itself. That being said, this printer has much better fans than the previous printer. More fans, and stronger fans as well, to ventilate the UV lamp and cool down the LCD for a better longer life. However, crucially, there is no fan that sucks air out of the build chamber itself, unlike the Photon.

    I haven't noticed if the machine makes more or less small than my previous machine. But I still run the machine in the garage, with the door leading to the house proper weather sealed. The weather sealing is to keep the cooler air out of the house since in winter the temperature in the garage usually hovers around 16-18 C (60.8 - 64.4 in those weird degrees you use :ROFLMAO:). Actually, this is a bit cold for printing, where generally you want to be above 20C (68F), so I have my printer in a cabinet... lucky, the new printer still fits, though I need to buy a low-profile USB stick.

    IMG_20201230_091133948.JPG

    The old printer generated a lot of heat, and by cracking the door open just a bit, I could regulate the temperature of the machine to run at nearly 30C (86F). But it's not working with this printer!! The UV lamp turns on for only 1.5 seconds or so per cycle (compared to 11 seconds on the old printer) and it's not heating up. Yesterday a five hour print never brought the temperature in the cabinet up above 21C for the entire duration of the print, even with the door fully closed.

    Anyway, that all being said, there are some nearly odorless resins, but I've not tried any of them yet (they tend to cost a bit more).
     
    BNSF FAN likes this.
  15. BNSF FAN

    BNSF FAN TrainBoard Supporter

    7,296
    12,922
    123
    Interesting. Thanks sir. :)
     
  16. KeithUKN

    KeithUKN New Member

    4
    0
    1
    Hello Stephane,
    Loaded your V2 code into the simulator, and used pushbuttons for toggle and sensor inputs with LEDs for indicator and relay outputs - it works a treat!
    I think from the simulator the direction round the loop for a single entry/exit using one turnout will operate in alternating directions - am I correct?
    I'm using a helix with a single track to drop down, and round a reverse loop then back up the helix; now I might just add to the loop part to give me two storage roads!
    I will next try to add in servo control once I get my head round that.
    Thanks for getting me so far along the road to a fully automated reverse loop for my layout.
    Cheers
    Keith
     
  17. Sumner

    Sumner TrainBoard Member

    1,029
    1,139
    26
  18. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    Glad I could help Keith! If I understand your question correctly about the alternating routes, then yes, when the train exits the loop through the diverging, it will re-enter through the diverging, then exiting through the main, and then re-entering through the main, etc.

    Sumner: I have one of those heat pads in a box in the garage. completely useless. Bought it when I was first trying to figure out how to warm my cabinet, but before I had actually tried printing in that cabinet LOL. Doesn't radiate heat at all, it just gets warmish to the touch. It's really meant to be stuck to the underside of an terrarium and heat the soil somehow. I also tried an IR heat bulb. Also lying somewhere in a box now. I dropped that idea real quick, that heated up the cabinet to stupid hot levels in a very short time!

    I think the temperature is fine, the garage is heated; else the temperature would go below zero in the dead of winter. However the central heating of the house just isn't heating it enough due to the garage door being such a terrible insulator. But when I need to work in there, I just use a portable heater to bring up the temp to the low 20s. So no worries really.

    Still paying with the printer. I'm trying to put up some LED lights at my home office desk, beneath the cabinets. I designed the little mounts for the aluminum rail in Fusion 360 and printed a set. But I've got a weird thing happening with the printer. When I open the cabinet door, and then initially touch the metal side, I often get a small shock if it's been running a while. I'm not sure if I've been dragging my feet or something, but the last time I got the tiny shock was when my print was at 4% remaining. It froze the printer! Just stopped printing and was unresponsive. Had to power it off and back on. Restarted a new print and now seems to be working fine. I'm worried the machine might not be grounded properly. For the next few times I go the the machine, I'll make sure to touch a screw on the electrical cabinet that's on the wall next to the printer; make sure I have no static electricity on me before touching the machine. If I still get a shock, that machine is going back to Amazon.
     
  19. Stephane Savard

    Stephane Savard TrainBoard Member

    333
    682
    13
    Mystery solved. I'm just dragging my feet too much and the air is really dry today. I walked up to my printer after the previous post, and as a precaution, touched one of the screws on the electrical cabinet's front panel. I saw a little blue static shock as I touched it. Ow. :D:D:D

    So yeah, touching the printer was fine after that. But that's a lesson, make sure to be grounded before touching the machine when it's running.
     
  20. Sumner

    Sumner TrainBoard Member

    1,029
    1,139
    26
    I get static shocks more on the Ender than other things in the house. Not sure why but hasn't effected the printer.

    On the heat I really like these controls.

    This one turns something 'off' when the temp drops to a certain level that is easy to set and seems pretty darn accurate. Have one on a blower for a gas heating stove. On the swamp cooler and two on exhaust fans for the green house....

    https://www.amazon.com/gp/product/B01LZV591B/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1

    This one turns something 'on' when the temp drops to a selected point, down to 40 degrees (what could work for you with a bulb in the cabinet). I have one set on a heat lamp where the water comes into the house and where it can freeze there .....

    https://www.amazon.com/gp/product/B01I15S6OM/ref=ppx_yo_dt_b_asin_title_o05_s00?ie=UTF8&psc=1

    They aren't that expensive and I like that you can always see the present temp at any time on the screen,

    Sumner
     

Share This Page