Building a Case for DCC++EX Base Station

LifeTrekker_ Apr 27, 2022

  1. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    So, now that I've assembled my first DCC++EX base station and gotten it working, I'd like to case it up.

    Now I know that some have 3D printed cases for their DCC++ systems, but I don't have a 3D printer, and being an old school modeler, I leaning towards building a case out of off-the-shelf materials that are readily available.

    First off, what are my design goals? One, I want everything in one case, including the power supplies. Two, the case needs to be sturdy enough to protect the components. Three, no wires going in or out, only connection ports on the outside of case. They will be one for power to the DCC++EX system, the USB serial port, and then speaker terminals for the main and programming track outputs. Fourth, room for an interior mounted cooling fan, if needed. And fifth, mounting tabs on the case so it can be attached somewhere under the layout structure.

    So, with all the above in mind, below is a picture of all the components I have gathered up so far. The main thing I'm missing is the speaker connection terminal, but I hope to pick up something suitable by the end of the week.

    Thoughts? Comments, Suggestions? Am I totally barking up the wrong tree?


    Sent from my SM-G973U1 using Tapatalk
    [​IMG][​IMG]
     
    Last edited: Apr 27, 2022
    Sumner likes this.
  2. Davey H

    Davey H New Member

    3
    2
    8
    As I experimented with DCC++ and, in particular, ex-rail, I discovered I wanted to add more sensors, servo drivers, music players etc.. This, of course, necessitates fixing many wires to the Mega, all of which must pass through any casing. So you may need to make provision for these wires in your design?

    Similarly space must be provided for any expansion boards you may wish to add such as WiFi.

    Good luck.

    Davey
     
  3. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    Another window in the case for future wiring as Davey mentioned is a good idea and ....

    I for sure would add the space for a WiFi Shield.

    My combination case for the command station with a Raspberry Pi and a Mega with a Motor Shield ( HERE ) .....

    [​IMG]

    ..... ended up having enough space also for a Makerfab WiFi shield. At $10 for a WiFi shield why not add it. Plug it into the motorshield, connect two simple jumpers and check another box or so with the AutoInstaller for DCC++EX and you have onboard WiFi for your phone throttle. Very simple to do as shown ( HERE ).

    WiFi integrated with your command station makes it more functional. I have a Pi with JMRI on it and the Pi creates a WiFi hotspot so have a WiFi connection any time the Pi is running. But I have the option with the WiFi shield on the Mega to not turn the Pi on if I want and will still have a WiFi connection available for.....

    [​IMG]

    ..... my phone throttle ( HERE ).

    LifeTrekker keep the pictures and info coming on the case build. I'll be interest in seeing what you do with the power supply side of it. I'd like to get rid of the separate power supplies I now have for the track power, Pi and Mega and go with one power supply and a couple buck converters in a case to clean the power supply side of the command station up.

    Sumner
     
    LifeTrekker_ likes this.
  4. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    Thanks for the info Sumner.

    Right now I have a Makerfab WIFI Shield installed on my DCC++EX system, so I'm good to go there. And the electrical box I chose has more than enough room for the two power supplies and I think even an internally mounted computer case fan. But I'll be sure to post photos of my build. It won't be as elegant a solution as some have come up with, especially electrically, but it should be functional.

    Sent from my SM-G973U1 using Tapatalk
     
    Sumner likes this.
  5. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    interesting. so how are the power wires routed if no external wiring? im keeping an eye on this build :D
     
  6. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    Well, not entirely no external wiring. What I meant is no wiring hanging out of the case. So basically one 120VAC power cord socket on the outside of the case, and 4 speaker terminals for the main and programming tracks, and the one USB serial port from the Mega. That's it. I hope that makes sense. In any case, I'll post pics of the build as it comes along. I'm sure it will make more sense after seeing some pictures.

    Sent from my SM-G973U1 using Tapatalk
     
  7. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    So, I have a question for you all.

    It is my understanding that I can power the Arduino Mega with either 3.3vdc, 5vdc, or 9vdc. And if I were to power it with 5vdc for example, I could do so by connecting 5vdc powered jumpers to the two inputs on the Makerfab WIFI Shield indicated by the red lines in the picture below. Is that correct? [​IMG]

    Sent from my SM-G973U1 using Tapatalk
     
  8. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    Personally I wouldn't do that. I think if you look a little bit you will see that they recommend 7 to 12 volts.

    http://store.arduino.cc/products/arduino-mega-2560-rev3

    Maybe use a buck converter off of your power supply for the track voltage. That is what some people have done and what I will do if I change my power supplies around. I used a couple for my Turntable controller ( HERE ). Inexpensive, small and work well.

    I am using a 9 volt 2 amp right now and that seems to be pretty common.

    Sumner
     
    Last edited: Apr 28, 2022
    LifeTrekker_ likes this.
  9. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    Well, if I wanted to bypass the 9vdc input socket and connect 9vdc directly to the Mega, then I would use the VIN and GND pins, right?

    Also, another question. Since the pins will be going through all three boards, I assume they will be seeing the 9vdc too. Is that correct?

    [​IMG]

    Sent from my SM-G973U1 using Tapatalk
     
    Last edited: Apr 28, 2022
  10. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    It is recommended to use two different power supplies. One for the Arduino and a second for the motor shield (and shields above it). From DCC++EX ( HERE ) ...

    "By default, the motor controller connects its power supply via the pins, to the Arduino. This can supply too much voltage to the Arduino. If you do not cut this trace or bend out the Vin, you could damage the Arduino if you apply more than 12V to the motor board. In the same way, if you don’t bypass Vin and use the 2 power supplies as recommended, they would be connected to each other. This would not be good."

    To achieve that you need to cut the Vin Trace on the motor board or bend the one pin out because as you mentioned the pins go through all the boards .....

    [​IMG]

    I prefer bending the pin out as shown above since it is easy and you haven't compromised the board if you want to use it again. What voltage power supply are you using for the motor board? I'm at 12 volts now and that seems to be fine for my N scale locos so I'm at the upper limit of what is recommended for the Mega. I bend the pin out and use the two power supplies since they are less than $10 each. Pretty cheap insurance and down the road if I wanted to go to a higher voltage power supply for the motor shield (track power) I'd only have to connect it and not make any other changes.

    All of this is covered here....

    https://dcc-ex.com/get-started/assembly.html

    NOTE: For those that are following this and are intimidated by electronics projects this is about the only thing you need to do in assembling a DCC++EX Command Station other than plugging the boards into each other and connecting the power wires (in and to the tracks) like you do with any other commercial command station. What computer work you have to do is also easy as they have an AutoInstaller that is about the same as installing any new program on your computer. Be into DCC for well under a $100. Check out how easy it is to do ( HERE ).

    Sumner
     
    LifeTrekker_ likes this.
  11. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    In my particular case, I cut the VIN trace on the back of the motor shield, and am currently powering the Mega with a 9vdc power supply through the 9vdv input socket. I am powering the motor shield with a 15vdc power supply.

    So what I'm wanting to know is if I don't use the 9vdc input socket (bypass it), and use the VIN and GRN pin inputs on the WIFI Shield instead, will this power the system properly? Basically what I'm trying to do is avoid having to use the 9vdc input socket on the Arduino Mega, and to provide it and the rest of the system with 9vdc power by feeding it in at another point. Does that make sense?

    Sent from my SM-G973U1 using Tapatalk
     
    Last edited: Apr 28, 2022
  12. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    Yes, I misunderstood before :unsure:. I think that would work but I'd better pass. I don't have enough Arduino experience to want to say one way or the other. Maybe (this will help)?

    With the trace cut and the pins still going through (not bent out like I did) I'd use a VOM and test for continuity from the WiFi shield down and if it is there like I think it should be then using Vin on the WiFi should be like using it on the Mega alone as is documented in the link I posted above.

    In my case with the pin bent out I don't think it would work.

    Sumner
     
    LifeTrekker_ likes this.
  13. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    Yeah, that's what I was thinking too. I'll test the voltage at those pins on the wifi shield with the 9vdc adapter plugged into the 9vdc input socket on the Mega. If it is seeing 9vdc there, then I should have no problems inputting 9vdc from that end of things. I'll try it this evening and report the results back here.

    Sent from my SM-G973U1 using Tapatalk
     
    Sumner likes this.
  14. Sumner

    Sumner TrainBoard Member

    2,798
    5,837
    63
    So this got me thinking....I have the Vin pin bent out on my motor shield. Still the WiFi shield worked. So where is it getting power from since it is only plugged into the motor shield?

    Sumner
     
  15. KC Smith

    KC Smith TrainBoard Member

    109
    111
    12
    The MakerFab ESP 8266 WiFi Shield uses the 5vdc pin from the Arduino for power, reduces it to 3.3vdc and feeds the ESP
    processors vcc in.
     
    sidney, Sumner and LifeTrekker_ like this.
  16. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    So, I'm thinking (hoping) that cutting the VIN trace on the motor shield basically just keeps the 12vdc that we are powering it with from getting to the Arduino Mega, and that the VIN and GND pins that go through all the boards are seeing the 9vdc from the 9vdc power supply we are plugging into the 9vdc input socket on the Mega. I hope. (Fingers crossed.)

    Sent from my SM-G973U1 using Tapatalk
     
  17. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    hummm im learning more and more (y) keep building and reporting:D
     
  18. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    I am happy to report that this is exactly what I found.

    The first photo shows the voltage I measured at the VIN and GND pins at the WIFI shield with the 9vdc adapter plugged into the 9vdc socket on the Arduino Mega.

    The second photo shows the voltage I measured at the VIN and GND pins at the WIFI shield with both the 9vac adapter plugged into the 9vdc socket on the Arduino Mega and the 15vdc power supply connected to the motor shield.

    The third photo shows the voltage I measured at the 5VAC and GND pins at the WIFI shield with both the 9vac adapter plugged into the 9vdc socket on the Arduino Mega and the 15vdc power supply connected to the motor shield.

    And the fourth photo shows the voltage I measured at the VIN and GND pins at the WIFI shield with just the 15vdc power supply connected to the motor shield.

    I believe what this tells me is that I should be able to power the Arduino Mega and WIFI shield by only supplying 9vdc to the VIN and GND pins at the WIFI shield. Which means I won't need to use the 9vdc input socket on the Mega to provide power to the system, which will help me reach one of my design goals. I'll hook it up that way this weekend to confirm that everything works in that configuration before proceeding with laying everything out and casing it up.




    [​IMG][​IMG][​IMG][​IMG]

    Update: I also just found this statement on the following page:

    https://circuitjournal.com/arduino-power-pins#vin-pin

    "The Arduino Vin pin and barrel jack are the same. The Vin pin is directly connected to the tip of the barrel jack. The sleeve is connected to the GND. This means that if you power your Arduino through the barrel connector, then you can use the Vin pin as a direct unregulated battery output."

    This is exactly what I was hoping was the case. So I'm off to the races!


    Sent from my SM-G973U1 using Tapatalk
     
    Last edited: Apr 29, 2022
    Uncle peanut butter likes this.
  19. LifeTrekker_

    LifeTrekker_ TrainBoard Member

    47
    84
    4
    I don't have this build done yet, but here are a few pics to show what I've gotten done so far.

    The case I'm using is an off-the-shelf PVC plastic 6" X 6" X 4" Carlon electrical box I picked up at Menard's for about $19.00.

    https://www.menards.com/main/electr...-pvc-enclosure-box/e987rr/p-1444444973855.htm

    I laid everything out in the box to figure out roughly where everything needed to go and then started the mounting process for the Arduino Mega. The biggest challenge was figuring out where I needed to make the hole for the USB socket.

    My plan was to use brass computer PC board mounting standoffs that I had leftover from one of my many previous computer building projects. In order to get the location correct, but especially the height, I measured the thickness of the PC board with the standoff mounted, added that to the thickness of the case, and marked a corresponding line on the outside of the case with a Sharpie marker. This would hopefully line up with the bottom of the USB port. I then eyeballed the centerline of the USB port on the outside of the case, and then marked the dimensions of the USB port using my micrometer and Sharpie marker.

    Next I drilled a series of holes just inside the USB port outline location, and cut through the extra material with my #11 X-Acto knife to remove the plug. I then trimmed up the hole with a jewelers file until the USB port would just fit.

    The next step was to mount the brass PC board standoffs. I used a self centering pilot hole tool leftover from my RC airplane modeling days to get the holes in the right place. I then drilled and tapped the PVC (#6/32 in this case), and screwed in the brass standoffs.

    Now, to see how everything lined up. And as luck would have it, everything lined up on the first try! That doesn't happen very often, but I'll take it.

    Now to secure the Mega in the case. I used the smallest head diameter #6 screws I had laying around, and then made some insulating washers out of some thin engine gasket material I had leftover from another project. I punched them out first with a paper hole punch, and then punched out the center hole with a leather hole punch tool.

    So this is where it sits right now. I hope to get some more work completed this evening. Next up is mounting the AC socket and Banana plug speaker jacks to the outside of the case for the AC input and main and programming track outputs, respectively. And also deciding if I need to install the computer case fan or not. Then on to wiring everything up.

    [​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG][​IMG]

    [​IMG]

    Sent from my SM-G973U1 using Tapatalk
     
    Last edited: May 2, 2022
  20. sidney

    sidney TrainBoard Member

    1,235
    2,086
    37
    pretty cool . whats the brass drill thingy and more importantly where do i get one. i like that tool. i really need more tools :D
    it looks to be a hand made drill with a long drill bit and custom made knurled parts.
     

Share This Page