Servos should have a seperate power supply, things are more stable that way. Plus it means the control circuit does not have to be in the 5V range that the servos want.
The small PIC chips are $1.50 or less, so unless you are only building one semaphore, the cost of a simple programmer is negligble across multiple circuits - in some cases you can build a programmer very simply. An emulator is most certainly not needed for something this simply - you're just writing a simple program to take a digital input, and depending on said input state, generate one of two different pulse widths out of one of the PWM outputs. Chip, R/C for clocking, input pulled high (for use with current sink detectors) and the output to the control pin of the servo.
You can actually get the chips for free - Microchip still does engineering samples. I have about a dozen of the 16F series used in the DeLoof Locobuffer and LocoIO boasrds. if I make LocoIOs out of all of them, I'll have 192 I/O lines for detectors and whatnot.
--Randy
Modeling the Reading Railroad in the 1950's
Visit my web site at www.readingeastpenn.com for construction updates, DCC Info, and more.
while a picoprocess may be a good option, I wanted something inexpensive and not requiring a emulator/programmer ($30 ebay).
I've been working on the above circuit. 3 op-amps (LM324) are used to generate a triangle waveform. For each servo, an op-amp/comparator (lm319/339) can be used to create a pulse determined by a reference voltage that can be externally controlled by the circuit in the bottom right corner.
A signal from a block detector grounds the 2nd resistor changing the pulse width. While one position can be determined by adjusting linkage, the 2nd position may be more conveniently adjust by making the resistor variable. The capacitor causes the reference voltage to change slowly so that the semaphore moves slowly.
while the rest of the circuit more or less shifts with supply voltage fluctuations, the reference voltage does not because of the capacitor. But I think it makes sense to have a separate supply for the servos and control circuit below (or regulate the control circuit voltage).
comments?
greg - Philadelphia & Reading / Reading
You could try a couple of these and use a relay to switch between them.
http://www.ebay.com/itm/291057917512?_trksid=p2060778.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT
Elmer.
The above is my opinion, from an active and experienced Model Railroader in N scale and HO since 1961.
(Modeling Freelance, Eastern US, HO scale, in 1962, with NCE DCC for locomotive control and a stand alone LocoNet for block detection and signals.) http://waynes-trains.com/ at home, and N scale at the Club.
One of the small 8 pin micros is probably the easiest, as long as it has at least 1 PWM output. Cheap and easy.
Not a DIY project, but have you looked at what Tam Valley Depot offers in the way of servo contollers?
http://www.tamvalleydepot.com
planning on using RC servo to control 2-aspect semaphore. RC servos are controlled by pulse width. For the two aspect semaphore I need to generate two different pulse widths. The input will be a block detector output. Not sure a 555 timer is suitable. Looking for a simple and cheap circuit I be build.any DIYers have any experience designing/building such a circuit?
tanks