ok, I have a project that I am doing. I have a Copernicus GPS module feeding an NMEA string into a transmitter xbee, which should transmit the NMEA string wirelessly to the receiver xbee, which is on an Arduino Uno. The sketch on the Arduino parses the incoming data and displays it on a GLCD.
Now, if I jump the transmitter xbee's input and ground over to the receiver xbee's output (bypassing the xbee modules), everything works perfectly. but when I try to send it wirelessly I get nothing. I called tech support at Digi and they had me test the xbees to make sure they are transmitting and receiving, and they are. but for some reason when I try to send the NMEA string wirelessly, it doesn't work. any ideas? I am completely lost and it's driving me nuts!
I haven't tried yet. The test I did with Digi shows that they are transmitting and receiving, but when I try to transmit the NMEA string, I get nothing. I am just wondering if in order to transmit GPS data, if something needs to be changed in the cinfiguration.
I will try tonight. I think they are transmitting and receiving, as the PWM RSSI LED output lights showing it is receiving. It seems like it is receiving the signal, but not sending it to the Arduino input. I will try sending another string tonight when I get to the house. Any other information that I can post that might help?
Well, here is the schematic for the transmitter and receiver. I omitted the voltage regulator and switches to simplify it. The serial GLCD wires MAY be on other ports of the Uno, I can't remember off hand without looking at it or the sketch, but it is irrelevant nonetheless, because if I jump over ground and signal from the transmitter to the receiver, everything works. I will post up the sketch when I get to the house this afternoon.
It could be that the serial output from the Xbee is not enough to drive the arduino where as the output from the GPS is.
This happens because the Xbee system has only a 3V3 supply which means the signals can reach only a maximum of 3V3. This is close to the limit of what is detected as a logic high.
The GPS is a 3.3v module as well, so by that logic, the same could be said for it, and wired in directly, it works fine? I could be wrong, but I don't think it's a hardware issue.
Ok, I have attached the sketch that I am using. This is my first time doing any programing, and using Arduino, so If anyone has any suggestion to make it more efficient, I am all ears. Also, I have not had a chance to comment the sketch, but if it will help you guys figure out the issue I am having, I will gladly go in and do so.
Arduino-Nate:
The GPS is a 3.3v module as well, so by that logic, the same could be said for it, and wired in directly, it works fine? I could be wrong, but I don't think it's a hardware issue.
Your are probbily wrong on that one. If a direct wiring works then your code is most likely to be correct. However diffrent 3V3 devices will not all produce the same output. You are right on the limit of it working / not working.
Since this appears to be a coding issue you would have got faster and better results if you had posted your code in the first place. Maybe remember that for next time.
Sorry, When I posted, I was at my office and didn't have the code handy. I am still not sure if the problem lies with the xbee or the sketch. The sketch seems to work fine without the xbee's transmitting the NMEA string, but when I put the xbees in the mix, It doesn't work?
Ok, I can make them changes and post it up tonight. What exactly is that going to do? is newData something that need to be defined in this case? Does that field need to bu used later in the sketch, or do I just need that line? Also, where is the best place to put it, prior to the setup when the other fields are defined, or in the setup function? Sorry for all the questions, But aside from wanting this to work properly, I also wish to understand what I did wrong as well as how the sketch works. Anything else you guys can think of, lay it on me!
Oh, and I have my Baud rate at 9600 as well. I just use 115200 for the serial monitor (which I just use for troubleshooting and has nothing to do with the final program function). Is there any way that the Baud rate could cause this kind of issue?
I just stumbled across something. The Copernicus ll GPS module has a Baud rate of 4800, and in the sketch the serial Baud rate is 4800. But.....The Baud Rate of the Xbee is 9600, and I am guessing that the Baud rate needs changed in the sketch accordingly. I just realized that. It explains why it works when the string is fed from the module directly (@4800) and not from the Xbee (9600). I will have to verify this when I get home, but is my logic sound?
Ok, so I downloaded and installed the IDE on my office computer, made the change, and commented the sketch for you guys and attached it. Anyone see anything else I should do to it before I try it tonight?