Thursday, February 12, 2009
A virtual open house?
But, can we do it via the web?
In preparation for a "Virtual" open house, I added a web cam to the very bottom of this blog.
I'll announce the actual dates and times once I get it all finalized.
In the mean time, scroll all the way to the bottom and have a peek.
Tuesday, February 10, 2009
How does First Zone work?
If this is the first time you visited this blog, you might want to read these posts first:
Hunting for the DCC system of the future.
Robotics and DCC.
Steve is a follower, he asked:
"So what are the benefits of having the terms the way you have them? Wouldn't the first zone be different depending on where the loco (for example) was first placed on the tracks? How does that distance help with the rest of the layout?"
This sounds like a good topic for today's blog.
When you power up the system for the very first time, you can place a loco anywhere on the track. When it is run, it will come to a zone boundary, ( the insulator that separates two zones. ) It then starts a timer. When it comes to the other end of that zone, it then notes how long it took to get THROUGH that FIRST ZONE (Fz).
From That point on, for every session, that section of track is the First Zone. It remains the First Zone until you perform a software reset.
The first zone is then assigned a length of ONE. Continuing around the track, the loco can time each of the other zones and assign them lengths that are based on the time it took to get through the "FIRST ZONE".
If the second zone takes twice as long, then it's length is two Fzs.
If the loco takes one fourth as long to get through a zone, it's length is 0.25 FZs.
To simplify the above explanation, we'll assume for now that the loco travels at one constant speed. However, we will see later that the loco can still do this, when the speed changes.
Remember, One goal is to have the system work without the tons of configurations needed by existing systems. In fact, no user input at all.
So, put yourself in the position of a robot.
You wake up and find yourself in a curving, twisted concrete tunnel.
You are on a remote controlled golf cart.
An on-board fax prints out instructions telling you to measure the lengths of all the "Zones" in the tunnel and draw a map.
There is a stopwatch, but instead of seconds, it is calibrated in TICKS.
The servo on the throttle is calibrated 0 through 127 and labeled "STEPS".
STEPS, not MPH of KPH. The golf cart does not have a speedometer.
The servo moves to 40 STEPS. The cart starts moving. You have no idea how fast a STEP is, or even what scale you are. You might be an N scale robot or a G scale robot.
You come to a line painted on the tunnel walls. A sign says, "You are leaving Zone B and entering Zone C". You reset the stopwatch to zero and start it.
You come to another line and a sign that says, "You are leaving Zone C and entering Zone A" You notice it took 1800 ticks.
You start drawing a map showing the first zone you have measured.
FIRST ZONE
ZONE C
1800 ticks at 40 steps
?--B/C-----1800@40----------C/A
You come to another line and a sign that says, "You leaving Zone A and are entering Zone B" You notice it took 900 ticks. Your servo holds steady at 40
You add to your map.
?--B/C-------1800@40--------C/A----900@40---A/B
You come a third line and a sign that says, "You are leaving Zone B and entering Zone C" You notice it took 900 ticks at 40 steps
You add to your map.
?--B/C-------1800@40--------C/A----900@40---A/B---900@40----B/C
At this point, You might think you are back in the First Zone, zone "C".
That would mean you are on a loop. However, there might be several zone "C"s. To be sure you are on a loop, you would predict that you should leave zone C and enter Zone A in 1800 ticks. Then, if the next two zones match your map and each take 900 ticks, you are confident that you have measured the entire loop.
When that is done,you can draw a sketch. The total time to go around the loop was 1,800 + 900 + 900 = 3,600 ticks, or 10 ticks per degree. You can start at zero degrees (12 noon) and going clockwise draw the first zone (C) 180 degrees to the 6 o'clock position. The other two zones each take 90 degrees.
To report this, you can send:
First zone = C
Zone C = 1
Zone A = 0.5
Zone B = 0.5
Notice that we don't know the actual length of any zone. But, we can describe the length of each zone in terms of the first zone.
It would also be useless to report back the time it took to go through each zone because we have no idea what speed the golf cart is going at STEP 40.
In reality, you need to send three other numbers for each Zone, Confidence, Accuracy and Resolution. Confidence has to do with changing speed while measurements are made. Accuracy has to do with variations in the number of ticks required to go through the same zone multiple times. Resolution has to do with the number of total ticks used for each zone.
Once all the numbers are crunched, the information can be shoved back into the golf carts fax machine and will be used by all the other robots that might need a map of this tunnel.
HOMEWORK
If you'd like to try this assignment and receive a grade, record your answers in this FORM. It will open in a separate window.
You are a robot. Another robot has already made a map. You will use its map.
You wake up to find yourself in a tunnel on a fax equipped, remote controlled moped with a stop watch.
The fax spews out the information shown above.
A servo is marked off in numbers from 1 to 14. It moves to the 10 mark and your moped lurches forward.
Exactly 155 ticks later, you see a sign that says "you are leaving Zone B and entering Zone A.
- Question 1 - What direction are you traveling?
(a) Clockwise.
(b) Counterclockwise.
(c) Unknown. - Question 2 - How long will it take you to get to Zone C?
(a) 900 ticks.
(b) At least 155 ticks or longer.
(c) 745 ticks.
After entering Zone A, you found it took you 200 ticks to get all the way through Zone A to to Zone C.
- Question 3 - When you enter zone C at step 10, how long do you predict it will take you to get to zone B?
(a) 200 ticks.
(b) 400 ticks.
(c) 1800 ticks. - Question 4 - You just left zone C and entered Zone B. 600 ticks later, where are you?
(a) In Zone A.
(b) Lost.
(c) At the 3 o'clock position on the diagram above. - Question 5 - You leave Zone B and enter Zone A, Still going at 10 steps. Starting at the time you enter Zone A, how many ticks later should you slam on the brakes to stop at your original starting point.
(a) 645 ticks.
(b) 45 ticks.
(c) At the 3 o'clock position on the diagram above.
If you get all five answers right, then you realize that, without knowing any actual speeds or distances;
- We can tell exactly where you are now.
- We can tell where you will be in the future if you continue at that speed step.
- We can tell you how long to continue running to arrive at any spot in the tunnel.
Click HERE to see the correct answers.