Jump to content
  • entries
    3
  • comments
    0
  • views
    477

An Atari 2600 as a lap counter / timer for slot cars


alex_79

394 views

I inaugurate my blog to show this little silly project of mine (mostly because I'm not sure in which forum would make more sense to post it...)

 

Every once in a while I cherish the idea of building a routed track and buy a few slot cars to play with, and so I browse some websites and forums on the subject, looking for examples, construction techniques and wiring schemes.

 

One of the aspects that increases the fun is a lap counter/timing system which also allows to play alone "against the clock". Other than commercial ready to use systems, there are a lot of DIY solutions from software running on a PC to standalone devices built using an arduino or other microcontroller. After looking at some of these examples, I thought that the Atari 2600 would serve the purpose just fine: it has several I/O pins available on the controller ports to read the sensors and also, for example, controlling a starting light and a relay to automatically power on/off to the track, and a video output to display the data. Moreover, in my scrap-parts bin, I had an old 5" B&W CRT surveillance monitor with some burn-in and geometry issues, but otherwise working and that would be ok for just displaying some numeric values, and a board from a 6-switch 2600 which only display in B&W (That's actually the console I mentioned in my very first post here, many years ago...)

 

So after a few weeks, I came up with this:

IMG_20201028_221103.thumb.jpg.d5b167531961d23ecd2509c48d269b8a.jpgIMG_20201028_221120.thumb.jpg.33427fefe4415e5ad1d1fcdaa4ac345b.jpg

IMG_20201028_220325.thumb.jpg.0e6b00895efddb5d53c5527f12415acb.jpgIMG_20201028_220642.thumb.jpg.a2578dd74879644a398f75a357790f0e.jpg

 

The thing is entirely made out of recycled parts (even switches, leds and connectors were scavenged from old electronics), because I'm cheap I care about the environment.

I also mounted a practical handle for transportation.?

The monitor has a few dents and scratches, which gives it a worn look. I like it this way.

 

The software manages tracks with up to 4 lanes, displays lap times and gaps with 0.01s resolution  and it's extremely simple to use as there's no configuration and the only option is to set the time and number of laps for race duration.
The display shows rather simple graphics (sufficient for this application), the digits are flicker free and easy to read (at least with up to 3 lanes. With 4 lanes, the resulting 13 rows of text are quite a bit compressed vertically), and there are enough cycles free to check the inputs often enough (5 scanlines is the maximum time between two consecutive polls of the sensors. That is, if I counted cycles correctly).


Among the features there's the ability to control an external starting light and/or a relay for power and the transmission of the lap times to a PC through a serial connection.


Here are some pictures of the inside.

IMG_20201031_142325.thumb.jpg.fae715db14afe47f989c63446e84ab69.jpgIMG_20201031_142353.thumb.jpg.1c0bbba9eae5b81b4ffe87bc61baa2f0.jpg

 

To free some room, I removed the power supply section of the monitor, so now it's powered by an external regulated 12V power supply rather than directly by the 220v mains. I had to shorten the Atari board to make it fit inside the metal case, mounted vertically on one side of the tube, and then restore some of the tracks that were cut with jumpers. I also removed all the components which were not needed, like those for the color generation circuit, including the extra PAL oscillator, and also had to relocate some components (the quartz crystal interfered with the CRT tube). I used a bare cartridge board to mount the eprom with the custom program and modified the cart connector so that it ends being parallel to the main board.
Still, I need to loosen and rotate the yoke around the CRT neck, if I want to unplug the board (I had to do that a couple of times to reprogram the eprom because of late bug-fixes)

IMG_20201031_142407.thumb.jpg.5240efea4015ba4f3c0fa64bab626ca3.jpg

 

Finally I wired the connectors and switches I needed to the corresponding RIOT and TIA I/O pins. I used a single 9 pin male socket for connection to the track. There are 4 (RIOT) pins used as inputs from the sensors, 1 (TIA) input to select polarity of the pulses, and 2 (RIOT) pins as outputs to drive a starting light and/or a relay. The female 9 pin connector is RS232 serial port to optionally transmit data to a PC. The port includes a TTL to RS232 kevel converter circuit built using discrete (recycled of course) components. I also added a small audio driver for a speaker, with volume pot and on/off switch (a bit overkill, as the sounds only consist in a few beeps...). Finally there are 3 push buttons to control the software: two on the front for the main functions (wired like the SELECT and RESET switches on a full console, but with inverted logic, because the switches I used are normally closed) and a smaller one, mounted on the rear panel wired to the pin normally used for the right difficulty switch, which is rarely needed (it's used to abort a race, to skip the starting procedure, or to reboot the software).

 

IMG_20201028_221141.thumb.jpg.02a5832a136acdf0e881310fd2fdf48b.jpg

 

I still had the old plastic 1/43 scale track from when I was a kid in the attic, and used that to test the thing.
I decided to go with optical sensors, consisting in IR emitters mounted on a "bridge" positioned over the track (which also holds the starting lights) and photodiodes mounted under the surface.
Again I used scrap parts: a small piece of aluminum square tube, and some sheet plastic cut and glued together.
The IR emitters are from a couple of old remotes, while the photodiodes are scavenged from "dusk to dawn" sensor light bulbs.

here a few pictures.

IMG_20201028_221426.thumb.jpg.3af1a1153e200e6b68081314df0e7c77.jpg

You can see the two sensors mounted on the base, the track section where the bridge is positioned has two corresponding holes drilled.

IMG_20201028_221435.thumb.jpg.8ece4746427e743f8ea6e0812382e967.jpgIMG_20201028_221531.thumb.jpg.5e21c778eed6ab46bfb6c8cc5852ce9a.jpg

Here are the IR emitters, on the bottom of the bridge

IMG_20201028_221648.thumb.jpg.ae20a185b8f4a9c4c21228d1279e4782.jpg

 


In this video you can see a short 5 laps race test (I found impossible to control both cars at the same time, so I just run them at reduced speed to shot the video). The laptop on the left is connected through the serial port (actually an usb to serial adapter), and you can see the lap times displayed in the terminal window on each pass. The system seems to work reliably, with no missed laps in my tests.

 

 

I also made a version of the software that works on a standard console, so that I could quickly test it in Stella and on real hardware with an Harmony cart.

Apart for the slightly difference in managing the console switches, this version is in color (?), and can optionally display a (blocky!) starting light on screen.

 

18138700_Laptimer2k6(PAL)_10.png.small.png.8a4ad1775fb93086d0c4d9a44066f323.png623825720_Laptimer2k6(PAL)_12.png.small.png.3522d2ed41a81886939cc51034dfca00.png1256969683_Laptimer2k6(PAL)_1.png.small.png.b59a0c7630c01892265bb59799dd9ae8.png2122408702_Laptimer2k6(PAL)_8.png.small.png.64eae887d72e5cfa81ef62dd68720d18.png

1190489124_Laptimer2k6(PAL)_5.png.small.png.4ca9a87e1c672d88f228567826e5d8b8.png559659320_Laptimer2k6(PAL)_6.png.small.png.ef8eaef94aca8283ff604fe4ce04dcb8.png989427473_Laptimer2k6(PAL)_7.png.small.png.7f7c055fb20914b92435524eee2f1f9e.png

Here are the roms (for different TV systems), in the unlikely case someone wants to give it a try (You can simulate the car passing over the sensors by connecting a joystick to the right controller port. the 4 lanes correspond to UP,DOWN,LEFT and RIGHT directions).

laptimer2k6.zip

Here's the manual (in Italian or Poor English...).

laptimer2k6_docs.zip

 

P.S. if you can't find an opponent to race against, a TI 99/4A computer can act as a substitute!

 

 

 

 

 

 

 

 

  • Like 5

0 Comments


Recommended Comments

There are no comments to display.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...