Pages: [1]   Go Down
Author Topic: Time based output  (Read 420 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello!

I'm trying to build a low power gps module with an update rate which is user set. For example, I want to be able to set the update rate to every 15 minutes, 8 minutes, 5 minutes and every minute. When the GPS-location doesnt need to be updated I want the arduino to go into a sleep mode for power saving. Most sleep modes need an interrupt to come out of the sleep mode.
Preferably I want to do this with a timer on the side. I want to be able to set the timer to the user defined countdown time. After the timer has reached 0, I want the (clock)module to sent a pulse to the interrupt pin on an Uno to come out of the sleep mode and get a GPS location.
Ive been looking around the find a solution for this, however I havent found one. I hope someone here can help me out, all help and suggestions are welcome!

Thanks in advance.

Leo
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8648
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Running the Arduino for a few microseconds every second shouldn't increase the power requirement much.  If your GPS provides a "Pulse Per Second" output you could use that to wake the CPU.  Count off the time and if its not time to take a reading, go back to sleep.

If you want an external chip, many RTC chips have alarm-clock outputs.  You can set the alarm for some time in the future and use the alarm signal to trigger and interrupt.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Global Moderator
Offline Offline
Brattain Member
*****
Karma: 473
Posts: 18695
Lua rocks!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

http://www.gammon.com.au/power


A simple solution is to use the watchdog timer to wake you every 8 seconds. Count those up as appropriate to get your desired interval (eg. a minute would be 7 lots of 8 seconds plus one of 4).

You may (probably) want to use a MOSFET to turn the power to the GPS on and off as required.
Logged

Poole, Dorset, UK
Offline Offline
Edison Member
*
Karma: 50
Posts: 2194
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

There are a number of different was of making an Arduino "sleep" take a look in the datasheet!.

Mark
Logged

Pages: [1]   Go Up
Jump to: