Adafruit Ultimate GPS with N+2. Any experiences? - Netduino Plus 2 (and Netduino Plus 1) - Netduino Forums
   
Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Adafruit Ultimate GPS with N+2. Any experiences?


  • Please log in to reply
52 replies to this topic

#1 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 22 March 2014 - 12:28 PM

Hi folks,

 

does anyone have experiences with the Adafruit Ultimate GPS breakout connected to Netduino Plus 2?

I´m currently trying to get this combination up and running but I make no progress due to some strange behavior of this thing.

 

Here is what I tried:

 

  • connect GPS breakout to Netduino´s 5V and GND and to Digital0 (Rx) and Digital1 (Tx). GPS breakout is blinking constantly and won´t get a sat fix even after hours. NMEA sentences are sent and readable by Netduino, so data connection obviously works.
  • connect GPS breakout to Netduino´s 5V and GND only, no data connection: LED is blinking constantly, no sat fix even after hours.
  • connect GPS breakout to 3 AA batteries only, no connection to Netduino board: LED signals a sat fix after approx. 30 secs.
  • connect GPS breakout to a USB-5V power supply, no connection to Netduino: LED signals a sat fix after approx. 30 secs.
  • connect GPS breakout to a USB-5V power supply, connect power supply GND to Netduino GND only, no other connections: LED signals a sat fix after approx. 30 secs.
  • connect GPS breakout to a USB 5V power supply, power supply GND to Netduino GND and Rx/Tx from breakout to Netduino Dig0/Dig1: LED is blinking constantly, no sat fix even after hours.
  • connect GPS breakout to a USB 5V power supply, power supply GND to Netduino GND, no Rx/Tx connections: LED signals a sat fix after approx. 30 secs. Connecting Rx/Tx now: sat fix is lost after a few secs. Disconnect Rx/Tx: sat fix comes back immediately.

So to me it looks very much like the Netduino board somehow affects the GPS breakout. Noisy power/data lines or whatever...
Currently I have no chance to get this thing connected and have a sat fix. I can connect it w/o having a sat fix or having a sat fix w/o getting the breakout connected. Both is quite useless icon_wink.gif

Does anyone have an idea how to fix this?

thanks,
Daniel



#2 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 22 March 2014 - 10:36 PM

update:
If I power the GPS breakout by batteries, wait until it got a sat fix and than connect it to the Netduino it keeps the fix and works fine!
So obviously the Netduino data and/or power connection prevents the GPS from getting a sat fix. Once it has a fix it keeps it even if connected to the Netduino. But it doesnt get a fix if powered by the Netduino or initially connected to it. Still very strange!

 

Maybe something like a filter (capacity) or pull-up resistor on the Tx/Rx lines would fix it? Any suggestions?

 

Not very helpful, but just as an illustration:
netduinoGps.jpg
(I tried several other wiring options)

 


Daniel



#3 dino4net

dino4net

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 23 March 2014 - 09:22 AM

Hello,

I have the same hardware and it also takes ages to get a fix in this configuration. I never worried about it, as I use an external Antenna and it work's fine.

I will try to play around if I have some time.



#4 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 23 March 2014 - 03:42 PM

Hi,

 

I'm running two of them without any problems on a N1 and N1+ device. Using N2(+) devices the same code does not run probably (even with the new 4.3.1)

 

Antenna:

I always run the GPS board with an external antenna, as I noticed that the position is only accurate with an external antenna.

When using the built-in antenna, the positions are about 20-50 meters off the original track. With antenna it's less than 1-2 meters.

 

Wiring:

I have the board connected to the Rx/Tx and the 5V and GND nothing else.

 

Battery:

As I also had some issues with getting a fix after disconnecting from the power source, I added the battery and since then it gets a fix after about 30 secs (even when I travelled about 350km without switching the device on).

I think the combination of battery + antenna do the trick.

 

I don't know where you live, but in Germany I bought the antenna and the adapter cable from Exp-Tech as they deliver very fast (within 2 days).

http://www.exp-tech....-Mount-SMA.html

http://www.exp-tech....pter-Cable.html

 

Maybe some additional comment, you can switch between a 1Hz, 5Hz and 10Hz update rate.

I still have problem with that and it sometimes works and sometimes not, but once the rate is set with the battery the setting is kept.

To switch I have to change to 9600 baud and then restart the serial connection with the working-baudrate.

With the following combinations I made good experience

- 1Hz, 9600 Baud, Full data

- 5Hz, 115200 Baud, RMC+GGA

- 10Hz, 115200 Baud, RMC only (RMC+GGA currently under evaluation if results are good)

 

Hope this helps.

using System;
using System.IO.Ports;
using System.Threading;
using LL.Core;

namespace LL.Gps
{ 
   public class GpsConfig
   { 
   #region Hertz
      // Set the update rate to 1 Hz
      public const string GPSUpdateRate1HZ = "$PMTK220,1000*1F";
 
      // 5 Hz update rate- for 9600 baud you'll have to set the output to RMC or RMCGGA only 
      public const string GPSUpdateRate5HZ = "$PMTK220,200*2C"; //5Hz
 
      // 10 Hz update rate - for 9600 baud you'll have to set the output to RMC only
      public const string GPSUpdateRate10HZ = "$PMTK220,100*2F"; //10Hz
   #endregion
 
   #region Data
      //turns on RMC (recommended minimum) and GGA (fix data) including altitude 
      public const string GPSDataRecommendedMin = "PMTK_SET_NMEA_OUTPUT_RMCGGA";
      //turns on only the "minimum recommended" data for high update rates!
      public const string GPSDataMinimum = "PMTK_SET_NMEA_OUTPUT_RMCONLY";
 
      //turns on all the available data - for 9600 baud you'll want 1 Hz rate
      public const string GPSDataFull = "PMTK_SET_NMEA_OUTPUT_ALLDATA";
   #endregion
 
   #region Baudrate
      public const string GPSBaudrate9600 = "$PMTK251,9600*17"; //9600
      public const string GPSBaudrate57600 = "$PMTK251,57600*2C"; //57600
      public const string GPSBaudrate115200 = "$PMTK251,115200*1F"; //115200
   #endregion

        public void Set1Hz()
        {
            Logger.Log(LoggerSource.GPS, "Receiver set to 1Hz");
            Thread.Sleep(1000);
            SendCommand(GPSBaudrate115200);            
            Thread.Sleep(1000);
            SendCommand(GPSDataFull);
            Thread.Sleep(1000);
            SendCommand(GPSUpdateRate1HZ);            
        }

        public void Set5Hz()
        {
            Logger.Log(LoggerSource.GPS, "Receiver set to 5Hz");
            Thread.Sleep(1000);
            SendCommand(GPSBaudrate115200);            
            Thread.Sleep(1000);
            SendCommand(GPSDataRecommendedMin);
            Thread.Sleep(1000);
            SendCommand(GPSUpdateRate5HZ);
            
        }

        public void Set10Hz()
        {
            Logger.Log(LoggerSource.GPS, "Receiver set to 10Hz");
            Thread.Sleep(1000);
            SendCommand(GPSBaudrate115200);            
            Thread.Sleep(1000);
            SendCommand(GPSDataRecommendedMin);
            Thread.Sleep(1000);
            SendCommand(GPSUpdateRate10HZ);         
        }       
        private void SendCommand(string line)
        {
            Send(line + "\r\n");
        }

        private void Send(string line)
        {
            if (line != null && line != String.Empty)
            {
                while (!_serialPort.CanWrite)
                {
                    Thread.Sleep(100);
                }
                System.Text.UTF8Encoding encoder = new System.Text.UTF8Encoding();
                byte[] bytesToSend = encoder.GetBytes(line);
                _serialPort.Write(bytesToSend, 0, bytesToSend.Length);
            }
        }
    }
}


#5 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 23 March 2014 - 03:47 PM

thanks, nhale

 

I still cannot really believe that this is an antenna problem, since the GPS breakout works if it is powered by USB power supply or battery and is not connected to the Netduino (at least it´s LED says that is has a sat fix). The problem only ocurres if the breakout is powered by the Netduino (or data cables are connected to).

I will try running the whole thing (Netduino and GPS breakout) on battery today. If this works, to me it looks like there is a problem with the 5V DC provided by the Netduino. Kinda noice or something like that. Maybe my GPS breakout is just a little bit out of spec (or maybe the Netduino is, or maybe both).

 

I´m from Germany too. Thanks for the antenna links anyway. I still hope that I don´t need one ;)

 

Daniel



#6 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 23 March 2014 - 06:35 PM

update:

 

I taped the GPS breakout right into my roof-light powered by 3 AA batteries and not connected to the Netduino board. It got a sat fix after about 2-3 mins (rainy weather outside).

Next I used a 9V battery to power the Netduino and connected the GPS breakout to the Netduino´s 5V and GND to power it. I did not connect the data wires (Rx/Tx) and I did not move the GPS breakout taped into the window (weather is getting better, rain stopped!). It is searching and searching and searching and.... bothers me.

No sat fix at all.

So what is the difference? Just the power supply!?!?! The GPS breakout works fine if it is powered from battery or USB power supply but not if it is connected to the Netduino. :angry:

First I thought the problem could be caused by noise coming thru mains voltage. But since the whole thing isn´t working even on batteries I´m pretty sure that there is something wrong with the DC/DC converter on the Netduino board. However, this nasty guy obviously affects the GPS breakout.

 

Could anyone please try this w/o using an external antenna and in the very same configuration? Maybe it works with a more powerful antenna but I don´t have one currently and even if: I would not accept it ;)

 

thanks,

Daniel



#7 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 23 March 2014 - 06:54 PM

next update:

The 9V battery/Netduino/GPS breakout combination finally got a sat fix. After more than 30 mins.

Success! But not really satisfying. I will try it again with USB powered Netduino/GPS now...

 

Daniel



#8 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 23 March 2014 - 07:05 PM

Do you have the small battery at the bottom at all times?

Because this helped me, as the internal RTC is kept running and this helps the system to get the fix faster.

 

I've once had another GPS shield, which was a lot bigger and so on and I only got a fix only once and never again.

With the Adafruit Ultimate board it's running without any problems.

 

Why is an external antenna no option?



#9 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 23 March 2014 - 07:14 PM

Do you have the small battery at the bottom at all times?

...

Why is an external antenna no option?

 

right now I don´t have this backup battery installed, but I have one. Will try this later.

 

For my project (a compact and lightweight "car travel logger") an external antenna is not really an option. The whole thing should be rental-car-compatible. My Garmin GPS and even my smartphone gets a sat fix even on the dash of a car or on my desk. So I would expect that the Ultimate(!) GPS breakout using obviously the same GPS chip as the Garmin eTrex series would get a fix too.

And it does! But not, if powered by the Netduino. The GPS module itself seems not to be the problem. It´s more the combination of (my?) GPS breakout and (my?) Netduino.

 

Maybe I really got a GPS module and/or Netduino slightly out of spec....

 

Daniel



#10 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 23 March 2014 - 08:48 PM

I'm not familiar with these portable GPS devices but mobile phones also use the mobile network to get the GPS location. I remeber situations where there was no network signal and also the GPS could not get a fix.

For both I think they have some kind of RTC, so try it with the backup battery. I have still the first one since about a year.

 

The problem with the connection to the Netduino is indeed somehow strange.



#11 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 23 March 2014 - 10:20 PM

I taped the GPS breakout right into my roof-light powered by 3 AA batteries and not connected to the Netduino board. It got a sat fix after about 2-3 mins (rainy weather outside).

 
Was Netduino running during that time?
 

Next I used a 9V battery to power the Netduino and connected the GPS breakout to the Netduino´s 5V and GND to power it.


How far is Netduino from the GPS module?

Have you tried adding some shielding to Netduino? If not, try placing a grounded metal sheet between Netduino and the GPS module, or carefully wrap Netduino in aluminium foil and connect it to ground - but make sure it does not short out the pins on the bottom, better to place some paper or tape there.

#12 wendo

wendo

    Advanced Member

  • Members
  • PipPipPip
  • 85 posts

Posted 24 March 2014 - 06:09 AM

Random question... how are you powering the netduino? Is it possible your USB port can't provide enough power to bring up both devices?

 

Do you have a powered hub you could try running it from, or a 7.5v adapter you could plug into the barrel jack?



#13 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 24 March 2014 - 07:12 AM

I'm not familiar with these portable GPS devices but mobile phones also use the mobile network to get the GPS location. I remeber situations where there was no network signal and also the GPS could not get a fix.

 

a mobile network connection is definitely not required to get a sat fix. It may help with some devices (mobile phones) but absically a GOPS receiver works without any other mobile network. What you mea is A-GPS (assistet GPS) which allows faster fix times. But if I polace my Garmin eTrex (it does not has A-GPS) next to the Netduino/GOS combination it got a fix in a few secondas while the Netduino/GPS combination never gets a fix.

 

 

 
Was Netduino running during that time?
 

How far is Netduino from the GPS module?

Have you tried adding some shielding to Netduino? If not, try placing a grounded metal sheet between Netduino and the GPS module, or carefully wrap Netduino in aluminium foil and connect it to ground - but make sure it does not short out the pins on the bottom, better to place some paper or tape there.

 

It makes absolutely no difference if the Netduino is running or not. Also it makes no difference how far it is located from the GPS module. I tried all possible combinations. The Netduino affects the GPS module somehow but its is for sure not affected by some kind of "radio noice" etc. The problem ocurres only if the Netduino is wired to the GPS (!)

 

Random question... how are you powering the netduino? Is it possible your USB port can't provide enough power to bring up both devices?

 

Power supply capability should not be the problem. I tried several USB power adapters and also several USB plugs from the computer. Netduino takes 143mA (measured) if a program is running and GPS module is not attached. With GPS attached it takes 167mA (measured). This is far less than a normal USB port can provide.

If the power supply wopul be to weak to power the Netduino/GPS combination the power supply would collapse and nothing would run, but the Netduino is running well.

 

Once again: it´s definitely not a problem of weak sat signal coverage or weak power supply.

I´m pretty sure that the (my?) Netduino brings some kind of noice to it´s 3,3V and 5V outputs used to power the GPS. And this is obviously not noice from the mains voltage since the battery powered Netduino/GPS combination also behaves very strange.

 

An oscilloscope would be helpful. I´m trying to get one...

 

Daniel



#14 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 24 March 2014 - 07:47 AM

I´m pretty sure that the (my?) Netduino brings some kind of noice to it´s 3,3V and 5V outputs used to power the GPS. And this is obviously not noice from the mains voltage since the battery powered Netduino/GPS combination also behaves very strange.

 
Thanks for all the information. IMHO the other options has been ruled out and power noise is what remains. There is a switching regulator (ST1S12GR, datasheet) on board and also the microcontroller itself is source of high frequency noise, so it seems some connection is picking that up. The GPS module datasheet states "The VCC ripple must be controlled under 50 mVPP", which should be within the ST1S12GR specification (*). 
 
(*) Reference load regulation typ. 0.0025 %VO/mA, for VO = 3.3V and IO = 170 mA it is 0.0025*170 % of 3.3V = 14 mV.
 

An oscilloscope would be helpful. I´m trying to get one...


EEVblog #594 – How To Measure Power Supply Ripple & Noise  ;)



#15 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 24 March 2014 - 08:05 AM

thanks, CW2!

I´ll try to get an oscilloscope as soon as possible.

If I will find critical noise/ripple on the power supply (higher than the spec allows) it looks like I have to replace the Netduino board... (?)

 

Daniel



#16 nhale

nhale

    Advanced Member

  • Members
  • PipPipPip
  • 64 posts
  • LocationHeidelberg, Germany

Posted 24 March 2014 - 08:18 AM

 

a mobile network connection is definitely not required to get a sat fix.

 

I know, I just wanted to say that you should not compare the mobile phone with a standalone GPS receiver, as the mobile phone has additional "support" through the network. I really think that you should try the backup battery and wait until you got a fix, then disconnect and reconnect with the Netduino (backup battery always attached).



#17 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 24 March 2014 - 08:49 AM

I know, I just wanted to say that you should not compare the mobile phone with a standalone GPS receiver,

 

I understand.

But I compare the GPS module powered by battery and not connected to the netduino (which gets a fix after seconds) to the same GPS module connected to the Netduino... which does not get a fix ;)

 

Daniel



#18 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 26 March 2014 - 04:22 PM

we have "oscilloscoped" the Netduino now and there is obviously some ripple. I´ll try to get some screenshots in the next few days.

And I will test the GPS breakout powered by an old Arduino. If it is working with the Arduinio, then the Netduino must be the problem.

 

Daniel



#19 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 26 March 2014 - 10:14 PM

I just received my Adafruit Ultimate GPS today.Based on your experience, I attached a 3.7v LiPo to Vin and Ground, stuck it on a windowsill, and went to have lunch.  By the time I got back, it had a lock. I then moved it to my N2+ and it locked within 30 seconds (location masked because I'm just paranoid):

 

3D-Fix: True, Sattellites: 6, Time: 03/27/2014 22:04:33, Latitude: 4XXX.4XXX,N, Longitude: 09XXX.1XXX,W, Altitude: 290.9,M, Knots: 0.579999983 (1.13215995 km/h)

 

This is with the backup battery installed and the internal antenna only.  I'm using the NmeaGps class from the NetMFToolkit.

 

So far, so good.  Any chance you might have a defective unit?



#20 DanielK

DanielK

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 27 March 2014 - 06:50 AM

thanks, remotewizard.

 

I finally installed this backup battery, powered to GPS using 2 AA batteries, wait until it got a fix, removed the 2 AAs, attached the GPS to the Netduino and.... it´s working now!

But I´m really wondering if it will get a fix if I start the GPS/Netduino combination tomorrow w/o the initial battery powered start or if I start some miles away from it´s current position.

Could you please try to get a sat fix w/o the backup battery installed and with the GPS module Netduino powered only? This would be really interessting.

 

update:

It´s not a fix, it´s a fake!

Once it got a "fix" (at least the LED blinks like it has one) it never ever lost it. If I move the GPS/Netduino into my bathroom (in the middle of the house, not even a window) and power it up there it believes it has a "fix" after a few seconds. But this is impossible! So I guess that with the backup battery installed the GPS module just uses it´s last position and get into a "fix" status although it does not have a fix. The first initial fix I´ve got this morning was just because I powered the GPS with 2 AA batteries (this worked before). When I remove the backup battery and power the GPS from the Netduino it does not get a fix. Never ever.

So it´s basically the same situation: this GPS breakout is NOT working as designe on (my) Netduino.

 

thanks,

Daniel






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.