Here is the sketch, please excuse the mess I am purely prototyping at the moment.
Some notes, I am using the breadboard setup that Nick has on his site: http://www.gammon.com.au/images/Arduino/Minimal_Arduino1.jpg
with a 328P that has been re-flashed to run at 8mhz lillypad style.
The gps I am using is the adafruit ultimate gps breakout.
The code essentially runs the following:
Arduino starts up and attempts a GPS fix, which counts through to 2 minutes. If no GPS fix then the arduino sleeps into power down mode and the GPS is turned off via its enable pin. If a fix is found within the 2 minutes then the sleep is initiated earlier.
The code is:http://pastebin.com/xpGhfYs2
I have highlighted in the code above where the command (line 74.. message length was too long for post so had to put this on pastebin) is called to start the serial (it has been uncommented along with all of the serial.print lines whilst I have been measuring current draw). With the code as above during sleep I can get 0.7mA as expected. However if I uncomment the serial.begin line and the corresponding serial.print lines later on it seems to run much higher as shown below.
The following consumption readings have been measured:
barebones as lilly running 8mhz:
arduino awake = 11.6mA
arduino sleep = 0.3mA
arduino + gps (aquiring fix) = 49 - 57mA Note: Seems quite high as GPS aquiring fix is only around 20-25mA from data sheet
arduino + gps + sleep = 37mA // figures incorrect serial.begin adds in another 20ma atleast?! GPS is definitely asleep as tested without GPS breakout on board
arduino + gps + sleep + gps disabled + no serial.begin = 0.7ma sleep and 20mA wake[/li][/list]
On the 3rd test case you can see I noted that it seems quite high consumption. I would have expected 30mA approx but something was pushing nearly another 30mA on top of this.
On the 4th test whilst everything was asleep I noticed a draw of still 37mA.. I even disconnected the GPS and still had over 30mA being pulled.
On the 5th test I commented out all of the serial.begin and print code and everything worked as I would have expted.
Conclusion was that the serial.begin was causing the issue?