LusoRobótica - Robótica em Português

Robótica => Tutoriais => Tópico iniciado por: XEE em 22 de Agosto de 2009, 20:28

Título: [Arduino] Reduzir consumo do Arduino
Enviado por: XEE em 22 de Agosto de 2009, 20:28
Não foi um tuturial feito por mim, mas penso que está seja a melhor categoria para a informação.


(https://lusorobotica.com/proxy.php?request=http%3A%2F%2Fimg.skitch.com%2F20090822-pm48i36f7yjuj77tt7mu25r4u5.jpg&hash=fd374dbba9d83e2f1fe9a6280240384126a89de8)

Watchdog and Sleep functions

This example shows how to make use of the Watchdog and Sleep functions provided by the ATMEGA 168 chip . These functions are useful if you want to build  low power consuming devices operated by battery or solar power.

The reduced power consumption is achieved by through a  intermittent  operation of the system .In case of Arduino your main loop will be  executed once before  the system is  put into the sleep mode. After a few seconds t the watchdog wakes the system up  and the main loop is executed again. The ratio between main loop execution time and watchdog time determines the amount of power that will  be saved.

When we assume that the time to  measure a sensor and making  some decisions will take 10 millisecond and the watchdog is set to 8 seconds the on/off ratio is 800 which extends the battery live time by this factor.


Battery live time calculation

Now we want to know long we can operate our device with standard alkaline AA Cells. These Cells even the cheap ones provide between 2000 ad 3000 milliamps per hour (mA/h). We assume our system takes 20 mA when operating and 0.05 mA when sleeping.

In normal operation with a current of 20mA  the battery will last 2000/20 = 100 hours or about  4 days.
In intermittent operation with a factor of 800 the operating current is reduced to 20mA/800 = 0.025mA plus the current that is drawn in sleep mode 0.05mA.
Now with 2000/(0,025+0,05)  we come to 27000 hours lifetime which is about 3 years.





Basicamente o codigo mete o arduino em sleep por 8segundos ao fim de cada execução do loop, permitindo um aumento signficativo na duração na duração da bateria, claro que tambem vai depender de projecto para projecto.

Ainda não vi o codigo todo, mas penso que seja possivel mudar o valor dos 8seg para mais. Já que no ficheiro pde de exemplo os 8seg é o valor maximo.

E ainda têm no site, o esquema do mini-Arduino usado pelo autor.
Com o Arduino "normal" já não vale muito usar estas funções porque o regulador de tensão que vem nas board's usa cerca de 10mA em idle.


Site:
Lab3 - Laboratory for Experimental Computer Science (http://interface.khm.de/index.php/lab/experiments/sleep_watchdog_battery/)
Arduino.cc (http://www.arduino.cc/playground/Learning/ArduinoSleepCode)
Título: Re:[Arduino] Reduzir consumo do Arduino
Enviado por: TigPT em 23 de Agosto de 2009, 01:45
Muito interessante, obrigado por partilhares ;)
Título: Re:[Arduino] Reduzir consumo do Arduino
Enviado por: kast em 23 de Agosto de 2009, 10:22
oi pessoal

Eu preciso de saber como é possível limitar o arduino para consumir o mínimo de energia possível.
No projecto que estou a fazer (Smartracker) preciso que o arduino se coloque em modo sleep de hora a hora e que fique 5 minutos ligado. Para além do arduino preciso que 2 aparelhos também fiquem desligados (talvez com relés).

Alguém me ajuda com isto ?

kast