Lost communication with Asset Tracker

Hi (again),

so everything was working and then I added a photo-resistor to the Asset Tracker board and since then I have lost communication with it. GPS will blink and then find fix (with external antennae) but I do not receive data anymore.
Tried with another shield (same electron) and all is fine. I get about 3Volt from D6, so I assume I somehow wrecked the connection to serial.1 ?
If I ask Serial.1 for a simple “hello” I don’t get a print.
Is there any way to fix it? Could I use one of the other ports? I have removed all the offending parts but the problem persists :frowning:

3V on D6 seems to shut down the GPS module. At least that’s what it should do.
Letting go of D6 (e.g. via INPUT mode) or setting it HIGH will cause the module to be powered down.

How did you attach the photo resistor?

1 Like

thanks @ScruffR, I guess the correct way would be to say D6 is sinking 3.3V… which is consistent with the functioning shield…

I connected the photo-resistor from A5 to the 3.3 V rail adding a 1k resistor to GRD (I realise it would be better to rather power the sensor through a pin), soldering it onto the perfboard part of the shield.

like so: http://www.ladyada.net/images/sensors/cdspulldowndiag.gif

Hmm, how do you check the function of the shield when you have no serial connection to it? Just by the fix LED?

Is this a V1 or a V2 AssetTracker Shield?

1 Like

with a Voltmeter on the D6 pin, the fix LED and the fact that it all works when i plug it into a working shield…guess that doesn’t rule out a fault in the GPS, but then should I not be able to print a “hello” over the serial1? … its a V1

Hmm, I would have thought you’d to read near 0.0V directly on D6 when the pin is sinking the 3.3V via the 10k pull-up.

The working shield is also a V1 Asset Tracker?

How does the “faulty” Shield behave with another Electron/Photon?

// Settings D6 LOW powers up the GPS module
pinMode(D6, OUTPUT);
digitalWrite(D6, LOW);

holding negative terminal of the voltmeter to D6, positive to 3.3 rail on shield

working shield is also V1, will try see what happens with the other electron and report back just have to take it online first

I see.
Normally voltage measurements are referenced to GND (D6 - GND will read 0V).
You measured the voltage drop across the pull-up resistor - hence the confusion :wink:

ah! …learned something again :slight_smile:

ok so using the other electron results are the same. also the function to send the data in the AssetTrackerRK library, displayInfo(), is inside this:

	while (Serial1.available() > 0) {
		if (gps.encode(Serial1.read())) {
			displayInfo();
		}
	}

if I just place displayInfo() without any conditions in loop then it returns “no location”

the function looks like this:

void displayInfo()
{
 
	if (millis() - lastSerial >= SERIAL_PERIOD) {
		lastSerial = millis();
		
		Serial.print("sat: ");
        printInt(gps.satellites.value(), gps.satellites.isValid(), 5);
        Serial.println();	
        
		char buf[128];
		if (gps.location.isValid()) {
			snprintf(buf, sizeof(buf), "%f,%f", gps.location.lat(), gps.location.lng());
			if (gettingFix) {
				gettingFix = false;
				unsigned long elapsed = millis() - startFix;
				Serial.printlnf("%lu milliseconds to get GPS fix", elapsed);
			}
		}
		else {
			strcpy(buf, "no location");
			if (!gettingFix) {
				gettingFix = true;
				startFix = millis();
			}
		}
		Serial.println(buf);

if (publish) {
    if (Particle.connected()) {
	if (millis() - lastPublish >= PUBLISH_PERIOD) {
			
				Particle.publish("gps", buf);
                lastPublish = millis();
			}
		   }
		}
	}

}

uups no they are V2