Results 1 to 15 of 15

Thread: Pinnacle & Western Electronics Build Thread

  1. #1
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default Pinnacle & Western Electronics Build Thread

    Here are links to some previous posts for my lighting control build.

    https://www.nscale.net/forums/showth...111#post608111
    https://www.nscale.net/forums/showth...240#post608240

    I ordered some additional parts at the end of the last weekend and they arrived today.

    A Klein Tools ethernet connector crimper and 100 each RJ45 and RJ11 crimp on connecters.
    Now I should have the supplies to eventually make all the necessary connections between the Arduino nodes.

    IMAG2173-20210317-165432212.jpg

    Haven't assembled the first board yet. Got sidetracked working on the software side...

    Control Panel Screenshot 2021-03-17_01.jpg

    On the left, we have the Fast Clock settings. I have it programmed be able to go from a 1:1 to a 10:1 fast clock ratio. If the fast clock function is enabled, the control program will broadcast the fast clock time whenever it changes. I'll have several nodes on the walls around the layout that will display the fast clock time.

    The big RED button on the middle is the Emergency (read: "PANIC!") button. When activated, a emergency stop message will be sent across the network and each node will act to stop as needed. Pressing the button again will cause an emergency clear message to be sent to all nodes.

    On the right is the lighting control panel. A slider for each variable color channel (red, green, blue, yellow, warm white, and cool white). There's also a work light channel that's simply on or off. I can set each channel individually or all together (except the work light).

    My long term plan for the lighting is to be able to sync it to the fast clock and have the lighting change according to the time of day, day of year, and moon phase.

    Next steps:


    • find all the bugs in the control program that I can
    • assemble the lighting control node
    • breadboard a test rig that will allow testing of the light control node
    • test and adjust the programming as necessary
    • determine if I can use the current custom PCB for both lighting and fast clock. I'm thinking I can until I can prove otherwise.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  2. The Following 6 Users Say Thank You to Gary Rowan For This Useful Post:


  3. #2
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default

    Made some progress last night.

    Built a breakout cable out of the good end of an ethernet cable (other end was bad) and some dupont connectors.

    IMAG2180-20210318-004724249.jpg

    Assembled the first node. While doing continuity checks on the connections, I discovered that the ground trace to the RJ45 pin 8 was missing. It turns out that I had forgotten to manually route that one trace. Not a major problem, I can fix it by adding a jumper wire on the back side of the PCB. Or maybe not. Any other board I connect via the RJ45 will already have a ground connection from the DC accessory power bus.

    IMAG2175-20210318-003817906.jpg

    And finally assembled the initial test rig. This will be used to check basic data communications, system level commands (like emergency stop and clear, fast clock time), lighting specific commands.

    IMAG2179-20210318-003707128.jpg

    Now where did I put that large alarm clock LED display?
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  4. The Following 8 Users Say Thank You to Gary Rowan For This Useful Post:


  5. #3
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default

    Short update...

    Putting an order together for the parts for the LED driver board. Still have to double check that PCB design.

    Had to go back and refer to one of my previous posts for some specific parts: https://www.nscale.net/forums/showth...OSFET-question

    Wrapping up the test sequence programming in the master program. Testing begins tomorrow ... maybe.

    Also beginning the circuit design for a fast clock display driver board. Not going to use my LED driver board. The clock display is going to require some display multiplexing (involving some external ICs) and the output connections are going to be different.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  6. The Following User Says Thank You to Gary Rowan For This Useful Post:


  7. #4
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default

    Started the testing this afternoon.

    First, I made the missing connection between RJ45 pin 8 and ground.

    IMAG2181-20210320-194144829.jpg

    Then, I put together a small sketch to confirm that the custom PCB is now wired correctly, that the breakout cable is wired correctly, and that the Arduino output pins are mapped to the lighting channels correctly.

    https://youtu.be/ztCOy9Z0Suw

    All good, on to adding in and testing basic communications.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  8. The Following 5 Users Say Thank You to Gary Rowan For This Useful Post:


  9. #5
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default Pinnacle and Western Lighting Build - testing update

    Well, the communications testing didn't go as planned. I hookup up the Nano, the test display board, and the computer and got the master program up and running. The first test was a 'Ping' test. The master program was to send a ping command to the Nano which should have read the message, and sent back an acknowledgment. All I could see happening was <...crickets...> nothing.

    So, shutdown the master program and brought up the Arduino IDE with its monitor program. Tried sending a message through the monitor and same thing: zip, zilch, nada.

    The Arduino program compiled, so it had to be syntactically correct, which means a logic error.
    I could see the receive light flash on the Nano when the message was sent, but no response back.

    When I initially developed the Nano program, I had attempted to modularize the functions as much as possible. I'm thinking that something is not working correctly between modules.

    To test that hypothesis, I wrote another small test program that would simply read in a message and write it back out on the serial line. And that test program worked. This test also rules out any issues with the serial port on the computer, the USB cable, and the Nano itself.

    Next step: I've cobbled up a third test program which includes only a subset of the command set I was trying to implement. Wifey wants to use the computer so that test will have to wait until later this evening or tomorrow.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  10. The Following 3 Users Say Thank You to Gary Rowan For This Useful Post:


  11. #6
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default Late test update

    Had a few minutes before bedtime so I tried the Nano test program #3. It Works!!!

    Video of operation using the master control program: https://youtu.be/bVl0MG__J6I

    Not real happy with the response, but I've got the baud rate set at only 9600. May try upping the baud rate to 19200 or higher. My only concern on that would be the data cable picking up interference.

    Proof of concept successful. So now I can concentrate on finalizing the design and parts orders for the driver board.

    One question for the electronics gurus:

    Any one know of a device comparable to the TLC5940? It's a 16 channel PWM LED driver chip. They seem to be scarce, and pricey.
    One of these would let me free up the 6 PWM pins (in exchange for 3 digital pins) I'm using for lighting output and would go me a total of 22 PWM outputs off a single UNO/Nano.

    And I just had another thought. I can build a board with slide potentiometers, hook them to the Arduino analog pins, and have that board send lighting commands to the master control program. Another project to add to the list.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  12. The Following 3 Users Say Thank You to Gary Rowan For This Useful Post:


  13. #7
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default

    Okay, the parts orders for the lighting driver board have been placed. Arrival expected sometime next week. Still have to do the circuit board order, but I can breadboard the circuit for the initial testing once the parts arrive.

    So in the meantime, I'll work on the fast clock.

    Found this in the junk parts box - an old faceplate and display from a dead AM/FM alarm clock.

    IMAG2193-20210324-231537939.jpg

    Here it is with the plastic printed film stripped off. I'm hoping to find some suitable tinted plastic sheet to recover the faceplate. I'll probably end up building a small wooden box I can mount the faceplate into.

    IMAG2194-20210324-231537105.jpg

    And finally the LED display on its own.

    IMAG2195-20210324-231513730.jpg

    The attached ribbon cable has 19 wires, 2 of which are unused and 2 of which are grounds (commons). Each of the 15 remaining wires light 1 of 2 display segments depending on which ground is used. I've mapped the segments to their corresponding pins and commons and it appears that the display is basically divided in half, top & bottom.

    Haven't done a lot of thinking yet on how to design the interface to the Nano. Anyone have any thoughts or suggestions?
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  14. The Following 7 Users Say Thank You to Gary Rowan For This Useful Post:


  15. #8
    Join Date
    Apr 2014
    Location
    southeast michigan
    Posts
    1,765
    Thanks
    1,278
    Thanked 3,160 Times in 1,000 Posts
    Mentioned
    88 Post(s)
    Tagged
    0 Thread(s)

    Default

    That's a lot of wires! I used a $10 2-line display for a weigh scale and needed a pretty big ribbon cable. Hooking it up was the project's biggest pita. If I were to do it again I'd use this: https://www.adafruit.com/product/772...hoCGQMQAvD_BwE

  16. The Following 2 Users Say Thank You to NtheBasement For This Useful Post:


  17. #9
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default

    Quote Originally Posted by NtheBasement View Post
    That's a lot of wires! I used a $10 2-line display for a weigh scale and needed a pretty big ribbon cable. Hooking it up was the project's biggest pita. If I were to do it again I'd use this: https://www.adafruit.com/product/772...hoCGQMQAvD_BwE
    That's a good idea, but I don't think it's for this particular application. The digits on the display I have are 3 inches tall and can easily be seen across the room (it was an alarm clock, after all). The older I get .....
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  18. The Following User Says Thank You to Gary Rowan For This Useful Post:


  19. #10
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default Some parts have arrived...

    The parts I ordered last week were waiting for me when I got home today.

    IMAG2197-20210329-190002950.jpgIMAG2198-20210329-19000282.jpg


    • Some 16 pin IC sockets for the fast clock circuit
    • MOSFETS for the LED lighting project
    • heatsinks for the MOSFETS
    • SN74HC585 Serial In/Parallel Out shift registers for the fast clock circuit and future projects
    • SN74HC165 Parallel In/Serial Out shift registers for a couple of future projects already smoldering in my feeble brain


    With the MOSFETS now in hand, I can now breadboard the LED driver circuit and test it before finally locking down the PCB design.

    The 585 shift registers will let me breadboard the fast clock driver circuit and begin program development / testing.

    The rest of my week is looking very busy through Saturday night, so I don't anticipate much progress in the next few days.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  20. The Following 8 Users Say Thank You to Gary Rowan For This Useful Post:


  21. #11
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default

    Still recovering from a very busy last week and weekend. Did manage to get into the train room this evening for a few minutes and gather all the parts needed to breadboard and test the LED lighting driver circuit.

    The LED strips shown were a gift from a friend and are intended for automotive applications. They eventually may be used for under the layout work lighting. Now to find a suitable 12 volt wall wart.

    IMAG2201-20210406-213239718.jpg
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  22. The Following 7 Users Say Thank You to Gary Rowan For This Useful Post:


  23. #12
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default

    Early weekend update...

    Managed this evening to breadboard the LED driver test circuit.

    IMAG2203-20210409-212424354.jpg

    I decided to start testing with 5 volts and discrete LED's instead of 12 volt LED strips (meaning: I still haven't found my box of wall-warts. )

    IF I don't go to a train show tomorrow, I'll test it while the wife is at work, otherwise I'll test sometime Sunday.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  24. The Following 10 Users Say Thank You to Gary Rowan For This Useful Post:


  25. #13
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default

    Well, today was a very good day. I was able to go to a model train show this morning, a gun show this afternoon, -AND- was able test my LED driver board circuit design.

    Short video of test here: https://youtu.be/lhqVtyA_pHE

    Now to find that <expletive deleted> 12 volt wall wart and test the circuit with it and the LED strips.

    ... Late update - found my box of wall warts while looking for something else ... Isn't it funny how that works?
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  26. The Following 4 Users Say Thank You to Gary Rowan For This Useful Post:


  27. #14
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default Pinnacle and Western Lighting Build - Final LED driver circuit test

    So, this evening I hooked up the final test circuit with some short 12 volt LED strips and a 12 volt wall wart.

    Short video of the final test: https://youtu.be/zyj7BG6HXyQ

    I'm am satisfied that the circuit design works so I'll finalize the printed circuit board design and get it ready to send off.

    I'm going to hold of on the circuit board order for the moment and throw in some other circuit designs to reduce the shipping cost.

    Now, on to the fast clock circuit.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  28. The Following 4 Users Say Thank You to Gary Rowan For This Useful Post:


  29. #15
    Join Date
    Oct 2014
    Location
    Northwest Arkansas, USA
    Posts
    520
    Blog Entries
    6
    Thanks
    2,287
    Thanked 1,732 Times in 402 Posts
    Mentioned
    36 Post(s)
    Tagged
    0 Thread(s)

    Default Fast Clock Display Driver Circuit Prototype

    Starting working on the prototype / test circuit for adapting an old alarm clock LED display into a fast clock.

    I've decided to use some 74HC595 shift registers between the Arduino and the LED display board.

    The LED display has 19 interface pins. 2 of the pins are common grounds and 15 of the pins for 30 light-able the segments. The rest of the pins are unused.

    Each of the 15 pins is tied to 2 segments. One segment of each pair is tied to one ground and the second segment of each pair is tied to the other ground.

    This effectively splits the display into two halves, top and bottom.

    It will take 2 8-bit shift registers for each display half (upper and lower).

    This particular shift register chip has an 'Output Enable' pin that I can use to toggle between each display half (top enabled, bottom disabled, and vice-verse).

    Doing it this way eliminates the need to try to switch the ground lines off and on as needed.

    Anyways, since I've never used this chip before, I built a simple test circuit to see if I had it figured understood it correctly.

    Short video of the working circuit: https://youtu.be/N7g3ZYx0vM0

    I'm also planning on using this shift register method on a circuit for interior lighting. Wifey gave me 3 laser cut house kits for Xmas. They're mostly assembled with interior lighting LEDs already added. They're just waiting on me to build the interior lighting electronics.
    - Gary R.

    President & CEO
    Pinnacle & Western Railroad

    Never under-do the over-kill.

    I don't always stop for trains, but when ... oh wait!, Yes I do.

  30. The Following 3 Users Say Thank You to Gary Rowan For This Useful Post:


Similar Threads

  1. Pinnacle & Erewhon build thread
    By Gary Rowan in forum Layouts, Design, & Planning.
    Replies: 10
    Last Post: 14th Nov 2020, 11:09 PM
  2. Deseret Western Railway Construction Thread
    By Deseret Western in forum Layouts, Design, & Planning.
    Replies: 24
    Last Post: 21st Apr 2019, 12:18 AM
  3. Pinnacle & Western helix Structural design
    By Gary Rowan in forum Layouts, Design, & Planning.
    Replies: 4
    Last Post: 11th Apr 2016, 10:09 PM
  4. Pinnacle & Western
    By Gary Rowan in forum Layouts, Design, & Planning.
    Replies: 9
    Last Post: 3rd Mar 2015, 10:57 PM
  5. Western Pennsylvania Coal Hauling Layout, Build Thread
    By Bessemer Bob in forum Layouts, Design, & Planning.
    Replies: 54
    Last Post: 2nd Jan 2013, 07:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •