Overlapping I/O
wclark
Posts: 3
Forgive me if these have been covered already. I tried searching this forum but found nothing relevant.
I am new to the Basic Stamp and have been reading everything I can find. The project we are working on is an automated start system for timing auto races on a road where the start and finish are a few miles apart. We use a twisted pair wire for communications and have for years simply had a person at start shout GO into a mic and worker with a headphone at finish press a button on a timer (which was stopped by an electric eye when the car crossed the finish). We want to upgrade this to to an automated start and trigger that includes a sequenced start light, a DTMF tone upon start that will be detected by the finish timing system and an electric eye sensing an early start and lighting a light.
The questions I havent been able to resolve regarding applying the Basic Stamp to this are:
Can the Stamp pull one Output line low to current sink a relay at the same time as another Output asserts a DTMFout? They may be held on for different times but need to be able to begin at nearly the same time.
While doing the countdown will it also be able to detect an input from our "electric eye" early start detector and at some point (either immediately when detected or shortly after the start) latch on another output while not changing anything about countdown or the DTMFout which still need to go on as normal?
Thanks.
Post Edited (wclark) : 10/10/2009 2:50:23 PM GMT
I am new to the Basic Stamp and have been reading everything I can find. The project we are working on is an automated start system for timing auto races on a road where the start and finish are a few miles apart. We use a twisted pair wire for communications and have for years simply had a person at start shout GO into a mic and worker with a headphone at finish press a button on a timer (which was stopped by an electric eye when the car crossed the finish). We want to upgrade this to to an automated start and trigger that includes a sequenced start light, a DTMF tone upon start that will be detected by the finish timing system and an electric eye sensing an early start and lighting a light.
The questions I havent been able to resolve regarding applying the Basic Stamp to this are:
Can the Stamp pull one Output line low to current sink a relay at the same time as another Output asserts a DTMFout? They may be held on for different times but need to be able to begin at nearly the same time.
While doing the countdown will it also be able to detect an input from our "electric eye" early start detector and at some point (either immediately when detected or shortly after the start) latch on another output while not changing anything about countdown or the DTMFout which still need to go on as normal?
Thanks.
Post Edited (wclark) : 10/10/2009 2:50:23 PM GMT
Comments
As for the early eye, it should be accurate to within a few milliseconds. Since you only need the early eye before the race begins, then you are only asking the BS2 to do one thing at a time (count down to start while watching the eye).
I don't think you need the Propeller or a camera for this application.
At the Start line we will be sequencing up to 3 lights a little like drag racing. After an automated countdown (flashing light) the GO light will come on to start the competitor and at the same time a DTMF tone will be sent to Finish to begin the time measurement. We will have an electric eye at start to sense anyone starting early (right now that is done by human observation and can be subjective). Any early start will light another light and may send a different DTMF tone to Finish which will inform the timing to add a 10 second penalty to the run time. The run is not disqualified just penalized.
So before we pull the trigger on the Basic Stamp (thinking BS2-IC at this point) and start developing on it I need to understand that the controller will be able to do at least 2 of these thing at a time. If I can assert one output line for a second and have another output line generate a half second long DTMF tone beginning at the same time, and if the controller will be able to accept a trigger input indicating an early start while continuing the countdown lights before it gets to the DTMS output and our GO assertion, then it is a great choice for us. If however it will only permit one output at a time to be controlled, or it will ignore an input (or abort a sequence to service it) while doing another task then it is not going to work for us.
Edit: Thanks as well SRLM. I was writing rest of this reply while you were contributing and missed it until now. I have an option for the issue of needing to do 2 things at once. I have already created a breadboard DTMF generator that will generate a fixed duration output with a ground input of any length. I was hoping not to need to use it given the DTMFout capability on the micro controller as it just adds another bit of hardware that can fail. To use this I can simply trigger the DTMF generator off the output that controls the relay for the GO light. I made this up initially before any investigation of micro controllers began here on the assumption that the controller we chose would not have a DTMF simulation. Turns out this one does but as I now understand it we may not be able to take advantage of it.
Post Edited (wclark) : 10/10/2009 7:59:58 PM GMT
In your case, you could turn on the LEDs which would take only a few milliseconds and produce the DTMF tone (using FREQOUT) for a 1/2 second, then go back to finish the LED sequence. Similarly, the Stamp could be checking the "early start" signal while it's sequencing the LEDs since most of the sequencing involves waiting until the next change should occur. What the Stamp can't do is check an input while it's actually making the DTMF tone or change an LED during the 1/2 second while the FREQOUT statement is executing.