• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GPS Sticky
#1
Hi all,
When I turn on OpenCPN after a few hours of inactivity, the GPS icon in the upper right says there isn't GPS NMEA data coming in. A check in of the NMEA debug confirms this.

If I start OpenPlotter and do diagnostics on the GPS USB port, I can see the data streaming from the device. I then close the diagnostic window, and the data starts appearing in OpenCPN. 

Any thoughts on how I might get the GPS data to be more consistent?
  Reply
#2
(02-14-2018, 10:56 AM)abarrow Wrote: Hi all,
When I turn on OpenCPN after a few hours of inactivity, the GPS icon in the upper right says there isn't GPS NMEA data coming in. A check in of the NMEA debug confirms this.

If I start OpenPlotter and do diagnostics on the GPS USB port, I can see the data streaming from the device. I then close the diagnostic window, and the data starts appearing in OpenCPN. 

Any thoughts on how I might get the GPS data to be more consistent?

What kind of GPS is it and what kind of computer is it hooked up to? 

I've always had problems with USB GPS's One I had would hang up on me like that whenever by tablet's backlight would dim for power saving. I replaced it with another and that one would hang up every other time I started my outboard. It's not the GPS itself that is the problem by the USB converter chip both of which were PL2303 devices. Since I went to GPS modules connected to an Arduino (And using an active external antenna)  and used it's USB output the problem went away completely. Those converters seem to be susceptible to noise induced into the cable so sometimes rerouting the cable away from power lines or other cables can help
  Reply
#3
Thanks. It's a generic USB GPS puck plugged into my Raspberry PI.

The idea that it might be going to sleep is interesting - I'll have a look at the logs to see if there is anything there. Perhaps I can set up some sort of CRON job that will wake it up on a regular basis.
  Reply
#4
Another thing to check is your power supply to the Pi especially if it is a Pi 3. If it draws a lot of power for some reason such as CPU load then it can starve the USB power and cause the voltage to sag. you need a really clean stable source that can provide a minimum 3 amps because most are switching regulators and when you start hitting 75% of their rated power the output can look like everything but DC and will have a lot of AC noise or switching spikes on it that can cause all sorts of weird problems and glitches

I built one of these for my boat
https://www.amazon.com/Handheld-Pocket-s...oscope+kit
And although it doesn't have a very high bandwidth it does have enough for check for noise on DC power lines as well as checking NMEA 0183 and NMEA 2000 data lines and other things a multimeter just can't do .... I'm an Electrical Engineer and have "real" o-scopes but for the price you really can't beat this device. I would have loved having something like that 40+ years ago when I was starting out in electronics. For the folks that aren't handy for a little bit more you can buy one that's already assembled but if you even have the most basic of soldering skills this kit is easy to do and I have helped kids as young as 12 put them together in a Mentoring Program I'm part of
  Reply
#5
Thanks. Also an Electrical Engineer and I have one of those little DSO202 handheld scopes. There's nothing like a good scope to really find out what is going on. Good idea to have a look at power - I'm using one of those little 3-amp buck converters, but I guess you never know!
  Reply
#6
I got a couple of the sealed 3 amp units (Mine says CPT on it) but I haven't had a chance to characterize and test them yet. However I do know that the little LM2596 based open modules that claim to be 3 amps will start crapping out at about 2 amps because they don't have copper ground plane to adequately sink the heat at much over 2 amps and they start crapping out and the output gets really ugly. I have been able to get them to work a bit over 2.5 amps with thermally conductive adhesive and a small heatsink on the bottom side.  Before I added the heatsink my windows tablet would slowly discharge even though it is only rated at 2 amps but after it could keep up. It also couldn't keep up with a Raspi 3 with a 5" touchscreen LCD and a webcam that I had on one of my 3D printers.

Also on my Raspis for embedded designs I've been using 20 gauge silicone wire and tacking it directly to the PCB under the USB port and using liquid black tape to insulate it and provide some strain relief. USB power cables are always a crap shoot and even the best only use 22 gauge for the power leads. It also allows me to use a little circuit for foolproof shutdown using a DPDT slide switch, a GP transistor, a relay, diode and a couple of resistors without having to butcher a USB cable
  Reply
#7
Thanks for that. I got one of these 10 amp converters

https://www.amazon.com/EPBOWPT-Converter...B01M03288J

Looks like I'm changing out my power supply circuit!
  Reply
#8
abarrow
i have the same power supply in your link.and have the same problem as you + i need to restart i2c and 1w to get them to show on sk diag.after reboot.
i am thinking it could be the mini usb "power"cable i am going to try to solder wires to the pads under the usb socket with better wire than what the usb cable has.
give it a bigger straw to drink through
when i use the hdmi monitor it shows the power bolt thingy sometimes ..
i will post the results when i get around to doing the soldering on the board..
  Reply
#9
Sounds to me like a classic case of a 'dirty' output from a switching converter/regulator. However it might be fixed or at least lessened by adding some additional filtering at the output of the converter and a little more at the Raspi ..... When i come across seemingly random glitches in a device and it uses a switching rather than a linear supply thats the first thing I start looking at. That's why I suggested using an o-scope in the AC coupled mode to look at the output while under load. A lot of them use a switching frequency of around 100 - 200 kHz. Some of the newer chips use higher frequencies into the low Mhz but those usually aren't as much of a problem which is why they went to the higher frequency because it makes the filtering easier and the components smaller and more SMD friendly
  Reply
#10
(03-12-2018, 08:14 AM)jim321 Wrote: abarrow
i have the same power supply in your link.and have the same problem as you + i need to restart i2c and 1w to get them to show on sk diag.after reboot.
i am thinking it could be the mini usb "power"cable i am going to try to solder wires to the pads under the usb socket with better wire than what the usb cable has.
give it a bigger straw to drink through
when i use the hdmi monitor it shows the power bolt thingy sometimes ..
i will post the results when i get around to doing the soldering on the board..

Did you ever get around to doing this? I've done similar on a couple of Raspi projects for Retropie using 20 ga. silicone wire for the power and it does seem to make a difference. Also on the Raspi 3 you can up the available current to the USB ports to 1.2 amp from the 600 mA it normally supplies by adding the line " max_usb_current=1 " to the /boot/config.txt file which can be done from Windows using Notepad++ . I know guys building weather stations with a lot of inputs have used that successfully but I believe it only works with the Raspi 3
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)