Well, I got the PCBs from China yesterday, and other than a few gaffes on my part, such as that label that is half off the board ... they turned out well.
Soldered one up yesterday, and it works pretty nice -- especially with having slowed it down to ~1 second between cycles, rather than the 100ms I was using during testing.
Here's a couple of pics of the completed board:
If anyone's interested, I'd be willing to ship you one. Would rather see them go to a good home, than sit here collecting dust. Just PM me and we'll hammer out what timing you want on the LEDs, and your shipping addres.
Board'll arrive (nearly) ready to run -- you'll just need a 9-24v power source (it "should" work with AC or DC, but I can't find my MRC pack to test it with so, I'd recommend not using AC), LEDs, and their current-limiting resistors.
-Dan
Builder of Bowser steam! Railimages Site
Very true. There's little truly new. I'm not one to reinvent the wheel, I always look for prior works, change or incorporate them if possible, before I ever try to come up with solution on my own.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
I have the distinct feeling anything I feel like trying to tackle has probably been done (and possibly better) ... Some crazy smart types in this hobby if you know where to start digging ...
Actually I back-doored into it, since I saw the expansion board on the MRCS site and they mentiont he limitations there, but I was curious about the chip they used so I looked it up and got the data sheet. ANd found out there is already an Arduino library that supports both versions (for some reason I like SPI - dunno, I just like it better than I2C). So among other parts, I have some MCP23S17's ready to build a prototype circuit. Soon as I finish getting the finalized schematic for my turnout controller, and getting the boards spun. And more or less finalizing the software. It works perfectly fine but I'm tweaking it a bit. Then I will start work on my version of the cpNode. I've already done the very basic "hook an RS484 adapter to an Arduino and use JMRI to turn an LED on and off" test.
Yup, I must be blind
Table 1, page 3, in the MCP23x17 data sheet.
Yeah, I wasn't seeing either spec in the tables. It's probably just somewhere in the text and I just glossed over it, in looking for the tables.
The 23x17's can drive something like 45ma or so per output, to a max of 160ma for the whole chip, so if you use all 16 lines for output, it's no more than 10ma per line. Which is fine for LEDs. If you need more, just add a drive like a ULN2003.
The key thing to remember is that there are usually two specifications on data sheets for anything that has multiple drive lines - how much each line can handle, and how much total you cna have for the whole chip. Most have a combined total that is much less than the per line limit times the number of lines.
Yeah, the 6971s are for a different LED-based project of mine (not related to MRR'ing).
Those registers you mentioned look like simple i/o expanders -- I probably misread the datasheet, but it didn't look like they could deal with LEDs -- or at least I couldn't find the ratings on a pin.
I'm not currently skilled enough to set up a multi-board communications network, so the "expansion board" idea I'm thinking about is simply that the backplane supplies 5VDC power to the card(s) that're plugged in. Each card then has its own microcontroller doing whatever it's been programmed to do.
Maybe in the future, write up something more complex (although, by then, I think whatever that ends up being would also involve "hey MRR editors, how much does the smallest ad space cost?")
That's sort of how MRCS does their cpNode - thye have add-on boards for IO expanders using the MC23017, and it just interfaces to the main board with 4 wires, 2 for the I2C and 2 for power and ground, and you can daisy chain another one to the first.Nice thing is the hardware design is the same for no, one, or two expansion boards. It's all just a software change to address the extra ports over the bus.
I checked out the MAX6971 - it seems liek it's really meant for controlling large LED strings - with 36 volts per channel you can hook 10 LEDs in series and then it's a constnat current cource for each one - plus PWM on the enable pin controls the LED brightness. Might be an option for layout lighting, but it's way overkill for structire lighting. There are cheaper smaller LED constant current drivers for single or small quantity LEDs - then you don;t have to supply any resistors on the LEDs themselves.
Heh, I've got a boatload of the sn74 registers right now. This initially started out as a project to see how small I could get the code while making the missus a little present (and yep, I crammed it into an attiny25 using plain Arduino IDE code. I think if make use of more inline assembly, I can shrink it some more).
As I was playing with it, I figured it might be useful on a layout.
Expanding it is more just a thought exercise -- 32 individual random LEDs is already probably pushing it . But it helps me learn if I have a semblance of an actual project (like pluggable cards in a power bus to act as brainboxes for ... something ).
I was also looking into the Maxim Integrated MAX6971 series - but they're 4.50 apiece (yuck).
If you really need ports, there are the devices I am planning to use on my CMRI nodes - Microchip MCP23S17 poort expanders. There is a 23017 which is I2C and a 23S17 which is SPI, and each has 16 I/O pins. So 2 pins (or 3 if using SPI) becomes 16 - but not quite. Each 23x17 has 3 address lines to set the internal address, so you can have 8 of them per bus, so 2 or 3 pins becomes up to 128 pins! Not quite as cheap as the 74HC595 shift registers, but they also don;t do bit shofting to get the output - each 8 bit port (there are 2 per 23x17) is individually addressable. They are $1.30 in single unit quantities from the usual distributors, maybe cheaper on ebay. But remember, that's 16 pins for that, so 2x of the shift registers. And there are Arduino libraries for either version.
gregc NeO6874 The MOSFETs will handle something silly like 20 amps did you actually build a circuit using mosfets? if so, were they discrete or an array? i have large discrete mosfets, but the fdc6401N is rated at only 3A. still plenty
NeO6874 The MOSFETs will handle something silly like 20 amps
did you actually build a circuit using mosfets? if so, were they discrete or an array?
i have large discrete mosfets, but the fdc6401N is rated at only 3A. still plenty
Just a test board, and actually, now that I double-check the parts ... they're actually FQP30N06L, and rated to 32A apiece. (Not the FQP27P06 which're 27A)
Yeah, The edge-connectors are just an idle thought -- I think that connectors in general look cleaner than using header pins; and "needs force to insert" tends to also mean "needs force to remove".
Going with the "split" approach, the brainbox board is 1.0 x 1.3 inches -- just big enough for an attiny, capacitor, and an rj45 connector for power/signal output (or programming input).
Remotes in or near buildings would then take input, and have howevermany shift registers the building needs (up to four, assuming we stick with that ATTiny25 ... I haven't really messed with seeing how well the code scales, so let's assume we can double it (8 registers, 64 LEDs) with a -45, or double it again (16 registers, 128 LEDs) with an -85).
Although 16 registers is 1.12 A if we're driving them as hard as they'll go (70 mA apiece), and 24AWG wire is only rated for 570mA per conductor (and I'm not 100% sure we could use two conductors)
NeO6874The MOSFETs will handle something silly like 20 amps
greg - Philadelphia & Reading / Reading
NeO6874 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).
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).
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).
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'm using SN74HC595 Shift registers -- though they're (IIRC) limited to 20 mA per pin, or 70 mA total through VCC (or GND - though I've never bothered trying to use them as sinks).
at 5 volts, with a nominal forward voltage of 3-3.3V, the little test-array I'm running is pushing about 8-9 mA / LED (220 Ohm resistors)
Granted, these are chineseium LEDs, so they may not all actually be anywhere near that value (but after 4 days of running, the shift registers were still working fine...)
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?
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 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.
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.
Good deal
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)
NeO6874 Nice . 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.
Nice . 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.
Oh, and for your distributed-lighting plan, something like this?
http://www.djph.net/media/RndLight-8_v1.0.pdf
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!