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!

Light "controller" of sorts

3249 views
46 replies
1 rating 2 rating 3 rating 4 rating 5 rating
  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Light "controller" of sorts
Posted by NeO6874 on Friday, October 26, 2018 3:00 PM

I've been toying with a 32-LED controller for a little tchotchkey present for SWMBO, and it kinda struck me that some fellow MRR's might find some use out of it -- maybe for randomized house lights "at night" or similar situations where you don't necessarily want "all" the lights to turn on at once.

 

Circuit's pretty simple - an ATTiny25 microcontroller is driving 4x SN74HC595 shift registers, and everything is getting 5V power from the LM317 voltage regulator.  The board itself can be powered from either 12-24 VAC or 9-24VDC (DC_in merely goes through a single protection diode before the regulator, vs. the bridge rectifier for AC).

Here's a quick video of a test setup just soldered to some perf-board.  (Sorry about the shaky-cam -- I was too excited I got it working to go hunting for a real camera, so was just using my phone) -- http://www.djph.net/media/32LightTest.mp4

Schematic: http://www.djph.net/media/Schematic_LightingController_v1.0.pdf

I'll put together a full Bill of Materials (with links, etc.) later -- the test circuit is built from stuff on the bench, so don't have all the info handy.

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    December 2015
  • From: Shenandoah Valley
  • 9,094 posts
Posted by BigDaddy on Friday, October 26, 2018 3:27 PM

You know this can be done with Arduino.  I don't know enough to qualify as even an Arduino newbie, but Jerry Leone has a video on MRVP where he programmed random lights and sequential lights, like old movie marquees had.  

In arduino, the time to turn off or on can be adjusted pretty easily.  Maybe that is also the case for your experiement as well. 

Henry

COB Potomac & Northern

Shenandoah Valley

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Friday, October 26, 2018 4:25 PM

 Who says he isn't? Big Smile

ATTiny25's, ATTiny85's, and other small micros can be programmed with the same IDE and infrastructure as a big giant Arduino Uno or even bigger Mega. That circuit on a small PCB would be smaller than an Uno, too - depending on what sort of connectors were used for the terminals to connect the lights to. 

Got to remember, Arduino isn't really the hardware, it's the programming environment which has nice simple functions like pinMode and digitalWrite so you don't have to set registers in the micro to control each IO port.

One of the things I made is actually a programmer add-on that I can plug in an ATTiny85 (possibly a 25 even) and program it just as easily as I program a full fledged Arduino board. Those little chips are very cheap, and have more than enough power to do something liek produce multiple random lights in a structure. Smart Model Structures, maybe? Wait - I'm going to copyright that name LOL  Even with an Arduino Nano or Uno, you'd still need shift registers to get 32 outputs. Only a Mega has that many (and more) built in. And a Tiny25 plus 4 shift register chips is a FRACTION of the price of a Mega board - which also has dozens of features not needed for a simple random lighting circuit.

                                              --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 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Friday, October 26, 2018 6:28 PM

Yeah, an Arduino is simply a different (bigger) microcontroller thats essentially been factory-soldered to a breakout with a few addons (think of it as the "ready to run" version --with the RTR markup).

They definitely have their place, but tend to cost kind of a lot, at least for "official" ones (and even the Chinese cheapo ones are $3+) .  All told (including ripoff fedex shipping because i was just over the USPS parcel post 14 ounce weight limit), I was able to order 10x custom PCBs and all the necessary components for only about the cost of an Arduino uno (maybe two, plus shipping).  

I probably should've just dealt with ugly perfboard ... but the whole "present" thing, made me want to go and have the circuitry look nice for SWMBO.

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    December 2015
  • From: Shenandoah Valley
  • 9,094 posts
Posted by BigDaddy on Friday, October 26, 2018 6:46 PM

Randy probably exposed my ignorance, but since I don't know what a ATTiny25 is, I can't be sure.  Huh?  Randy is one of my forum friends and I have no shortage of electrical ignorance.

For you guys that understood the OP's diagram, you can probably do it cheaper than the rest of us.  Some of us need to be spoon fed.

 

Henry

COB Potomac & Northern

Shenandoah Valley

  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Friday, October 26, 2018 7:52 PM

Don't worry about it :).

 

It's simply a specific microcontroller chip.  

"Arduino" boards are built around some of their bigger cousins ... and since they're "RTR", well you pay for all the extras.

 

Randy, the protoboards are like 2x4 in. Size could definitely drop with some of those practically microscopic SMD components, but I'm building this by hand Wink

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Friday, October 26, 2018 8:22 PM

I went with the UNO, it gives me 20 ports RTR for led operation.  I build expansion boards for the UNO to support a high current driver for Grain of Wheat bulbs.
 
I use the random controllers for houses and they only have 14 to 20 bulbs so the 20 port UNO works great.
 
 
Mel
 
 
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 Friday, October 26, 2018 9:04 PM

 Yeah forget surface mount, I'm building all my stuff with through hole. I have enough vision issues so as it is and tend to solder about 5 inches from my face to see what I'm doing. No way can I do surface mount. I'm doing my own servo turnout controllers complete with frog power relays and both locla and remote control - I need enough pins that I am using ATMega328's, same micro on the Uno and Nano. I'm also doing my own version of the cpNode 'Arduino' based CMRI node to interface my detectors and signals - also ATMega 328 chips. I was going to use something like the Tiny 85 for structure light controls - but really those have more flash and eeprom that would ever be needed, so the Tiny 25 might be a better option, depends on the price. Also I need far too many to hand wire them all, so I am having boards made. I did one board so far, I made a programmer that uses a Nano to program a bare ATMega 328. Got 9 boards left - I only needed 1, but you get 10 for $2.

All these other things - ATTiny25, ATTiny85, are all just different Atmel (now Microchip) microcontrollers. Internally they all program the same, the difference is in the number of pins, amount of memory, etc. Since most Atmel chips have a common language, people have made board files for the Arduino IDE for most of them. Thus the same code you write for an actual Arduino piece of hardware will run on these other chips - just keep in mind the pins. An 8 pin chip like the Tiny 25 or Tiny 85, once you take away 2 pins for power and ground, only has 6 IO pins, and one is also the reset. So really 5 easily usable - compared to 20 on the ATMega 328 used in the Uno and Nano. So you can't do a pinMode(12,OUTPUT) on a Tiny 85 - there is no pin 12. But you can do pinMode(0,OUTPUT). So really - it's just like a different Arduino board with fewer outputs. FOr something like a grade crossing - you need what, 2 outputs for the flashing LEDS, 1 to drive the servo to raise and lower the gates, and 1 for a control input. Easily handled by a cheap Tiny-series chip instead os using a full-blown Arduino. 

 Was just watching a video on a micro you cna get from China that, in 300 unit quantites, are less than THREE CENTS each. Granted, they are one-time programmable - you can;t program and erase them, if you program one with bad code, it's just so much junk. but it was 3 cents! They are in no way Arduino compatible, the company has it's own development environment that appears to have tons of online help - even if some of it is a bit Chinglish, they really do seem to be trying to make this usable. I cna see some possibilities, but really these are not something for the casual hobbyist. 

 I do have an Uno, a Mega, and a handful of Nanos (I think i got the Nanos on Amazon, 5 for $12 or something - came as flat boards plus a stick of header pins I had to break apart and solder on myself). I use these on breadboards for developing and testing my designs, but the final product will use just the chip - all you need to use the bare chip is a 16MHz resonator, a pair of 22pF caps, and a couple of bypass caps on the poower suppyl lines. The second micro on the Uno board, the USB port, the 5V and 3.3V regulators - don't need ANY of that stuff in the finished product.

 So just think of the Tiny 25 as an Uno with fewer pins. And less space for complex programs. But how much do you need? My servo controller, which has 2 pushbuttons, 2 LEDs, 2 relays, a servo, and two external inputs per turnout (and drives 2 turnouts), plus ALSO stores the last positioon in the EEPROM, using a system that spreads the EEPROM acces out over most of the memory space to even out the number of writes per memory address, uses 12% of the memory of an Uno/Nano. And that's without any attempts to optimize it for size. Today I did consolidate a set of outputs that were used in 4 different places into a single function, but the size didn't really change.

                       --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
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Saturday, October 27, 2018 4:15 AM

NeO6874
They definitely have their place, but tend to cost kind of a lot, at least for "official" ones (and even the Chinese cheapo ones are $3+) .  ...  I was able to order 10x custom PCBs and all the necessary components for only about the cost of an Arduino uno (maybe two, plus shipping). 

i can understand the desire to make things inexpensive but wouldn't it be better to have several random light generators that can be placed at various locations on a layout closer to the building being lit than one requiring lots of lenghy wiring serving a larger portion of the layout?

Arduino Nano can be had for a $3+.   Does size matter?   Even if price matters, isn't it worth it to have a few to minimize wiring?

 

where do you guys get custom PCBs fabricated?

greg - Philadelphia & Reading / Reading

  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Saturday, October 27, 2018 5:55 AM

Don't disagree Greg, but I needed 32 LEDs in one place Wink.

Smaller controllers are dead easy - I actually started testing the idea with just one register (so 8 LEDs).

As are larger, though one would have to work in "banks" of 16, due to the way avr controllers handle numbers. I guess you could work in banks of 8 as well, but that starts getting painful fast.

Don't forget that with the Arduino boards you usually have to add a 3.3 or 5 volt power source -- these little ones I knocked together will take pretty much anything HO-scalers (and smaller) run under the layout, starting at about 9 volts or so - AC or DC.  Max would be 35 volts in.

 

Randy, you use jclpcb too, huh? Smile

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Saturday, October 27, 2018 6:13 AM

while the atmega328 on the Arduino (and Nano) runs at 5V, there is a regulator that will accept up to 12VDC.

 

there are easier ways to drive many LEDs.  They don't need to be driven constantly.   You can connect the LEDs in a matrix.   

for example 8 rows and 8 columns.   in a loop, you drive low one of the rows while driving high the LEDs in that row that you want lit.   16 I/O pins can control 64 LEDs.   If you drive an LED 1/8 the time, you can drive it with 8x the current (which may exceed the atmel chip I/O limits).

 

greg - Philadelphia & Reading / Reading

  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Saturday, October 27, 2018 6:31 AM

Sure, you can multiplex LEDs too, Have a prototype multiplex array of 50 LEDs being driven from 10 pins (could make it 8 pins if I hard-lock the register "enable" and "clear" pins to either ground or +5v).  Could also extend that to 80 LEDs without changing the pinout to the microcontroller (5x16 array).  The MOSFETs will handle something silly like 20 amps, so a single row could potentially have several thousand LEDs (although any one shift register is limited to 70mA).  But that's taking things a little too far, I think Smile, Wink & Grin.

Tons of ways to skin the cat Smile.

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Saturday, October 27, 2018 6:43 AM

NeO6874
he MOSFETs will handle something silly like 20 amps, so a single row could potentially have several thousand LEDs

if you drive an LED 1/N the the time, what is the average current?    what so you need to drive the LEDs at?

greg - Philadelphia & Reading / Reading

  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Saturday, October 27, 2018 7:02 AM

even with only one LED being on 1/n of the time, an entire row (10 LEDs) has the potential to overcurrent one of the Arduino pins (max 40mA), so the MOSFET is there as protection from that happening (e.g. from me writing bad code).

 

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Saturday, October 27, 2018 8:58 AM

I ended up using a ULN2003 seven channel 500ma sink driver at about 23¢ from a US Seller.  Three per board on a UNO (China) for total of about $7.50 or 37¢ per bulb.  I’m powering 8 UNOs for 8 houses at 8.6 volts (roughly 150 GOW 12 volt bulbs at 40 to 70ma) from a DC to DC converter off a 12 volt switching power supply.
 
  
I tried a MEGA to power three houses and didn’t like that.  I have a separate switch for each house on my control panel labeled for the owner, in my case a house for each of our kids and one for Mom and Dad.
 
 
Mel
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Saturday, October 27, 2018 10:48 AM

Nice Smile.  That's $7.50 including the uno, right?  Just about the same as getting 10 of these spun up from the prototype place -- about $6.50 per, although I have a gazillion resistors and capacitors on hand, so I didn't order anything new there.Mine are a bit bigger than an Uno (1.9 x 3.7" -- about the size of the 'MEGA' boards, IIRC) 


Only real downside I can see to those Darlington Arrays is that they're 1:1 on the pin-mapping, so you're pretty much required to use the ATMega series of chips because you need the pins.

 

This board could be scaled up to drive 96 LEDs with only adding the necessary registers, pin headers, and an upgrade from the attiny25 to an attiny45 (there's not enough room to run the 96 pins in the -25 ... although I suppose you could run them in 3 banks of 32 with the code as-is).  And really, the only reason that 96 is the limit is that the board manufacturer will only do a 100mm square (3.9") board for their cheap-as-chips pricing Wink.

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, October 27, 2018 10:53 AM

 Distributing the lighting was where I was gooing wioth me "Smart Structure Lighting" - a small 8 pin chip in each structure rather than a single larger one with lots of wires going everywhere to each structure. That would allow for random (or not so random) multi-light effects with lights in different rooms going ona nd off, and even the occasional flickery TV effect. No extra drivers, if 5 different circuits aren't enough, a little multiplexing can get more, but it's doubtful that any one structure would need more than 5 independent light circuits. Might even be a place to try those 3 cent jobbies, although the 3 cent price only gets you the surface mount version, the PDIP ones a few few cents more (oh the horror - still under 10 cents, for a micro that can drive multiple LEDs with nothing more than a power supply bypass cap and some current limiting resistors on the LEDs).

 And the heavy current drive with some bigger MOSFETs is coming - I forgot about that one. I intend to use LED strip lighting for my layout - multiuple rows of white, plus a row of RGB, plus a row of blue, so I can do anything from sunrise to sunset and anywhere in betwene on either side. The RGB set I got to play around with came with a controller, but it's only good for one reel (3 meters) of LEDs, and it only has 8 steps of brightness for each color, so smooth transistions - not so much. I'm sure I can do better with my own design. Plus you can;t string too many strips togetherm the flexible strips themselves can;t handle sufficient current to allow an unlimited number of stips to daisy chain, so there will be multiple segments, but I want all of them to change at the same time, so I need multiple controllers that all tie together through some method.

 Yes, I use JLCPCB for the boards. The shipping costs more than the boards. 10 boards for $2, for up to a certain size 2-sided board with standard soldermask and so forth (they can do more layers, and have other color soldermasks and can do all sorts of other stuff too, but that costs more). There are some good Youtube videos from some of the electronics channels that have actually toured their factory.  I've actually taken to using their EasyEDA software to draw schematics and then make the board layouts, it's far easier to use than anything else I tried (i REALLY wanted to like KiCAD, but damn.. and all the other stuff is prohbitively expensive, like OrCAD or Altium. And Eagle being bought out and changing the license models made that too annoying.). Since EasyEDA gets their schematic elements and PCB footprints from every part they sell through their third arm, LCSC, they have a full array of elements, I've had no problem finding anything I needed so far. It's completely free - the only catch is that you can only have a couple of 'private' projects (it's all web-based, but the software installs locally, although there is a browser-based version) for free, so you have to make your projects 'public' where anyone else using EasyEDA can open up your designs (they can;t change them in your account). Frankly, this is of no consequence to me since I have always intended on sharing my schematics and board layouts for all this model railroad stuff. Since they of course conveniently build a BOM you can one-click trnasfer over to LCSC to order the parts, I will probably do just that for my boards, they are no more expensive than anyone for typical components. 

 Oh - and 10 boards for $2 - well, if your design can fit multiple boards in the maximum space allowed for the 10/$2, you can further panalize things and get however many fits in each full boards x 10 for $2 - there's a Youtube video with a quite small design example that reslts in you getting 270 boards for $2, 27 of the small boards per panel, times 10 panels for $2. 

 Plus with each order they send you one of the slickest pens I've ever seen. It's actually a hard paper tube, but the pen cartridge in it draws one of the smoothest and finest lines I've ever seen outside of some fancy $10+ thing. This is not your typical 10 for a dollar Bic pen. 

 Oh, and you don;t HAVE to use EasyEDA to get the boards, you can use and PCB design application and just upload the Gerbers. But with EasyEDA - there's actually a button in there that transfers you right to JLCPCB and creates the order for you.

 Oh, and you CAN go larger, it just won't be $2 any more. It's not crazy espensive, either. And they will also supply solder paste stencils for SMD boards.

                                   --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 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Saturday, October 27, 2018 11:06 AM

Heh, we'd better be careful Randy - might fall foul of that "no ads" rule Wink.

 

Yeah, I've only ordered one (now two) boards from them.  This one's just a bit too big once they account for the sprues.  Although, I could ditch the AC input , and rearrange things and probably get two boards on a panel.  

Though, I think they dropped the "if it panels in that 100mm square, it's still $2" thing - just checking with this board tacked on $6 (but still, 20 boards for $20 ...)

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, October 27, 2018 11:31 AM

 Seems to be ok when you are just recommeneding a place you've gotten good service from. I didn't add the usual "no connection, just a satisfied custoomer" disclaimer since I figured it's pretty obvious I do not live in China and therefore do not own a Chinese company but, just in case - there it is. 

 Also no links, I think most people can find it on their own without posting potentially forbidden links. Then again, after the other week at work - this will make no sense unless you are a Windows administrator, but I had someone ask for help finding GPO (Group Policy) templates for a product. I wasn;t even familiar witht he product, so first I had to look that up. Then I simply types in Google "GPO templastes for <product>" and the very first hit had step by step instuctions to install the required templates and where you copy them from. The person I was helping said he had been tryuing to find the answer on Google but wasn;t having any luck. Seems just too obvious to me to type just those couple words, since it is precisely what is being searched for, but what do I know? I can understand it when I have to get creative and use alternative words for things to find what I'm looking for, that sort of thing  chalk down to experience, in that somewhere in my life I've heard that alternative term and then try that, which may result in success whereas someone not familiar with the alternative term can;t find anything helpful in searches. But this sort of thing - I mean, the phrase I types in was even in the help request sent to me, as this guy said "I can't find the GPO templates for <product>" Copy and paste your last 4 words to Google, voila!

                           --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 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Saturday, October 27, 2018 12:16 PM

Oh, and for your distributed-lighting plan, something like this?

http://www.djph.net/media/RndLight-8_v1.0.pdf

 

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Saturday, October 27, 2018 12:54 PM

NeO6874

Nice Smile.  That's $7.50 including the uno, right?  Just about the same as getting 10 of these spun up from the prototype place -- about $6.50 per, although I have a gazillion resistors and capacitors on hand, so I didn't order anything new there.

Yes $7.50 includes the UNO.  Actually I did a closer look at costs and only spent a total of $47 and some change on all eight houses, just under $6 per house for the controllers including the high current driver boards.
 
I install all my Arduinos in my control panel and use flat ribbon cable between the controllers and the structures.  The grey cable is easy to label using a black Sharpie.  I keep an eye open for the ribbon cable and have found it cheaper than using hookup wire or even TELCO frame wire and no spaghetti bowl either.
 
I wire all of my structures with a male micro connector in the basement to keep things neat.  A dual row 2X8 pin for 14 bulb structures and dual row 2X12 pin for 20 bulb structures.
 
 
Click of the picture for full screen
 
I recently picked up a new unused 100’ roll of 26 conductor #28 for $17 free S&H delivered.  Works great for my 20 bulb structures, I parallel four #28s for the 8 volt bulb supply.   With all 20 bulbs on the max draw is just under 800ma (including the Arduinos) at 8½ volts, four #28s works out to 1 amp.  My longest run is 20’ with a drop of .08 volts at max current.
 
 
Mel
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Saturday, October 27, 2018 2:29 PM

Good deal Smile 

Trying to think up a decent circuit that'd work in a structure and only need power (so even get rid of ribbon cables) -- but sizing kinda demands SMD things (ugh... it's bad enough with chips, resistors and diodes are just silly)

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    February 2002
  • From: Reading, PA
  • 30,002 posts
Posted by rrinker on Saturday, October 27, 2018 3:07 PM

 AN 8 pin micro will fit on a very small board. Rather than board mount the resistors, put them near the LEDs, which are mounted in the ceiling anyway. I have no desire to build power eegulatoors on every board I build - instead I am using those small buch converters you can get super cheap - I did find there are two kind, one witht he input and output capacitors mounted witht heir leads perpendicular tot he board edge and ones with them parallel to the edges. The perpendicular ones seem to sometimes have the leads busted loose when the boards get cut apart from their large panels, so far none of the parallel ones I've gotten have that issue. A board with small terminals for the 8 pin micro would be even smaller than this converter module. Using LEDs means no high current drivers to add, and warm white LEDs look perfectly fine to me - though I haven't tried the cheapo Chinese ones which may end up being some odd color temperature and look wrong. 

 Should be able to fit something liek this in all but the smallest shack.

                                             --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 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Saturday, October 27, 2018 3:15 PM

I like the regulator on-board (although I'm definitely using the complex one - can simplify it pretty heavily) -- don't have to find a home for a buck converter then.

Actually, dropping the register, and a smaller header, those could probably be maybe an inch and a half square ... 

Smaller buildings could be fed from beneath, like we do with signals.

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Saturday, October 27, 2018 3:46 PM

I built an Arduino card shelf to hold my Arduinos.  I find having them handy and easy to get to much better than scattered all over my layout.  If I want to change the program it’s a piece of cake.  Finding the ribbon cable for wiring my layout was one of my best finds.  Hundreds of neat looking wires in my “D” rings.  I use the ribbon wire for almost everything on my layout that doesn’t require high current.
 
 
 
I’ve made several changes since I took these pictures, I mounted a cheapo digital panel meter on top of each DC to DC converter so I can easily monitor the voltages.  The converter on the left is set to 1.35 volts for my 1½ volt micro bulbs, the center converter is 5 volts and the one on the right is 8½ volts for all of my 12 volt GOW bulbs.  The converters have an 8 amp rating at ambient cooling and 12 amps with forced air cooling. 
 
The converters are powered from a 12 volt 30 amp switching power supply.  This power arrangement is the best I’ve had in my 60+ years of model railroading, as well as the lowest cost per amp.
 
This is my bench supply.
 
 
Two converters glued to a 12 volt 15 amp switching power supply with two cheapie digital panel meters.
 
Randy, I want to thank you again for all of your help over the years!  You’re help has helped many Forum Members.
 
 
Mel
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
 
  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Monday, October 29, 2018 4:46 AM

Hmm, seems my response didn't send yesterday.  What'd you use to make that card tray, just some aluminum sheet and styrene U-channel?

-Dan

Builder of Bowser steam! Railimages Site

  • Member since
    July 2009
  • From: lavale, md
  • 4,678 posts
Posted by gregc on Monday, October 29, 2018 7:07 AM

the uln2803/4 is a darlington array that is useful as a sink (pulling something to ground).

is there a similar device (octal array) for sourcing (Vcc) higher current?

i've found devices like fdc6401n (dual, hex).

greg - Philadelphia & Reading / Reading

  • Member since
    January 2009
  • From: Bakersfield, CA 93308
  • 6,526 posts
Posted by RR_Mel on Monday, October 29, 2018 7:53 AM

NeO6874

Hmm, seems my response didn't send yesterday.  What'd you use to make that card tray, just some aluminum sheet and styrene U-channel?

 

I used 1/16” sheet Aluminum for the top, bottom and sides.  ½” Aluminum angle for the corner bracing.  I drilled and tapped the angle for 4-40 flat head machine screws and counter sunk them for flush mounting.
 
I found some 7 inch nylon card guides on eBay and cut them in half.  I removed the snap-in mounting tabs and glued them to the Aluminum using Amazing Goop (my go to glue for everything but Styrene and wood).
 
As I planned on inserting the Arduinos from the front all the tapered card guide slots are toward the front.
 
 
 
This is a rear view with two UNOS on the left an a MEGA on the right.
 
I made two identical card shelves that fit in the left corner of my control panel so I have room for 16 Arduinos.  The card shelves or racks fit tight in the side compartment so no mounting is necessary.
 
If the ambient temperature in the compartment gets too warm from the DC to DC converters I have a contingency plan for a 3” 12 volt whisper fan to remove the heat.
 
 
 
This is what it will look like when finished, the upper portion of the left panel has Velcro strips to hold a 7” Tablet (view finder for my camera car).  The Tablet was stolen during a break-in last November and I need to order a replacement.  My MRC Prodigy controller slides under the DC 7000 Sound and Power on the right. 
 
I operate my layout dual mode, the Sound and Power for DC and Prodigy for DCC.  The two systems are interlocked using a relay powered off of the Sound and Power, turning on the Sound and Power switches the rails to it and drops the Prodigy.
 
 
Mel
 
 
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 Monday, October 29, 2018 8:25 AM

gregc

the uln2803/4 is a darlington array that is useful as a sink (pulling something to ground).

is there a similar device (octal array) for sourcing (Vcc) higher current?

i've found devices like fdc6401n (dual, hex).

 

I did a lot of research when I was trying to figure out the easiest way to build a high current driver and the highest current I found in a chip (seven channel) was 500ma.  Because my max current is under 100ma I didn’t dig any deeper.
 
I originally went with a Toshiba TD62304 but switched to the ULN2003 because the TD62304 more than quadrupled in price in a year.  I paid just over $1 for the originals and the UNL2003 is 25¢ from a US Seller.  The only spec difference in the two is the TD62304 is inverted and the UNL2003 doesn't need 5 volts.  Samo samo on the connections pin 1 in pin 16 out on both.
 
Switching to the ULN2003 works out better because the sketch is normal now, I didn’t like to change the code for the inverted output anyway.  Now the UNO is interchangeable between LED and high current.
 
 
Mel
 
 
My Model Railroad   
 
Bakersfield, California
 
I'm beginning to realize that aging is not for wimps.
 
  • Member since
    January 2006
  • From: Northeast OH
  • 2,268 posts
Posted by NeO6874 on Monday, October 29, 2018 8:29 AM

Nice - will have to check the 'bay for those guiderails.

 

I really like that "cards in a box" approach -- toying around with a redesign that'll be similar now.  Except that I'll add a backplane power source, and some card-edge connectors for power.  (outputs will be the other side, not sure what yet, maybe 8p8c).

-Dan

Builder of Bowser steam! Railimages Site

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!