Jump to content
 
  • entries
    26
  • comments
    89
  • views
    11,726

Trefeglwvs Road - Getting Control


Steam_Julie

557 views

Hi

This project is intended to enable the control of 2 points using solenoid point motors and another accessory using a standard Hornby 3 function DCC loco decoder.

 

The main layout controller for the layout is a Bachmann Easy Controller.

 

To achieve the above functionality, I have decided to use address 9. A standard loco decoder is programmed to address 9. This has 3 function outputs F0, F1 and F2. These are standard digital 0 – 5v with a driving capacity of 20 mA, either ON or OFF.

 

We require a transition from 0 to 1 to give a short pulse 0 – 12v with about 0.5A output. Similarly a transition from 1 to 0 to give a short pulse 0 -12v with about 0.5A output. See diagram below.

 

My intention is to use a PIC P16C71 microcontroller as the basis of my design. This has 18 pins and has 2 ports which can be configured as either input or output. The following listing in pseudo code defines the functionality.

 

blogentry-20065-0-23272000-1388230228.jpg

blogentry-20065-0-88681100-1388230176.jpg

 

The listing of the points control program can be seen, by clicking on the link below. This is a word document and is fully formatted.

 

Points_Project.doc

 

With Functions 1 and 2 off, both of the points in the goods yard are set to normal, this means that the main line is set to straight, i.e. straight through. The second point is also set strait too.

 

To select the road into siding no, 1 you are required to select function 1 ON and function 2 OFF and for road 2 selection function 1 ON and function 2 ON.

 

To aid the points going over correctly, capacitance discharge circuits are added. The resistor in this circuit is to limit the charging current.

 

The discharge current is only limited by the emitter collector resistance, and since the transistor is switched fully on, this is negligible!

 

I now need to convert the pseudo code, into assembly language, then assemble it and then download it to the PIC P16C71 and then test it. I could have used wire and tube, but where is the FUN in that!

 

Julie

2 Comments


Recommended Comments

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...