Perhaps stating the obvious but the 4017 Reset function (in addition to clearing any "illegal" states) puts the count back to 0 where the Q0 output is high.  In your circuit this puts Red on the E-W direction.

 

To add some interest to your layout, if your intersection is near a grade-crossing you could have your train-detector (ITAD, isolated-rail, etc.) reset the 4017 to immediately stop E-W traffic going to the RR crossing.  I don't know if there is a standard but I see this behavior on traffic signals next to RR crossings near me.

 

Depending on how you do block detection, it could be as simple as a 10 cent transistor and a couple resistors but no more than, say, 50 cents using an opto-isolator chip.

Good point Stan, while it's perhaps obvious to you and me, it's still worth mentioning.

 

I like the idea of holding it in reset when a train is passing to block traffic, that's pretty tricky.

 

That is a good idea, the RR crossings here do that as well. There were two intersections like this right by our old home of 35 years before we moved a little further west in 2013.

 

I get the idea, not sure I know how to accomplish it, but will give it a try. Something to fiddle with anyway. Will post back here with results one way or the other. Don't go away, in case I get stuck...

 

Thanks to both of you for all the help so far.

nvocc5,

 

I can't find the jumpers I got, but here is a link for some similar ones on ebay.

 

Male to Male breadboard jumpers 

 

These might be easier than the ones that come with the bread board if you get one. Just thought you might like these better, I did? The one set that comes with the BB might not always be enough either?

 

I also found a Knight Rider (the talking car from the '80s) flasher if you are interested. Something else I have tried that I found on the internet. Probably no good for rail roads, but if you want more to play with it might be fun. 

It's truly sad that the US averages about 6 collisions per day at RR crossings with several hundred fatalities each year

 

http://oli.org/about-us/news/collisions-casulties

 

The numbers seem to be on a downward trend perhaps in part because of better coordinated signaling technology.  Thus, I think it's worth $1 in parts and effort to include this in your layout if appropriate.

 

Again, it depends on how you trigger you crossings, but a general solution would be an opto-isolator which "shorts" the capacitor when a train triggers your crossing gates/signals/flashers.  I suggest the LTV-8141 opto-isolator only because GRJ showed it in one of his circuits, DigiKey sells it (64 cents qty 1), and if you're only going to "stock" one opto-isolator in your stash it's a good one to have for O-gauge applications.  So by applying, say, 12V (AC or DC) to the opto-isolator thru a current-limiting resistor, the capacitor is discharged which resets the 4017 and the E-W traffic gets the red light as long as the train is present.

 

ogr ltv8141 reset trigger

Attachments

Photos (1)

I had no idea there were that many collisions at crossings? The numbers have really dropped since 1981. In the 35 years we lived by those crossings I can only remember one collision with a motor vehicle. A lady ran off the road on to the track and the car got stuck. Luckily a police car came by or saw her go off the road and the policeman helped her get out of the car just before the train came through. From the report on the news it sounded like they didn't get out of there any too soon, it was a close call.

 

Back on track now. Thanks for the drawing revisions, I will try it out. The opto-isolator sort of looks like a relay. Would a plain old relay work there as well? I am guessing the opto-isolator is just a lot cheaper and much smaller than a relay? Never the less I am going to get some of the ones you suggest as I don't have any and have never fiddled with them. Let's see now, there must be something else I need at Digi-key while I'm there...

Originally Posted by rtr12:

..The opto-isolator sort of looks like a relay. Would a plain old relay work there as well? I am guessing the opto-isolator is just a lot cheaper and much smaller than a relay? Never the less I am going to get some of the ones you suggest as I don't have any and have never fiddled with them.

Right.  When the opto-isolator is triggered, the transistors on the output side effectively "shorts" the capacitor like a relay would.  The key is the voltage across that cap is always of the same polarity (more positive on the "top" side) so a transistor works since transistors are, in-effect, DC devices.  Also, the currents involved are quite small, measured in milli-Amps, so the "puny" transistor in an opto-isolator is adequate; you do not need the Amp level switching capacity of a relay.

 

And, yes, if you like to fiddle with electronic parts or just want to learn more about what goes on under-the-hood you definitely need to add opto-isolators to your bag of tricks.  That is, since O-gauge uses AC for track and accessory power while all the new-fangled electronics uses DC, you will frequently need to bridge that gap which, in one way of thinking, essentially means using (opto) isolators to allow the two systems to inter-operate.

 

Dear gentleman

 

This is one on the main reason I love this forum the free follow of information and great depth of knowledge that is being shared. I appreciate that you were able to help rtr12 with the traffic light problem. I also learned something  new this about electronics. I will place the order with Digikey later today unless you folks want to add some else to the circuit.

 

 

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)

 

Dear rtr12

 

Please provide with the link Knight Rider link that would be interesting to see.

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)

 

Dear rtr12 and all

 

Since you talked about the crossing gates and accidents. The Metro North accident happened 2 miles north of where I live. It is a sad to hear that seven people lost their lives in that accident. That is the deadliest accident that Metro North has had in it history. I hope that the NTSB can learn from this accident and implement some kind of new safety system so this does not happen again in the future,

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)

 

Originally Posted by nvocc5:

Dear gentleman

 

This is one on the main reason I love this forum the free follow of information and great depth of knowledge that is being shared. I appreciate that you were able to help rtr12 with the traffic light problem. I also learned something  new this about electronics. I will place the order with Digikey later today unless you folks want to add some else to the circuit.

 

 

It is a great place! This is where I learn as well, as you can see, thanks to stan2004, gunrunnerjohn and many others too.

 

For your parts order, I just realized I didn't have any LED's listed. I'm not sure I have ever gotten any from Digi-Key, but I am sure they should have them. I got some assortments of red, green, yellow and clear at Radio Shack quite a while back. I have gotten some at Jameco and also on ebay. They are just the plain old 5mm ones. I also have some assortments of 3mm that I think came from RS as well, but I can't remember for sure. Anyway don't forget the LED's.

 

It's good to have extras of all this stuff too, mine sometimes go bad. I have no idea how this happens, but usually some circuit study and moving a jumper or two will make the next ones last a lot longer.   It's still good to have extras.

 

I got the Knight Rider circuit off the internet too (like the traffic signals), but it seems like it also needed a little fiddling to get working? Neither the traffic signals or the Knight rider circuits were my design (I'm not that smart). They were both found on the internet and I just fiddle with them a little to get them working and made a new diagram.  

Originally Posted by gunrunnerjohn:

That whole circuit, including the opto for holding it in reset, would be nice to put on a circuit board.

 

I don't know if it had the opto-isolator in it, or the reset, but it sure seems like I have seen these in kits somewhere? Quite similar anyway. I don't know enough to do this on my own, or without you guys helping me.

 

I need to start keeping track of where I find these things, I will look around and see if I can find anything on them. I tried a few different variations and I couldn't get them to work as they were. After some fiddling, jumper checking and head scratching I got them to go, usually with some very minor changes.

Ok, here is a couple of the Knight Rider circuits. The jpg diagram was from the internet and I have it marked as 'Works' with no notes or scratch outs on the original print out I have. I have not tried this one again yet.

 

The TinyCad and pdf file I also had marked as working. This also originated on the internet, but I can't find the original file of it? Anyway, I couldn't get the original to work and changed a few things. This was also a couple years ago and unfortunately any memories of what was changed have faded. The notes are not mine, they were on the original diagram I had, but can't find now.

 

The bad news is I tried this one last night and so far it is not working. Will fiddle with it more today. I probably have something mis-wired, missing jumper or something? I will report back if I get it fixed and post a new diagram if there are any changes. Or will be back asking GRJ and stan2004 for more assistance.

Attachments

The 4017 is just a decade counter, so the outputs will be energized one-at-a-time for each count, and it'll wrap when it counts past nine.  You just have to figure out what pattern you want and arrange the diodes to match.  The PDF appears to show a simple circuit that will "walk" the LED's back and forth as the counter counts.

It really did walk a couple years ago when I did this, but has since stalled out on my latest attempt yesterday. Had to be something I goofed up.  

 

Circuit Breaker - While I was looking for the PCB's I thought I had seen for the traffic lights I found this. What do you all think of it? Looked interesting, but I don't know enough to tell anything about it. I have done some of the circuits on this website and they have all worked, so I think this guy is pretty good. He also offers PCB's for a few other items including a single traffic light. Sorry, I am easily distracted sometimes...

Dear rtr12

 

Thanks for the information I did check out the Knight Rider stuff on the internet. I did order the Arduino Cook book and I am waiting for that to come in. I will keep in touch if you do not mind. 

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)

 

Sounds fine, but John and Stan will be a lot more help if something goes wrong.   I tried the Knight Rider again the other day and still did not get it working. Weather is supposed to turn bad again here starting tomorrow. I will try it again and see if I can figure out what I did wrong? It worked a couple years ago? I still have not tried the one from the internet again, may try that too.

 

I also ordered some stuff from Digi-Key on Wed evening, got it today. That's a great place! Anyway, I got the Opto-isolators Stan was explaining above so will see how that goes too.

What exactly goes wrong?  You could try stepping it a pulse at a time by triggering the counter directly and see where things go south.  It's a pretty simple circuit, so I suspect it's something silly that's the problem.

 

Sharp eye Stan, that will certainly screw up the 555 circuit!

 

Here's the corrected files, the input file for TinyCAD and a graphics file for printing for those of you that don't have TinyCAD (which is free, FYI)

 

Edit: Added the missing ground that Stan so generously pointed out.

 

 

Attachments

Duh, you're right, I was so busy moving the cap that I didn't actually look at the 555 data sheet.

 

I'll correct the corrected post files.

So in looking around in eBay for 555 timer modules, I came across this $1.27 (free shipping) module that has a 555 and 4017 in the same configuration as the Traffic Signal controller and the Knight Rider circuit.  Yes, you'd have to be handy with the soldering iron to modify the 10 outputs with the diodes and actual LEDs but it may be a way to save some time wiring up the 555 and 4017 portion of the circuit.  It probably runs fast for a traffic signal so the 1uF capacitor C1 would need to be increased.  Just a thought.

 

http://www.ebay.com/itm/New-NE...;hash=item4ad99b4138

 

ogr ebay 555 4017

 

 

One more thing on the 555.  Usually, if pin 7 (Discharge) is used for a basic oscillator, then the 500K pot goes to pin 8 (Vcc) rather than to pin 3 (output).  But there are zillions of ways to hook up the 555 - but I'd double-check that connection.

 

Knight Rider Car Flasher Circuit

Attachments

Photos (2)

Looks like the designers found this diagram first.   There are a lot of ways to make the chip oscillate, I suspect you could wire it a ton of different ways.

 

Thanks for all the help guys (I need all I can get), I found the pin 1 and cap in wrong place error last night and I think my 555 timer circuit is still the culprit. Your last two posts (stan & grj) look promising. I haven't fiddled with it again yet today, but those suggestions are going to be coming up this afternoon. I must also check out the link stan posted, might have to have one or two of those. I am weak, I can't resist these things...

 

I think I must have copied from something else in the Tinycad drawing and never finished revising it? I was doing this about the time we started looking for a new house and moved a couple years ago. I can't find my original that I started with though.

Here's a search of Google Images for 555 Basic Oscillator Circuit, just look at a few of these and adjust your circuit until you have happiness.

 

 

So many circuits, so little time! I discovered something else a while ago.

With power on at 9vdc, I pulled 33k the resistor off of the 555 pin 3. It started working with just me holding the resistor and the other end still connected to pin 14 on the 4017. It was a bit fast, but at least I'm hot on the trail. Maybe I'll just discard the 555 and hold the resistor, a human timer...

The high impedance of the counter input was just picking up the 60hz noise, same thing you see if you grab a 'scope probe.

 

Problem solved, working now. No more human timer required, back to the 555. Works perfect if you get everything just right.  

 

I will fix the drawing and re-post sometime tomorrow.

 

Thanks to everyone for the assistance.

Actually I think the only thing that was wrong was the cap on pin 1 instead of where it belonged, after pin 2 & 6. Pretty sure the real problem was my poor eyesight (cataracts they won't remove yet, maybe in a couple months) and I just had a jumper in the wrong spot and didn't (or couldn't) see it. (Not knowing what I am doing may figure into the equation as well. ) Must have checked those 555 jumpers at least a dozen times.

 

I did 2 things yesterday, tried a new 555 chip then took all the jumpers off the 555 and re-did them. I also changed the power to the 500k pot from pin 3 directly to power supply as Stan posted above. I now think the other 555 is fine though, never saw any magic smoke.

 

I am going to take it all apart later and re-do it to make sure my drawing is correct now, but I think yours where you moved the cap is also correct. I will try powering the pot from pin 3 again and see what happens when I re-do it later. 

Here is a clean file of everything, parts and revisions. For some reason the TinyCad files print funny now, won't all fit on one page. They are fine if you print from the pdf.

 

The Knight Rider did work with power to the pot from pin 3 of the 555, but I changed it to the main power source just to be on the safe side per Stan's post above.

Attachments

In the Knight Rider Flasher, why does the 500k pot have a comment "Good starting point 4k ohm"?  Sounds like a big variance.

 

I left a lot of adjustment room there.   Actually that's the smallest one I had, 1M was the only other size I had. 4K was the only time I measured it. I'll fiddle with it some more and see if I can narrow that down a little.

 

I found the comment curious when I saw the component.

 

FWIW, when you're drawing something like this and you know the right component is, say a 10k pot, and you're using a 500k because you have one in the junkbox, I'd still make the schematic indicate the correct value.  Most folks that are going to try to duplicate it should know that you can use a larger one and simply not use the full range.

Good point, I'll remember that. Haven't had a chance to test the values again yet, but will post back with an updated diagram when I can.

 

Just so you don't think I forgot, my wife's father (86) is in pretty bad shape in the hospital, started very early yesterday morning, might be a while before I get back to the flashers.

Add Reply

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

www.ogaugerr.com
×
×
×
×
×