Arduino Pro Mini + OpenLog + GPS

Hi guys,

this is the first time I meet Arduino for a project and for sure 'll need some help & tips from yours in order to achieve my goal to create a little gps logger.

I need to create a very little logger so I thought to use an Arduino Pro Mini 5v with ATMega328 (connected to a 9v battery).

The data will be logged on a miniSD connected to OpenLog and all the data will came from a high sampling rate GPS (I think 'll use the one provided by diydrones a MediaTeck MTK3329 + Basic Adapter.

All the data operations will be driven by a FTDI Basic Breakout 5v

The first question I can raise myself is: is Arduino Mini Pro powerful enough to handle this setup?

And now as far as I have understood OpenLog has a native structure that allow me to install it with some pins on the left side of AMP, but now 'll have to install also the GPS that has GND, 5v, TX, RX and EN.

Where have I to attach these? GND and 5v aren't a problem, but TX and RX? Have I to attach them to the same TX0 and RX1 I used for the OpenLog?

I know that these are n00bish question but you know this is the first time I start experiencing a little work with eletronics :-X

Thank you in advance for any tipo :)

The first question I can raise myself is: is Arduino Mini Pro powerful enough to handle this setup?

The first question that you should ask yourself is whether that wimpy little 9V battery will power the Arduino, the GPS, and the SD card. The first answer you should tell yourself is NO.

is Arduino Mini Pro powerful enough to handle this setup?

It is capable. It only has one hardware serial port, so either the GPS or the OpenLog will need to be communicated with using NewSoftSerial, and any two other I/O pins.

Thank you in advance for any tipo

I think you have enough typos already.

tnx PaulS, yeah I know I should pay more attention in writing :) let's hope not to type any typo again ;D btw tipo was a "keyboard typo" of tips.

btw as far as i have understood using NewSoftSerial I should be able to map tx/rx to virtual tx/rx ports and so I can connect OpenLog & GPS to the same AMP, prob looking at the source snippet provided with the GPS 'll have, at least, to tune its own library in order to move all the reference to Serial port to a virtual one, isn't it?

dealing with the 9v battery problem for sure is better for me to read suggestions about this, 'm not so much expert in these things... do you think a 4AA battery pack is better? as far as i have understood in terms of amps it seems so...

do you think a 4AA battery pack is better?

Much better.

so I can connect OpenLog & GPS to the same AMP

???

You can connect the OpenLog and GPS to the same Arduino, using different serial ports - one hardware, one software. I'd try to have OpenLog use the software port, since it is output oriented.

yes, but I was thinking about to use two software ports for GPS & OpenLog and keep the hardware one for FTDI Basic Breakout.

I was advised not to use soft serial for a situation where input might start coming in on one port while I was writing to another. I followed that advice, so I cannot say for sure whether I would have missed incoming characters or not. I am reading a GPS with soft serial (actually NewSoftSerial) and writing to an xBee on the hardware serial port. I just have to pull the xBee from the socket to use FTDI to program the Pro Mini.

You can use the hardware serial port in operation and still have it for FTDI when you need to program the flash. Just have jumpers on RX and TX to your device or devices (if you only read from GPS and only write to OpenLog, you can set them to the same baud rate and share the port) and pull the jumpers when you need to program it. Makes diagnostics a pain, but for a simple data logger the development should not be that bad.

tnx arbarnhart for your suggestions, atm I was thinking to deal with this situation in a way like this:

void loop(){

if(GPS.available() && GPS.NewData==0)
{
    GPS.Read();
    // now GPS.NewData is different from 0
}

if(openLog.available() && GPS.NewData !=0)
{
   openLog.print("GPS Data");
   GPS.NewData=0;
   //etc etc 
}
}

do you think I risk anything acting in this way?

Initially I prefer to keep the hw serial only for FTDI also because 'll give 5v to AMP through that source (then as soon as the code is bug-free 'll move to a 4AA pack) 'll do this also because it's my first time playing with arduino and I prefer to keep the circuit as simple and clean as I can ;D Btw in further test 'll try for sure to act also in that way, but I need for sure a little more xp 8-)

Are you going to use TinyGPS to parse the GPS data or just log everything you receive? The reason I ask is that if you do that you are far more likely to get complete packets if all you are doing is buffering them (that is what the encode function in TinyGPS does most of the time) until you have the full NMEA sentence.

Your pseudocode (I assume) is a bit off - you don't need to check for available() to write to a device.

Your pseudocode (I assume) is a bit off - you don't need to check for available() to write to a device.

I agree with you I have just noticed that the lock is relative to read and not to trasmit, so I can use directly a pseudo-code like this:

void loop(){

if(GPS.available() && GPS.NewData==0)
{
    GPS.Read();
    // now GPS.NewData is different from 0
}

if(GPS.NewData !=0)
{
   openLog.print("GPS Data");
   GPS.NewData=0;
   //etc etc
}
}

Are you going to use TinyGPS to parse the GPS data or just log everything you receive? The reason I ask is that if you do that you are far more likely to get complete packets if all you are doing is buffering them (that is what the encode function in TinyGPS does most of the time) until you have the full NMEA sentence.

Nope I'm going to use a dedicated lib made for that gps (Ublox GPS library for Arduino), I have just tuned it a little in order to use NSS instead of connecting directly to Serial as it was coded originally.