How to connect a led into a gps module and a sim module

Hi everyone

im gonna start saying like im doing a gps tracker using an arduino, a sim800l module and a gps module to be exactly im using this modules


Sim800l Module


GPS module

Well, this is my problem...

the 2 modules have a signal led, the led of sim module works in this way: when the sim have a good signal reception, it blinks once per 5 seconds, but when it doesnt have a good signal reception it blinks once time per second.

the led of the gps starts blinking when it have a good signal reception.

So... i tried to connect a 5mm led on the sim module and the gps module, because i need to see the signal reception, but i dont know how to make it! i mean a tried connecting the anode of the led of the module with the anode of my 5mm led but it doesnt work :c

so after that, i try to read the voltage level with my tester, but the blink its really fast, so i can have a good voltage read, i only can read 200mV~. So hope someone can help me with this problem please.

Thanks.

As those existing small leds are driven direct from the sim chip you will have to be carefull that you do not overload its output with the current of 2 leds.

Typically better to use a transistor so the extra load is minimal

000132.jpg

Use an AT command to get the status in your sketch. Connect an LED to the Arduino (directly with current-limiting resistor of 220-470 ohms, or indirectly through a transistor) and control it based on the status.

Similarly, use a GPS library (NeoGPS?) to get the GPS status and control a 2nd LED with the Arduino.

Then you could desolder the LEDs on the SIM and GPS modules to save power, if necessary.

Cheers,
/dev

/dev:
Use an AT command to get the status in your sketch. Connect an LED to the Arduino (directly with current-limiting resistor of 220-470 ohms, or indirectly through a transistor) and control it based on the status.

Similarly, use a GPS library (NeoGPS?) to get the GPS status and control a 2nd LED with the Arduino.

Then you could desolder the LEDs on the SIM and GPS modules to save power, if necessary.

Cheers,
/dev

Hi /dev thanks for try to help me.

Well im not sure about how to connect the leds with a transistor, i mean i think like i need to connect the anode of the smd led to the transistors base its correct? it doesnt have sense for me.

In the case of the gps i solve the problem in this way:

im using the TinyGPS library so one of the instructions of the library is this:

if(gps.encode(newInfo)){    //Where 'newInfo' its a char where i save the info readed from gps

The last instruction means like the proccess gonna start only when i have information who can be proceseced by the arduino, that means 'the gps have signal' so when that happends i turn on a led with a simple digitalWrite instruction.

In the Sim case i dont found an AT command who can give me the signal reception, and im not sure how to use this info to make the led turn on.

mike_117:
the last instruction means like the proccess gonna start only when i have information who can be proceseced by the arduino, that means ‘the gps have signal’

Nope. That just tells you if it completed decoding one “sentence”. GPS devices send different kinds of sentences, with different pieces of information. A “batch” of these different sentences is sent each second. So the sentence that was just received may or may not have status in it. You can still ask TinyGPS for the status, but it may not be the most recent status.

The NeoGPS library groups a batch of sentences into one complete “fix” structure. It always has the most recent status. You would check the status this way:

#include <NMEAGPS.h>

// Pick the port your GPS is connected to.  Comment all the others out.

#define gps_port Serial1        // for a Mega
//AltSoftSerial gps_port;       // pins 8 & 9 only on an UNO, need to get and include Library
//NeoSWSerial gps_port( 3,4 );  // any two pins, need to get and include Library
//SoftwareSerial gps_port(x,x); // NOT RECOMMENDED!  Very inefficient, can interfere with sketch timing

NMEAGPS gps;
gps_fix fix;

void setup()
{
  Serial.begin( 9600 );
  Serial.print( F("Waiting for GPS fix...") );

  gps_port.begin( 9600 );
}

void loop()
{
  //  Read and process available GPS characters
  if (gps.available( gps_port )) {

    //  A complete batch of sentences were received.  Get the latest fix structure.
    fix = gps.read();

    //  Look at the "status" member of the fix structure (check the valid flag first)
    if (fix.valid.status && (fix.status < gps_fix::STATUS_STD)) {
      digitalWrite( GPS_LED, LOW );   // Bad GPS status
      Serial.print( '.' );

    } else {
      digitalWrite( GPS_LED, HIGH );  // Good GPS status

      // Other fields are available in the 'fix' structure.  See the NeoGPS Data Model page.

      //  If the GPS device has a time, print the current seconds.
      if (fix.valid.time) {
        Serial.print( fix.dateTime.seconds );
        Serial.print( ' ' );
      }

      //  If the GPS device has a location, print it.
      if (fix.valid.location) {
        Serial.print( fix.latitude(), 6 );
        Serial.print( ' ' );
        Serial.print( fix.longitude(), 6 );
        Serial.println();
      }
    }
  }
}

When a new fix is available, the GPS device will be quiet for a little bit. That’s the best time to do other work, like sending an SMS message. The TinyGPS examples do not wait for this quiet time, so the GPS characters that keep coming can interfere with your sketch, especially if you try to use SoftwareSerial.

Sorry, I don’t know the AT command to get the signal strength. It’s probably there somewhere…

The 5mm LEDs can be driven from an Arduino pin, as long as you use a resistor, too. The anode is the + side (longer leg, to an Arduino digital output pin), the cathode is the - side (shorter leg, to the resistor), and the other side of the resistor goes to ground. The resistor should be between 220 and 470 ohms. More ohms if it’s too bright.

Cheers,
/dev