Jump to content
43oh

GPS + GSM on MSP430 using Energia


Recommended Posts

Hi!

 

I would like to interface a combined GPS + GSM module to an MSP-EXP430FR5969 using Energia.

 

The aim is at the press of a button/signal, an SMS is sent with the GPS lat/long coordinates at the time of the press.

 

I am planning to use this module (https://tronixlabs.com.au/arduino/shields/3g-shield/adafruit-fona-3g-cellular-breakout-900-and-2100-mhz-for-optus-vodafone-australia/) to connect it all up.

 

I've seen a lot of Arduino examples on this (e.g. using tinyGPS and softwareSerial) but I'm not sure if this same code will work on the MSP430. Will it? How can I go about changing the Arduino set up/pin definitions so that it'll work on the MSP430 using Energia?

 

Thanks in advance :)

 

Link to post
Share on other sites

HI @@anwar1506 and welcome to 43oh...

 

I have used the NEO-6M GPS with the MSP430F5529 using the library that is linked on this page:  https://www.addicore.com/NEO-6M-GPS-p/231.htm

 

If I remember correctly, no modification to the library was necessary.  It would have been with Energia V16 or maybe V17.  Here are the pins, taken from comments I inserted into the code at the time:

   MSP-EXP430F5529 LaunchPad connected to an Addicore NEO-6M GPS Module at 9600 baud.
   
   Connections are as follows:
   NEO-6M      LaunchPad      Comments
   ------      ---------      -------------------------------------------
   VCC         3V3            NEO-6M is a 3.3 V device
   RX          Pin 4          Pin 4 on LaunchPad is TX
   TX          Pin 3          Pin 3 on LaunchPad is RX
   GND         GND
Link to post
Share on other sites

Thanks for the response Fmilburn.

 

With the MSP-EXP430FR5969, is it possible to connect a separate GPS and GSM module via UART to both Rx/Tx on board (layout shown here: http://energia.nu/wordpress/wp-content/uploads/2014/06/MSP430FR5969.jpeg

 

I've looked at the User's guide and although the board has 2 UART interfaces, one of them is called 'Application (or "Backchannel") UART'.

 

If I am unable to use both UARTs on board to communicate, how is it that the combined GPS + GSM module can interface with the micro-controller using just the 1 interface?

 

Thanks!

Link to post
Share on other sites
I've looked at the User's guide and although the board has 2 UART interfaces, one of them is called 'Application (or "Backchannel") UART'.

If I am unable to use both UARTs on board to communicate, how is it that the combined GPS + GSM module can interface with the micro-controller using just the 1 interface?

I am not that familiar with that device but the Energia pin diagram you link to shows  the following:

 

  • Pins 3 and 4 on the left hand LaunchPad header are labelled P2.6 and P2.5 as well as RX(1) and TX(1)
  • The programming header is labelled RXD and TXD.  Looking at the LaunchPad User's Manual these turn out to be P2.1 and 2.0.

There are two UARTS available in hardware:  USCI_A0 and USCI_A1.

 

I haven't tried this on the FR5969 but quoting from the Energia documentation on Serial:

 

Depending on your hardware you may have more than one pair of UART pins. By default, you can use

Link to post
Share on other sites

Thank you, that was helpful!

 

I'm still unsure how I should connect a UART module to the backchannel UART (pins 2.1 and 2.0) . Here's what the board currently looks like: https://postimg.org/image/6wcwjbho3/

 

I am using a micro-USB to computer so the Ez-FET jumpers are all disconnected (although I do have a JTAG debugger if it is necessary to use).

 

Do I remove the RXD and TXD jumpers entirely (or flip them horizontally)? If so, then which pin do I use, the top or the bottom of each RXD/TXD?

 

I have also read that the board uses UART to communicate with the computer. How is it possible then that I can use both UARTs whilst still having it plugged in for coding?

 

Thanks :)

Link to post
Share on other sites

@@anwar1506

 

You may be going about this backwards - start with the application requirements and then pick the microcontroller based on the requirements :)

 

I am an electronic hobbyist so perhaps one of the more learned members will jump in if I get part of this wrong.  There are only two UARTs on the FR5969.  Pins 2.1 and 2.0 connect to the Ez-FET which is a USB to UART bridge that allows both programming of the target microcontroller (in this case the FR5969) and serial communication (in the case of Energia through a window that you open up).

 

If you want to use Pins 2.1 and 2.0 for something other than programming and serial communication then 1) download the firmware as usual over USB using the Ez-FET, 2) remove the USB connection, 3) remove the RXD and TXD jumpers and isolate Ez-FET from the target microcontoller, 4) connect the new device (e.g. GPS) to RXD and TXD on the target side - i.e. FR5969 side, and 5) power back up.  Now the new device can use hardware UART over pins 2.1 and 2.0.

 

Of course you can't use serial over USB to the PC now since the jumpers were removed.  If PC connection is required then you can use software UART (limited to 9600 baud) or select a microcontroller such as the TM4C123 which has plenty of UART peripherals available. 

Link to post
Share on other sites

you can have a look at an older project of mine here:

 

https://github.com/rodan/tracy

 

all the code is interrupt driven, no blocking calls, two different uarts are used. and it works nicely as an always-online tracker, it has more than an year uptime mounted on my motorcycle.

Link to post
Share on other sites

Hi again all!

 

I currently have the FONA 3g GPS + GSM module (linked in first first post) so that I can use both over the one UART connection.

 

However, I can't get it to work :( My current connection is FONA Tx -> MSP Rx (P2.6)

                                                                               FONA Rx -> MSP Tx (P2.5)

                                                                               FONA Gnd -> MSP GNS (P20)

                                                                               FONA Vio -> MSP 5V Vcc (P1)

 

 

 

I can upload the empty File -> New code and get the Serial monitor open (on COM5). I was expecting the GPS NMEA data to stream in but it is empty at every baud rate.

 

Is there any basic test code to check if it is plugged in correctly and get some GPS data in?

 

Thanks!

Link to post
Share on other sites
  • 5 months later...
On 12/7/2016 at 7:13 PM, Fmilburn said:

HI @@anwar1506 and welcome to 43oh...

 

I have used the NEO-6M GPS with the MSP430F5529 using the library that is linked on this page:  https://www.addicore.com/NEO-6M-GPS-p/231.htm

 

If I remember correctly, no modification to the library was necessary.  It would have been with Energia V16 or maybe V17.  Here are the pins, taken from comments I inserted into the code at the time:


   MSP-EXP430F5529 LaunchPad connected to an Addicore NEO-6M GPS Module at 9600 baud.
   
   Connections are as follows:
   NEO-6M      LaunchPad      Comments
   ------      ---------      -------------------------------------------
   VCC         3V3            NEO-6M is a 3.3 V device
   RX          Pin 4          Pin 4 on LaunchPad is TX
   TX          Pin 3          Pin 3 on LaunchPad is RX
   GND         GND

I have the same LP with different GPS (SparkFun Venus GPS logger) that uses same pins.. I used TinyGPS++ Library from Github but no luck.. we get data printed out but zeros every where.. any idea why? 

Link to post
Share on other sites
3 hours ago, adalloul said:

I have the same LP with different GPS (SparkFun Venus GPS logger) that uses same pins.. I used TinyGPS++ Library from Github but no luck.. we get data printed out but zeros every where.. any idea why? 

It works now.. but We need to find a way were we have a software serial Bus for camera and gps

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...