PMB-688 and the Arduino...again.
VamP
Posts: 17
I have done a few things...
I have used a usb-to-serial (FTDI breakout by sparkfun.com) to test the GPS module. It spits out data just fine.
I have sent the Arduino data via the usb-to-serial breakout board. I have also sent the usb-to-serial data through the Arduino. Works fine.
I have tried outputting data to an small LCD screen. I get nothing.
I have tried the UNO and the Duemilanove both have acted identical.
Using this pin-out setup http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/PMB-688_Specification_V0.1.pdf
(TX, RX, Vcc, Vss, N.C., N.C.)
I have tried this code (with no data received):
#include <SoftwareSerial.h>
SoftwareSerial sSerial(2, 3);
void setup(){
pinMode(13, OUTPUT);
Serial.begin(4800);
sSerial.begin(4800);
}
void loop(){
if (sSerial.available()){
Serial.write((int)sSerial.read());
}
}
I have tried this code (with no response):
void setup(){
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
Serial.begin(4800);
}
void loop(){
if (sSerial.available()){
digitalWrite(13, HIGH);
}
}
EDIT: Before anyone says to check my wiring. I have done so already. I have connected the TX to the usb-to-serial, seen it spit out data. Then ONLY move the TX and have it not spit out anything to the Arduino.
I have used a usb-to-serial (FTDI breakout by sparkfun.com) to test the GPS module. It spits out data just fine.
I have sent the Arduino data via the usb-to-serial breakout board. I have also sent the usb-to-serial data through the Arduino. Works fine.
I have tried outputting data to an small LCD screen. I get nothing.
I have tried the UNO and the Duemilanove both have acted identical.
Using this pin-out setup http://www.parallax.com/Portals/0/Downloads/docs/prod/sens/PMB-688_Specification_V0.1.pdf
(TX, RX, Vcc, Vss, N.C., N.C.)
I have tried this code (with no data received):
#include <SoftwareSerial.h>
SoftwareSerial sSerial(2, 3);
void setup(){
pinMode(13, OUTPUT);
Serial.begin(4800);
sSerial.begin(4800);
}
void loop(){
if (sSerial.available()){
Serial.write((int)sSerial.read());
}
}
I have tried this code (with no response):
void setup(){
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
Serial.begin(4800);
}
void loop(){
if (sSerial.available()){
digitalWrite(13, HIGH);
}
}
EDIT: Before anyone says to check my wiring. I have done so already. I have connected the TX to the usb-to-serial, seen it spit out data. Then ONLY move the TX and have it not spit out anything to the Arduino.
Comments
If you look at the TTL output +5 should go to an RS232 level shifter that inverts the output and becomes something like -9 to -12 volts. And a TTL output of 0 volts should go to an RS232 level shifter and output +9 to +12 volts. That is historically why there is an inversion involved.
So at times if you just go TTL to TTL, the inversion is not right. Does the LCD screen have a configuration choice for regular or inverted TTL? That might make it even easier to resolve.
The fact that everything else seems to get it right, indicates that it is either this OR wiring OR the wrong detailed configuration (baud rate, parity, stop bits, hard and soft handshaking).
You know the gps is sending valid data and the wiring is correct.
So trouble probably lies in software serial decoding (inverted/non inverted) or on the lcd part.
Can you test the lcd part is ok by sending data from a terminal? Something like typing data in the terminal and seeing it streaming on the lcd? In an ideal world it would require changing the pin number from the gps port to the pc port.
On the software serial decoding side you should check if you can set the inverted/noninverted mode and try both.
Massimo
The LCD screen is just a small screen from adafruit (http://adafruit.com/products/198)
Yes, I can display data on the LCD. (Hard coded or sent from Serial monitor)
I'm glad I am not the only one who is a little befuddled from this.
Does anyone know how to change the 688's baud? Maybe if I bump it up to 9600... (Pulling at strings here)
I never work with any of the Arduino libraries.
It seems like what you're trying to do is capture each and every character and knock that out to your LCD.
I've used the '688 with Arduino to capture the time of day characters from the RMC sentence.
I buffer that data and then knock it out to a display.
The following Kickstart is for the '648, but it may be of some interest anyway.
http://learn.parallax.com/kickstart/28500
Really? 4800 standard? I wonder why so slow. I mean not that it really needs to be faster.
I have compiled the Arduino uno code in that link you gave me. I have attached the GPS to pin 6 with TX(Yellow wire) as stated in the article. I have opened the serial monitor on the Arduino IDE with a baud rate of 115200.
I receive the "Reading GPS" but even after leaving it running for 5 minutes. I have no data.
I connected the 688 data out to Arduino D0 (RX), I'm not a "softserial maven".
Later this evening I'll try to find time enough to post what I've done with it.
http://www.youtube.com/watch?v=OW8FVmrA7js
This youtube video is informative
http://www.youtube.com/watch?v=AO_Dv6kqn5k
Watched both videos, thank you for your continued help.
My setup is very simple, in fact exact setup in the second video.
Yellow(TX) to pin 2.
Red to Vdd.
Black to Vss.
The only difference I noticed in the videos code was he set different serial rates. He had the GPS on 4800 (same as me) But he had the Arduinos hardware UART to 9600. I have been setting them both to 4800. I don't THINK this would make a difference but I will go and try this right now.
EDIT: Tested '688 with 4800 baud and Arduino UART at 9600. Made no difference at all. Still receiving no data.
Sorry. The red LED's blinking indicates that it's acquiring, it goes solid on when it has valid data.
It would be beneficial to knock the data out to Serial Monitor as quickly as possible.
Two questions:
Is your red LED turning solid on at some time then?
You're running the '688 from Arduino 5V?
Have a look at this link --
http://arduino.cc/forum/index.php/topic,109398.0.html
Yes I have tested it with valid data (a lock) and non valid data (no lock).
Yes I am running it from the Arduino uno's 5v.
I looked at that, didn't know it had a buffer limit. I mean... It makes sense. But it didn't cross my mind. In my first code (when I expected it to work) I was initializing my own buffer.
char buffer[300] = "";
for (int i = 0; i < 300; i++){
buffer = ' ';
}
At the moment of just trying it to relay data I am not using really any buffer. I am basically just using the arduino to repeat any data from the softwareSerial out to the hardware serial.
Connect GPS data to D0.
Each time the GPS prints "$GPRMC," D13 will blink and the seconds characters will print on Serial Monitor,
The '688 has several sentences enabled, so it won't blink 1pps.
See how that works and then give it a shot with "software serial".
Again I thank you, but come baring bad news. No flashing the LED nor any data received by the monitor.
For shits and giggles I setup a little fun. I hooked up the gps to an xbee, then another xbee to FTDI to PC. Then used a serial monitor. Guess what? I received data.
Well how about the second XBee to the Arduino instead?
GPS to Xbee to Xbee to Arduino to PC.
I get data.
What the HELL does that mean?!
You still running the GPS (in Reply 17) from Arduino 5V?
That's the only thing, I don't run the GPS from Arduino 5V - it's separate.
More than that I cannot say. ( :
[Maybe I'd look at it, point, and say "Oh, oh - lookit!"]
Even though I'm running my GPS off a separate 5V, it's wired straight to a Nano and everything's everything.
What's that you say?
-- Power requirements: 3.3V - 5V DC @ 65mA --
The output levels should approximate the supply.
=O
Interesting...
So it's likely that the Arduino is just seeing a jumpy bunch of zeros?
The XBee, being a 3V deal, figures it's good enough.
With a couple of transistors, you could make a double inverter.
The first stage's output would rock 0/5V and the second stage would rightwise it.
Is it "brand new" or just new to you? (What's its provenance?) ( :
The interesting part? Parallax tested it for me.
I'm am by no means an electrical engineer so not sure how to set that up. haha. How would I set up those transistors and which transistors do you recommend? I would love to test this.
Any small-signal NPN should do it (2N3904, PN2222..)
The wires are labelled in the document.
The wires/connector don't match the labelled pads on the board.
But the labels for the pads on the board are correct for those pads.
You're not the first person to assume that the two correspond.
Despite the subject's going cold, I put mine on the scope.
Never been an issue, so I never looked at it before.
With a 5V supply it's 0/3V.
3V is 3/5 of 5V. So, 3/5 of 3V is 1.9V. Maybe I should try a 3V supply?
The Arduino boards have only one 5V pin, the one right next it is 3V, so.. I'm just wondering.
The GPS will run from 3V (according to the docs), but the Arduino won't recognise a 1.9V as a valid 'high'.