Building simple circuits

One of the joys of model railroading is it provides the opportunity and motivation to learn new skills. One skill many avoid though, is building electronic circuits. I admit circuit building is intimidating, and not terribly necessary since so much is available RTR, but it is particularly satisfying to turn on the power and see things light up (most DIY circuits involve lights) knowing you put that part together from scratch.
You do not have to go to engineering school to learn circuit building. In fact, many ee programs do not include practical circuit building-- all lab work happens on breadboards or in computer simulations. The best way to learn these skills is to get some electronics kits and put them together. If you are a guitar or bass player, an excellent sources for interesting kits is Build Your Own Clone, a company that specializes in classic and cutting edge stop boxes and effects. Their web site is a cornucopia of information-- especially see the "confidence booster" kit-- it doesn't do much (it's a simple volume control) but the instructions are a complete lesson in soldering and parts handling. Another excellent site is Adafruit, which has a section called "learn' with guides to simple and complex projects and topics for the glow in the dark, performance art, Arduino widgets crowd. Another goto resource is SparkFun, which slants a bit more to the robotics fan-- all of the parts needed to build a stepper motor indexed turntable can be found here. Finally, (Definitely not least) is Make, which is a magazine/ publishing house dedicated to DIY in many forms. Their Electronics PDF bundle is a perfect resource for the beginner.
In addition to these, the web has thousands of tutorials and projects including the hobbyprojects.com Model trains section and a site full of circuits from Mark Rollins.
My intent with these notes is to let you get a toe in the water by showing how to build some very basic circuits*, starting with a simple track power detector. I'm not going to teach any theory here, just the actual building skills needed to make a schematic into a board.
pqe
*Suggestions welcome
>> Posts index
Navigation
Journals/Blogs
Recent Blog posts:
Comments
Got it - thanks
Aha - I see. In addition to the potential swing allowed by the NMRA spec, I see I was starting wrong at 12V rather than peak to peak. I checked my LED specs and while they recommend 16-18ma they can handle up to 35ma.so I will stick to the 2K (or closest I have: 2.2K) resister.
Thanks for the explanation.
-Ed
----------------------------------------------------------------------
Proprietor - Northern New England Scenic (V3). N scale NH B&M Eastern and western coastal routes in the late 1950s.
https://nnescenicmodelrr.com
One last question - the diodes...
I have one more question. The original simple circuit to test polarity at the beginning of the thread used an LED without an additional diode. But the turnout direction detector uses the 1N415 diode in series with each LED. I am wondering what the purpose/advantage of the additional diode for each of the LEDs is. Is this another peak handling situation of some sort?
Thanks,
-Ed
----------------------------------------------------------------------
Proprietor - Northern New England Scenic (V3). N scale NH B&M Eastern and western coastal routes in the late 1950s.
https://nnescenicmodelrr.com
Think I figured it out...
By reading some other articles on the web plus reading the specs for the LED versus the specs for the 1N4148, I think I figured out why the extra diode for each LED. It looks to me like the reverse breakdown voltage is far higher for the diode than for the LED. As a result, the diode should limit current more effectively in the reverse direction ensuring we can't draw more reverse current through the LED than it can handle. I have seen other circuits that put a diode in the reverse direction in parallel with the LED instead. But I am guessing this series arrangement accomplishes the purpose.
Am I understanding it correctly?
Thanks,
-Ed
----------------------------------------------------------------------
Proprietor - Northern New England Scenic (V3). N scale NH B&M Eastern and western coastal routes in the late 1950s.
https://nnescenicmodelrr.com
I added the extra diodes after testing.
You will note the circuit connects the two rails through back to back LEDS. In theory, a backward biased LED should block current through the other LED, but in practice, an LED can leak enough current to allow the other one to light. When I tested a version without the extra diodes, both LEDs would glow a bit when the A and B clips were attached. The extra diodes prevent that.
pqe
I missed that...
I was so focused on the path through the resistor, it hadn't even dawned on me that there were the back to back LEDs and nothing else between the two power buses if not for the diodes. The LEDs I have appear to be rated for reverse voltage of only 5V. Don;' know about the ones you used, but for mine that suggests to me that the voltage difference between the two power buses would exceed the brakdown voiltage for the LEDs causing current to flow. So that might explain your experience. The reverse voltage rating for the 1N415 series (or my 1N4148) is well above the peak to peak between the power buses.
-Ed
----------------------------------------------------------------------
Proprietor - Northern New England Scenic (V3). N scale NH B&M Eastern and western coastal routes in the late 1950s.
https://nnescenicmodelrr.com
Okay but where can I get
Okay but where can I get software to run a stepper motor controlled turntable.
Arden
What Software?
Dear Arden,
For "software" to be required, it implies you already have some form of "hardware" in mind, or indeed in-situ...
- For PCs, there are plenty of "servo/stepper drive" apps and interfaces available
(suggest looking at the IOIO interface board and Adroid supporting apps,
or, if you want Industrial/bulletproof/overkill solutions, try the USB connected animals from SeaLevel
http://www.sealevel.com/ )
- For TI Launchpads, and Arduinos, you're into specific coding languages
(see Dr Geoff Bunza's Arduino threads on this forum, The "Search" function at top right of this page is your friend...)
- For Rasberry Pi and similar "PC on a chip" systems, you're into Linux world.
- If the "stepper motor" you are referring to is actually a commercially-produced DCC-controlled turntable,
then the DCC system you are using and the Human Interface you wish to use comes into play...
(EG for NCE systems, the "MiniPanel" can make up into a useful little "control front-end UI" for most DCC-controlled items)
However, if you're actually wanting to follow the ethos of this thread,
and "build a simple electronic circuit" solution to driving a stepper motor,
(IE no specific "software" involved or needed)
then I'd suggest checking out another of the circuits on Rob Paisley's excellent "Model Rairoads and Misc Electronics" website, namely
http://home.cogeco.ca/~rpaisley4/Stepper1200.html
Happy Modelling,
Aim to Improve,
Prof Klyzlr
PS the question "How to create a control system for a stepper-motor-driven turntable?" really does IMHO deserve a thread unto itself... I'm sure the rank-n-file here onlist would have some useful suggestions...
Turntable control
I use Arduino cards for stepper control, since the code is simple and only one driver chip is required. You don't need LINUX, as Arduinos can be programmed on a Mac or PC. However, as the Prof points out, that's not the kind of thing I had in mind for these tutorials.
I do have an idea in the back of my head for a circuit that uses magnetic sensors to stop a motor at a particular point-- maybe that could be an alternative way to control a turntable.
pqe
So simple, I never thought of it.
I am planning to put SPST toggles on all of the hidden staging tracks and every storage track off the turntable. I never thought about using LEDs to show if the track is powered or off.
I'm another one that built Heathkits and also Knight Kits and built my first ham transmitter from junk TV's a half century ago.
Ken
Next project?
Pelsea:
I've enjoyed these threads and have a request for a new "simple"(?) project. Without resorting to an Arduino, is there a simple latching circuit that I can use with a magnet & reed switch to turn on an off my battery in a loco or car when not in use?
Thanks in advance!
Neil
Neil Erickson, Hawai’i
My Blogs