Basic Outline
The purpose of this circuit is to switch points on a model railway layout using a computer. Each point has a solenoid that only needs to be activated momentarily when the point needs to change direction.
Switches S2-S5 are used to create a binary number in the range 0 – 15. This indicates the point to be changed.
Switch S5 is used to select the direction of the change. I.e. Left or Right.
Switch S6 is activated for approximately half a second in order to send power to the point to implement the change.
This circuit is attached to a general purpose parallel interface circuit which is attached to the parallel port of the computer. It was a hobby kitset that I assembled previously.
It was intended to be used to switch relays or lights on and off. So S2-7 of this circuit are attached to another 8 Way Darlington Driver in a similar fashion to IC 4-7. So there is a path to ground when the switches are enabled.
I also take a +5 volt feed from the general purpose parallel circuit to power the digital circuit.
This is the first design that I have created and I was not too sure about a few things. Having some form of Electrical Engineering Skills probably would have helped as well J.
My Questions
1. Is the method that I used to use the switches correct – effectively a 100K resistor from +5v? I tried a 10K resister and this also seems to work ok. Having no resistor does not work correctly.
2. I had a bit of fun with S6 that was intended to select either IC2 or IC3. I found that I could not attach it directly to the Enable pin of IC2. Strangely (to me) this technique worked ok for the S2-5. I was going to try to use a transistor as a NOT gate rather than IC1 which contains 6 NOT gates. By experimenting I discovered that S6 would work correctly with IC1 but not with the Enable pin of IC2 or IC3.
o Is there an explanation for this behaviour that I can learn from?
o What would be a simple way to use a transistor to achieve the same purpose?
3. I read somewhere that if you do not use pins on an IC you must connect them either to Ground or +5v. In the case of IC1 where I am not using all of the circuits can all of the unused A and /Ys’ all go to Ground or should the As’ go to Ground and the /Ys’ go to +5v – i.e because the /Ys should all be High if the As’ are Low?
4. I found an example of using a transistor as a switch (Q1, R1, R2) and have used it to activate the power to the solenoids rather than a relay. Is there any drawbacks to this design? And do I need to put any capacitors into the circuit?
5. IC2 and 3 are 4-16 decoders. They have a Latch Enable pin. For this circuit design it does not matter to me if the outputs fluctuate during any transition during point selection. So I thought that I could permanently wire it to High to avoid the use of another input switch. Again it seemed to require a resistor so that it behaved correctly. Is this approach OK?
6. The Zener Diodes and 100Ohm resistor were used within the parallel interface design in case someone attached wires the wrong way around. I just reused this technique verbatim in my design. It seems to work ok . . . so far. And the Darlington drivers work like relays and look like they can handle the extra voltage and current. Do capacitors need to be added to this section?
The purpose of this circuit is to switch points on a model railway layout using a computer. Each point has a solenoid that only needs to be activated momentarily when the point needs to change direction.
Switches S2-S5 are used to create a binary number in the range 0 – 15. This indicates the point to be changed.
Switch S5 is used to select the direction of the change. I.e. Left or Right.
Switch S6 is activated for approximately half a second in order to send power to the point to implement the change.
This circuit is attached to a general purpose parallel interface circuit which is attached to the parallel port of the computer. It was a hobby kitset that I assembled previously.
It was intended to be used to switch relays or lights on and off. So S2-7 of this circuit are attached to another 8 Way Darlington Driver in a similar fashion to IC 4-7. So there is a path to ground when the switches are enabled.
I also take a +5 volt feed from the general purpose parallel circuit to power the digital circuit.
This is the first design that I have created and I was not too sure about a few things. Having some form of Electrical Engineering Skills probably would have helped as well J.
My Questions
1. Is the method that I used to use the switches correct – effectively a 100K resistor from +5v? I tried a 10K resister and this also seems to work ok. Having no resistor does not work correctly.
2. I had a bit of fun with S6 that was intended to select either IC2 or IC3. I found that I could not attach it directly to the Enable pin of IC2. Strangely (to me) this technique worked ok for the S2-5. I was going to try to use a transistor as a NOT gate rather than IC1 which contains 6 NOT gates. By experimenting I discovered that S6 would work correctly with IC1 but not with the Enable pin of IC2 or IC3.
o Is there an explanation for this behaviour that I can learn from?
o What would be a simple way to use a transistor to achieve the same purpose?
3. I read somewhere that if you do not use pins on an IC you must connect them either to Ground or +5v. In the case of IC1 where I am not using all of the circuits can all of the unused A and /Ys’ all go to Ground or should the As’ go to Ground and the /Ys’ go to +5v – i.e because the /Ys should all be High if the As’ are Low?
4. I found an example of using a transistor as a switch (Q1, R1, R2) and have used it to activate the power to the solenoids rather than a relay. Is there any drawbacks to this design? And do I need to put any capacitors into the circuit?
5. IC2 and 3 are 4-16 decoders. They have a Latch Enable pin. For this circuit design it does not matter to me if the outputs fluctuate during any transition during point selection. So I thought that I could permanently wire it to High to avoid the use of another input switch. Again it seemed to require a resistor so that it behaved correctly. Is this approach OK?
6. The Zener Diodes and 100Ohm resistor were used within the parallel interface design in case someone attached wires the wrong way around. I just reused this technique verbatim in my design. It seems to work ok . . . so far. And the Darlington drivers work like relays and look like they can handle the extra voltage and current. Do capacitors need to be added to this section?