wake up arduino pro mini using time

Hello

I am doing a project to send sensor data from one arduino mini pro to another using NRF24L01.

Sensor will activate maximum three times a week. so i don't want to waster power so i will but transmitter in to deep sleep mode and wakeup when sensor is activated and sends data, i have done till here.

Now i want to make another interrupt using timer that arduino should wakeup every 5 hours and sends the transmitter battery status and goes to sleep after sending data. because i am new to this timer concept can some please help me with any example code or some reference links.

Thank you

What "timer" are you talking about? One of the three (or 5) built into the Arduino?

What sleep mode are you using? Some sleep modes disable the timers, so you can't make a timer wake the Arduino, because the timer isn't running.

Hello Paul

Thank you. I am giving battery voltage to analog pin. i want transmitter to send this data every 2 hours once.

What are the options? how can i do this? i am not getting any idea. please help me

What are the options?

Options for what? By far, the simplest solution is to acquire an RTC, with an alarm capability, and set the alarm to fire whenever you want to wake the Arduino up.

If "deep sleep" means power down sleep, the only built-in timer available is the watchdog timer. The longest time frame available is 8 seconds but you can wake up, update a counter and immediately go to sleep again if you want to wait a multiple of these 8 secs.

PaulS:
Options for what? By far, the simplest solution is to acquire an RTC, with an alarm capability, and set the alarm to fire whenever you want to wake the Arduino up.

I don't think RTC is good choice it consumes more power. I need to find some solution. is there any option to make time of delay 1 hour to send analog data message from transmitter to receiver.

I don't think RTC is good choice it consumes more power.

From its own battery, which will last a year or more.

But, fine, struggle along on your own, stuck in your own ways.

I don't think RTC is good choice it consumes more power.

So, it was a bad idea to put an RTC in every personal computer that has been made over the last, oh, 30 years.

Sorry if i was mistaken. Thank you i will try using RTC.

bmg1234:
I don't think RTC is good choice it consumes more power.

More power than what?

It's the normal way of doing it.

But that battery level you want to measure - is that the same battery that powers the Arduino? How do you plan to measure this?

wvmarle:
But that battery level you want to measure - is that the same battery that powers the Arduino? How do you plan to measure this?

Battery will be placed at transmitter side. i want to measure transmitter battery voltage at receiver side.

So you have a sensor that wakes up and takes a measurement once every few days, a measurement that needs to be transmitted.

But you're taking the battery level every five hours, and then transmit that as well. Isn't THAT a massive waste of power? That one transmission easily takes as much battery power as the days sleep in between sensor measurements.

Maybe I'm missing something. The description is pretty vague, really. Images would be very helpful to picture what's really going on.

I'm ignoring the part where you suggest that you measure the battery voltage magically from a distance... because that just totally doesn't make any sense so there must be more to it.

It sounds like you're going to place some sensor at the cap that detects whether it's being opened; make sure you wire it in a way that it's a normally closed circuit, which opens when the cap is unscrewed. That way you can detect whether the wires to the cap are cut.

The normal solution is to hide the battery and the rest of the system - put it in an inaccessible place (e.g. inside the vehicle, and have it trigger like a normal car alarm as well, so by movement or doors opening, before the thief can reach the actual electronics and disable the thing). I remember that it used to be commonplace to have a red LED blinking to indicate a car had an alarm present (sometimes just a blinking LED to pretend it's there), thus preventing thieves from even attempting the theft. Do mark your car as having such a system, it's enough to deter all but the most determined thieves (which would likely just steal the whole vehicle if they can't get to the fuel).

The only way to make sure a battery is there and your device is working is to power up the battery powered device and have it transmit a message. That costs a lot of power.

Not likely a would-be thief will spend the time searching for how to disable a battery when trying to steal your fuel. Even so: stealing fuel won't take long, can't imagine a thief would spend more than 5-10 mins on that, so a once every 5 hour check is far too little. The theft is likely to be completed long before the message is due.

The battery, isn't that the vehicle's main battery?

Because using the vehicle's battery solves all that. You have plenty of power to send a daily message to see the system is up and running, and the driver will be there every three days or so as you mentioned before - and will not miss a dead battery when he's trying to start the vehicle.