Connect with us

Model race car track controller

Discussion in 'General Electronics Discussion' started by tip2tail, Oct 20, 2010.

Scroll to continue with content
  1. tip2tail

    tip2tail

    5
    0
    Oct 20, 2010
    Hi All,

    I'm a bit of a newbie to this scene although I did a bit of basic electronics (designing an LED dice) in Uni many years ago.

    I am however a computer programmer and I have been asked by a family member to attempt to replace the software that is used by their slot car club to:

    • Control power to 4x lanes
    • Power 4x traffic lights for the starting system
    • Monitor 4x light sensors that act as the lap timers

    The current software makes use of a kit that connects to the Parallel port on the PC however we would like to move this to USB in order to develop a more modern application and use a new PC that will not have a Parallel port.

    Here are 2 basic diagrams for the current set-up:

    Light Sensors:
    [​IMG]
    Power Control & Traffic Lights:
    [​IMG]

    Is there anyone able to assist in making this kind of project?

    Thanks,

    tip2tail
     
  2. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,451
    2,809
    Jan 21, 2010
    2 observations:

    1) Use LEDs instead of filament lamps.
    2) Tell us what you're actually trying to achieve.

    I suspect you *may* be able to use a microcontroller instead of a PC. It will still play to your strengths as a programmer.
     
  3. tip2tail

    tip2tail

    5
    0
    Oct 20, 2010
    Hi,

    Thanks for your response - the fillement light bulbs are already in situ on a bridge over the track. They are not really part of the circut and are controled by a local switch and not by the PC.

    Basically I want to be able to send signals to each of the 4 traffic lights to turn them on and off from the program, to be able to control the power to the each of the 4 lanes (the power is from an external power source) and finally monitor the light sensors so that when the car passes between the light source and the sensors I can count a new lap for that lane.

    Hope someone can help...

    Thanks,

    tip2tail
     
  4. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,451
    2,809
    Jan 21, 2010
    The photodiodes will need something to amplify and buffer the signal they produce, and you may also need to condition it so that it ignores minor ambient light changes.

    If you use relays you may also need a diode across the relay to absorb the inductive spike as the relay coil is de-energised.

    If the lights are relatively low powered you may be able to drive them from the ULN2803. Another option is using transistors (BJT or MOSFET) as they will be a lot quieter than relays, which may be a factor if they are turned on and off frequently (especially if they are flashing)

    edit: OK, they're phototransistors and you want to move it to USB. (silly me) -- The easiest solution may be to get a USB to parallel converter (it will probably cost you only a couple of dollars) and just wire it up to that. If the software talks direct to the hardware you have a problem, but it's probably a cheap fix if it uses normal api routines to control it.
     
    Last edited: Oct 21, 2010
  5. tip2tail

    tip2tail

    5
    0
    Oct 20, 2010
    Well to be honest its a brand new peice of software I am writing in C# to handle the system. The power for the traffic lights and power to the track comes externally I just want to be able to switch it on and off via the USB through the program. Basically the ability to send on or off signals to 8 different switches (transistors if possible) through the USB.

    My idea was not to use a convertor and create a new hardware kit to work with the new software, a USB kit. Thinking about it I'd be happy to have the lights and track power controled by one USB "device" and another port and device used as the lap counter monitoring system. That one just needs to send a signal from 1 of 4 sensors everytime the light is off (i.e. when a car passes).

    Hope that makes sense,

    tip2tail
     
  6. tip2tail

    tip2tail

    5
    0
    Oct 20, 2010
    Im not sure if this is making sense?

    Of if it's even possible?...

    tip2tail
     
  7. (*steve*)

    (*steve*) ¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd Moderator

    25,451
    2,809
    Jan 21, 2010
    Sorry, I'm off overseas at the moment. Maybe someone else can assist. Boarding in a few minutes...

    programming USB devices from scratch is non-trivial. Make sure you get something that has generic drivers available.
     
  8. tip2tail

    tip2tail

    5
    0
    Oct 20, 2010
    Thanks Steve!

    I've been thinking again about this... I'm going to take it in 2 stages. The lap counter is the first bit.

    I want to have sensors detect when the light is stopped from reaching them (i.e. by a car passing between the light source and the sensor) and send a signal that I can interpet in my program i.e. Sensor1-light-broken then sensor4-light-broken.

    It needs to connect by USB.

    Is this possible?

    tip2tail
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-