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...)
-Dan
Builder of Bowser steam! Railimages Site
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).
NeO6874The 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
greg - Philadelphia & Reading / Reading
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)
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
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)
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.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
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).
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.
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?")
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, 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.
Table 1, page 3, in the MCP23x17 data sheet.
Yup, I must be blind
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.
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 ...
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.
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.