SlotForum banner
1 - 20 of 54 Posts

·
Premium Member
Joined
·
1,009 Posts
Discussion Starter · #1 ·
After getting a HO set of my own I decided I needed a timing system for it. Since I thought my local club SCHORC would also benefit from such a thing I decided to see what I could come up with. While this system has been designed for HO, the system should also work well with larger scales using suitable sensors.

Technical bit
I discovered the mbed board earlier in the year and it jumped out as me as being ideal for such a project. An mbed is designed for rapid prototyping and offered a number of attractive features.
  • USB connectivity
  • 25 general purpose I/O pins
  • A free online C++ compiler
  • No specialist tools or software required for programming the board
  • A powerful chip mounted on a board that's easy to integrate with prototype hardware

To me the mbed removed a number of barriers to embedded development. It can be programmed in C++ which admittedly isn't super efficient at this level but it certainly makes things simple. There is a good selection of well documented built in classes and users can share their own software libraries. All your code is stored on their servers so it can be accessed anywhere.The development environment runs in your web browser and once your program is ready you hit the compile button. If your code builds successfully you have the option of downloading the newly built binary file.

To program the board couldn't be simpler. It's flash memory appears as a removable storage drive on your PC. You drag and drop the binary file on to the mbed drive and then press the reset button on the mbed and the new binary will start running.

Software
To ensure accurate timing the mbed is running a high resolution microsecond timer that is used for clocking car detections on the appropriate input pins. This should mean the system is considerably more accurate than windows based timing system based on a parallel port. The mbed software queues detections to send to the PC via USB. When there are no detections to send it is sending its current detection clock value to the PC which is used for running the race timer. The data sent to and from the PC is protected with CRCs and the the PC can request packets to be resent by the mbed if it finds the data to be invalid.

Prototype hardware



As you can see the mbed board sits very happily on some breadboard for prototyping. This prototype has 4 lanes of detection and start lights. If desired though it could have up to 25 detectors which could be used for sector timing, pit entrance and exit sensors, or speed traps.

With suitably circuitry the mbed should also be able to control track power. It could probably also monitor the voltage on each lane for fuel simulation. With suitable external circuitry it could also drive each lane with a PWM signal enabling digital throttle maps... In fact it opens up a great many possibilities to people interested in pursuing them

Prototype hall effect sensor board (version 2)


I decided to use hall effect sensors for the car detection as I thought they offered a few advantages over a light bridge or dead strip for HO cars. The system could very easily be adapted for other sensor types though.

I will shortly be starting work on version 3 of this sensor board as the sensors need to be rotated through 90 degrees to get the hall effect sensors closer to the middle of each lane. This appears to allow them to detect a G-Plus HO chassis without compromising their ability to detect other chassis.

Each lane requires two hall effect sensors as they only detect magnetic south poles. As traction magnets seem fairly random in orientation and not all HO motors spin the same way, one sensor is needed on each side of the lane to guarantee all chassis are detected.

The hall effect sensors seem to work very reliably but it did require some effort to get them to that point. Electromagnetic noise from the track seemed to be the main problem. The inputs to the mbed from the sensors have a simple low pass filter which improved the quality of signal present on the mbed I/O pins. The final piece of the jigsaw was fitting a substantial ferrite bead on the cable from the sensors to the mbed board which also stopped the interference from the track generally upsetting the mbed, particularly its USB connection.

A future project for me will be adding SSD detection for use with my digital Scalextric.

Basic PC software

As the protocol to the mbed is propriety it is currently only supported by my own race control software which is very much a work in progress...



what next...
I am really pleased with what this system offers and I think it has exciting potential. It is more complex than attaching some photodiodes to your parallel port but the advantages this system offers were worth the additional effort and cost to me. I also think it should be easy enough for someone with a reasonable hobby level interest in electronics to build there own.

So if other people are interested in building similar systems I am happy to provide circuit diagrams, help, code and basic race control software.

Also if people have constructive comments on improving the system I would love to hear them.
 

·
Registered
Joined
·
550 Posts
Looks excellent.

How easy would it be to knock up a DLL to just expose all the input timing from the mbed? Not a C++ person, but fiddle around in VB.Net so it would be good to be able to create a front end to interface this, especially with so many inputs available.
 

·
Premium Member
Joined
·
1,009 Posts
Discussion Starter · #3 ·
Thanks!

That's a good idea, I could make you a dll to do that pretty easily. Alternatively I have C# code you could use.

To be honest if you can do VB.NET I don't think you would find it too hard to get into the C++ the mbed uses if you wanted to make minor configuration changes to which pins you were using for what etc.
 

·
Premium Member
Joined
·
4,213 Posts
Sounds excellent.

I think if you could package it up to work with photo sensors there is a market for a simple USB based lapcounting/timing system - especially for rally tracks. The simple inclusion of LED, start? lights is great.

From my perspective i would buy a made up unit and software only becasue i simply have not idea how to wire this kind of thing (and no time!).

Good luck with development.
 

·
Premium Member
Joined
·
1,009 Posts
Discussion Starter · #6 ·
Thanks for the kind words guys

@montoya1 I am happy to work with any other developers who wish to add support for this system to their software. I imagine they will only be interested in doing this if there is enough interest though. So if you want mbed support adding to Race Coordinator I suggest you get in contact with the guy who writes it and point him in the direction of this thread or me.

@JEXY1 I think the firmware in the mbed will only require a minimal tweak to make it work with optical sensors. I might get a couple and see how well it works out. If it works well I will use it for timing the 1:32 rally stage I like to put out from time to time.


I'm not sure I have the time to produce packaged finished units, but again it depends on how much interest this receives...
 

·
Registered
Joined
·
826 Posts
Like JEXY1, I would also be interested in something a bit more "turnkey". It doesn't necessarily need to be nicely packaged, even a breadboarded version would be okay with me. I'm okay with making an enclosure or doing some soldering but the last time I did any programming was in C and it was a long time ago.

Oh, I'm doing 1/32 at the moment. The system I'm using works great (Carlson) but I'm always interested in something new and different.

Randy
 

·
Premium Member
Joined
·
1,009 Posts
Discussion Starter · #8 ·
@keysandslots I am probably not too far from being able to supply a list of the required components and a suitable plan for making up what you would need on vero board. It would be really nice to get some proper PCBs made up, but I think I would need more interest than I have had so far before I would consider doing that.

For those that are happy with system as I have written it there would be no need to do any programming.

I have had they day off today and done a bit more work on the system.

I have redesigned the hall effect sensor boards so they are much simpler to make and hopefully they will work with a wider variety of HO chassis.

The top


and the bottom


This is just a two lane version for my home track and for demonstrating the system at the AFX 6 hour endurance race on Sunday.

I have also added track power switching. You should be able to see the relay (kindly donated by Roy Masters) and an additional red and green LED for showing if the track is currently powered or not.

 

·
Simon Platten
Joined
·
1,060 Posts
Cool platform, just came across this when researching something else...We use MQTT at work which is a message subscription system...the idea is you have a "Broker" which allows systems / users to set-up subscriptions to the "Broker", other systems then post data to the "Broker" and the "Broker" distributes the messages to subscribers.

Its a very leight weight system and works very well, they're are MQTT implementations around for lots of platforms including mBed. You could implement MQTT to allow the system to publish results to a server then subscribers could get the results.
 

·
Premium Member
Joined
·
2,574 Posts
Hi Al, does the timing system now work with Magnatraction and G+, reliably
 

·
Premium Member
Joined
·
2,574 Posts
Excellent news, great work Al
 

·
Premium Member
Joined
·
2,574 Posts
At our recent 'Pancake Cup' event the system worked superbly, with the AFX magnatraction and G+ chassis.

Top work Al.
 

·
Registered
Joined
·
6 Posts
Hello people, my apologies for a slight change in direction though still related to Race Management, any help/advise would be most appreciated.

I am using DS kit (great kit) but have been unable to get my PC running XP to see the DS 300 Lap Counter, I have adjusted the baud rate from the default 96000 to 57600 and, still nothing.

So, I was wandering, if it's possible to convert to USB ?

Frankly, if I had known how difficult it was going to be set up a connection between the DS Lap Counter 300 Pro and my computer via Com Port simply to retrieve the codes required to get the Winslot Software, I'm pretty sure I would not of bothered - I like many like stuff to work straight out of the box.

Worst, there are no understandable instruction in the DS Manual for trouble shooting, in fact, overall the Manual is pretty poorly put together, I am sure many that use DS kit have notice how one sentence on a topic within the Manual appears both contradictory and confusing.

Even more perverse is that, in spite of the fact you've already paid hard cash for their (DS Electronic) kit and the software (Winslot) which, I know is free, nevertheless you have to go through an unbelievable time consuming process seeking help from various people and there are no guarantee - even the retailer can not supply the software even though, they are aware that you have made a genuine purchase.

I have had this kit for nearly 3 months now - I have tried everything and can still not retrieve the Winslot Codes

I know this is an old thread but, assuming I wasn't sold a dud, please, anyone, any advise would be really appreciated. I can not stand the thought of returning to Scalextric RMS, its depressing lol.....
 

·
Simon Platten
Joined
·
1,060 Posts
The DS-300 is serial only, the only way you could use it on USB would be to get a USB to serial adapter, but then your back to square one as the USB adapter would just work as a serial port.

The correct settings for a DS-300 on the serial port are:
57600, 8 databits, 1 stopbit and no parity.

I agree with you the manual is quite difficult to interpret. There are a few packages available that support the DS-300, including my own (SRS). Unfortunately you will still need to configure the box correctly before you can use any of them.

I would suggest starting a new thread in this forum more specifically titled as I would imagine the author of this thread wouldn't want it to be hi-jacked.
 

·
Registered
Joined
·
6 Posts
Hello Sly,

Thanks, for your input, I will start an other thread as you suggest though, from some of the content from your replay seems to imply that a new thread would a waste of time particularly as I have tried setting up Com Port 1 exactly as you discribed - we can but try, thanks.

Paul
 

·
Registered
Joined
·
1,011 Posts
Hi Al

How's your project going ?

I am looking at the moment to improve the timing situation on my 2 lane Sport track.
I want to use a small 'netbook' computer, which would be dedicated to slotcar timing.
I figure I could pick up one of these 2nd hand, real cheap.
I wanted a netbook, as it's size and freedom from power supply would mean it could 'roam' in the layout room easily on a long USB cable.
Also most have a VGA skt. if a larger screen is needed.

I think all these computers have only USB, the parallel & serial skts. are becoming a thing of the past a lot now.

I didn't realise untill delving into the timing forum that PC timing was so bad.
Your system seems to solve this with it's own clock etc. which is exellent.

I also like your idea with the Hall switches, I'm suprised no one else seems to be using them, It's a great idea.
You've obviously got the Hall stuff working in HO, so I'm guessing a board for 1:32 Sport is doable.

I just checked my favorite 'high-priced' electronics supplier RS for the MBED, they have it at £40 + VAT.
Do you know of a cheaper supplier, as I find RS often overprice stuff a lot IMO.

I'm still looking around at other timing stuff, but I could well be interested Al in making one of your setups.
Since there isn't much action in the thread, I figure no one else has made one yet.

If I'm gonna do PC based timing, I would hope for spot on timing, your hardware solution looks good for that.

The ability to log lap times, and see them on screen at a reasonable size is my main reason for considering a new timing system.
I also had wondered about trying to implement a 3 sector 'F1' style system, but haven't seen any solutions for this in my looking so far.

Let us know how the project is going.
I could be up for building one.

Cheers

Si.
 

·
Premium Member
Joined
·
1,009 Posts
Discussion Starter · #20 ·
Hi Si,

Thanks for your interest!

Lots of development has been going on here but nothing has really got to a stage where I felt it was quite worthwhile posting an update...

Overall I'm very pleased with the system, it gets a good hammering at least once a month at SCHORC and has only suffered the odd minor issue as development has continued. Sector time is a easily doable with this system and Dave Hannington has an mbed and my software that his is trialling at the permenent HO "HONK" track in Kent. Once complete his system will have 3 sectors of timing and individual control of track to power to each of the 6 lanes. This will allow time penalties to be applied to jump starters.

The RMS software is coming along nicely but is still not quite ready to release to the public yet. I'm hoping it will be in a few months time though.

The hall effect sensors work very well for HO cars with magnets. I haven't tried them with any of my 1:32 cars as they are all digital but for cars with magnets they should work fine. I have also tested the system with photodiodes and it works with them too. I suspect it could also work with a dead strip without too much hassle. A more interesting idea I have conceived but not tested is a "live strip" where you measure the current to a small section of track and use that trigger detection...

On the hardware side I am just about to try some new hall effect sensors to see if I can get away with fewer of them as I need two per lane for HO cars at the moment. Also hopefully the new ones will be able to detect the lifelike M chassis which seems to elude my current ones.

Last night I also got the mbed to detect and ID my digital scalextric cars which pleased me greatly as I can start to add multiple sector timing to my digital track and have much better control of pace cars.

Once I have the hardware fully sorted I am intending to get some PCBs made up and have already started work on their design. Hopefully then I will be able to offer kits or fully made up boards. At the moment there will be a main PCB for the mbed module, one for start leds, one for detection confidence leds (that light up when each car is detected), one for control of multiple lanes of track power and a few variations of board for different input sensors...

As for the cost of the mbed I think I paid about £40 for mine from Farnell which seemed to be the going rate at the time.

Cheers
 
1 - 20 of 54 Posts
Top