Dear Stan

 

I come too far and with your, GRJ and others help me to make my dream a reality to stop now. So I purchased the Aoshima with led scanner at 1:43 scale. The only way to make the Hot wheels car work is in a machine shop. I would need use of a milling machine and cut off one lay at a time from the inside of the car to make the led slot. This is time consuming, I do not have a milling machine and the possibility of damaging the car runs high. Once I get the new Knight Rider I will let you know.

Kris

 

A proud member of the Brotherhood of Carpet Layouts.  Permanent layout scheduled for Spring of  2019. New Home of Phoenix Train Works (Name of Layout)

 

Hi Stan

 

Thanks! That will be the easy part of this mod. What type of diode would you suggest?

Kris

 

A proud member of the Brotherhood of Carpet Layouts.  Permanent layout scheduled for Spring of  2019. New Home of Phoenix Train Works (Name of Layout)

 

Hi Stan

 

Thanks for the reply. I finally got a chance to paint the caboose flat black yesterday looks sharp. Once I have two coats on I will finish the electronics and post pictures for all that interested to see. Then I will start the box car part  of this project.

Kris

 

A proud member of the Brotherhood of Carpet Layouts.  Permanent layout scheduled for Spring of  2019. New Home of Phoenix Train Works (Name of Layout)

 

Hi al

 

Here is a sneak peak at the build. The caboose painting is done and electronics almost done. The box car is get a paint job and electronics will start soon.

 

 

Caboose mod

Caboose electroncis

Box car

Kris

 

A proud member of the Brotherhood of Carpet Layouts.  Permanent layout scheduled for Spring of  2019. New Home of Phoenix Train Works (Name of Layout)

 

Attachments

Photos (3)

Stan2004 and GRJ, I finally got a PCB made using Diptrace and JLCPCB, using the 4-Way Traffic Signal schematic discussed in this thread. Ended up making a few changes to the original, but the assembled PCB seems to be working pretty well...no smoke so far! It's been a great learning experience as well. 

This was all made possible for me with the help of GRJ designing the TIU Tester proposed by Adrian, some suggestions from Stan and GRJ's PCB design work to put it all together. Then GRJ passed the kit offering part to me since he was too busy at the time to fiddle with making TIU Tester kits for everyone that wanted one. Looking at his Diptrace files and learning how to get the PCBs made for that project gave me the incentive (and courage) to finally try learning about the entire process myself using Diptrace. Took me a while, and I still have a lot to learn, but I finally got where I could use Diptrace enough to cobble things together and get a PCB made from the files. 

I started with the basic traffic signals only and then added the opto-isolator for crossing signals that Stan added toward the end of the project. I have working PCBs for the traffic signals only, but have not yet had any made with the opto-isolators. That is coming up next as soon as I breadboard the circuit so I can understand it better. 

I ordered most of the PCBs from JLCPCB, they were $2 for 5 PCBs and $5.50 for shipping. Takes about 2 weeks or so to get them, which isn't bad, unless you have made a mistake and have to correct it and order more. This did happen a couple of times, but I think I have things all fixed now.

Anyway, if I could talk you two into it, I would appreciate you two looking over the new schematic and I will also post the Diptrace PCB files for your examination. Any comments/tips/pointers etc. would be much appreciated! 

I posted the files in .pdf format for ease of viewing. Subject to approval from Stan & GRJ here, I'll post all the Diptrace files for anyone to use as they want. 

4-Way Traffic Signals Schematic v2A-images

4-Way Traffic Signals Opto-Iso Schematic v2B-images

Attachments

Ok, thanks.  I'm still learning and there is lots left to learn! It's fun though, very enjoyable too. 

Does this look better?

4-Way Traffic Signals Schematic v2A

 

Also, I was thinking there was another thread about these traffic signals, possibly more info in it? But I can't seem to find it anywhere so I hope this is the right place to post this. 

Attachments

Photos (1)
rtr12 posted:

...

Anyway, if I could talk you two into it, I would appreciate you two looking over the new schematic and I will also post the Diptrace PCB files for your examination. Any comments/tips/pointers etc. would be much appreciated! 

It appears you're using 2mm pitch 5-pin connections to each signal head?  Have you identified an inexpensive source of male-female connectors or pre-crimped cables of suitable length/gauge?  Or maybe you don't plan to use connectors and just solder wires from the LEDs directly to the board?

Are you fabricating your own signal heads?  That is, I see eBay seller "wehonest" has some inexpensive O-gauge LED signals...but they use the 4-wire method (R, Y, G, and a common) … as opposed to the 5-wire method.

TrafficSignal48GR3Asp_02

I realize this is a hobby circuit...but the CD4017B chip is being pushed to drive a pair of LEDs in parallel.  That is, one might stumble across something like this:

cd4000B series output current

I suppose 10 mA output or 5 mA per LED can be quite bright but I notice that other off-the-shelf controllers advertise ability to drive up to 10 signal heads or even incandescent bulbs. 

Attachments

Photos (2)

This was really an exercise in learning to make a PCB (and after a few attempts it actually works)! I have been wanting to learn that for a long time. While it would be nice actually using the PCB and circuit someday, making my own signals to use the 5 wire set up seems like a large source of frustration as it's probably not feasible to make one's own traffic signals. Especially when the ones you listed above are so readily available and affordable. I think I even have some of those around here somewhere.

I wasn't aware of the over current conditions with the 4017 ICs? Thanks for pointing that out (I need to study the data sheets more closely). That's another good point that would probably need some thought. Also I don't have a source for the 2mm pitch terminals, the ones I got are from Digikey and were not outrageously priced, but not what I would call inexpensive like the 5mm ones either. I was trying to keep the PCB as small as possible. Must be from following GRJ's projects and the way he shrinks the PCBs down so well? 

You read my mind on the 4 wire problem with the premade signals. I have been thinking about that since I started trying to create the PCB, with no solution in sight so far. It's a nice thought to change the circuit to work with the 4 wire signals, much more practical. However, not sure I have the know how to do that, if it's even possible. You are right about the off the shelf controllers being much better and easier to use, which I should probably just use for any layout projects, but taking this route I never would have learned to make a PCB. 

If you have any thoughts on a better IC for the above project, or any ideas on using the 4 wire ready made signals with the my newly created PCB I'd love to hear about them. All the while I was working on this I suspected that it may never actually get used on a layout anywhere, but it was really a fun project and didn't cost a great deal. Only goofed up a couple of PCB orders and the components are not too expensive.

So, it's really not a big deal if my PCB ever gets used, it's been a great learning experience! At least now I can cobble together a simple PCB using Diptrace. Although with some difficulty using the included libraries of parts and patterns and getting them all to match the components being used. I think creating my own actual circuit is a ways off yet, but maybe someday?

Thanks for your input and any other comments you might have to add are most welcome.

Tom, time to learn a little programming, that makes a lot of these projects go much smoother.  Can you creating the Super-Chuffer functionality without a processor?  

FYI, here's a simple little fixed DC supply I build, I shrunk it a bit and I'm waiting on it's boards.  I use this whenever I need a little DC power from track power in a locomotive or rolling stock. I can use any value voltage regulator on it to obtain various power values.

I normally just encase them in a bit of heatshrink.

 

Attachments

Photos (2)

I'm guessing the Super Chuffer would be a real nightmare without micro controllers! Can't even imagine where to start with ICs? And I bet the the PCB would be about as large as an old 1960s color TV set if one ever did get a somewhat working prototype. That would be a challenge, at least I think it would. The 4 wire signals would be much easier with an Arduino too, at least for me.

I can do a little Arduino programming (with a lot of looking up syntax, libraries, etc.), but I am also somewhat fascinated with the IC chip methods and creating circuits with them. I'd like to learn more about all that too, probably the reason for my obsession with the traffic light circuits. C programming takes me quite a while too, but on the brighter side there is a ton of ready made programs for the Arduino stuff. The size of the Arduino boards are a problem though, can't shrink them up like you can a PCB of one's own design.

I think you are using the PIC chips for some of your projects, which seem to have endless possibilities. I have never tried any PICs so they are all new to me. From what I have seen, if I'm understanding correctly, they are programmed in assembly? If so, that's definitely over my head. I've seen a PIC Basic programming language advertised for them. Don't know much about that either, but it sounds like something more my speed. Then there is the vast selection of different PIC chips available and figuring out which one to use where...I'm lost there too. 

I'm not quite up snuff for putting things on both sides of the PCB like you do either, but maybe I can get to that someday as well. The way you shrink down the size if your PCBs is a very nice feature. This is all great fun and I really enjoy puttering around with all this stuff. Maybe I will take a closer look at the PIC and Arduino type stuff? I would also like to someday check into the PIC Basic programming as I used to use Quick Basic and Microsoft Basic Pro many years ago. I used to enjoy doing that too, then Windows came along and ruined all that. I fell way behind and also kind of lost interest with Visual Basic. To me it just didn't have the same fun factor for some reason.

I write all my code for the PIC in C, no need for assembly.  The Microchip MPLAB-X development environment is quite complete.  The one thing you also need is something like the PICKIT3 to actually program the chips.  I used the ICD3, but it's a lot more expensive.

Thanks, I'll look up the MPLAB-X and see what happens. I didn't realize PICs could be programmed in C and had always wondered how the PIC Basic programming worked as well. Guess it's time for some investigating.

rtr12 posted:

...

I can do a little Arduino programming (with a lot of looking up syntax, libraries, etc.), but I am also somewhat fascinated with the IC chip methods and creating circuits with them. I'd like to learn more about all that too, probably the reason for my obsession with the traffic light circuits

...

To be sure, the Arduino, PIC, or microcontrollers of that ilk provide the ultimate in flexibility, functionality, etc..  But if the "IC chip method" is still of interest, here are some thoughts.

If you want to go the 4-wire method, you could do something like this:

4-way 4-wire heads

The existing circuit employs a "trick" whereby the YLW or GRN in one direction simultaneously drives the RED in the other direction.  This is implemented with the so-called "diode-OR" function which in this case means when either the YLW or GRN LED is on, then the opposite RED is also ON.  This is shown in pink above...LEDs being diodes that happen to light up.  But this requires the 5-wire implementation.  If going to a 4-wire implementation, you must implement this "diode-OR" function independently which in effect means you must add 2 diodes per direction to replace the "OR" function provided by the YLW and GRN LEDs.  Of course these diodes are a penny a piece so it's really about the real-estate cost of the PCB than the component cost itself.

There is the separate issue that going to a 4-wire method doubles the current requirement since you can't "double-up" on the LEDs.  That is, in the original circuit with the 5-wire LED head, a single 74HC4017 output drives a YLW & RED (in series) or a YLW & GRN (in series).  With a 4-wire LED head, each 74HC4017 output drives a the 2-color combination in parallel.  In effect this doubles the current draw on the already stressed 74HC4017.

Additionally, from what I can tell, the 4-wire signal heads are typically common-ANODE (common +) whereas the suggested alteration above assume a common-CATHODE (common -).  The wehonest 4-wire signal head is common-ANODE.

SignalWires3Aspect common ANODE

So by using 6 transistors to flip the polarity of the six LED drive signals, we solve 2 problems.  1) transistor provides adequate current to drive multiple signal heads, and 2) transistor inverts the polarity of each 74HC4017 output so that a common-ANODE signal head can be used.  The transistors are 5 cents each...though it does require additional PCB real-estate. 

4-way 4-wire heads Common Anode

Attachments

Photos (3)

I do know the micro controllers are much more flexible. And per GRJ's post above I just downloaded the PIC MPLAB-X IDE and do intend to look into the PIC chips too. If I ever get all this figured out a PIC might be the thing I use on or for a PCB for my actual layout. I have been interested in the PICs for sometime as well. 

However, I do find the IC circuits quite fascinating and your suggestions above will be put to good use to enhance the current project. I am going to try everything you suggest. Another nice learning exercise that is just what I was hoping for here. Getting this circuit to the 4 wire operation is going to be neat! I was sure I had some of the We_Honest signals, but after looking today I can't seem to locate them? Maybe they will turn up...or I'll be ordering some more for testing. 

Also, I was going to ask about the 74 series 4017s possibly having more current handling as opposed to the CD4000 series, but you read my mind there too and already answered the question. I will be ordering the 2N7000s tonight and giving this a go too. I don't suppose an NPN transistor (BC547) would suffice until I get the 2N7000s? I have a small bag of BC547s on hand already (also maybe a few 2N2222s). And as you can tell, I need to do some serious data sheet study as well...if I just knew what all the data meant? Some I get, but some is not well understood  to me. 

Thanks to you and to GRJ for all the help and patience! It is truly appreciated and I'm even finally learning a thing or two! 

Yes, the 74HC series has improved output current compared to the CD4000 series in an apples-to-apples comparison.  I don't know when the original 4017 design you found came out, but I figure the CD4017 was used because of its higher operating voltage range which is needed to drive the GRN & RED LED in series.  The ~3V of the GRN LED and the ~2V of the RED LED would be pushing the output voltage capability of a 74 series device which has a nominal 5V operation.  Yes, you can operate 74HC devices at 5.5V which might be enough output voltage but now you're rolling the dice.  The CD4000 series operates to 15V or more.

But the real issue is you want to drive a 4-wire common-anode signal head So you need to invert 6 signals.  Any common-sense signal inversion method would provide additional current drive capability for "free".  I suggest the 2N7000 transistor since that's what I found on eBay for cheap (5 cents each).  I suggested a FET since this means you don't need the additional overhead (PCB real-estate) of a resistor in the input.  You could use your BC547 or any other NPN switching transistor like the 2N2222... just insert a ~10K resistor on the input. 

N-FET or NPN with resistor

Note that when inserting the inverting-buffering transistors, the "common" wire from each signal head now goes to the + side of the power source via a resistor.  If using 12V DC, and driving 2V-3V LEDs, that's a 9V-10V DC drop.  So if driving each LED at 5 mA, that would be a 10V / 5mA = ~2K resistor.  If driving 2 signal heads in parallel (as drawn in the original design) that would be 10 mA or ~1K resistor.  Adjust resistor value for desired brightness.

 

 

Attachments

Photos (1)

I hadn't thought of the lower voltage on the 74 series. I have had that 4017 circuit for several years (from at least 2012 or so, found on the internet somewhere but I now don't remember where?), so I imagine it goes back a ways. As I recall it didn't work as I found it, but I forgot what I did to get it going? Got the data sheets now, but haven't yet studied them. I think I'll start printing them out so they are handy for easy reference, then maybe some more of the info will stick. 

As an aside here, I did read a book on components over the winter and it was pretty informative. But there was a lot of info to remember in there. Can't remember the title off hand, but it was a set of 3 volumes and written so I could understand most of it. Just remembering it all is a problem. It was pretty informative and covered many components.

I ordered some of the 2N7000s, got them from a US seller so I should have them next week...got a little anxious here. They were a little more, maybe a little over 10 cents or so each, but the shipping was also free and much faster. While waiting, I think I'll try the BC547s following your recommendations. Maybe I will this all figured out by the time the MOSFETs arrive. Now if I could just find my 4 wire signals...

Thanks again for all your help and suggestions. 

Oops.  There is a problem with my recommended inverting circuit.  

N-FET%2520or%2520NPN%2520with%2520resistor

I thought I was saving you a resistor per inverter-buffer by using a FET.  But this only works if directly driven by a digital gate like the CD4017.  Instead, in this design there are diodes in the path.  So bottom line is you do need a resistor paired with each transistor when you use an N-FET or an NPN.  It's just the resistor is hooked up different depending on the method.  Sorry for the misdirection.

For driving a few LEDs per transistor as in this case, either method works equally well.  If you were going to drive heavier loads I'd suggest the FET method which is more efficient albeit a few cents more per buffer. 

Attachments

Photos (1)

Thanks Stan,

Just printed out your drawings above and was studying them to modify my wiring diagrams. I'll still be using the FETs when they arrive and the added resistor isn't a problem, but thanks for catching that. I'm sure I would not have noticed until something went wrong somewhere. But, I always order extra components just in case of any unintended smoke releases that may arise. So far so good though, no smoke! I will post back with my results, or maybe more questions first.

Stan, I think I may have it re-worked with the BC547s (MOSFETs next). Here's the revised schematic, if I got everything in the proper place (including the wires). I couldn't get the transistor symbol to cooperate as far as orientation goes, so I changed the CBE designations to match your examples.  And as usual, any further input welcome (and wanted ). 

If I got this correct, that really reduced the output wiring. Makes me feel like I missed something...

 

4-Way Traffic Signals Opto-Iso Schematic v3B

 

Attachments

Photos (1)

Curious your choice to use two 6-pin connectors, and two 2-pin connectors for the 16 total connections.  This means you're doubling up on the common wires - N-S common and E-W common have 2 wires to each PCB terminal.  I'm not saying this is wrong or won't work - but perhaps unconventional.

It just seems you have 4-wires coming from each wehonest signal head and IMO you'd want those 4-wires going to a single 4-terminal connector on the board.  I don't know if there are economical 2mm pitch screw-terminals available but on eBay you can get 2.54mm (0.1") 4-pole screw terminals for 40 cents each from a US seller...a little cheaper if you can wait for Asia.

4-wire connectors

I don't know the gauge of wiring coming from the signal heads.  Screw terminals like this don't like really fine wires in terms of clamping down to make a reliable connection...but you can always "fold" the stripped wire ends back on itself to essentially double up the diameter of the wire to give more clamping area.

Attachments

Photos (1)

Thanks again Stan, I see my error now that you have pointed it out. I guess it was old thinking carried over from the previous circuit. Back to the drawing board. Let me try this again and I will repost. The terminals you listed also look good, that's a good price compared to Digikey. I better order a few!

I'd jump right to the FET's, they'll do all you want to do and aren't any more complicated to wire in than the transistors.

I do plan to use the FETs, but they are still on order and I don't have them yet.  I was only going to try this out with the transistors I do have on hand and then swap them out to the FETs when they arrive. Was thinking it shouldn't be too hard to swap them out and redo the circuit once I had the basic stuff in place. I won't be trying any PCBs until I get the FETs. And the way things are going today, it'll probably take me until the FETs arrive to get it working...it also keeps me busy and off the streets! 

I'm easy, but I ain't cheap!    Some slacking in old age is a big factor too. 

I think I have the corrections made, time for a look to see what I have screwed up this time (before posting). Whatever it is, I'll probably miss it again though...

Ok, I have another schematic to look at. I got myself confused a few times re-doing this (sometimes that's pretty easy for me). Hopefully it isn't too far off this time and I'm at least getting closer.  

4-Way Traffic Signals Schematic-Transistors v3B

Attachments

Photos (1)

Looks good by me.  

Untitled

Not that you'd be using MTH signal heads...but wouldn't it be dandy if you could plug their 4-wire cable right into your board.   Not sure if they use common-anode or common-cathode, not sure exactly what kind of connector they use, not clear how their wire-color-key maps to the LED colors, etc..

Attachments

Photos (1)

Thanks Stan! I even have it working on a breadboard too. Once you get all the little jumpers plugged into the correct holes in the breadboard it works great. Someone had a couple wires in the wrong breadboard holes right out of the gate, but they found and corrected them and all is well now. 

Still haven't found my We_Honest signals, all I can find are some red & green 2 LED signals that I have for switch indication. However, I am sure I do have a set of the MTH traffic signals you mention above and I'll dig those out and see how they could possibly fit together. I like the 'just plug it in' idea. 

I have been fiddling with the trimmer pot and capacitor values and I thin with the 220uf cap a 50k pot is more than sufficient. At about 25k ohms on the pot you get about 40 seconds on the red and green and 10 sec on the yellow. Have also been trying to tidy up my drawing and turn it into a PCB. Using Diptrace is quite fun and really not too hard to learn enough to get started with it. I still have a lot to learn though.

MOSFETs should be here by mid-week.

Thanks for all your help!

Here's the schematic for the MOSFETs, hopefully all the wires connected correctly as I ordered some PCBs from JLCPCB for both the transistor and MOSFET versions. As an FYI, it was $2 for the first order of 5 (transistors), then $4 for the next 5 (MOSFETs) and $5.91 for shipping. Not too bad on the pricing. Due to the larger size than I have ever had before, OSHPark was $26.50 for 3 PCBs shipped. I can see clearly now what GRJ was talking about with the PCB size being a big factor on where to order your PCBs.

The plan is to assemble one of each PCB to make sure they work properly, then post all the Gerber and drawing files along with a materials list (Digikey part numbers included) for anyone that might want to make some of these for as a hobby project. With the Digikey part info you could most likely find the same items on ebay from Asia and possibly save some on the parts order.

Stan, I can't find my MTH signals either, I think I am missing a box of stuff somewhere? I probably put them in a 'safe' place somewhere... I'll keep looking, they should turn up one of these days? When found, I'll see about making the connections for them and a PCB to match and report back. And also a big Thank You for the assistance and the revised 4 wire design to make this work with some of the readily available traffic signals. 

4-Way Traffic Signals Schematic-MOSFETs v3A 

Attachments

Photos (1)

   I didn't look to see exactly how the applies, But CBE postions on a component should'nt be taken for granted. I've ad suppliers throw curveball odd numbering additions into normal packaging needing two legs cossed and/or reverse placement. Read the included data sheets every time .

"Still trying to not shoot my eye out"

 

"Nursing insomnia one railcar at a time"

My aroma therapy? Smoke Pellets.

 





Adriatic posted:

   I didn't look to see exactly how the applies, But CBE postions on a component should'nt be taken for granted. I've ad suppliers throw curveball odd numbering additions into normal packaging needing two legs cossed and/or reverse placement. Read the included data sheets every time .

Back in the day, Radio Shack would sell a grab-bag of random and cryptically marked transistors. No data sheets included.  But a hobbyist willing to spend the time could save some money sorting through these.  While I can't imagine anyone doing this today, I see that the "FREE with coupon" Harbor Freight DMM still offers the so-called hFE transistor-test function which allows you, in effect, to determine the CBE orientation of a transistor as well as its polarity (NPN vs. PNP).  Here's the meter set to hFE mode with an NPN with the EBC orientation showing an hFE (current gain) of ~200.

free HF meter hfe tester

Unfortunately, this is NOT suitable for working with FETs.

 

 

Attachments

Photos (1)

I probably should have waited for the MOSFETS to arrive, they are still not here and the ebay listing said guaranteed delivery by June, 26th. So much for the 'guaranteed' delivery date. 

I bought a kit on ebay and built one of the 'transistor testers' which has worked pretty well so far. They are pretty inexpensive and can be found lots of places. Since I don't know the resistor color codes, that's how I check all my resistors to make sure I have the correct value. These are neat little devices, what will they think of next?  I find it to also be fun and relaxing!  

Of course that won't help my already ordered PCBs, if the actual part's don't match the schematic. Another problem with ordering on ebay is you don't always know what datasheet matches the part you are ordering. While Stan and others here can probably determine what they are getting, that can sometimes be a crap shoot for me. Keeping fingers crossed that everything matches up... 

This transistor tester looks identical to the one I have.

transistor tester

Attachments

Photos (1)

I could teach you the ditty that we learned when I was a kid to remember the resistor color codes, it goes something like "Bad Boys..."  I might get censured if I post the whole thing!

I've tried learning the colors a couple times, but never got there. (once when I was a lot younger too). I think I'm too old now...sleeping makes me forget what I had done the previous day. Like a reboot of the old PC, clears out all the memory.   Besides, I don't want you getting censured while trying to help out around here!     (Maybe I'll google it and see what comes up?)

Add Reply

Post
OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
330-757-3020

www.ogaugerr.com
×
×
×
×
×