DIY Electronics

I had been using all these kits for a reason: I didn't trust my electronics skills enough to build everything myself, and I didn't have the equipment to etch my own PCBs (I have done that in the past, but it is a messy business, and not really cost-effective if you use it infrequently).
But building them and experimenting with them gave me enough confidence to try more things, and so I dug up some basic ideas from websites and the kits I had been building, and tackled some problems I had been having:
  • accessory decoders: some signals don't play well with decoders that give negative voltages, so either I needed to use different decoders for these signals, or I had to find a way to reverse the voltage; after some experimenting, I came up with this design:
Basically, I use the negative voltages to switch a bistable relay, that connects the common (positive) decoder output to one of the two new outputs, while tying up the negative outputs with diodes to the new common output. This is a relative cheap method to connect one or more 'positive voltage' accessories to my decoders. At one point, I needed 4 of these outputs, for this I bought a single decoder from viessmann, which supplied positive voltages, this was the cheaper option.
  • By using the same bistable relays, it was also possible to convert an accessory decoder to a switching decoder, to use with scenery lighting or other effects that need a toggle on/off circuit. I use this type of relay, with two coils:

The coils are not polarized, so by tying together one pole of each as common pole, and connecting the others to the decoder outputs, you have a switching decoder. They cost about € 10 (£ 9), so for converting some outputs of a normal turnout decoder it is quite economical.
  • Lighting: for specific lighting situation (station platforms, working lights in sheds, etc.) I needed small light sources, so LEDs were quite convenient. Normally, I would connect these leds in series with a resistor, but this is not optimal: the resistors dissipate heat, and the value of the resistor depends on the supply voltage and the number of LEDs used. So I went looking for a neater solution: a constant current source circuit. I found two possibilities:



I built both circuits, and they worked well; one nice side-effect is that they are both very environmentally friendly: normally all the energy not needed for lighting would be dissipated into heat, but with these circuits I could connect 6 LEDs in series, and they would use no more energy than one single LED, for in both cases the power needed would be: 15 (volts) x 10 (milli-Amps) = 150 milli-Watts, the same as one single LED with a resistor in series.

One neat use for this is in an optical gate I use for train detection: since it uses an infrared LED, it is not easy to detect whether the LED still works, so I used the first circuit and connected a second red LED in series; if that LED is on, current flows through it and therefore also through the infrared led.