The Grand Finale!
I have combined all three circuits onto a single board:
This could be a bit more compact, but I have learned not to try to use every single pad. When things get jammed together it is hard to build and hard to debug. As you can see, I have expanded the detector section to include 4 photocells-- I'll show the changes required to do that a bit later. Both the detectors and LEDs are connected via headers. In the final installation with the LEDs in flasher crossbucks and the photocells in the track, there will probably be some barrier strips or other connectors involved as well.
Here is the board without the test doodads:
As you remember the detector circuit at the right powers (via some purple wire and a diode) the blinker circuit when any of the photocells are dark. When the power from the detector goes away, the delay is triggered via the capacitor seen on row 26. The delay supplies power to the blinker (another purple wire and diode at row 20) for an additional 3 seconds. Both power connections can be seen in this close-up:
In order to make this power switching work, I had to disconnect part of the + buss from the rest of the board. (I marked the isolated section, which runs from row 3 to 13 with some red marker). I cut the trace with a # 16 Xacto blade, leaving it as shown here:
The circuit is otherwise laid out exactly as presented in the blinker circuit thread.
Here is a close-up of the delay section.
The duration of the delay is controlled by the resistor and capacitor at the top of row 22 and 23. Make either one bigger for a longer delay before the blinkers shut down. The resistors at the bottom of the picture work with the small ceramic capacitor at the right to trigger the delay when the power from the detector shuts off.
Increasing the number of inputs to the detector is simple. Here is the schematic for four:
(Drawing corrected 9/7/15)
You can see it is a bit repetitious. A single section is an opamp comparator with a photocell and resistor on the inverting (-) input and a reference voltage on the non-inverting (+) input. The out put is connected via a 10k resistor the the base of a 2N3904 (npn) transistor. The collectors of the transistors are all connected to positive power, and the emitters are all connected together. It is this emitter buss that provides power to the blinker. (I used a TIP 120 transistor in the first version to ensure there would be power for anything you wanted to hook up. The 2N3904s are more than capable of driving the blinker.) If you should feel the need for even more inputs, just add more of these sections.
Here's the expanded detector:
All four opamps are contained in the chip, a TL084. Here is the way the devices are fitted into the chip:
Notice the power connections. There are several popular quad opamp packages, and some of them are connected quite differently. Always consult the data sheet before hooking up.
Here's another angle on the detector showing some connections that were hidden above;
There are some parts here that are not shown on any of the schematics. I am referring to small (.01µf) capacitors that are connected to the positive power and ground buss here and there. There's one on row 37 at the bottom of this photo. There should be one near each chip. Their job is to catch any power spikes generated by the chips as they switch on and off.
This view also shows the orientation of the transistors. These particular devices are set up so as you look at the flat face, the leads are emitter, base, collector from left to right. There are 6 possible ways the leads could be arranged, and believe me, every single one can be found on some transistor somewhere. Again you must consult a data sheet before hooking up. Luckily, data sheets for everything can be found on the net- just search on the part number.
About wire colors- My circuits tend to be colorful, but the choice of colors is not random. I've found that a bit of fanaticism about wire color pays off in the long run because it makes the circuit much easier to follow. It may vary a bit from project to project (depending on what wire I have around), but I always use red wires for the positive power, blue for the negative, and black for the ground. (OK, there's some blue ground jumpers in the earlier posts, but I was out of black, and anyway ground is the negative supply on those.) This project uses yellow and white for inputs and violet or brown for outputs.
About capacitor values. There is nothing so confusing as the markings on capacitors. And unlike resistors, which any meter can easily check, you have to spring for a $200 Fluke to measure capacitance. Big caps have a label printed on the side-- something like 10µF (that's a microfarad- a farad is lots of charge. I mean LOTs.) Small capacitors used to be marked in micro-microfarads (mmf), but a few years ago that unit was changed to pf (picofarad). There's not much room on these things, so all you get is a number- 0 to 99 is straight pf. Above that it gets weird. The system works like resistors, but with numbers instead of colors. So a 100 pf cap is labeled 101. The midrange gets even stranger. If there is a decimal point, the unit is µf: .1 .01 and .001 are really common sizes. But those sizes might also be listed in pf, so they would be 104, 103 or 102. And now there's a new unit, the nanofarad, which is a thousand pf. So the same three could be 100n, 10n or just 1n. Electrolytic caps (the bigger ones) also have a voltage rating on them. It's a good thing these are in plain English, like 16v, because if you exceed their voltage rating, they may explode. Incidentally, capacitor values are only accurate within 20%, so if a circuit is a bit out of tune, just grab another cap of the same value-- it may work better.
That's a wrap for this project- there are always modifications and improvements possible, but I think I've got the basic function covered. As always, corrections and brickbats are welcomed.
Thanks for looking in.
pqe