Skip to main content

Hi All;

I have recently been working on a DipTrace schematic project with RTR12, attached below. It is a 556 timer circuit designed to operate 3 aspect block signal leds, green, red, and yellow. It is a modification of a circuit by Rob Paisley found on his site "Circuitous" called "3 Light Signal Animator". With his permission I have attached my adaptation of the circuit here for discussion.

The problem is it's designed to operate common cathode wired leds, whereas the 3 aspect block signal lights found on the WeHonest site are all wired common anode according to Tom, who has some on hand. Is there any feasible way to modify the circuit to handle common anode wired leds?

Thanks for any help, Rod

Attachments

Last edited by Rod Stewart
Original Post

Replies sorted oldest to newest

cjack posted:

Replace the LEDs with load resistors and drive three NPN transistors with the LEDs plus resistors in circuit from collector to the positive power supply. IE, all their anodes will be common. The transistors will then pull the individual cathodes low to light them.

Also...you could invert the signal to the red LED with a transistor and eliminate the two PNP transistors, driving the green and yellow directly with the 556 since it's outputs are capable. 

Great, thanks for all the suggestions!

After considerable effort RTR12 came up with the attached common anode revision, which after we have both tested it out, we are quite happy with. it seems to work as we had hoped, and now makes the wehonest and other common anode aspect lights useable! Yahoo.  My hat is off to Tom for all his dedication and hard work!

Posting the schematic here for any feedback or improvement comments anyone would like to add. Thanks in advance! We will likely delete the second diode D4 from the green led return wiring; it does not appear to be needed.

After all is said and done I will probably post the final versions with gerbers here, so that anyone that wants can order boards.

Rod

Attachments

cjack posted:

It doesn’t look like the green LED is off when the red LED is on.

What am I missing?

 I’m thinking the green LED should be driven with an OR gate keeping it off when either of the 556 timers are high.

cjack, I think grj nailed it. All I know is, it works quite well.

John, the NO switch was originally envisioned for conventional triggers such as a #153 mechanical switch, or insulated outer rail section, something like that. I think you are right though, the opto should handle most any powered trigger circuit. In the end I will probably leave both in because it's only a couple of small extra traces on the board, and you can just leave them bare if not needed.

Thanks for the feedback so far guys,

Rod

Green is off when red is on because a Green LED has a higher turn-on voltage than a Red LED, say, ~3V vs. ~2V.  This "voltage starving" is sort of described in this previous OGR thread

The two diodes D3 and D4 effectively increase the Green turn on voltage to ~4.5V further insuring the distinction.  If you remove the 2nd diode D4 as proposed, I'm thinking you might see Green turn on every so faintly (turn down the room lights) when Red is on.

GRJ has the operation described above, just took me a LOT longer than it took him to figure out how to do it. I was trying to use the suggestions above, but I didn't quite grasp the proper circuit needed to follow the suggestions (you guys are all way ahead of me), so this could is be a variation of some of those above suggestions.

Stan, your are right about D4. On my bread board, with D3 only, by itself does allow the green LED to just barely flicker. I needed to add the extra diode to my circuit. When Rod tried it, he got no flicker (or light) from the green LED with only one diode (D3) and did not need D4.  When testing the previous common cathode circuit, we both needed the second diode during testing. The common cathode version was the starting point for this common anode version. 

I am guessing there is some difference in the LEDs we are using that is causing the two different results. I am using a 'bargain basement' (cheapest I could find with the most LEDs) LED assortment from ebay, short leads and all. Not sure what LEDs rod is using. 

Rod, I'll try just one of the we_honest signals separately to see if they work on D3 only or need to have D4 added. Not sure I thought of trying that before? Anyway I haven't tried it?

I think that might be a good idea, since no one knows for sure what others will be using for LEDs. Also, as I'm sure you already know, it's difficult to predict what (or how) others might use the circuit. That is if they are even interested in using it at all? Definitely another very good exercise in learning though! 

I was just fiddling with the we_honest 3 aspect signals, I have and 2 of them and each worked just fine, individually, with only one diode. I was also using the signal's 1k resistor built in to the common anode wire. I was using a 470 ohm on the bread board when I needed to add the 2nd diode. I think Rod is also using that same 470 value. I suppose the 1k resistor vs 470 ohm could make a difference too.

So yesterday I played around with various values for R7 from 200 to 470R, and with/without inline 1K resistors to the leds, and with one D3 diode in the cicuit. At no time did I get a glimmer from the green led when either the red or the yellow were on. They were of course all very dim with the 1K and R7 from 200 to 470. I varied the supply voltage from 6-12 vdc.

But I wound up leaving D4 in the Diptrace files anyway, as shown in the schematic, just so we have that option. Then I ordered some boards so they should be here in a couple of weeks. Once they arrive I'll get a couple built and see how they work.

Many thanks for all the great input. Will keep ya all posted! 

Rod

PS; I just want to add a great big note of thanks here to RTR12 for doing all the heavy lifting on the right side of the schematic, and creating/testing a circuit that works like we wanted. If all goes according to plan we will wind up with a nice affordable little board that will operate all those common anode pre-wired 3 light aspect signals! Yahoo.

Last edited by Rod Stewart
rtr12 posted:

...

I am guessing there is some difference in the LEDs we are using that is causing the two different results. I am using a 'bargain basement' (cheapest I could find with the most LEDs) LED assortment from ebay, short leads and all. 

Right.  In my experience, buying "cheap" Red LEDs verge on being orange as opposed to being "deep red".  Likewise, the "cheap" Green LEDs are almost yellow-green as opposed to being "deep green".

LED color

Without delving into semiconductor physics and such, note that the typical operating LED voltage varies with color.   Cheap red and green LEDs will have operating voltages closer together than Deep red and Deep green LEDs.  And in the circuit you guys are using, the function of D3 and D4 is to separate the operating voltages of Red and Green.  Hence, it could be that Rod is using darker LEDs that already start with a wider voltage separation and hence do not need the 2nd diode.

For the prototypical sticklers for detail, you can actually look up the FRS specification for the wavelength effectively specified in nanometers (nm) for Red and Green signals.  Some might find the following clip from 100 years ago amusing.  Given the technology of the day, rather than specifying in terms of nM wavelength as you might find today, note the definition of Green talks of a hint of "blue" meaning to the left of the spectrum as shown above.  In other words a deep green!

admiralty green

If you shop around, you will find interesting names for colors of LEDs such as "Emerald Green", "Pure Green", and so on.  Very few hobbyists, if any, can afford an optical spectrometer that can measure the wavelength of an LED.

Attachments

Images (2)
  • LED color
  • admiralty green
Last edited by stan2004
gunrunnerjohn posted:

For peanuts, you could add a bridge rectifier, capacitor, and 8V regulator.  That would give you universal compatibility.  The 8V regulator is so it would still be compatible with 12VDC with no issues of low input power.

Good plan John and Stan. We already have a bridge rectifier and 220 uF filter cap in the circuit, but a reg would be a good addition. A TO-92 LM7808 would fit with no issues and the 100 ma current limit is plenty for what this circuit is doing. It would be a good addon for the next revision. And we can use one value for R7 that fits all.  Darn, now I need to order some LM7808's.

Rod

Stan, that has to be the difference. My green LEDs are a very light green. The reds and yellows are not what I would call 'deep' colors either, also pretty light colored. I have some better (I think anyway) LEDs from Digikey around here somewhere that I am going to try today and see what happens. One of those may even be an Emerald green, that sounds kind of familiar.

The we_honest signals seem to have somewhat 'deeper' colored LEDs, more so than my cheap LED kit has. For the total signal price, I would expect the we_honest signals to also be using pretty inexpensive LEDs. They so look better than the ones in my kit though. I'm sure they get much better pricing than I do, so they could have the better quality LEDs in their signals and still keep pricing low I guess.

I have been watching the developing convert from common cathode to anode and am aware of the dual transistor OR function of the original schematic. It's solid with two PNP transistors in terms of various LED choices. I have to say that the voltage starved sensitivity to component choices leaves me somewhat anxious. I think a solid OR gate like a PNP with a couple of diodes on the base would eliminate all the component variations. Simple and devoid of a lot of testing. The idea is if either of the 556 timers outputs is positive, then the green LED is off. No problem. No issue with voltage either power supply or LED choices.

Rod Stewart posted:
 A TO-92 LM7808 would fit with no issues and the 100 ma current limit is plenty for what this circuit is doing. It would be a good addon for the next revision. And we can use one value for R7 that fits all.  Darn, now I need to order some LM7808's.

Rod

No-no!  You want the TO-220 package and likely also a small heat sink.  The TO-92 package, in spite of it's datasheet rating, is not suitable for 100ma!

cjack, I have had fairly reliable results using 2 diodes from the green LED cathode to Pin 9 of the 556. It also works for me with the green cathode to GND using 2 diodes. I had a couple of glitches (flickering green at times), but I think I now have all the gremlins removed from that part. Rod has had the same results (with no gremlins) using only one diode in his circuit. I think he has now made the PCB with 2 diodes and anyone using it can either add both or jumper one out as desired. I'm just planning on using both diodes for anything I do here. 

Are you thinking of a 3rd transistor somewhere in the circuit? I sort of fiddled with that earlier and never came up with a way to make it work properly. Then I stumbled on to the circuit as it is now, which has been the best one so far. I'm still pretty green with this stuff though, so what seems simple or obvious to you guys might be way over my head?

LOL.  8 cents vs. 14 cents.  This high-finance is making my head spin! 

Untitled

In any case, my concern is someone hooking it up to 14-16V AC Accessory voltage without the regulator.  That would release the magic smoke from the 556 which is spec'd to operate up to 16V DC. 

What may not be obvious is some train transformers that let you set the AC Accessory voltage can be problematic.  Even though the AC Accessory Voltage is set to, say, 12V AC the peak voltages that would reach the 556 IC chip (again, we're talking without a 780x regulator) would exceed 16V DC.  This devolves into a conversation about chopped-sine transformers which gets boring really quickly.  Best just to put in the 780x regulator and be done with it!

Attachments

Images (1)
  • Untitled
cjack posted:

I have been watching the developing convert from common cathode to anode and am aware of the dual transistor OR function of the original schematic. It's solid with two PNP transistors in terms of various LED choices. I have to say that the voltage starved sensitivity to component choices leaves me somewhat anxious. I think a solid OR gate like a PNP with a couple of diodes on the base would eliminate all the component variations. Simple and devoid of a lot of testing. The idea is if either of the 556 timers outputs is positive, then the green LED is off. No problem. No issue with voltage either power supply or LED choices.

cjack; you mean like this:

3 Light Signal Animator CA #2

This is reproduced by permission from Rob Paisley's site; Circuitous. I had been in touch with him and asked if he had any ideas for modifying his original common cathode circuit to common anode, and this was one of three options he has since posted on his site. Note the date! Option #3 looks almost identical to the creation of our very own RTR12, which is the basis of the circuit I posted on Oct 23, above. The link to the Circuitous site is http://www.circuitous.ca/Timed3LightSignal555.html

Some subsequent suggestions from this thread are incorporated in the following revision to the basic circuit:

R5.4 Circuit Scan

This has provision for a fixed regulator, which could be a 5, 8, 9 volt or other. I show an 8 volt version here as suggested by grj. There is also a selectable DuPont style  jumper block, depending on whether the regulator is installed or not. The 8 volt reg will need a DC supply of minimum 12 volts, if bridge diode D1 is left installed (though if the application is purely DC it would be best to just jumper this), OR minimum 8.5 volts AC. For the case of an 8 volt reg, R7 should be about 270 ohms, if the target led current is say 15 ma. Note that there is also provision for both D3 and D4 diodes in the circuit, since RTR12 needed both in his version of the circuit to keep the green led from lighting when either red or yellow were lit.

Good discussion here, let's keep it going!

Rod

Attachments

Images (2)
  • 3 Light Signal Animator CA #2
  • R5.4 Circuit Scan

Just bread boarded the 3 transistor #2 circuit above. It works quite well, though no better than that shown in R5.4 also above, from what I can tell. I had to change the resistor that grounds the base of the 2N3906 PNP transistor from 10K to 2.2K. The green led was not lighting after the yellow went out, so I reasoned that the base voltage was not close enough to ground with the 10K value to make it conduct. Anyway, it seems to work fine now. I also added a couple of diodes in line with the red and yellow leds, to better equalize the currents and reduce their brightness to more like the green. All good.

Rod

Rod, I can't find that circuit on Rob's site? I found some others, but that one seems to be hiding? I'm probably overlooking something obvious...    Anyway, I copied the one from your post above so at least I have a copy... but I'd be interested in reading what Rob posted about it though (that is if he posted anything).

Before ending up with the basic circuit we have now (the 10/23 version), this is what I was trying to do in prior attempts, but was unsuccessful. Rob's has figured it out and I also suspect this could very well be what cjack was saying above that I still didn't quite understand how to do. 

Rod Stewart posted:

Just bread boarded the 3 transistor #2 circuit above. It works quite well, though no better than that shown in R5.4 also above, from what I can tell. I had to change the resistor that grounds the base of the 2N3906 PNP transistor from 10K to 2.2K. The green led was not lighting after the yellow went out, so I reasoned that the base voltage was not close enough to ground with the 10K value to make it conduct. Anyway, it seems to work fine now. I also added a couple of diodes in line with the red and yellow leds, to better equalize the currents and reduce their brightness to more like the green. All good.

Rod

That's it, #2. I wasn't sure that placing the PNP above the Green LED would work without more parts value sensitivity, but it looks good. The 2.2K draws more current from the 556 but it's got a lot available. Alternatively I thought about using one fourth of a CMOS 4001 driving an NPN transistor. The CMOS chip can use any of the voltages being suggested. But the above has less parts.

gunrunnerjohn posted:
Rod Stewart posted:
 A TO-92 LM7808 would fit with no issues and the 100 ma current limit is plenty for what this circuit is doing. It would be a good addon for the next revision. And we can use one value for R7 that fits all.  Darn, now I need to order some LM7808's.

Rod

No-no!  You want the TO-220 package and likely also a small heat sink.  The TO-92 package, in spite of it's datasheet rating, is not suitable for 100ma!

I hear you on this John. I plan to run a little breadboarding trial using a TO-92 package reg and see what she does. I'll stand by with the fire extinguisher handy! Mostly I use a TO-92-100 pattern for any TO-92 package lately, just to make the soldering easier. This includes the new board I have roughed out for this addition. And conveniently this pattern nicely fits the TO-220 pin spacing as well. Only hitch is the #1 and #3 pins are reversed between the two, so you would have to install the TO-220 backwards, but it could be done I think.

Tom, did you find that #1 circuit with the 339 comparators being used?

Rod

I can tell you that the TO-92 regulator used on the Lionel smoke unit frequently fails with just the 30-40ma load of the smoke motor on it.  I have built modules with the TO-92 regulator, and with about 40ma on them, feeding them with half wave filtered 18V track power, the regulator shoots past 100C in temperature.  My temperature guideline for these regulators is no more than 85C, and I prefer to keep them lower in the 70's.

For the few cents difference in price, let me save you some time.  Forget the TO-92 package and move right to the TO-220 model.

Point taken John. Thanks, I am going to convert the design over to TO-220 style and be done with it. Lots of them around the place anyway. 

For those following the Circuitous site #2 design above (using 3 transistors), I just got word from Rob Paisley that he is overhauling the circuit a bit. So there will be a new version along, likely later today. 

Rod

Of the 3 options, I'd go with #2 if you are going to make an OSH Park (or whatever) PCB design.  Circuit #1 is limited by the drive capability of the LM339.  If you are driving more than one signal head in parallel, or if using high-power LEDs (100 mA instead of 20 mA nominal operating current), or even miniature incandescent bulbs then you're out of luck.  Circuit #3 depends on the different in drive voltage for different color LEDs.  This works of course of the Red-Yellow-Green LEDs but what about incandescent bulbs or a PRR style 7-LED signal head which uses all the same color LEDs?

what about PRR

Did you guys actually prototype circuit #2?  I think the "OR" circuit which turns off the Green LED when Red OR Yellow is on is skating on thin ice.

555 high is not full scale

The Yellow and Red LEDs are turned on when one or the other 555 chip is ON (at pin 3 output).  This ON signal does NOT go to the positive supply voltage because there's an output transistor as shown in the 555 internal schematic above.  As the curve shows on the right, the "ON" voltage might be about 1V below the DC+ supply voltage.  Then each Yellow/Red output goes thru a diode which further lowers the voltage.

So this transistor + diode voltage drop now tries to turn off the 2N3906.  While a diode appears to have been added above the 2N3906, it's not clear to me that either the Yellow or Red output generates a high enough voltage to turn OFF the 2N3906.

 

Attachments

Images (2)
  • what about PRR
  • 555 high is not full scale
stan2004 posted:

Of the 3 options, I'd go with #2 if you are going to make an OSH Park (or whatever) PCB design.  Circuit #1 is limited by the drive capability of the LM339.  If you are driving more than one signal head in parallel, or if using high-power LEDs (100 mA instead of 20 mA nominal operating current), or even miniature incandescent bulbs then you're out of luck.  Circuit #3 depends on the different in drive voltage for different color LEDs.  This works of course of the Red-Yellow-Green LEDs but what about incandescent bulbs or a PRR style 7-LED signal head which uses all the same color LEDs?

what about PRR

Did you guys actually prototype circuit #2?  I think the "OR" circuit which turns off the Green LED when Red OR Yellow is on is skating on thin ice.

555 high is not full scale

The Yellow and Red LEDs are turned on when one or the other 555 chip is ON (at pin 3 output).  This ON signal does NOT go to the positive supply voltage because there's an output transistor as shown in the 555 internal schematic above.  As the curve shows on the right, the "ON" voltage might be about 1V below the DC+ supply voltage.  Then each Yellow/Red output goes thru a diode which further lowers the voltage.

So this transistor + diode voltage drop now tries to turn off the 2N3906.  While a diode appears to have been added above the 2N3906, it's not clear to me that either the Yellow or Red output generates a high enough voltage to turn OFF the 2N3906.

 

Good point you make Stan, think you nailed it. I was breadboarding this crcuit over the last day or two. While it does seem to work fine, I noticed that when either the red or yellow leds are lit, the green is VERY dimly lit. I did not even notice it until I turned the shop lights mostly off. I think it might be noticeable though if you were running trains in subdued lighting.

Then I tried the 3 x 555 circuit that Rob (Circuitous) has also published. It seems to work quite well, and there is no false triggered green lighting at all. I had to drop the base drive resistor on the green led 3904 to 2.2K to get full ma to the led, but good after that. 

All consiidered though I am leaning towards our relatively simple circuit R5.4 published earlier in this thread. It works quite well, has the option of a voltage reg, can be triggered by an independent opto circuit, and with fewer components the board size is smaller, not to mention less expensive. Just waiting for my board order to arrive so aas to do a test build and make sure all goes as planned. 

Rod

Stan, Today's project is the Circuit #2 you posted a pic of above, that Rod has already tried. The one with 4 transistors.

And FWIW, I tried the circuit with the LM339 and was unable to make it work. I checked and re-checked all my connections and they seemed to be correct. Even tried a couple of things I thought might make a difference and they did not, still didn't work. I don't think it was due to a mistake on my part? I set it aside and am going to check it one more time in a day or two before giving up? 

Rod is ahead of me in trying some of the others. I have to agree with him that the first circuit we came up with (R5.4 posted here) earlier in the thread seems to be the one we are leaning toward. 

I also broke down and got some 7808 & 7809 voltage regulators to add to my 5 & 12 volt versions. I went all out and used a US seller (about 30 cents each, still free shipping). And they are already here! So I can now experiment with those too.   

Also, for anyone else having trouble with the link to Rob Paisley's site, my earlier problem was Chrome and the website being http: instead of https:  Chrome wasn't allowing everything to come through until I told it the site was safe as it wanted the site to be https:  There are settings in Chrome to allow an http: site, but they are apparently turned off by default.

I hadn't run into this previously? Thought I would post in case others had problems. Also, the http: site worked just fine with IE 11, no special settings needed. 

rtr12 posted:

… And FWIW, I tried the circuit with the LM339 and was unable to make it work. I checked and re-checked all my connections and they seemed to be correct. Even tried a couple of things I thought might make a difference and they did not, still didn't work. I don't think it was due to a mistake on my part? I set it aside and am going to check it one more time in a day or two before giving up? 

Perhaps moot now if you've moved on.  But when you say it didn't work, in what way did it not work? 

Did you have the 3-LED signal hooked up to the LM339 outputs?  It's a longshot but the LM339 needs a load hooked up to it for the output voltage to change as intended.  If no LEDs were hooked up and you just used a meter to see if the LM339 outputs changed, you would likely have read 0 or near 0V on all the outputs.  

rtr12 posted:

… I have to agree with him that the first circuit we came up with (R5.4 posted here) earlier in the thread seems to be the one we are leaning toward..

Not my circus, not my monkeys!    But if trying to cover as many bases as possible with one circuit, I'd consider the PRR style signal head as I diagrammed above.  You cannot use the voltage-starving technique depending on the Red-Green LED voltage difference.  Though I think you've seen that the circuit difference is maybe a transistor instead of a diode and a resistor or whatever.  In other words a few pennies to make the circuit independent of color.

Also, have you guys considered 2-aspect signals?  The time-delay and inherent flicker suppression is a nice feature that few (if any?) off-the-shelf 2-aspect signals (e.g., dwarf) have.  I haven't reviewed your circuits to see if this is a no-cost / just a jumper change.

Last edited by stan2004

For the 339 circuit, I didn't have the actual signal connected, but was using individual LEDs, red, yel, grn. as they show in the schematic. I did have the 2.2k resistor feeding all 3 LEDs as in the schematic, but I didn't try any different values there. I did try shuffling a few things around and a couple of different resistor values in the wire feeding the positive side of the 339 inputs. I got differing results which I didn't document, but I will re-try the circuit as shown and report back with more details.

One thing that caused me some confusion was the 'A' (top) comparator of the 339. It's shown with the positive wire going to the negative input, which doesn't match the other two comparators B & C. Then an 'H' has been added to that connection of the A comparator and just the opposite is shown for the other A comparator input? I tried swapping them around  still didn't get the expected operation of the LEDs. 

I think I may have really butchered the above description? The picture of the schematic explains it much better. Not sure I could have done it in 1,000 words either?

I am not all that familiar with the PRR signals and we have not tried anything with those. We started out with just the common cathode version that Rod found on Rob PAisley's website and it kind of went from there. the PRR signals look like an interesting thing to maybe try and accommodate though. I will look at your schematic above some more. 

As for the 2 aspect signals, we haven't talked about those either, but I do actually have some we_honest dwarf signals and it might be nice to be able to operate them from the same circuit/PCB. I guess I was thinking of those as a separate project some day, was probably going to use them for switch position indication, but nothing definite there. I hadn't really considered adapting what ever we end up with here to also operate those. Good thoughts, more to think about!

gunrunnerjohn posted:

Is it time to post the uP solution?

I have the PicKit here in the laboratory! It's still on the need-to-learn list! I keep getting these other projects that start out appearing to be much simpler than they really are that derail me. Then comes that 'feature creep' you mention around here every so often. Not to mention the fuzzy lines... I'm gonna have to live to be 150 to ever have a chance of catching up... Good excuse for longevity? 

If I understand your question about the top "A" LM339 comparator that drives GRN, that comparator operates opposite the YLW and RED comparators.  That is, when RED is high, the RED comparator turns on the RED LED.  When YLW is high, the YLW comparator turns on the YLW LED.  OTOH, GRN operates differently.  When either YLW or RED are high (the "or" being implemented by the two diodes) then GRN is turned OFF (rather than ON).  This is opposite so that's why the top comparator is different in polarity.

As for making it compatible with the PRR-style, it was just a casual comment.  I don't think it is a big demand item amongst the DIY crowd - if for no other reason than I don't think we_honest sells a low-cost PRR signal head!  The center LED is always ON.  Each R,Y,G output drives 3 LEDs when active...two of the three are unique but the center LED is common.   In any case I found this video of a common-anode 7-LED PRR signal with time delay implemented using eBay relay modules. 

Last edited by stan2004
rtr12 posted:
gunrunnerjohn posted:

Is it time to post the uP solution?

I have the PicKit here in the laboratory! It's still on the need-to-learn list! I keep getting these other projects that start out appearing to be much simpler than they really are that derail me. Then comes that 'feature creep' you mention around here every so often. Not to mention the fuzzy lines... I'm gonna have to live to be 150 to ever have a chance of catching up... Good excuse for longevity? 

The one thing about the PIC solution is that you build a board with the PIC processor and some lamp drivers and a sensing circuit.  Then you just fiddle the software to achieve the desired result, you don't have to keep laying out boards to make a change.  You can test changes as fast as you can modify the software.

Stan, Your description of the "A" comparator of the 339 got me on the right track! I re-read the datasheet on the operation of the inputs and with the help of your description, swapped a couple of wires around on the BB and the circuit is now working! Thank you for the explanation, that is exactly where I was getting confused. 

The PRR signal with just a couple of relays is looking nice! I'm sure there is a little more to it, but using only 2 relays looks a bit more appealing than getting all those little jumpers and components in the correct holes going to the correct IC pins on the BBs. But then you don't get all the excitement of trying to get all the little wires in the incorrect holes to the IC pins and related head scratching (maybe excitement isn't exactly the correct word...).

GRJ, I'm working toward that, one of these days! It does sound quite interesting to be able to do what you describe. I got the MPLAB X IDE loaded as well, just haven't gotten around to trying the programming part yet. I also have some of the PIC chips you listed in traffic light  thread, I think it was that one anyway. If memory serves, I think I even found the PIC chips in DipTrace right after I got them.  

Those darn IC circuits keep de-railing me...but pretty good learning experience there too. It's all quite enjoyable to me as well.

stan2004 posted:

Also, have you guys considered 2-aspect signals?  The time-delay and inherent flicker suppression is a nice feature that few (if any?) off-the-shelf 2-aspect signals (e.g., dwarf) have.  I haven't reviewed your circuits to see if this is a no-cost / just a jumper change.

Stan;

Well our simple circuit R5.4 (2 transistors, 2 diodes) version works well as a 2 aspect signal timer also. All you do is replace the R6 270K resistor (yellow release timer) with a 1N4148 diode, and presto. When tripped the signal goes red as it should, then after the prescribed release time it goes straight to green.

Actually there is a split second flicker of yellow, but as long as there is no yellow diode in use, you don’t even notice it. In my testing it made no difference whether an led was attached to the yellow output or not. 

You would not be able to use this circuit to run both 2 and 3 aspect signals together however. There would be a long gap of no light on the 2 aspect head when the yellow is lit on the 3 aspect head.

I plan to document all this in the User Notes.

Rod

Last edited by Rod Stewart

Stan; noted your comment about the PRR style signal head. I actually have the RK 2 track version of this signal on the layout, but it comes with all the timing etc built in of course. I just use two Z-Stuff actuators to sense train presence and trigger it. Looks nice though.

Guess you would have to use maybe the 339 comparator version, or the 3 x 555 version to run one that had just bare leds, and the center led could just be left on full time probably. I'm sure it could be done, but unless there are premade signal heads somewhere that don't have built in timing, there is likely no demand.

Rod

rtr12 posted:
GRJ, I'm working toward that, one of these days! It does sound quite interesting to be able to do what you describe. I got the MPLAB X IDE loaded as well, just haven't gotten around to trying the programming part yet. I also have some of the PIC chips you listed in traffic light  thread, I think it was that one anyway. If memory serves, I think I even found the PIC chips in DipTrace right after I got them.  

 

Those darn IC circuits keep de-railing me...but pretty good learning experience there too. It's all quite enjoyable to me as well.

The skills picked up there are still useful, you still have to add some circuitry around the uP for most tasks.

stan2004 posted:

Did you guys actually prototype circuit #2?  I think the "OR" circuit which turns off the Green LED when Red OR Yellow is on is skating on thin ice.

555 high is not full scale

The Yellow and Red LEDs are turned on when one or the other 555 chip is ON (at pin 3 output).  This ON signal does NOT go to the positive supply voltage because there's an output transistor as shown in the 555 internal schematic above.  As the curve shows on the right, the "ON" voltage might be about 1V below the DC+ supply voltage.  Then each Yellow/Red output goes thru a diode which further lowers the voltage.

So this transistor + diode voltage drop now tries to turn off the 2N3906.  While a diode appears to have been added above the 2N3906, it's not clear to me that either the Yellow or Red output generates a high enough voltage to turn OFF the 2N3906.

 

I am a little behind Rod in trying these. He has this circuit working, but I am having what I believe is the exact problem you describe here with this circuit and it does not work properly for me. We are both using 556s instead of 2 555s, but I am using an NE556 and I think Rod may be using a TS556CN (not exactly sure on the exact part he has?).  I plan to try it with a couple of 555s next. I have 3 different types of those, NE555, LM555 and a TLC555CP. There might even be one other variety around here after I start hunting them down.

As you describe above, the Base voltage on the PNP transistor (circled) is always about 0.6 to 0.8 volts or so below the voltage coming from the DC supply through the diode. Base voltage never quite gets high enough to turn off the green LED when it's supposed to be the the red's or yellow's solo performances. The red and yellow operate, but the green stays on all the time no matter what. 

Rod is using S8050 (3) and S8550 (1) transistors. I have tried those but was mainly using BC547 (3) & BC557 (1), I have a bunch of those and only a few of the others. Also tried a 3906 for the PNP. I don't really think this matters much though? I think it's the shortage of voltage output on pins 3 & 9 of the 556 exactly as you suspected.

You are going to get me converted to those PICs yet!   But, I think I just learned something here too! Rod has this working, it doesn't work here no matter what I do. I didn't think there would be that much difference in the 556s, but now I'm not so sure. At least I am learning about how transistors work, or maybe that should be how they don't work! I happened to remember Stan saying something about one of these circuits, and when I came back to look it just happened to be this one.

The PICs really do have my interests up, but the data sheet on just that one chip you suggested is 436 pages long! I was just looking at the new Atlas signal stuff they are doing and the board they have now looks like it may have a microprocessor on it. Couldn't tell for sure, but maybe could have even been a PIC? And as you have pointed out, there didn't appear to be a whole lot of other stuff on the board, but sounded like it did quite a bit functionally. 

There are a ton of embedded processors, but the PIC is a very popular chip family.  They have literally hundreds of variations, so you can usually find anything you need.

Don't be too daunted by the huge datasheet, you don't need to know most of that stuff to effectively use the chip in this application.  The latest MPLAB X has all sorts of plug-ins that make creating code easier.

My usage of the PIC has just scratched the surface, I used other microprocessors when I was gainfully employed and did a ton of processing with them. 

Rubbing elbows with the analog side is all good, you need to have some background in that to avoid pitfalls, even in digital circuits.

rtr12 posted:
...Also tried a 3906 for the PNP. I don't really think this matters much though? I think it's the shortage of voltage output on pins 3 & 9 of the 556 exactly as you suspected.

Right.  Well, if you're still determined to get circuit 2 working, try the following simple change:

2n3904 inverter

Ditch the 2N3906 and use a 4th 2N3904.  The objective is to turn OFF the Green 2N3904 when either Red or Yellow is high.  In the circuit on the right, the "new" 2N3904 turns "on" when either Red or Yellow is high.  When this 2N3904 turn on, its collector voltage (which drives the Green 2N3904) drops to 0.2V (or less).  This 0.2V (or less) is insufficient to turn  on the Green 2N3904 and hence it turns off.  The relevant datasheet info is the so-called "Collector Saturation Region" which we can get into if you really have nothing better to do with your time but it does get a bit nerdy - I figure you ought to be able to prototype this with actual hardware in a couple minutes which would be more expedient!

2n3904 collector saturation

 

Attachments

Images (2)
  • 2n3904 inverter
  • 2n3904 collector saturation
stan2004 posted:
rtr12 posted:
...Also tried a 3906 for the PNP. I don't really think this matters much though? I think it's the shortage of voltage output on pins 3 & 9 of the 556 exactly as you suspected.

Right.  Well, if you're still determined to get circuit 2 working, try the following simple change:

2n3904 inverter

Ditch the 2N3906 and use a 4th 2N3904.  The objective is to turn OFF the Green 2N3904 when either Red or Yellow is high.  In the circuit on the right, the "new" 2N3904 turns "on" when either Red or Yellow is high.  When this 2N3904 turn on, its collector voltage (which drives the Green 2N3904) drops to 0.2V (or less).  This 0.2V (or less) is insufficient to turn  on the Green 2N3904 and hence it turns off.  The relevant datasheet info is the so-called "Collector Saturation Region" which we can get into if you really have nothing better to do with your time but it does get a bit nerdy - I figure you ought to be able to prototype this with actual hardware in a couple minutes which would be more expedient!

2n3904 collector saturation

 

Well I couldn't stand the suspense so I tried this out after supper. Works like a charm Stan. And now the green led is either on at full current, or completely off. No dim flickering when red or yellow is on, or anything foolish.  So thanks to your help Stan we can now call this variation a win!

Rod

If I could interrupt here for a second?

OK, so I'm following along the best I can. I wish this was in simple English!

Anyways is this going to be made into a kit for purchase? Is there a list of parts I could buy to build my own?

Seems like a simple list but I'd probably get it wrong somewhere. A couple of LM555, resistors, diodes?, 2N3904 x 4? etc.

Notes: I'm running 2 rail and would probably need optical like in Stan's video above? I've read old posts about 2 rail using resistors on wheel sets of rolling stock to trip circuits? I think I'd like to keep it simple and just get something going.

What is that optical sensor you used Stan? or what is meant for the occupancy detector?

I'm modeling the (modern) Northeast area and think maybe I should go with the newest style PTC masts? I see they were installed in our Niagara Falls yard.

I might build my own??

Engineer-Joe posted:

...

Notes: I'm running 2 rail and would probably need optical like in Stan's video above? I've read old posts about 2 rail using resistors on wheel sets of rolling stock to trip circuits? I think I'd like to keep it simple and just get something going.

What is that optical sensor you used Stan? or what is meant for the occupancy detector?

Untitled

The module on the left of the video is just a photoresistor relay for less than $2 (free shipping from Asia).  It has a CdS sensor as used in night-lights and similar widgets that turn on a light or whatever when it gets dark.  It was just to demonstrate how a switch closure (the relay) as an occupancy sensor.  So I put my hand in front of the sensor (which was in some black heat-shrink to give it "tunnel vision") and it gets dark and the relay triggers.  

To your point, to keep it simple you definitely don't want to go with the resistor wheel-sets for 2-rail operation.  These require a current-sensor to detects power beings drawn by the consist in the block.  Obviously the engine is no problem as it is drawing power.  But your rolling stock would need a special wheel-set every so-many cars.

I'd say your best bet is something like an MTH ITAD or Lionel 153IR optical detector.  These are kind of spendy in my opinion ($20-$40).  So if you're willing to do some DIY with IR LEDs and phototransistors, or IR modules from eBay, you can get the cost down to a couple bucks each.  I've shown many ways to do this in previous OGR threads which I can dig up if there's interest.

Attachments

Images (1)
  • Untitled

Stan, I tried these changes this morning and as Rod posted above it worked perfectly, just as I expected it would!  Thank you for the revisions needed to finally get this thing working correctly! As an aside, I think I learned a thing or two as well! Also, I seem to remember the things that cause a fair amount of head scratching much better than the things that just work right away. As Carl Spackler once said "So I got that going for me, which is nice"

As for dessert, both types are a bit crunchy for my tastes. But if given a choice I think I'd prefer the NPNs over the PNPs, they seem to be a little more satisfying. 

Engineer-Joe, I think Stan's video above using the ready made timers & relays would be the easiest and probably even the most reliable. Stan also knows a LOT more than I ever will, so I am sure everything Stan posts will work without a hitch. 

But, if you are ever interested in any of the 3 aspect signal controller boards Rod and I have been experimenting with, I would be happy to help you get going with them. There are also some other circuits from the same source with the same functions that might be a little simpler and would use fewer parts.

I can't design anything from scratch, but I have learned how to cobble together a schematic in Diptrace, get some PCBs made from it, and get some parts, etc. (Diptrace does the heavy lifting, along with the original circuit designer). I would be happy to help others learn to do the same with that part of the process.

These experiments are a lot of fun for me, whether I ever use the circuits or not. I also learn something along the way. It's also extremely nice to have good folks like Stan and GRJ to help when one gets stuck. I'd never make it without them! Probably would have never started experimenting with these things without their help either. 

Engineer-Joe posted:

Thanks Stan. I found that exact listing and there were 5 left, so I bought the 5 for now. Not sure what I need but I thought I'd start. I will search for your posts. I probably saw them back in time and forgot.

They have more. They just show a limited number so you buy them all. 😀

rtr12 posted:

...

But, if you are ever interested in any of the 3 aspect signal controller boards Rod and I have been experimenting with, I would be happy to help you get going with them. There are also some other circuits from the same source with the same functions that might be a little simpler and would use fewer parts.

….

Yeap! I am interested. I have to study the new PTC CSX lights near me in the Niagara Falls yard limits.

Engineer-Joe posted:

If I could interrupt here for a second?

OK, so I'm following along the best I can. I wish this was in simple English!

Anyways is this going to be made into a kit for purchase? Is there a list of parts I could buy to build my own?

Seems like a simple list but I'd probably get it wrong somewhere. A couple of LM555, resistors, diodes?, 2N3904 x 4? etc.

Notes: I'm running 2 rail and would probably need optical like in Stan's video above? I've read old posts about 2 rail using resistors on wheel sets of rolling stock to trip circuits? I think I'd like to keep it simple and just get something going.

What is that optical sensor you used Stan? or what is meant for the occupancy detector?

I'm modeling the (modern) Northeast area and think maybe I should go with the newest style PTC masts? I see they were installed in our Niagara Falls yard.

I might build my own??

Joe, its been a bit of a process getting this to fruition, but we are just about there. The plan is to put the schematic, the board layout, the gerber files, the BOM, and some User Notes here on the forum, very soon now. RTR12 and I are just finalizing the board layout, now that we have a circuit that seems to work well. This is thanks in no small part to Stan2004!

One nice feature of the current design is that it can be activated by any 2-12 volt ac or dc trigger by means of an opto-isolator. So there is no direct connection to the board circuitry. This would lend itself well to the phototransistor that Stan has shown you.

The board itself can be ordered by anyone using the gerber zip file that will be included. Its all thru-hole construction so most anyone with a soldering station can build it. This particular version will be good for signals using common anode wiring. We have no plans to assemble and sell kits so far as I know.

Let me know if you need any more info.

Rod

 

Add Reply

Post

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
Link copied to your clipboard.
×
×