Friday, December 19, 2008

Many Thanks!

I just want to say thank you to some awesome people in our life.

This past semester of school has been crazy!! I took 17 credit hours of strait upper level engineering courses, my laptop died 2/3rds of the way through the semester and we had a baby!

We couldn't have done it without the help from some awesome grandmas! Thank you so much Joan and Lael for coming and helping us! We are so lucky to have such wonderful parents.

Also, I want to thank Devin for letting me borrow his laptop for that last part of the semester. That was very kind of him.

We have a beautiful little girl and I was able to finish up this semester with only one A- !!

Thanks!!

My Senior Project

So I've been telling a lot of you to watch our blog for more info on my senior project. Well, I'm finally getting around to it! It's a little long, but I've tried to break it into blocks for those of you who are like me and have short attention spans for long wordy blogs. :-) I didn't review it much, so if there are grammatical issues, sorry.

Problem Statement:

In short, my senior project provides a solution to a problem not only in the model train world, but in the real train world as well. However our implementation is in the model train world, for obvious reasons. :-)

No one knows precisely where all trains on the tracks are at any given moment.

In the model train world, electrically independent blocks of track are created and so you know at least what block of track your train is in, but some of those blocks can become very large, and hence you don't really know where your train is. Expanding a layout to have more blocks can become quite difficult. Also, if you have two trains in adjacent blocks, one train could easily travel into the other block without you knowing.

In the real train world, trains are much like cars, the 'engineer' is responsible for driving the train and he decides where to be and when to be there. It is also his responsibility to report his location to a main coordinator of some kind. This leaves the control of the train, and knowledge about the train in the hands of a human. And in the real world, we don't like to due that, proof of that can be shown in the incident that occurred in LA a few months ago. However, we don't like relying on humans just because they can lie, its more of because they make mistakes. Computers only make mistakes if we tell them to. Of course, we can make a mistake in telling the computer what to do, but that's another story for another time.

Proposed Solution:

In order to not have the noted problems, we would need to know where each train is at any given moment. However, taking this to the extremes means continuous reporting of location in some reliable manner. This can become very daunting as the number of trains increases. So we proposed a periodic update of critical information to some central command. The information provided would give the central command the ability to know where each train is at any given moment.

The information needed in order to do this are: Unique Train ID (What train), Speed, Direction. With these things, a knowledge of the track layout and control over the switches on the track, a central computer can interpolate from the periodic updates where a train is at all times.

The advantage of periodic updates and interpolation is that the communication channels are not so bogged down with similar information. The computer, independently, is fast enough to do accurate interpolation with periodic updates.

So that last paragraph might not be completely in English, so: Every now and then, something will report to the computer the the trains location, speed and unique ID. The computer, with a knowledge of the layout, can accurately know where the train is because it knows it's speed and direction on the track. And if the updates are frequent enough, then the error in 'guessing' where the train is can be very small.

Implementation of Solution:

To implement the solution presented. We designed a sensor board that will gather the needed information, that is placed underneath the tracks. The picture below is the current revision of the sensor board.



And yes, we built this entire thing. We designed it and had the boards built, then we had to attach all the components to the boards. I was heavily involved in this part of the project, and it was tons of fun!

This board has two infrared sensor pairs, those are the four things, one on each corner of the board. They pop up on each side of the track. Two are transmitters and two are receivers. The transmitters send infrared beams across the track to the receivers. Thus when the train passes by, the beams are broken. First one, then as the train progresses across the sensor, then the other. The controller on the board will know when each pair is broken. So with this, the board will know what direction the train is going, by what sensor pair is 'tripped' first, and then the timing between the two beams being broken will let the board know the speed of the train.

So that gives us speed and direction, but we still need unique identification. Here's where all of my sweat comes in. We decided to go with a Radio Frequency Identification Device (RFID). This is basically a bar code that is read without any lasers, like you see at the grocery store. The information is collected through a very small radio transmission. We originally were going to build our own RFID reader, however, it proved to be more difficult that ever imagined. In short, when we started the project, there was only one readily available RFID reader chip, so we had to go with them. And the technical support they offered to us turned out to be much less than worthless. About a month ago, I found another RFID reader that has a much simpler implementation and the technical support is ready and willing to help. If they were around a year ago, we would have never gone with Texas Instruments. Yes I'm putting there name in here because I'm quite bitter about it. :-)

So because we couldn't get the TI reader to work, we had a plan B, which was to purchase an RFID reader system. This is a completely different circuit board that had to be installed above the track due to radio interference from the track and train. This system is shown below.



So with this, a 'tag' is placed on the train. It's technically called an RFID transponder. This is basically an antenna that grabs energy from the reader, and transmits back to the reader a unique ID. So it doesn't require any power.

So as the train passes, the sensor board will get speed, direction and unique identification. All of this information is sent to a computer, and the computer keeps track of where the trains are etc...

I didn't do to much on the software side, but it's a pretty impressive software package. You can control all the trains (this is done with an off the shelf device), and know where all the trains are.

We were working on some collision avoidance algorithms the day before the fair, but they didn't quite work correctly, and we didn't want to be crashing trains. :-) They were pretty cool however. Each train would proceed around the track and request to the computer if it could continue going forward. And, depending upon the location of all the other trains, the computer would let it continue, or it would be required to slow down, or stop. It would even search for alternate paths, so if a particular section was blocked, it would look to see if by going a different route, it could get to where it wanted to go. (It reminded me a lot of my work at ASI)

Summary:

So I think I've explained all the highlights of my project. If you have any questions, please ask, I'd love to tell you in more detail how it all works. I'm trying to keep this blog to just the basics. I do have, however, a year of my life dedicated to this project, so there is plenty more information that I'm leaving out. The video below is us at the fair. You can see the trains going around and passing by each sensor set. Only a few have the RFID readers because we couldn't afford to have a reader on each board. However, each board has the ability to have a reader on it. If you look on the inner side of each of the boards you'll see some lights blinking as the trains go by. It's not much if you don't know what's going on under the hood, but it's still fun to see. ;-)



THE END!

Tuesday, December 9, 2008

Our life with two.


I've been wanting to blog for a while now, but when I get the chance I don't know what to say. Life is fun, and very busy. We now get to do the daily routine twice!

For example, while talking on the phone today with my dear sweet husband, Zach up and shut himself in the bathroom. When I went to check on him he was stripping down to use the potty all by himself. Just then Elizabeth opted to do the same thing and vola--we had an instant mess. I then found myself hanging up on Peter and bouncing in between the kids to keep the rest of the potential messes under control. It has been fun and full of good times.


Here are a few pictures of what we have been up to:

Partying...
(When Elizabeth came home we decided to throw ourselves a party--a birthday party with cake and all.)



...Playing...
(Boy do we appreciate those trains. Thanks Grandma!)



...and Sleeping.
(we also appreciate those ZZZZs!)



Hope everyone else's lives are going well. We'll post again when we have the chance.