I have a TS-7800 ARM9 board from Technologic Systems that I would like to add an internal rs-232 GPS to. My end-game is to be able to poll the NMEA sentences to perform time synchronization and occaisional location queries.
I am new to SBC’s and am confused about the connectivty between the GPS and the board. What do I need to make this happen? My board has several rs-232 connectors as seen here:
Do the GPS modules come with connectors that will interface with the board and if so how? How would a GPS module be mounted to the board? I realize that a GPS antenna will also need to be connected but I understand that part.
Actually, it’s fairly simple. The problem is two fold; mechanical and electrical. I’d consider mounting the SBC to an aluminum plate for stability. The GPS module could be mounted next to the board and a short interface harness could be fabricated. You can get aluminum in a wide assortment of sizes and thicknesses from McMaster-Carr (www.mcmaster.com).
The electrical interface is the potentially tricky part. Most GPS modules use ‘logic level’ serial interfaces, not RS-232 serial interfaces. The difference between the two is the voltage levels that the GPS module will output (Logic: 0 to +3.3/5V or RS232: -12 to +12V). If you use a GPS module with a logic level interface, it’s likely that the SBC has logic level serial as well and you can make a direct connection (GPS Tx to SBC Rx). There are logic-to-RS232 converter chips available if there is an incompatibility. The point is that you need to know what the interface spec. is for both the GPS and the SBC and connect them accordingly.
Once you’ve got the two units connected and ‘talking’, you’ll need to write some software to receive the GPS data. Take a look at the ‘NMEA’ interface spec. to learn the format of the GPS output data. If you want primarily time synchronization, the $GPRMC ‘sentence’ will suffice. An interrupt driven serial receive routine that looks for the ‘$’ start character, and CR/LF end characters, and stuffs everything in between in your Rx buffer is the way to go!
I’ve got a lot of experience with the EM-406, so that is what I would recommend to get you going!
I had some time this morning, so I checked the technical specs. for the board you show. It has a boodle (this is a highly technical term, BTW!) of serial ports with both RS232 and TTL I/O levels. Thus, you should be able to find a GPS module that can be directly connected to that board.
While reviewing the specs., I was struck by the power/capability of that board. It sure seems like overkill to me for a time synchronization project… I just completed a project that I use to synchronize the real time clock of my home automation system. It’s a EM-406 GPS module, a PIC16F648A processor, and an 8X2 LCD. The board outputs a time string to my HA controller once per day to keep the time in sync.
What exactly do you want to do? It’s possible that you can do it with simpler/cheaper hardware!
The board is already doing a number of different things–I’d just like to add GPS-capability to it’s overall functionality.
When you say that I can directly connect a GPS module to the board, do you mean that I will not have to fabricate a cable to do so? Where would a device like the EM-406 be physically attached to the board and how would it derive power? Would the GPS then show up under /dev/ as a serial port on a Linux OS? I apologize for the simple questions but I am new to SBCs in general.
There probably isn’t a good way to mount the GPS module directly on the SBC. You might find a flat area that you could attach it with double-sided tape, but mounting it alongside the SBC on an aluminum plate or in an enclosure would be preferable.
Yes, you’ll need to make up an interface cable. At a minimum you’ll need 4 signals: Vcc (+3.3V or 5V depending on your GPS module), GND, Tx Data (from the GPS to the SBC), and Rx Data (from the SBC to the GPS). All these signals are available on headers found on the SBC board.
The GPS itself is not a COM port. It’s a serial device that connects to an existing COM port on the SBC. The SBC OS should already be ‘aware’ of this COM port. Your job will be to write some software to receive, and parse the data being transmitted by the GPS module.
BTW, most GPS modules will output a continuous stream of data as soon as they are powered up. A once-per-second transmission is fairly common. The data stream (or streams) contains time data, position data, heading data, velocity data, etc. depending on the stream (NMEA sentence) being transmitted.
This is a fairly ambitious project for a beginner, but it’s doable if you do a bit of self-study (the NMEA spec., the GPS module and SBC datasheets, etc.), and ask the right questions!
I’m trying to do something similar so Ive been reading about this.
As I am gathering, the NMEA or binary format sentences are only half of a two piece puzzle if you want a precise time source…
Since its not hard, why not devote te extra effort to making it a stratum 1 level accurate time reference clock, which means taking the extra time to also route the 1PPS signal to an input on the PC that can be used to capture it.
Rather than repeat my posting there, look at the links in another post here about 1PPS.
I just joined the board - but if this one is approved, that one probably will be by then too- if you are reading this one!