# Digital logic equations, lots of variables.

Thread Starter

#### arthur92710

Joined Jun 25, 2007
307
Hi, guys
Its been a while since I was here, but now I need some advice.
For my Semester long design project I am designing a digital logic system to guide a train.

The green dots are light sensors, if its blocked the train cant pass. At this point I can control all the switches and the train moves from left to right. It can start at L1 or L2 or L3.

Will I need a million cell truth table for every possible combination of blockages and switch combination's?

Thanks
-Arthur

Last edited:

#### R!f@@

Joined Apr 2, 2009
9,921
how do u think any body can help u when no one knows what u are talking about.

Give references, show us ur design or what ever it is ur doing.

Thread Starter

#### arthur92710

Joined Jun 25, 2007
307
Sorry, its just that im experimenting with different ways to solve this.

A train starts from the left, L1 or L2 or L3, it must move to the right side, it can stop at R1 or R2 or R3.
Their are light sensors on the green points. When it is 0 the path is clear, 1 means it is blocked.
The switches are the gray boxes with an x or \ or / in it.

Disregard the boxes RS-x

If there is no path to the other side, A B C and D are blocked, NP=1

This is a truth table for a train leaving L1, it only covers the first part. The train stops right after the light sensor.
Heres the table I made: https://spreadsheets.google.com/ccc?key=0Ale06Hdx3yqCdElmS3JhdUY5RW9YRG5VbkFTcllwMFE&hl=en&authkey=CNfKyrIM

#### Georacer

Joined Nov 25, 2009
5,182
Do you expect us to guess the track layout you have in your mind? I think Yuri Gheller doesn't have an account on this site.

Post a drawing of the tracks that will include the junctions, the sensors and the motors (if there are any). We cannot help you until you ask for help properly.

Thread Starter

#### arthur92710

Joined Jun 25, 2007
307
I guess the pic in my first post does not work?
Ok, I have it as an attachment.
Sorry for the trouble.

#### Attachments

• 13.8 KB Views: 69

#### Georacer

Joined Nov 25, 2009
5,182
I take it you can control only the junctions of the rails, right? If you want to stop a train, how will you do it? By cutting its power or by positioning the junction in a way that the train can go nowhere?

In the logic part, you don't need a buzzilion variables, just independent systems for each junction. For example, sensors A and B need only control junction 1 and junction 4 needs to be bothered only with sensors E and F.

Things will be harder if you acutally want the train to precalculate its course at the moment it start at an L terminal. For example, if junctions 7 and 8 are blocked, any previous junction control is futile. In that case, do you want your train to be aware of the fact that it will never reach its destination and cope with it by not even starting? Or do you want it to go as far as it can and then stop?

Thread Starter

#### arthur92710

Joined Jun 25, 2007
307
In the logic part, you don't need a buzzilion variables, just independent systems for each junction. For example, sensors A and B need only control junction 1 and junction 4 needs to be bothered only with sensors E and F.
Great Idea! This is probably what I will do.

Before the train leaves it must know whether or not there is a possible path. But whether or not it should run as far as possible was not specified. I will experiment with this idea over weekend.

Thanks a lot.
-Arthur

#### Georacer

Joined Nov 25, 2009
5,182
Glad you found a fitting solution. Keep us updated with your progress. I would reall like to see that train moving, if you plan to actually build it.

Thread Starter

#### arthur92710

Joined Jun 25, 2007
307
Update:
We just passed component testing. Its basically a test of the system up to sector/switch 4,5,6, using light sensors A-H.

#### Georacer

Joined Nov 25, 2009
5,182
If you plan to make a full project out of this, you could ask a Mod to move this thread to "The Projects Forum", so we can help you on the construction part, not only on the theorectical one.

If you want however to complete it first and then post your work, the "Complete Projects Collection" is the place.

Keep it up!