background preloader

Lab3 - Laboratory for Experimental Computer Science

Lab3 - Laboratory for Experimental Computer Science
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. Nightingale Example Source Code

http://interface.khm.de/index.php/lab/experiments/sleep_watchdog_battery/

Related:  Raspberry Pi - Projects 1Arduino programmingcapteur temperature raspberry arduino

Introduction to pulse counting Reading pulses from meters with pulse outputs. Last updated: November 2010 Authors: Glyn Hudson, Trystan Lea A note on what this document covers The main thing that's being added here to the wealth of information on the internet about pulse counting is how to count pulses from more than two pulse outputs sources (up to 12 sources) using a continuos sampling and direct port manipulation Arduino sketch as opposed to interrupt driven counting. In the case of counting pulses from one or two pulse output meters it is best to use the interrupt method.

Low power ATmega/tiny with watchdog timer At work recently, the pranks have been escalating. I’ve decided that for my next salvo, I’m going to build the most annoying beeping device I can. I’m using an ATtiny45/85 chip, programmed using the Arduino development environment. The clone army grows The device is intended to be planted somewhere near the target’s desk, and will just beep (or make some other annoying sound), every 5-8 minutes. arduino meets processing - PUSHBUTTON The Arduino meets Processing project intends to make it as easy as possible for anyone to explore the world of physical computing. All you need is an Arduino board as well as the Arduino and Processing software, which you can download on their project websites. On this website we explain how to:

High-Low Tech – Programming an ATtiny w/ Arduino 1.0 This tutorial shows you how to program an ATtiny45, ATtiny85, ATtiny44 or ATtiny84 microcontroller using the Arduino software. These are small, cheap ($2-3) microcontrollers that are convenient for running simple programs. The ATtiny45 and ATtiny85 have eight legs and are almost identical, except that the ATtiny85 has twice the memory of the ATtiny45 and can therefore hold more complex programs. The ATtiny44 and ATtiny84 have 14-legs and more inputs and outputs. Thanks to Mark Sproul for his work on making the Arduino core portable across processors. OneWire in Due Hi Kcore. Thank you for your time testing. Ok, those are good news! Interrup based pulse counting with sleep mode This sketch detects pulses and prints to serial the character P. In order to reduce the power consumption the Atmega 328 is put into sleep mode in-between pulses. The interrupt pulse input (on digital input pin 2 or 3) is used to wake up the device. Unfortunately a value for power cant be calculated as the timers are off in sleep mode.

Adventures in Low Power Land - SparkFun Electronics Skill Level: Intermediate by Nate | August 09, 2011 | 32 comments I was working on a project called BigTime where low power operation was a necessity. Here's a tutorial to show you some of the tricks I found to get the power consumption down to about 1uA (that's micro, not milli = 0.000001A). I'm pretty sure rubbing your fingers together produces more heat energy than 1 microamp. My overall goal was to get an ATmega328 to go to the deepest sleep possible, waking up only with an external INT button interrupt or with a 32.768kHz TMR2 overflow interrupt (for an RTC). Interrupt based Pulse Counter Interrupt based Pulse Counter Arduino sketch example for interrupt based pulse counting: //Number of pulses, used to measure energy. long pulseCount = 0; //Used to measure power.unsigned long pulseTime,lastTime;

Notes on putting Arduino to sleep I’ve been challenged recently with the need to minimize the power drain on my battery-powered Arduino project. It seems I’m not alone and I found a bunch of great ideas on the web, and the solution I settled on involves the use of the AVR watchdog timer, and AVR sleep mode. The functions needed are available if you include the following header files in your Arduino code: #include <avr/sleep.h> and #include <avr/wdt.h>

Related: