Hey all, I’ve seen the other topics on using the spark core with the Adafruit ultimate GPS but I’m having some problems that I’ve done different debugging for. It involves getting a fix with the GPS.
When I was having problems getting a fix with the spark, I hooked it up to an Arduino and it was able to get a fix within a minute. My setup for testing this looks like this (just so you know it’s not an issue of me trying in different locations
The odd thing for me is it seems like the GPS should operate independently from wiring or anything - as long as it has power, it tries to fix to satellites and not really care about what its plugged into. Is this not the case? Is it a voltage problem? Maybe my wiring is wrong and I should look into that?
Any advice on further debugging this is appreciated!! Thank you!
My immedate guess would be a voltage problem, but it's a bit hard to say without actually knowing your setup/wiring.
But to rule out some software issues you could just write a very simple Serial1 (RX/TX 3.3V) or Serial2 (D0/D1 5V) to USB-Serial pass through program to (sort of) do the same thing as with your Arduino test.
@gelicia
The first possibility is that the voltages are different. The Arduino Uno operates at +5V. The Spark Core at +3.3V. I reviewed the Adafruit product description page and was not able to find a schematic of their breakout. The GPS module (lFGPMMOPA6H) has an Vcc operating range of +3v - +4.3v so I assume the Adafruit people may have an onboard regulator - it looks like a 3.3v regulator on the picture. I suspect that you need to drive the Adafruit breakout GPS at +5v. Regulators typically need to have supply voltages above their output voltages.
Folks, the Adafruit description clearly says “ultra-low dropout 3.3V regulator so you can power it with 3.3-5VDC in, 5V level safe inputs”. So voltage is not the issue and it should be powered via the Core’s 3.3v pin. The problem with the “serial” Arduino sketch is that it just won’t work with the Core. As @ScruffR pointed out, a small sketch that reads Serial1 (or 2) and copies out to Serial will do the same.
I unplugged the spark and everything from the rest of the project so I know there’s nothing else interfering. I’m powering everything off a battery that goes through a voltage regulator set at 5V and have the gps going off that instead of off the Spark’s 3.3v. This may or may not matter but more closely mirrors the uno setup.
The time to fix now seems to be more like what the Uno is so it’s gotta be something else in the project.
For anyone’s future reference, here is the code that mirrors the adafruit direct computer wiring example.
Despite the fact that I’ve not checked the datasheet and the careless use (taking over of) the OP’s term voltage, instead of the more appropriate term power (product of voltage x current) it might not be a voltage problem, but if the new power setup actually should work better, it might have been a power (more precisely said current) issue after all
As for the serial passthrough sketch, I’d rather use Serial.write() like this
//#include "Serial2.h" // replace Serial1 for use of D0/D1 for 5V toletance
void setup()
{
Serial.begin(115200); // USB serial is always that fast
Serial1.begin(9600); // this needs to fit to the other side
}
void loop()
{
while (Serial1.available())
Serial.write(Serial1.read()); // pass RX data to USB serial
while (Serial.available())
Serial1.write(Serial.read()); // pass USB serial to TX pin
}
When using Serial.print(), non-printable bytes would get converted to their integer number representation, which might be confusing (e.g. carriage return would print 13 and line feed 10, instead of producing a new line).
Edit: I just looked at the Adafruit specs, and 25mA (tracking) doesn’t seem excessive for the Core, unless you use a really wimpy power source, or you’ve got a lot of current going somewhere else.
Yep that was it exactly. I had it on a half breadboard, and that is too close to have the Photon and the GPS module. When I put it on a full breadboard, everything worked fine. A lot of headaches for a simple spacing issue!