Published:2011/8/4 1:58:00 Author:Li xiao na From:SeekIC
By Ray King
In many model railway layouts, electromagnets instantly snatch turnouts and semaphores from one position to another with an associated ’clunk’ noise. Armed with a PIC micro and a small servo, the circuit described in this article provides much slower, smoother, quieter and hence more realistic operation of these mechanical devices.
There are a large number of model railway builders using proprietary track and points to realize their layouts. When adding remote controls for points (turnouts) there is often disappointment with the unrealistic and noisy movement of the mechanism. There are commercially available motorized units but these are expensive as well as difficult to install. A further disadvantage of commercial units is that the force they use is often detrimental to fine scale turnouts in that it can easily cause damage if not precisely adjusted and maintained.
On a different track
The proposed design uses standard radio-control (R/C) servos to drive the turnouts. A PIC microcontroller is used to generate the necessary PWM pulses under the control of a simple on/off switch. The circuit includes a facility to switch the ’frog’ polarity depending on the position of the turnout. In railway terminology, a frog is ’a grooved piece of iron at place in railways where tracks cross’. There is also a signal returned to the operator to indicate correct operation of the unit for display on a track diagram, for example. The turnout will move slowly and smoothly from one position to the other with no excess travel or brute force that will damage the turnout. If you are interested in making your own pair of points (also known as a ’turnout’) then visit the webpage listed at the end of this article — it also shows a ’frog’. Since control is by a single on/off switch using standard TTL levels, it is also simple to interface the unit to an automatic or computer-controlled system (like the one described elsewhere in this issue).
So why use a PIC when the design could be accommodated with some simple hardware? The present design uses very few components, is easy to set up and the speed of movement can be adjusted by changing parameters in the code.
Circuit description
Figure 1 shows the circuit diagram of the smooth control for model railway turnouts. Basically, a PIC microcontroller sits between input and output connectors. The inputs include the ’turnout change’ control signal supplied by the master control unit or a simple switch on your control panel. This signal arrives at PIC input RA2 via connector K4. The two other input devices are pushbuttons SI and S2 which are read via PIC port lines RA1 and RAO respectively. They are used to set the servo action required to make the turnout reach its two extreme positions. Looking at output connectivity, we find the servo control pulses being supplied by PIC port line RA3 and fed to the servo by way of connector Kl and /or K2. Port line RA4 is read to detect the presence or absence of jumper JP1 which selects between two memory settings (more about this further on). Port line RB4 supplies control information about the turnouts status, for use as a feedback signal to the master control system. RB5 effectively controls a relay for use with a ’frog’. Depending on its mechanical structure, the ’frog’ employs the normally open (n.o.), normally closed (n.c.) contact, or both.
The circuit has an on-board 5-V supply regulator, IC2. The input voltage range should not exceed about 12 VDC.
The PIC has a standard quartz complement in its oscillator circuit consisting of an inexpensive 8-MHz quartz crystal XI and the two usual small loading capacitors, here C4 and C5.
Reprinted Url Of This Article: http://www.seekic.com/blog/project_solutions/2011/08/04/Smooth_Ope__for_Model_Railway_Turnouts_and_Semaphores_(1).html
Print this Page | Comments | Reading(1896)
Author:Ecco Reading(30186)
Author:Ecco Reading(3461)
Author:Ecco Reading(3181)
Author:Ecco Reading(3662)
Author:Ecco Reading(5231)
Author:Ecco Reading(3248)
Author:Ecco Reading(3390)
Author:Ecco Reading(3530)
Author:Ecco Reading(3935)
Author:Ecco Reading(3707)
Author:Ecco Reading(3677)
Author:Ecco Reading(3714)
Author:Ecco Reading(6028)
Author:Ecco Reading(3692)
Author:Ecco Reading(4478)