Problem with a Libelium GPS

Hi,

I have a Arduino Duemilanove connected to a Libelium GPS (http://www.libelium.com/tienda/catalog/product_info.php?cPath=21&products_id=37).
I am accessing the GPS through the LB_GPS library Version 01a
I am developing a small program (I am quite noob with Arduino) to read the data from the GPS and to show it in a LCD display.
While I am connected to the computer through the USB port the GPS seems to work fine, I receive NMEA strings as expected.
The problem comes when I want to power the system through batteries, not through the USB port.
I disconnect the USB cable, reset the Arduino and everything goes running until the program tries to read data from the GPS. Then it is blocked.
The following code shows what happens: working with a USB connection you can see at the display the strings "GETRAW IN" and "GETRAW OUT" swapping every 5 seconds approx.
When the Arduino is powered through batteries the display shows one time "GETRAW IN" and the program hangs.

Any idea on where is the problem?

Thanks in advance

#include <LiquidCrystal.h>
#include <LB_GPS.h>

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

void setup()
{
  GPS.init();    
  delay(100);
  
  lcd.begin(16,2);
  
}

void loop()
{
  Visualiza("GETRAW IN       ");
  GPS.getRaw(100);                           // reads the GPS string and stores it in inBuffer
  Visualiza("GETRAW OUT      ");
}

void Visualiza(const char *s1)
{
    lcd.setCursor(0,0);
    lcd.print(s1);
    lcd.setCursor(0,1);
    lcd.print("                ");

    delay(5000);
}

What kind of batteries are you using? What voltage? How many? How are they connected?

Hi,

I am using a pack of four Duracell AA 1.5V alcaline not rechargeable batteries. They are new, mounted in serial and they give a voltage of 5.68 V.

They are connected to the Arduino through the DC connector and everything is running fine except the GPS reception of data.

The GPS power is connected to the (5V) pin of the Arduino. The LCD display is also powered by this pin and it is running fine.

I will check what is happening if using NiMH rechargeable batteries.

Any suggestions will be really appreciated as I am stucked right now.

I have checked that if I connect the batteries through the (Vin) pin everything goes fine.
But if I connect them through the DC connector I have the problem I told previously.
Can this be normal? I thought the Vin pin and the DC connector were the same.

Can this be normal? I thought the Vin pin and the DC connector were the same.

Almost the same. The external DC connector goes to an inline series polarity protection diode before it wires to the voltage regulator's input and the Vin pin. So you will loose around .6vdc using the external connector Vs using the Vin pin.

Lefty

I have found in the Arduino web a text saying that powering with an adaptor must be done through the DC connector while the batteries have to be connected to the Vin pin. I have done this and everything works fine.

Thanks for the answers !