Animated Model Railroad Building Lights with Arduinos!

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ส.ค. 2022
  • Connect with me at ddrrcommunity@gmail.com
    Support the Channel on Patreon - / diyanddigitalrailroad
    Code and Schematic
    github.com/DIYandDigitalRR/Ar...
    1-2-3 blocks
    amzn.to/3pS1xuA
    Tamiya Cement
    amzn.to/3QYUBHF
    Starbond superglue
    amzn.to/3AVx1pY
    Styrene
    amzn.to/3PUFo9d
    Building kit
    www.modeltrainstuff.com/Desig...
    Arduino nano
    amzn.to/3AQORdB
    Nano shield
    amzn.to/3pS2d36
    LEDs
    amzn.to/3CA3EKP
    Wire
    amzn.to/3RdpCYR
    Amazon Store - www.amazon.com/shop/diyanddig...
    Etsy Store - www.etsy.com/shop/DIYandDigit...
    Facebook - / diyanddigitalrr
    Instagram - / diydigitalrailroad
    TRAIN SETS
    N Scale Train Set - amzn.to/33TzsbS
    HO Scale Train Set - amzn.to/311N17g
    O Scale Train Set - amzn.to/3lAZCGu
    G Scale Train Set - amzn.to/312Cn09
    3D PRINTERS
    Elegoo Mars 2 - amzn.to/3yopRaS
    Creality Ender 3 V2 - amzn.to/3DOuKei
    CAMERA
    Sony ZV-E10 - amzn.to/3IK9pX1
    MICROPHONE
    Rode Wireless Go - amzn.to/33ipqDf
    Rode Smart Lav - amzn.to/3dN6ChI
    LIGHTS
    Aputure Amaran 100D - amzn.to/3ELlysm
    Aputure Amaran MC - amzn.to/3ER8Vfw
    GVM 480LS 2 Light Kit - amzn.to/3EOTTGY
    MOTION CONTROL
    MOZA Aircross 2 Gimbal - amzn.to/3oNb4TG
    MOZA Slypod E - amzn.to/3dMWtkQ
    Channel Merch - teespring.com/shop/diy-digita...
    Consider donating the PCOS Challenge to help women everywhere with PCOS
    pcoschallenge.org/
    “The godly may trip seven times, but they will get up again.
    But one disaster is enough to overthrow the wicked.
    Don’t rejoice when your enemies fall;
    don’t be happy when they stumble.
    For the Lord will be displeased with you
    and will turn his anger away from them.
    Don’t fret because of evildoers;
    don’t envy the wicked.”
    Proverbs 24: 16-19 NLT
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 29

  • @pawpawelizabeth669
    @pawpawelizabeth669 ปีที่แล้ว +8

    You could also add a photocell sensor to start turning the lights on when darkness falls (i.e. you turn out the lights).

  • @richardwilliams232
    @richardwilliams232 ปีที่แล้ว

    My father, who worked for Ma Bell maintaining the switching equipment, taught me to use the side of the soldering iron barrel to make the shrink-wrap shrink.
    Nice project and keeping it simple helps understand integrating microcomputers to scenery.

  • @asaprocky8195
    @asaprocky8195 ปีที่แล้ว

    As a newbie, I'm really enjoying this series, for it applies instruction with application that bridges the esoteric thereby making it easier to understand the purpose of the code statements and the logic being utilized. From there, that understanding can be applied to all sorts of other instances not even related to model railroading. The scale of model railroading is very useful to this type of instruction, immediate application, highly visual, sound, motion, timing, responses to proximity, response to counted values, signal strength, etc... for a good grasp of micro-controlling or AI in general, not to mention the exercise of logic flow. It would be great if every school could have an area dedicated to model railroading for this purpose... for building, and programming as you tutor it. Students could then better understand the relationship between their code and result, instant feedback for best guidance. From there, the sky's the limit! Thank you so much. That said, I'm gonna click that Patreon link to support my appreciation and benefit from your channel. Learning with immediate application, is a very solid way to learn. The old saying, "If I only hear, I'll probably forget. If I see, I might remember. If I do, I'll understand." So far, I've enjoyed 2 out of 3 ... and it's time to get busy with the doing! Cheers! Keep safe, healthy, and happy!

  • @markjolyn94
    @markjolyn94 ปีที่แล้ว

    Very cool video!! Now I have more choices in lighting my buildings

  • @dhanushwimaladharma2524
    @dhanushwimaladharma2524 ปีที่แล้ว +1

    You're doing awsome, Jimmy ❤️‍🔥❤️‍🔥❤️‍🔥

  • @rwissbaum9849
    @rwissbaum9849 ปีที่แล้ว

    Jimmy, this is a GREAT video illustrating how easy it is to add interior lights to a structure. I see a lot of models that look beautiful, but are not lit - even on the outside - and, in my opinion, this ignores a wonderful way to make our structures come to life. A few comments:
    First, check out Roomettes lighting kits. They make very simple building interiors printed on cardboard and they include surface mounted LEDs. Many of their kits are designed to fit various DPM structures, and the others can be modified easily. That way, when the lights come on, you see an actual room, not just a white box. The LEDs they supply are compatible with Woodland Scenics Just-Plug lighting system, but they work just fine on 5 volts from the Arduino.
    Second, your if statement should be a while statement: while (randomlight1 == randomlight2) { randomlight2 = random(3,7);} This guarantees the two lights will be different and you can skip the else if statement.
    Third, you CANNOT use int timeon; if timeon will be larger than 32,767 (about 32 seconds)! If you want your light to be on for longer as you mention, you need to declare timeon as a long integer, like this: long timeon; Now, timeon can be as large as 2,147,483,647 - about 600 hours.
    Fourth, I know that using delay() in the loop() function makes things easy, but it puts severe handcuffs on the Arduino: the processor cannot do ANYTHING else while the delay() statement is running. Suppose I want to turn a random room light on for a random length of time, then do the same thing for the other four rooms? This is a much more realistic animation, and absolutely impossible to do using delay(). The solution is easy to use, but too lengthy to show here. I will email two files to you; you can choose whether your audience would be interested.

  • @GetRealwithMike
    @GetRealwithMike 2 หลายเดือนก่อน

    Awesome. Thanks!

  • @petermenningen338
    @petermenningen338 ปีที่แล้ว

    Jimmy a good addition to any modelers kit is a set of brad point drill bits. By design they cut the outer edge before the full center so they have a smaller chance to get hung up and spoil the work.
    You might explore the mili function rather than delay for timing as it does not stop the rest of the program while waiting.
    Mahalo

  • @CM-ARM
    @CM-ARM ปีที่แล้ว

    Very cool Jimmy

  • @Hellonwheels66
    @Hellonwheels66 ปีที่แล้ว +1

    If I saw the lights going on and off so often I’d be telling the kids to stop playing with the lights :)

  • @asaprocky8195
    @asaprocky8195 ปีที่แล้ว

    Outstanding episode, Jimmy! A bit of everything in this nice salad mix to turn into a finished product. The Sketch did a nice job of allowing each area to act independently, as well as together at times as it might in a real world. Really liked the clever way you handled separation for the random cases, by forcing a go back if equal. Well played. Curious.. Is that work surface mat specific to RR scale dimensions?

  • @SD45-ET44AC
    @SD45-ET44AC ปีที่แล้ว

    Looking Very nice ! It looks like I might eventually get there, almost ready to top out on my layout. Does your square convert inches or mms to HO & N scales? If you turn your project 90° & put it parallel to the front edge of your workbench you can use a pair of clamps to hold it in place (yes, I’m truly OCD).

  • @smallrails6831
    @smallrails6831 7 หลายเดือนก่อน

    Cool

  • @edwardaudet8367
    @edwardaudet8367 ปีที่แล้ว

    Really nice, like how you did the interior setup. I didn't realize you could use 12V leds and skip the resistors. One last thing did yu use an HO building to demonstrate the lighing on a building. My buildings are all DPM building and they sure look smaller than your building. Either that or my eyes are deceiving me ... Great video always a pleasure to tune in and learn new stuff !!!

    • @garrettswoodworx1873
      @garrettswoodworx1873 ปีที่แล้ว +1

      It was easy to miss but he mentioned right at the beginning of the video that it was an HO scale building. LOL your eyes are fine!

    • @edwardaudet8367
      @edwardaudet8367 ปีที่แล้ว

      @@garrettswoodworx1873 I guess it was my ears then.. I didn't catch it. It bytes getting old. Bummer!

    • @garrettswoodworx1873
      @garrettswoodworx1873 ปีที่แล้ว

      @@edwardaudet8367 Trust me Edward I understand! (Getting old does beat the alternative, however!)

    • @lab4746
      @lab4746 ปีที่แล้ว +1

      You may have noticed that the LEDs in the link are prewired with a resistor.

  • @MMRails
    @MMRails ปีที่แล้ว +1

    Looks great Jimmy! Can you add other things to that Nano (sp?) or is it now committed to that structure and lights only? Would you have to purchase another Nano for another structure?

  • @baldypalmsrailroad
    @baldypalmsrailroad ปีที่แล้ว

    Nice job Jimmy, thanks to posting all the links of the products you were using in this build. How long did the Tamiya glue take to set and dry. Did you use an accelerator? Thanks.

  • @VictorianMaid99
    @VictorianMaid99 ปีที่แล้ว

    I really enjoy your projects. Have you ever used the UNO to create engine noises on a diesel locomotive?

  • @l.rod2827
    @l.rod2827 ปีที่แล้ว

    Great video, I just put together some structure lighting but added four more lighting pins (total eight) I'm also using an Arduino Uno. The code you wrote worked great, just modified for the additional outputs however noticed the random lighting stops when it reaches the end, is there additional coding required to keep the random lighting sequence continually going?

  • @gravesclay
    @gravesclay ปีที่แล้ว

    A flickering blue LED could simulate a TV being on in a room!

  • @asaprocky8195
    @asaprocky8195 ปีที่แล้ว

    I'm now an Engineer Patreon... Gotta find me an Engineer's hat. Whoot ... Whoot!

  • @OTRWA
    @OTRWA ปีที่แล้ว

    Another interesting segment....forgive me if I ,issed a bit but was wondering...can these Arduino bus units be programmed for flickering and dimming your leds? Cheers in advance.

  • @donaldkormos5529
    @donaldkormos5529 ปีที่แล้ว +1

    Nice job Jimmy!! Some modelers give the interior and structure walls a quick spray of flat black to block light. BTW, if you increase the "on time" by using great big integers larger than 2 bytes with most Arduinos, you might have to declare them as long integers to get 4 btyes.

  • @rwissbaum9849
    @rwissbaum9849 ปีที่แล้ว

    Sorry - forgot to mention the Roomettes kits are only available in HO scale, but it would be easy to copy them at 54% to get N scale interiors.

  • @herliananovianti4152
    @herliananovianti4152 10 หลายเดือนก่อน

    May I know what tools are needed in this video?

  • @charlesmcclure5994
    @charlesmcclure5994 ปีที่แล้ว

    It's a nice little project Jimmy but you lost me at the coding 😵‍💫