appropriate microcontroller
Please help!
I built a Piezoelectric transmitter and receiver, each attached to Stamp2 pins 0 and 1 respectively.
Goal 1 is to activate the transmitter via HI at Pin 0 and and have the Stamp2 detect a HI at PIN 1 sent by the reciever when it is activated by the transmitter.
Goal 2 is to measure the time from PIN 0 Hi to PIN 1 HI.
Setting aside actual time from transit through the circuit, we have time of flight.
Does any one know how to achive my goal 1 and 2?
I built a Piezoelectric transmitter and receiver, each attached to Stamp2 pins 0 and 1 respectively.
Goal 1 is to activate the transmitter via HI at Pin 0 and and have the Stamp2 detect a HI at PIN 1 sent by the reciever when it is activated by the transmitter.
Goal 2 is to measure the time from PIN 0 Hi to PIN 1 HI.
Setting aside actual time from transit through the circuit, we have time of flight.
Does any one know how to achive my goal 1 and 2?
![confused.gif](http://forums.parallax.com/images/smilies/confused.gif)
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
Now, the TOF is actually a "pseudo TOF". As long as the load times are constant I just need a constant TOF value between all transmitters and receivers. I am using distance units not acutal distances (make any sense?). Therefor all ofher factors that are constant are ok.
The hardware is good to go. Calculating load times? SX processor? Uh-oh. Where do I start? Also (please forgive me for asking) do you think a basic to intermediate BASIC Stamp2 student would be better off with an OOPIC for this operation because of its complexity?
(don't expell me from the forum - I love the Stamp, it has done me right)
Post Edited (Tbag) : 5/18/2005 6:47:05 PM GMT
·· It's not so much about complexity as timing, and the SX can handle that no problem.· Your biggest problem if you're trying to use the stamp, is what reference do you have for timing the delay on the signal?· There is no internal clock to read when you activate the transmitter then read when you receive the pulse to calculate the time.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I need a PIC to sequence the transmissions and clock the delays. Would the SX do this with the addition of a timer (SX controls the timer and the sequenceing of the transmissions)?> Can it be software ended PBAsic?
··········· You could try the RCtime command; this would give to a amount back in relation to time.
·
RCtime 1,1,variable
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Stephen Swanson
Technical Support
Parallax, Inc.
sswanson@parallax.com
Question: So if I stayed with the TOF idea, for linearity, would I have to add further circuits to my receiver or transmitter to get the RC time command working?
Post Edited (Tbag) : 5/18/2005 10:57:59 PM GMT
The SX should be able to do everything for you and pass the info to a stamp in whatever format you need.
What type of signal comes from the receiver ? A pulse ? Multiple pulses ?
Are you sending and receiving from the same module or different modules ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
All great questions.
The receiver will output a digital waveform pulse.
I am sending and receiving from different modules.
The receiver will have a window comparater that will output a digital waveform to a base station flip flop counter when a threshhold signal in the receiver is breached from a transmitter pulse. The time delay calculated in binary. Thats the goal. Ideally the PIC will sequentially trigger 1 transmitter and calculate time delay to 2 receivers at the same time; this should be repeated for transmitters 2 and 3 as above to the same two receivers.
I am wondering if the SX can cover time delay and sequencing of the several modules I do have and do all the work up to transmitter activation then resuming at comparater output from the receiver - I have everything else in between worked out.
Do you still think the SX will do?
T.
But since we're talking about speed of sound, I think the SX would be more than fast enough.
From what I understand you have 3 different modules (Base-station, Transmitter, and Receiver).
Are all the modules hard wired together ?
Are you trying to measure the distance between the two receivers ? Or from the transmitter to each receiver ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
Here is a diagram that should explain. I had trouble sizing it to see the details - look at the one attached all the way to the right.
"Time" I need calculated can be deviated from true TOF as long as deviations are constant and linear.
T.
Post Edited (Tbag) : 5/19/2005 5:25:58 PM GMT
I think the SX would be as good as any for this application.
You should be able to measure sub-microseconds with a 50MHz SX.
How much distance between the transmitters and receivers ?
I assume you are doing triangulation since you have three transmitters ?
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
1.Where do you order the SX
2. does it supplement the BS2
3. where can I get a 16 bit+ voltmeter kit for either the BS2 or SX (the ADC0831 is too step small) (this is a seperate question from the current discussion)
4. do you consult regularly
Thank
T.
1)
The programming kits are on back order from Parallax until 5/27, check some electronic distributors to see if they have it.
What you want is the "SX-Tech Kit".
You may want to call Parallax and check on the ETA.
2) It can. Using serial to communicate back and forth.
3) I'll have to check and get to back to you.
4) Yes, please send me a private message using the "PM" icon on the left.
Bean.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
T.
·· The SX Tech Tool Kit PLUS is only $99.00 right now.· But is currently back-ordered until the 27th.
http://www.parallax.com/detail.asp?product_id=45181
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
I would recommend getting the PLUS version.
Don't forget to order a power supply also...
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"SX-Video·Module" Now available from Parallax for only $28.95 http://www.parallax.com/detail.asp?product_id=30012
Product web site: www.sxvm.com
"It's not getting what you want, it's wanting what you've got."
·
·· You should make sure the supply is 7.5V and at least 1A.· We have these.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
T.