Project: Automated Slot Car Intersection

Discussion in 'The Completed Projects Collection' started by Georacer, Sep 29, 2010.

  1. Georacer

    Thread Starter Moderator

    Nov 25, 2009
    5,142
    1,266
    After many months of work and a wad of cash, me and my pal b_gravedigger proudly present you the Automated Slot Car Intersection.

    A brief descripton: During this year's class Digital System Lab at the N.T.U.A. we were given the option to develop a constructional project in lieu of an examination at the end of the semester. The project had to contain at about 30 Integrated Circuits, preferably of the 74XX series, as they were used during the year. We decided to extend the project to include a physical, analog part as a single PCB with digital outputs would be very boring.

    So the idea is as follows:
    An infinity-shaped slot car track, which includes an intersection, will regulate the traffic on it automaticaly using a set of sensors and a control board. Traffic lights visualise the regulating actions executed by the control board. The sensors are located under each track piece and inform the control board whether a slot car is standing on top of it or not. The control board uses this information to count the cars waiting at the lights and give more circulation time to the direction with the most traffic. The actual slot car control is done by transistors under the track pieces that cut or give power to the rails of the track.

    Ingredients:

    • Four cheap slot car sets, for 20 euros each. We actually needed only 2 sets for their tracks but we also needed more cars. Sold-alone cars of known brands were actually more expensive than the whole set.
    • 74XX series IC's. We used at about 30 of them, a detailed list will follow. The circuit was designed on Mulitsim 11 and was sent away to be printed on a dual layer PCB. That was another 80 euros.
    • 80 transistors for the actuation of the track rails. They were soldered on two separate perforated boards, situated in the center of each track loop.
    • Components for a 7-segment display system from a 4-bit input.
    • Big LED's and 4 straws for the traffic lights.Diorama carton paper for the base of the project and some details
    Some pictures of the project:
    A view from above
    Overview.jpg

    Yes, wiring was a pain
    Wiring.jpg

    The intersection from up close
    Intersection.jpg

    The control center
    Control Center.jpg

    The car from the underside. Notice the brush coming out from the side to ground the sensor when above it
    Car Under.jpg
     
    Last edited by a moderator: Dec 27, 2011
  2. Georacer

    Thread Starter Moderator

    Nov 25, 2009
    5,142
    1,266
    Now that the post has been approved I can write a bit more (Thanks Mods! :D)
    I would also like to thank the AAC community for the input on how to minimise the frequency disturbances on the IC's through the use of decoupling capacitors.

    First of all, three more pictures, of the PCB this time.

    The upper layer of the board
    PCB Up Layer.jpg

    The lower layer of the board
    PCB Down Layer.jpg

    And the PCB with the IC bases soldered on it
    IC Bases.jpg

    I have also uploade a couple of videos of the contraption in action on YouTube (the account belongs to a friend):
    The first video has sound but the second one demonstrates how the system behaves with two or more cars being back to back on the same lane.
    http://www.youtube.com/watch?v=iJ-K4DBT6o0
    http://www.youtube.com/watch?v=Pjel9U6Ai0w

    I know the quality is horrible. I was never the photo-video guy, so my capturing means are long out of date. The general concept is clear though.

    The 7-segment counter is supposed to double the maximum amount of cars waiting on the light and count it down to provide time for them to cross the junction. The most observative of you will notice that at some point this number goes waaaay high. This is caused by voltage spikes at the power supply caused by the switching actions of the tracks, destabilising the Control Center. At that time I was using a 200 euro Mastech 3 output benchtop power supply and even that wasn't enough. Later we tried 4.5 volts provided by batteries and everything ran smoothly.

    On the next post I will analyse the logic diagram of the project.
    Feel free to ask anything you want.
     
  3. Ghar

    Active Member

    Mar 8, 2010
    655
    72
    Cool project, much more interesting than the junk we made.
     
  4. Georacer

    Thread Starter Moderator

    Nov 25, 2009
    5,142
    1,266
    Thanks Ghar! I aprreciate those words coming from one of the most active members of the AAC forum.

    Let me explain a bit about the logic behind the brain of the system, the Control Center (the big PCB afforementioned).

    First, a picture, as a refference. Since the board was created and exported through Multisim 11, I 'll take it from there.
    Control Center Logic Diagram.png

    Let's begin from the signal input. Down at the bottom of the screen there is the Register-Counter Array. It gets inputs from 4 sets of 8 sensors. These correspond to every direction of the junction and can count up to 8 cars per direction (actually in the project we use only 4 of them). When a car is standing on top of a piece of track, it conducts the Ground to the sensor through the sidebrush. This information is stored in a set of registers every time both lights are red and all cars come to a stop. This way the Register-Counter Array knows how heavy is the traffic on each direction.

    Next, it processes that information and, depending on which direction must be released next, it isolates the greatest number of cars waiting on each end, doubles it and sends it for countdown to the Countdown Module. This time (in seconds) will be the time the green light will stay on for the direction mentioned. The Countdown Module also outputs the 4-bit number it is on, in case we want it to be displayed on a 7-seg.

    The Ligts Circuitry is responsible for switching the traffic ligths. It receives one input related to which direction is moving (North-South or East-West) and changes the lights in pattern. For example. If there's green on the NS and red to the EW, when the input changes first it will get NS to orange, then red, then EW will go green.

    The Load Synchronizer is responsible for giving the "Read" pulse signal to the Register-Counter Array. It is imperative that the read action is performed only when both lights are red, and only once per serving period. Thus the Load Synchronizer is latched frozen when it gives the "Read" and unlatched only when the Red-Red signal is gone out and lit again.

    Last but not least the Clocks. It contains a 555 bistable working at 20Hz and divides that frequency through 2 counters down to 1Hz approximately. It outputs both the Fast Clock and the Slow Clock. All the units are fed with the Slow Clock and work at a slow work rate to match the physical environment. All except the Register Counter Array. This unit is required to perform all the calculation when both lights are red. That is, 1 second to load, count, compare and double the sensor data. For that reason it is fed with the Fast Clock with frequency high enough to perform its duty.

    That's the overview, more or less. The inside of the subcircuits is also available, but I will not go into further detail unless someone asks for it.
     
  5. Georacer

    Thread Starter Moderator

    Nov 25, 2009
    5,142
    1,266
    After the member anhnha requested more information on the build, I decided to upload a more complete set of schematics. For those who have the privilege of access to Multisim 11, I have uploaded the .ms11 files, that contain the complete circuit and can run a simulation.

    I know the schematics are very crude. I didn't know better back then.

    I leave the sensor and rail switch implementation of the user. It really depends on the hardware and it took me a month to fine tune (with my then limited knowledge) for it to run a short demo.
     
  6. Georacer

    Thread Starter Moderator

    Nov 25, 2009
    5,142
    1,266
    ...and the .ms11.
     
  7. THE_RB

    AAC Fanatic!

    Feb 11, 2008
    5,435
    1,305
    Wow! That's a ton of work you did there, especially so using logic ICs and not "cheating" using a microcontroller.

    That's pretty clever too, the way you added extra track sensors with conductive foil. :)
     
    tshuck likes this.
  8. Georacer

    Thread Starter Moderator

    Nov 25, 2009
    5,142
    1,266
    Logic circuitry was a prerequisite. This was a project for the Digital Circuits Lab and the use of a uC was prohibited.

    The design part wasn't so bad. We had a simulated version running as intended within a couple of weeks and then the board came 3 weeks later.

    It was taming the external hardware that was the VERY hard part and took at about 3 months (not full time, of course).

    First of all, we needed a way to power the rails at will with the start current of the cars. That varied wildly from car to car. Moreover, we didn't know about FETs back then and the BJTs also were a hard beast to tame when it came to maximum collector current.
    The rails themselves also weren't perfect conductors. Wiping them clean with alcohol would alter their performance significantly.

    We also needed an cell logic for each rail unit so that the cars wouldn't crash on one another. We implemented a BJT transistor logic for each rail segment that would power the rail if:
    There was no car on top of it OR there was no car on the next rail.
    We needed at about 30 such cells, each with 4 transistors. That worked pretty well - When we soldered the transistors in the proper orientation and not switching C with E. That was a day full of verbal violence

    The tin foil sensors where a pain too. The car brushes, to be exact. They had to be juuuuuuust right: not too high, so that they wouldn't touch the foil, nor too low, so that they would add friction to the system.

    In all, it was a fun project and most of the frustration stemmed from the low budget, but that couldn't be any different.
    I have the slot track stored, but I don't think I 'll ever try to restore it to a functional state ever again.
     
  9. Wendy

    Moderator

    Mar 24, 2008
    20,766
    2,536
    This thread was being hijacked pretty thoroughly (which is against the rules), so I moved the posts to Electromagnetic repulsion
     
Loading...