transmitted temperature data by 912mhz parallax module to 912mhz reciever the v
Tomvn
Posts: 103
hI all , I transmitt temperature from bs2 to other bs2 via 912mhz module but the reciever show the value not correct ,anybody know how?
Comments
Please post the code that you are using for your project.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
· here transmitter
main:
DO
GOSUB SHT_Measure_Temp
DEBUG CRSRXY, 0, 3,
"soT...... ", DEC soT, CR,
"tC....... ", DEC (tC / 10), ".", DEC1 tC, DegSym, " ", CR,
"tF....... ", DEC (tF / 10), ".", DEC1 tF, DegSym, " "
SEROUT Tx,84,[noparse][[/noparse]tC]
SEROUT Tx,84,[noparse][[/noparse]soT]
SEROUT Tx,84,[noparse][[/noparse]tF]
GOSUB SHT_Measure_Humidity
DEBUG CRSRXY, 0, 7,
"soRH..... ", DEC soRH, CR,
"rhLin.... ", DEC (rhLin / 10), ".", DEC1 rhLin, "% ", CR,
"rhTrue... ", DEC (rhTrue / 10), ".", DEC1 rhTrue, "% "
PAUSE 1000
LOOP
END
RETURN
Here reciever.
receiver_temp_data:
SERIN rx, 84, [noparse][[/noparse]soT]
SERIN rx, 84, [noparse][[/noparse]tC]
SERIN rx, 84, [noparse][[/noparse]tF]
DEBUG CRSRXY, 0, 3,
"soT...... ", DEC soT, CR,
"tC....... ", DEC (tC / 10), ".", DEC1 tC, DegSym, " ", CR,
"tF....... ", DEC (tF / 10), ".", DEC1 tF, DegSym, " "
·SEROUT 1,84,[noparse][[/noparse]HOME,"tC....... ", DEC (tC / 10 + 4), ".", DEC1 tC, DegSym, " ",CR]
GOTO receiver_temp_data
i use two BS2 one send and one reciever via 912mhz the· one reciever use the bluetooth eb500 module to send to PC but the value to PC is not correct ?
Post Edited (Tomvn) : 10/3/2009 6:49:10 PM GMT
What happens if you omit the transmitter and receiver, and wire the two BS2's directly? <-- Make sure that you share the same ground connection.
My first thought is that the data might be inverted, or get inverted through the transmitter or receiver.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
i read the document 912mhz module use 9600 to send and reciever and eb500 the same , and i ground eb500 and 912mhz same ground connection.
Post Edited (Tomvn) : 10/3/2009 7:48:26 PM GMT
The only obvious thing that I can see is that you are sending the data in a different order than you are receiving it. The 'soT' and 'tC' are swapped.
TX code
TX code
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
the preview code i alraedy fix it but the problem still , let me try to make the same ground connection
and let you know what happen.
My suggestion as far as making the same ground connection also involves you eliminating the RF transmitter and receiver and going with a direct connection. This is more of a sanity check to make sure that the code is actually functioning properly before we try to look for other problems.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Stephen
You need to have some sort of synchronization between the TX data and the RX data or else the order of which the bytes are received can become misaligned.
transmitter example:
receiver example:
Please reference the Basic Stamp Manual for SERIN, SEROUT, and the WAIT command...
www.parallax.com/Portals/0/Downloads/docs/prod/stamps/web-BSM-v2.2.pdf
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/6/2009 4:32:46 PM GMT
let my try different Pin .
For basic Transmit and receive between two BS2's I have tested this code and setup in a direct connection configuration. For both the Transmitter(TX) and Receiver(RX), P0 is used in this example, but you can change it to whatever is applicable. When connected to your RF modules, if you are using the Parallax Transceivers(TRX) you will need to make sure that one TRX is setup as a transmitter and the other TRX is setup as a receiver. Otherwise, connect the appropriate TX or RX to the BS2 and make sure that you share a common ground connection between the RX or TX module connected to each BS2.
Transmitter
Receiver
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
your code and the way you wires your sample is work really good , but the problem my here , I have to transmitt temperature data away 600ft from my brother house to my house. that why i have to use two 912mhz TRX from parallax to do the job.
"your code and the way you wires your sample is work really good , but the problem my here , I have to transmitt temperature data away 600ft from my brother house to my house. that why i have to use two 912mhz TRX from parallax to do the job." - Yes, I understand that. This code exercise is to make sure that the code is correct. The next step would be to connect the TRX modules making sure that one is configured as a Transmitter, while the other is configured as a Receiver and connected to their appropriate BS2.
Since the TRX is a line-of-sight device, building structures and external interference can play an role in the quality of the received signal.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
Post Edited (Beau Schwabe (Parallax)) : 10/7/2009 4:15:32 PM GMT
·I come back ,and i still·have with the same problem .
when i just send only one [noparse][[/noparse]tC] variable· to· RX the Rx·got confuse, sometime it recieve the right value sometime not.
perhaps your getting interference between your transmitter and your receiver that doesn't allow it to operate at 600 feet. Can you move the Transmitter and Receiver closer to one another just to see if that might be part of the problem? Another thing you could try is to lower the baud rate. Sometimes that will help in a noisy environment.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
You should be able to lower the baud just fine. I'm curious how far apart the transmitter and receiver are from one another? Is there a chance that you have another device nearby operating on the same frequency that could be causing some interference?
Can you take a photo of your Transmitter and your Receiver setup? ... and possibly a schematic that you are using?
That might help nail this problem down.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
yesterday i make a test to low the baud rate down but it didnt help.
I think I just figured out your problem....
In your original code... soT, tC, and tF are defined as WORDS
The serial function can only send BYTES ... so for your TX code it should look like this...
TX code
...And the RX code should look something like this...
RX code
Note:
Make sure that you define soT, tC, and tF as WORD variables. i.e.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.
it works great , thanks very much to take your time.
Great!, I'm glad that worked.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Beau Schwabe
IC Layout Engineer
Parallax, Inc.