Published:2011/8/4 2:09:00 Author:Li xiao na From:SeekIC
By Ray King
Printed circuit board
The printed circuit board (PCB) for the turnouts control has been spaciously laid out. What’s more, it contains standard size components only. The component overlay is given in Figure 2. Easy to use PCB terminal blocks with 5 mm pin spacing are used for the connectors, except Kl which is a 3-pin pinheader for use with ready-made servo cables. However, in all cases where you are not certain about the servo connections, use terminal block K2 instead. The completed and tested board should be mounted out of sight, which in nearly all cases will mean securing it to the underside of the model railway tabletop. If you do not need ’frog’ control, then components R6, Tl, D2, K6 and Rel may be omitted.
Setting up
There are two calibration pushbuttons, SI and S2. Press them simultaneously and the servo will adopt a central position. The turnout is held in its central position and attached to the servo’s operating arm. Make the control input (RA2) logic High and press SI and S2 individually to adjust the servo’s extreme CCW (counter clockwise) position. Next, make RA2 logic Low and again press SI and S2 individually until the desired extreme CW (clockwise) position is reached. If necessary, repeat the adjustments for each level of the control signal, until the servo drives accurately and smoothly from one position to the other. The settings are automatically stored in the PIC’s internal EEPROM. Jumper JP1 directs the PIC to use an alternative memory location permitting two settings to be used. Its use is optional.
Software
The source file (.BAS) was written in Proton PIC Basic Plus and should not be too difficult to convert to other PIC compilers. The Proton environment also generates an assembler file which, together with the Basic listing should provide enough clues to adapt the program and assemble it with your favorite assembler for the PIC16F84. The circuit could also be used to operate semaphore signals. By adjusting the parameters for operating speed and/or modifying the program code it should even be possible to mimic the ’bounce’ of the semaphore arm as it rises and falls.
Reprinted Url Of This Article: http://www.seekic.com/blog/project_solutions/2011/08/04/Smooth_Ope__for_Model_Railway_Turnouts_and_Semaphores_(2).html
Print this Page | Comments | Reading(429)
Author:Ecco Reading(30190)
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)