Trains.com

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Arduino mounting - Updated

6103 views
36 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Saturday, February 4, 2017 10:51 AM

Thanks Jim!  I’m stuck with the bummer knee, unfortunately I’m not a candidate for knee surgery.  I just have to wait on doing some tasks until the pain is at a minimum.
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2001
  • From: SE Minnesota
  • 6,847 posts
Posted by jrbernier on Saturday, February 4, 2017 10:19 AM

  Looks good.  Get that knee taken care of.  I had both knees done over a 4 year span.  Best decision I ever made(at least medical wise)...

Jim

Modeling BNSF  and Milwaukee Road in SW Wisconsin

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Friday, February 3, 2017 10:23 PM

It took longer than I expected but I have my first Arduino card shelf finished.  I had to put it on hold for several reasons.
 
Waiting on several slow boats from China.
 
Waiting on the weather, I don’t like using my table saw on the enclosed patio . . . . sawdust and in this case metal dust is a bugger to clean up out of the carpet.  I had to wait until is warmed up a bit.
 
I had a bad go with my bone to bone right knee that lasted several weeks.
 
Actually it went to together rather easy in a couple of hours, every thing fit as planed.  I did make a couple of changes form my drawings. I over lapped the sides instead of the top and bottom, it was easier to assemble that way and 2mm flat screws instead of SAE 4-40.  Aluminum is a bugger to tap!  I ended up using nuts on the screws.
 
This it the way it turned out.
 
 
 
I changed the card spacing from my drawings so I could add a fifth card.  The card shelf will hold five UNOs with expansion shields.
 
It’s raining again so the MEGA card shelf is on hold until the weather clears.
 
 
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, January 17, 2017 7:36 PM

A single MEGA has enough I/Os without having to use shift registers.  My signal system only needs 32 outputs, I wanted to have the diode matrix onboard the Arduino Shields for ease of construction, maintenance and modifications that will appear down the road as changes to my layout are made.
 
I need the high current drivers (500ma) for other purposes so I went with the TD62304 7 channel drivers, the driver chips uses less real estate than transistors and are much cheaper too at $1.49 each.  
 
I went with three individual UNOs for separate random lighting controllers so that they can be used individually driving separate structures.  The 14 outputs of an Arduino UNO works out very good for one structure.
 
The remaining slots in my card shelf are spares at this time not knowing what I’ll do down the road.  The Arduino clones are so cheap it’s not worth cludering up the expansion boards.
 
The programming is also easier using multiple Arduinos rather than stacking multiple programs, the delays that occur by stacking programs can be annoying with multiple programs.  I’m really not into writing Arduino programs so I keep it as simple as possible.
I use IR break beam for occupancy detection, it takes from one to five beams for each block plus turnout positions thus stacked expansion shields for my MEGA for the input matrix.
 
I have everything working correctly, I just wanted a card shelf to store my multiple Arduinos.
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
  • Member since
    December 2016
  • 168 posts
Posted by speedybee on Tuesday, January 17, 2017 7:25 PM

The time it takes to load/unload a shift register is on the order of one tenth of a millisecond... So you could run fifty shift registers (that's  400 input/outputs) and still they'd be updating a couple hundred times per second. Plenty fast enough for any model railroading purposes.

As for output capacity, iirc a 595 can output max 70ma over its eight pins, so around 8ma per pin. Personally I run my signal LEDs a little lower than that as I feel it looks too bright to have them at their max current. So I run them straight off the 595.

Not saying it's the magic solution to all the world's problems, but if someone finds themselves needing more digital input or outputs on their arduino, it's something to consider.

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Tuesday, January 17, 2017 6:19 PM

 Thay have their place. I'm not sure about thousands of outputs cascaded off 3 pins - get enough and there will be noticeable delays, especially when all you want to change is the 5th bit on the 20th shift register. Still need drivers unless you are using no more than 1 LED per line, as the 74HC495 output capacity per line is actually LESS than the Arduinos.

                            --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    December 2016
  • 168 posts
Posted by speedybee on Tuesday, January 17, 2017 2:37 PM

Anyone using an Arduino to control many LED signals or occupancy detectors might want to consider using shift registers, eg the 74hc595 and 74hc165.

A single Arduino can independently control hundreds (maybe thousands) of LEDs and occupancy detectors with shift registers, using only 3 or 4 pins.

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, January 17, 2017 12:43 PM

I finally have all the material to build my Arduino Card Shelf.  I found some very nice card guides on eBay thanks to Randy.  I was able to buy a 36” x 24” x .064” Aluminum sheet from a local metal shop for $15.  Very good price and enough to make several card shelves as well as a new control panel for my layout.
 
I found a ½” x ½” x 96” Aluminum angle at Lowes for $5.86.  So far so good for the basic material.
 
I decided to go with the Arduino type connectors, I bought single row and double row straight female and angled male connectors for my connections to the Arduino Extension Shields.
 
While waiting on multiple slow boats from China for connectors and expansion shields I did a lot of experimentation with the Arduino UNOs and MEGAs changing things sometimes daily.  I ended up with dual shields on my MEGA signal controller to handle all the inputs from the occupancy detectors and the outputs to my 16 single head bi-color LEDs signals.  To protect the Arduino MEGA from excessive high current I used five 7 channel 500ma driver chips for the 32 signal outputs needed for the bi-color LEDs.  I went with a simple diode matrix from multiple IR occupancy detectors to drive the Arduino inputs.  That required a lot of real state so I went with dual expansion shields.
 
This is my final card shelf design after many redo’s to handle both UNOs and MEGAs.
 
  
I have the unused section in my control panel 6” wide that the two shelves will fit in easily. 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Thursday, December 8, 2016 11:46 AM

More changes.
 
I decided to go in a slightly different direction with my Arduino rack. When I built my control panel back in 1990 I left room for future expansion.  Two four slot vertical shacked shelves will fit in the side compartment leaving enough room for a third shelf if needed.
 
This is a quickie drawing of a two shelf rack.
 
 
This is a picture of my control panel, the Arduino rack will go on the left side.  The right side has my MRC DC power pack on top and the bottom is home for my MRC Prodigy, I run dual mode.
 
 
I can cover the Arduino section with a panel to match the center panel.   I’ve been using that left cubby hole for tool storage for 26 years.
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Thursday, December 8, 2016 8:37 AM

Thanks Randy!  I guess you’re correct, I got a message from the vendor saying they are out of stock of the grey slides and I told him no on the yucky green slides.  I’ll go for the 20¢ per slot slides.
The slides that were out of stock were 3¼" long and the only difference after cutting the 6½" will be loss of the insertion angle from the rear.
 
 
 
The MEGA will hang an inch out the back of the slide but I was planning on that anyway.
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Thursday, December 8, 2016 7:10 AM

 Must have bought him out, the only ones I see when searching for "card guides" are $10 and up. I didn;t check exact sizes, but it seems ones twice as long are only slightly more expensive - so 2x as many guides if you just cut them in half, for maybe 20% more money.

 At 20 for $5 that should be 50 cents per slot.

                         --Randy

 


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Wednesday, December 7, 2016 10:53 PM

Randy, I found a pretty slick electronic store on eBay
 
 
They have a pretty good assortment of goodies, I ordered some of their card guides.  20 guides for $5
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Wednesday, December 7, 2016 10:17 PM

CG, I tried that when I built my control panel and they wouldn’t cut the metal to size.  I needed 18” x 24” piece and the smallest piece they had was 48” square at a super high price.  They really didn’t want to trouble themselves for such a small sale, they were rude to me like, why did you bother coming here.
 
They are the only scrap metal outfit close to me.  The other scrap metal outfits are 15 miles away in California traffic . . . . not worth a two  dollar savings.  
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    July 2016
  • From: Cumberland Plateau
  • 393 posts
Posted by CentralGulf on Wednesday, December 7, 2016 9:46 PM

RR_Mel

I’ve been working at my CAD on a card cage and I’ve come up with what might be a good design.  I found steel sheet 6” x !8” x .060” at Home Depot ($6.97) that will work for both ends as well as the top and bottom of my rack mount.

Mel, I'm sure that you have been around the block enough times that you probably know this, but just in case, Home Depot sheet steel prices are astronomical compared to any decent scrap metal operation that sells by the pound. Big Smile

The last time I bought steel, which admittedly has been awhile, I was paying well under a buck a pound.

CG

 

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Wednesday, December 7, 2016 8:46 PM

Thanks Randy, every little bit helps a lot.
 
It’s looking pretty good right now, about $2.25 per slot.
 
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Wednesday, December 7, 2016 8:00 PM

$7 for 20 card ghuides cheap enough?

https://www.amazon.com/Uxcell-20Pcs-Length-Horizontal-Mount/dp/B00X73RK28/ref=sr_1_3?ie=UTF8&qid=1481162394&sr=8-3&keywords=pcb+card+guides

No fabrication and they are ABS instead of styrene. Sized for a PCB thickness. They have other lengths and nylon as well as ABS.

                  --Randy


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Wednesday, December 7, 2016 7:22 PM

I’ve been working at my CAD on a card cage and I’ve come up with what might be a good design.  I found steel sheet 6” x !8” x .060” at Home Depot ($6.97) that will work for both ends as well as the top and bottom of my rack mount.  At this point I’m only planning on using Styrene for the card guides.
 
I haven come up with a way to mount the card connectors yet and I will probably not tackle that until I get the rack built.
 
The steel will be easy to tap for screws and be very durable.  I think with the front and back open there so it should dissipate any heat generated by the Arduinos.
 
I’ll keep this post going as I progress.
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Wednesday, December 7, 2016 6:20 PM

I did check out the DIN rail mounting and that would work better than the normal Arduino offered mounts but I’m hooked on slide rail mounting.  That’s the first time I’ve seen a shield mounted on the bottom of an Arduino and that’s very interesting, I’m going to look into that.
 
Thanks for your input.
 
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    December 2016
  • 9 posts
Posted by KK4HFJ on Wednesday, December 7, 2016 2:57 PM

You asked for a cage, and this isn't a cage, but it might give you food for thought. Din Rails ... http://arduinotronics.blogspot.com/2016/01/arduino-plc-or-pac.html

Tags: Arduino , din rail

Steve Spence

KK4HFJ (Ham Radio)

http://arduinotronics.blogspot.com

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Wednesday, December 7, 2016 11:05 AM

CentralGulf

I had to chuckle after seeing the Vector chassis. I am quite familiar with them and know what kind of costs you are getting into, home brewed or not. It's quite a contrast to David Popp's mounting Tam Valley Frog Juicers with stick on Velcro Dots. Huh?

http://mrr.trains.com/sitecore/content/home/articles/2016/10/how-to-library-dcc-installation-for-large-layouts-part-1---bus-lines

CG

 

About 20 years ago we were going through a complete upgrade for the Bakersfield Police Communications System and six Vector racks went into the trash and were gone before I knew it.  I wasn’t happy about it back then and now even more so.  I could have cut them and resized them to fit my Arduino cards.
 
 
Edit:
 
I think when we bought them back in the 80s they were about $54 each, prices have gone up a bit since then.
 
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    July 2016
  • From: Cumberland Plateau
  • 393 posts
Posted by CentralGulf on Wednesday, December 7, 2016 10:45 AM

I had to chuckle after seeing the Vector chassis. I am quite familiar with them and know what kind of costs you are getting into, home brewed or not. It's quite a contrast to David Popp's mounting Tam Valley Frog Juicers with stick on Velcro Dots. Huh?

http://mrr.trains.com/sitecore/content/home/articles/2016/10/how-to-library-dcc-installation-for-large-layouts-part-1---bus-lines

CG

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Wednesday, December 7, 2016 10:30 AM

After spending hours experimenting with Evergreen Styrene products I’ve decided to give it a try.  The Evergreen Styrene doesn’t seem any worse than any other material I’ve tried for generating static or sensitive to picking up dust.  Styrene is much easier to work with than Aluminum.
 
I used Vector Electronics Card Racks for over 30 years at work and that is the direction I want to go with my Arduinos.  You know the verbiage, “if it ain’t broke don’t fix it”.  The card cage or rack works for me.
 
For those who don’t know what a card cage/rack is here is a picture of a Vector CCA105/90 Card Rack that I will use as a go by in Arduino size.
 
  
 
The Vector price is a bit out of my model railroad budget at $195 so it’s a build it my self project.
 
 
Thanks for all your input, this is a great Forum full of a lot of great guys with great ideas.
 
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
  • Member since
    August 2015
  • 371 posts
Posted by fieryturbo on Wednesday, December 7, 2016 7:50 AM

Julian

Modeling Pre-WP merger UP (1974-81)

  • Member since
    August 2015
  • 371 posts
Posted by fieryturbo on Wednesday, December 7, 2016 7:47 AM

Most of the industrial project mountings I've seen use some kind of plexiglas, as do some computer cases.  Maybe start there?

Julian

Modeling Pre-WP merger UP (1974-81)

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, December 6, 2016 6:37 PM

OK you convinced me, no Styrene.  I did not know styrene was a static generator.
 
After reading you’re anti-Styrene posts I tried to build up a static charge with a sheet of Evergreen .040” x 6” x 12” White Styrene, I used several types of material (felt, cotton, wool, rayon and silk) and it did not induce any detectable static or become a dust magnet??  I know that Styrofoam is one of the worst at collecting a static charge, maybe Evergreen treats their products to prevent static build up.
 
I built my existing card cage from Aluminum so Aluminum it will be.  Between Home Depot and Lowes I can find enough Aluminum to build my project.  Aluminum is also high with static but it’s a standard in the electronics industry as are plastics.
 
I have a dedicated space for my electronics next to my control panel where the shelf will fit.  I have been using ribbon cable for my electronics wiring under my layout, it’s much easier to run and cleaner than bundling.  Come to find out ribbon cable on eBay is cheaper than hookup wire anyway.
 
My last purchase was 100’ of 16 conductor flat ribbon cable for under $20 delivered.  About a year ago I picked up a 100’ roll of 26 conductor ribbon cable for $28.  The flat cable is #26 & #28 AWG but easily handles low current LEDs and logic circuits.  My longest run is less than 15’.  I have one 8’ run using 12 volt 40 ma bulbs operating at 8½ volts, the highest voltage loss is under .25 volts with a 200ma load (6 bulbs at 30ma).
 
 
 
Mel
  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Tuesday, December 6, 2016 5:12 PM

 I would also stay away from styrene - use small wood strips for form the guides. The main issue is that the Arduinos don't exactly have the board edge perfectly clean of components - some of them have surface mount parts right at the edge of the board - so you need to be careful of not rubbing parts right off the board.

If you want neat - make actual cards, with some sort of connector, and repalce the Unos with Nanos sockedted to the board with connecting wires to the board edge, so that it can then plug in to some sort of backplane. The same code that runs on an Uno will run on the Nano, and it has the same outputs plus 2 more analog pins (which you can use, or just ignore). ANd they are super cheap, especially ones that don;t have the header pins already soldered on. The big benefit though is space, the Uno bard is relatively huge especially if you are just extending the pins and not adding extra circuitry. But even if you are - a Nano plus those driver chips you used on the light control board can be all placed in a footprint smaller than an Uno.

                 --Randy


Modeling the Reading Railroad in the 1950's

 

Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, December 6, 2016 11:56 AM

I built up a mockup using one row of a 20 pin male angle connector and super glued a 20 pin male straight connector to the angle connector to obtain 40 pins.  I used some contact grease in the female connectors but it will require a puller on the other end to remove the card.
 
I tried it with just a single row angle connector before I glued on the straight connector and it worked easily.  A UNO Shield with a single row 20 pin angle connector and contact grease works without a puller.
 
A simple Styrene pull handle attached to a MEGA Shield should work as a puller.  At this point I would say it’s a go for a home brew card cage.  I called my LHS and he has all the Styrene pieces in stock to make a card cage.     
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Tuesday, December 6, 2016 10:37 AM

My main reason is for a neat compact easy to remove multiple Arduino board mounting system.  For ease of modifications and programming, I’m never happy with anything very long and I change things sometimes daily.  There is always something new or a better way just around the corner.      
 
By using a standard Arduino angle connector on the boards (shields) a board should easily slide in and connect.  I used a similar card shelf for my home brew Pasiley circuit signal system with ribbon connectors.  I’m in the process of replacing my signal system and I’m looking at constant Arduino board removal.
 
 
 
Mel
 
Modeling the early to mid 1950s SP in HO scale since 1951
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    May 2016
  • 51 posts
Posted by Atchee on Tuesday, December 6, 2016 10:34 AM

I would shy away from styrene for an enclosure.  Athhough modern components are much more resistant to static issues they still exist, and styrene will build significant charges in the right conditions. 

The RS holder is listed as a project enclosure under an "Arduino" search.  They are pricey.  Not available on line - store only.

I would think a couple of wood sides with slots spaced to handle an Arduino in a box, plus a little space for wiring, would be good.  The boxes allow mounting a sheild on the enclosed Arduino.  Boxes are a buck fiddy for UNO sizes if you search, big 'uns are more.  A piece of brass stock or some wire can make an effective stop for the length on 1 end and keep them from pulling out the front on the other .

I'm not a big fan of having a lot of wire running around or having to build dedicated space for a bunch of electronics, and would tend to mount Arduinos close to where they are used.  Hanging them off framing with a couple of screws and non conductive stand-offs wouldn't bother me a bit.

 

Subscriber & Member Login

Login, or register today to interact in our online community, comment on articles, receive our newsletter, manage your account online and more!

Users Online

There are no community member online

Search the Community

ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT
Model Railroader Newsletter See all
Sign up for our FREE e-newsletter and get model railroad news in your inbox!