Hi.
I have found one problem on my project. I need to "completely" turn off and turn on Arduino Uno with the official Wifishield connected, on specific time to save battery.
First of receiving "sleep modes and watchdog" suggestions, let me clarify that this is not going to work for me, because I am using arduino wifishield and this sleep modes does not completely power off wifishiled. And not, incredible but true, there is no way to completely disconnect and turn off wifishield even with the client.stop(); and WiFi.disconnect(); commands.
So I think my last option is to completely cut the power on a specific time programmed on the sketch. I now I can do this with one little switch called "Pololu Power Switch":
So with this switch I have the option to cut the power and completely power off (both -> arduino uno and wifishield).
But what about on turn it on in an specific time?.
I know that this should be a common and frequently question, but surprisingly I do not have found any solution.
So any option or idea (hardware or software) that could solve my problem will be much appreciated.
OK I am not sure i understand this but if i do then no, you cant do it !
If the unit is OFF then is is not able to run any firmware to turn itself back on again.
What you need to be doing is turning the power to the WIFI shield OFF putting the Arduino into sleep mode. You can then use the WDT or some external interrupt to bring it back to life again. You will of course have to get the WIFI card to re-connect etc.
use a second arduino B with watchdog whos only function is to power up the first Arduino A that has the wifishield.
The power up switches on a relay
Arduino A can switch itself of by setting a pin LOW, detected by Arduino B causing the relay to switch off.
This allows the Arduino A also to save all data before switching off.
Another option is to bend the power pins of the wifi shield and put them under explicit control of the Arduino A.
Or if you are wanting to turn the Arduino back on after a fixed amount of time the use a 555 timer as a pulse stretcher triggered from the Arduino to cut the power to the Arduino and WIFI shield until nnn time has elapsed then turn it back on again.
Nothing you do on the Arduino will drop the current down to sub milliamp levels unless you disconnect the Arduino power supply. The Arduino sleep modes reduce the power consumption of the microcontroller itself but don't turn off everything else on the board. So, if you're going to power the whole thing down, you need to design a method to power it back up again.
Probably your best bet would be to use a standalone chip, or a clone designed for minimal power consumption, so that you can just sleep it and get it down to your required power levels, then use a RTC interrupt to wake it up again. You would need to have the Arduino control power to any other devices you're using such as a WiFi card, but you could do that easily enough with a transistor circuit switched on by the Arduino.
Bainesbunch & robtillaart & PeterH, you are almost agree on the approach of first turning the power to the WIFI shield off (with one transistor circuit switched or whatever) and then putting the Arduino into sleep mode (and later resume it from RTC or so).
I like this approach, but after checking the wifishield doc I am not completely sure which are the power pins of the wifi shield that I should bend to put wifishield under control of Arduino. Do you have info or experience about this?.
About controlling the hole thing, to cut all the power supply of the circuit (and recover it later) from one 555timer(???), hardware, circuit, switch, thing... completely independatnt to arduino, and then one timer that connect the power supply again, that is valid for me too.
So any help of where to buy or build this or some tutorial or link in this way would be also appreciated.
Thank you, Your responses are valid for me to start researching
Bainesbunch & robtillaart & PeterH, you are almost agree on the approach of first turning the power to the WIFI shield off (with one transistor circuit switched or whatever) and then putting the Arduino into sleep mode (and later resume it from RTC or so).
I like this approach, but after checking the wifishield doc I am not completely sure which are the power pins of the wifi shield that I should bend to put wifishield under control of Arduino. Do you have info or experience about this?.
About controlling the hole thing, to cut all the power supply of the circuit (and recover it later) from one 555timer(???), hardware, circuit, switch, thing... completely independatnt to arduino, and then one timer that connect the power supply again, that is valid for me too.
So any help of where to buy or build this or some tutorial or link in this way would be also appreciated.
Thank you, Your responses are valid for me to start researching
erlguta:
Bainesbunch & robtillaart & PeterH, you are almost agree on the approach of first turning the power to the WIFI shield off (with one transistor circuit switched or whatever) and then putting the Arduino into sleep mode (and later resume it from RTC or so).
I think you are overlooking the fact that even in sleep mode the standard Arduino boards have a considerable power consumption. If you want to drop the overall current draw to almost nothing you need to provide a way to disconnect power to the Arduino as well. Obviously, reconnecting it afterwards is the trick.
If you use a standalone Arduino or a clone designed for minimal power consumption then you don't have that problem and can leave the Arduino powered up in sleep mode.
erlguta:
Bainesbunch & robtillaart & PeterH, you are almost agree on the approach of first turning the power to the WIFI shield off (with one transistor circuit switched or whatever) and then putting the Arduino into sleep mode (and later resume it from RTC or so).
I think you are overlooking the fact that even in sleep mode the standard Arduino boards have a considerable power consumption. If you want to drop the overall current draw to almost nothing you need to provide a way to disconnect power to the Arduino as well. Obviously, reconnecting it afterwards is the trick.
If you use a standalone Arduino or a clone designed for minimal power consumption then you don't have that problem and can leave the Arduino powered up in sleep mode.
Yes hence my suggestion of a 555 timer to cut the power to the Arduino and then after nnn time reconnect it. the timer being triggered by the Arduino. That way the only thing drawing power is the 555.
erlguta:
Bainesbunch & robtillaart & PeterH, you are almost agree on the approach of first turning the power to the WIFI shield off (with one transistor circuit switched or whatever) and then putting the Arduino into sleep mode (and later resume it from RTC or so).
I think you are overlooking the fact that even in sleep mode the standard Arduino boards have a considerable power consumption. If you want to drop the overall current draw to almost nothing you need to provide a way to disconnect power to the Arduino as well. Obviously, reconnecting it afterwards is the trick.
If you use a standalone Arduino or a clone designed for minimal power consumption then you don't have that problem and can leave the Arduino powered up in sleep mode.
Yes, I know that even in the most power saving sleep mode arduino continue with some considerable power consumption. But, at least it save a lot of battery. The main problem is not with the power consumption of the Arduino, which I know it can go for sleep, the main problem is with the wifishield consumption, which there is no way of power off or go to sleep at all, and his consumption is considerable too.
As for the pin to bend on the WIFI card it is the one marked 5V
Cheers Pete.
Hi Bainesbunch, this is weird. I have disconnected the 5v PIN to not connect to the wifishield and wifishield connects anyway
I also tried to bend both 5v and 3v pins disconnecting then and wifishield have power too
What is giving power to the wifishield to try to bend it and control it from outside?.
Note that leaving an electronic device unpowered while applying voltages to I/O lines can sometimes damage it because it puts a reverse bias on parts of the circuit that aren't designed to take it.
While experimenting I suggest connecting the shield using jumper wires rather than physically bending pins.
Bainesbunch:
it could still be drawing it power through the SPI programming interface or drawing parasitic power from other lines
No success with the wifishield power PINS. I have disconnect 5v SPI programming interface and 5v and 3v arduino PINS and wifishield continues powered on
God knows what PIN or PINS is giving power to it...