wow you guys really know your stuff. I am a model train nut and build my own turnouts after reading your blog and looking at what is around on the let , I would like to put my toe in the water. Paul_DMV made a good point about analog and DCC and live frogs. can anyone help a new boy on the block with a diagram of how you would wire up a servo, led and file frog , I am concerned if the power is turned off how the system would know the position of the turnout. my humble apologies for posting in the code forum , but the code runs everything. Paul would you have the standard from your model club , I have just moved and starting a layout from the top
I have suggested to the Moderator to move your question to its own Thread as this one is 2 years dead and very long.
You have not said how you propose to switch the power to the "file frog" :). One way is to have a micro-switch that is triggered by the servo that moves the turnout blades.
Assuming the track uses 12v DC power or DCC that needs to be separate from the servo power. Servos usually use 4.5 to 6v and one way of generating that is by using a 7805 voltage regulator fed from the 12v DC supply. An LED can probably be powered directly from an Arduino pin provided you have a suitable resistor to keep the current below about 20 milliamps.
A diagram showing how you are thinking of connecting things would be a big help.
@Geelong61, if you edit your Original Post you can correct the title to say "Live Frog"
[quote author=Coding Badly date=1500108515 link=msg=3339938] Done. [/quote] Thanks. I had deliberately not bothered the moderators with it.
Servo, LED, Live Frog
Prefab sprout. King of Rock N Roll
If you perform an orderly shutdown (i.e. by a software command), you can just save your turnout settings in EEPROM.