background preloader

Low power ATmega/tiny with watchdog timer

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. Three primary factors influenced the design of this, in this order: Low power consumptionInexpensiveSmall size It’s likely to take the subject days, if not weeks, to find it at that rate, so the battery needs to last for at least a few weeks. As I intend to make around 10 of these devices, keeping the cost down was important. Making this as small as possible was quite a challenge, but in the end, the largest parts were the battery and battery holder. Putting the chip to sleep when it’s idle. 1. Putting the chip to sleep is pretty easy: But then you need some way to wake it up. 2. 3. 4. Related:  Raspberry Pi - Projects 1Arduino-low powerBattery etc

Raspberry PI ~ 18 : Construire une sonde de température radio pour 7€ | IdleBlog Ce post est le dix-huitième d’une liste de tutoriels sur le raspberry PI, cliquez ici pour accéder au sommaire ! Faire du on/off c’est bien ! Mais contrôler sa maison en disposant d’indicateurs c’est mieux ! Aussi allons-nous voir, pour changer, comment construire un petit capteur qui va transmettre une information de température par radio au Raspberry PI. Si comme moi, vous vous interrogez sur l’intérêt de connaître la température d’une pièce en temps réel, je trouve personnellement qu’il n’y en a aucun, en revanche cela peut être très utile pour le Raspberry PI, qui pourra par exemple en dessous d’une certaine température, enclencher les radiateurs, on appelle ça des scénarios (on en reparlera dans un prochaine tuto) pour le moment, contentons-nous de récupérer l’information via une interface web et via notre interface vocale Yuri. Avant tout, le traditionnel quart d’heure de honte en vidéo : (Le charisme d’une truite avec un double menton, un acteur né je vous dis !!) Le principe

LowPower - QED From QED < CEE474(Link to this page as CEE474/LowPower) Low Power Cookbook get the sketch for this here: This page is all about reducing power consuption of the AVR microcontrollers. Atmel resources, such as datasheets and application notes and picoPower videos The AVR libc library reference, specifically on avr/power.h, avr/sleep.h and avr/interrupt.h Dean Camera's great guides to Timers and Interrupts. No one of these is my favorite, they all give some great details. Turning off parts of the chip you're not using Theory The datasheet offers the following Power Reduction Register: from avr/power.h, a variety of functions you can use if you #include avr/power.h to manipulate the bits in PRR: Note that because the timers may be used in defining interrupts (see below), only turn off the timers that won't be used! In addition, there remain some other ADC functions you can turn off that are not accessed in power.h. Setting pins

<avr/power.h>: Power Reduction Management 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

How to Run an Arduino for Years on a Battery If you found this article after doing a search on Google, welcome! On this website you will find plenty of content around DIY home automation using open-source hardware. Enjoy the article! For most of the Arduino tutorials you will find on this website, power is usually not an issue as the Arduino is powered by the USB cable coming from the computer. For example, you want to power the wireless motion detector just by using a set of batteries. The first thing we need is to build our own Arduino system with just the minimal set of components. Hardware & Software Requirements You need several components to build you own Arduino system. In a previous project I used a FTDI breakout board to program the Arduino chip directly on the breadboard. To power the Arduino, you will need a battery. You will also need several components around the chip. Finally, you will need a breadboard and some jumper wires. This is the list of the components that were used in this article: Hardware Configuration

Sleeping Arduino - Part 5 Wake Up Via The Watchdog Timer OverviewWelcome to the fifth and final part of the "Sleeping Arduino" series, where we will cover how to wake the Arduino from sleep mode using the Watchdog Timer (WDT). When waking your Arduino from sleep, you could use one of the standard internal timers of an Arduino as I have detailed in Part 4, but if you are looking for the maximum sleep time and/or minimum sleep power consumption, you have the use the WDT;As I have mentioned in this table, the WDT can give us a sleep time of 8 seconds, whereas the 'longest' 8/18bit timer will only give us a sleep time of ~4 seconds.Watchdog Timer (WDT)The Watchdog Timer on the Arduino's microprocessor only has one source to drive it: it's own separate internal 128kHz oscillator (as opposed to the 8/16bit internal timers, which can use either the 16Mhz system clock or an external clock). The WDT also has a prescaler, which is used to configure the timeout period. It supports timeout periods from 16ms to 8 seconds: All parts of this series:

HomePi – Test 01 – Lire une sonde avec l’arduino et communiquer avec le RaspberryPi Bonjour à vous chers lecteurs geeks et moins geeks. Je continue mes travaux sur le Raspberry Pi et l’Arduino afin de créer un système domotique complet (HomePi). Aujourd’hui, nous allons voir comment lire avec l’Arduino une sonde de température DS18B20 (voir le tutoriel pour la lire avec le Raspi ici), puis de l’envoyer via un émetteur radio de 433Mhz vers le Raspberry Pi doté lui d’un récepteur radio de 433Mhz. Ce tutoriel risque d’être un peu long, mais je vais essayer de détailler chaque étape autant que possible (mais n’hésitez pas si vous avez des questions). Ce tutoriel est inspiré et basé sur les tutoriels d’Idleman, donc n’hésitez pas à y faire un tour. Les buts de ce tutoriel sont les suivants : Commencer à prendre en main l’arduino (reçu il y a peu)Étudier la communication radio entre les 2 deux appareilsÉtudier la faisabilité de mon projet (HomePi), notamment la partie communication avec les nœuds. Pour ce tutoriel, il vous faudra le matériel suivant : Étape 0 : pré-requis Voila. .

Arduino AtMega328p low power consumption » disk91.com – technology blog For one of my projects, I want to have a really low power consumption device to be able to use a battery for many month. For this I implemented a low power solution as described here. I’ll try to simplify it a little bit and document it a little more … Let’s start – what do we need ? We need to have a AtMega328P plus a couple of wires to get the following circuit. This schema use a 16Mhz Quartz but it will be removed once the system setup. Then, we need to use an ISP programming board like this one (USBASP v2). Let’s program the arduino bootloader The first step is to use avrdude to program the bootloader. To program the bootload I used the following command : . launched from /Applications/Arduino.app/Contents/Resources/Java/hardware/tools/avr/bin on mac os X Let’s update the fuses To change the oscillator mode, we must also update arduino fuses.They are some kind of hardware configuration registers. sudo . You can verify the result with this command : #sudo . Let’s have a first test sudo .

Electronics : Microprocessors : Power saving techniques for microprocessors Summary In this thread I show various power-saving techniques for the Atmega328P processor. They include sleep modes, use of power-reduction registers, and other techniques. Applying all of them can result in a current draw as low as approximately 100 nano-amps (100 nA), well below the self-discharge rate of most batteries. Proof from the datasheet for the Atmega328P (page 405 of my copy): That is 100 nA at at 25°C running at 3v. These techniques would be useful for battery-powered devices where the full power of the processor was only required intermittently, for example a TV remote, calculator, doorbell, or some sort of environmental monitor where you only needed to check things from time to time. Introduction I am going to explore various power-saving options for running your project, presumably from battery power. These examples are specifically for the Atmega328P processor, but the techniques are pretty general. Summary of methods Baseline - Arduino Uno Sketch A Sketch B Bare-bones board.

Raspberry Pi + Hyperion = Ambilight TV | Anderson69s Salut à tous, comment allez-vous? Je vais essayer de rattraper mon retard sur la rédaction des articles afin de pouvoir avancer sur de nouveaux projets et ainsi vous les faire partager… Aujourd’hui on va reparler de Xbian et du Raspberry Pi… Vous me direz on a déjà installé Xbian, on peut brancher nos disques durs dessus pour regarder les fichiers sur notre TV, on peut l’utiliser comme borne Airplay, comme serveur de fichiers (uPnP, SMB…) et on a également ajouter un écran LCD pour avoir toujours l’heure et l’adresse Ip du Pi… Que pouvons-nous faire de plus pour le rendre plus cool??? Eh bien, c’est assez simple on peut rajouter des LED au dos de notre TV afin de la transformer en TV Ambilight plutôt que de payer sa TV les yeux de la tête… Qu’est-ce qu’une TV ambilight? En fait c’est une TV qui possède des LED sur la face arrière. Voici une petite vidéo pour vous mettre l’eau à la bouche : J’avais le choix entre deux programmes pour arriver à mes fins : Boblight ou Hyperion. -Proto

Related: