Author Topic: Digispark to relay NMEA GPS data ?  (Read 4303 times)

tph_dk

  • Newbie
  • *
  • Posts: 2
Digispark to relay NMEA GPS data ?
« on: January 21, 2016, 04:39:48 pm »
Hi all,

I have just stated in the digispark-world, and is wondering about the performance I may expect from using SoftSerial on the digispark for a project on my small sailboat:

I want to use the digispark to tap into (i.e. receive, not transmit) NMEA sentences at a "high" speed (38400 baud), select lines from my GPS, and retransmit only those lines at a low speed (4800baud). In case of overflow, I plan to silently flush the excess data, so that the GPS data transmitted is current. It is for use on a sailboat, so the speed over ground will not be very high - so e.g. a GPS point every second or so would suffice! The digispark will only "grep" for the gps data and retransmit it - not make any other manipulation.

So I plan to use two instances of SoftSerial at the two speeds - but only using RX from the high speed line and TX from the low speed line. Do you think this can be made to work? In this case, the NMEA connection is a RS232 serial link, so I believe that I need to use a RS232<->TTL converter - at least for the TX-side (I expect that a voltage divider is enough on the RX-side?) ?

Background info: The reason for all of this is to get my DSC VHF radio to have the current position from the chart plotter, so that the distress function will work - while also being able to show AIS targets on the plotter.

Thanks in advance!
Theis

softweyr

  • Newbie
  • *
  • Posts: 1
Re: Digispark to relay NMEA GPS data ?
« Reply #1 on: July 19, 2016, 12:29:38 pm »
It seems like you might be better off with a small computer that has two functional serial ports, so you can just turn it into a "lump" in the cable between the chart plotter and the radio.  The DigiSpark Pro has a single UART, on pins PA0 and PA1.  You could also use one or more devices like the MAX3107, a serial UART that interfaces via I2C or high-speed SPI, stacking a pair of connectors on top of a Spark.

If you're not up to the hardware design yourself, you might want to toss it out to the community.  A serial shield for the Spark or Pro might be of interest to quite a few people.

tph_dk

  • Newbie
  • *
  • Posts: 2
Re: Digispark to relay NMEA GPS data ?
« Reply #2 on: August 17, 2016, 01:22:07 pm »
Sorry for my very late reply - and thank you for your input. I have just recently had the chance to try out my idea - however, for ease of debugging, I used an Arduino Uno-clone - but still using two instances of softserial, set at the two speeds. It appears to work fine, even at TTL voltages (i.e. no MAX232 driver).
I have not yet had the chance to test with a digispark.

Thanks again,
Theis