Comments (6)
Hi Fabien. I have to start with the obvious questions; Have you measured with another test program ie not Cosa. And second what are you measuring with. To measure below 1 mA requires good tools, wired, etc
Cheers Mikael
25 sep 2013 kl. 14:41 skrev duayfabi [email protected]:
Hi, Mikael,
I'm currently testing your watchdog API to enable low power consumption with an Attiny85 (with Arduino IDE).
I taked one of your exemple (VWI transmitter) and modified it to only have the Watchdog part running.
Here is the final code I have :
#include "Cosa/Pins.hh"
#include "Cosa/Watchdog.hh"
#include "Cosa/Power.hh"void setup()
{
// Set up watchdog for power down sleep
Watchdog::begin(1024, SLEEP_MODE_PWR_DOWN);// Disable hardware
Power::adc_disable();
Power::timer0_disable();
Power::timer1_disable();
#if defined(ARDUINO_TINY)
Power::usi_disable();
#else
Power::spi_disable();
Power::twi_disable();
Power::timer2_disable();
Power::usart0_disable();
#endif
}void loop()
{
SLEEP(2);
}
I measured a constant current of 250 - 300 µA (3.3 V and my Attiny is cadenced at 8 Mhz). I know it is possible to get a lower current, so, what's wrong with this code?For info : BOD is disabled with the fuses and the only component I have on my breadboard is the Attiny85 and a resistor on the reset PIN (my ISP programmer is disconnected) and I have tested with two different tiny85 chip.
Any hints for me?
Thank you.
Fabien D.
—
Reply to this email directly or view it on GitHub.
from cosa.
Hi again. I see one thing that you can test. You must disable the ADC and possible the timers. Check the ATmega manual for more details.
Cheers Mikael
25 sep 2013 kl. 14:41 skrev duayfabi [email protected]:
Hi, Mikael,
I'm currently testing your watchdog API to enable low power consumption with an Attiny85 (with Arduino IDE).
I taked one of your exemple (VWI transmitter) and modified it to only have the Watchdog part running.
Here is the final code I have :
#include "Cosa/Pins.hh"
#include "Cosa/Watchdog.hh"
#include "Cosa/Power.hh"void setup()
{
// Set up watchdog for power down sleep
Watchdog::begin(1024, SLEEP_MODE_PWR_DOWN);// Disable hardware
Power::adc_disable();
Power::timer0_disable();
Power::timer1_disable();
#if defined(ARDUINO_TINY)
Power::usi_disable();
#else
Power::spi_disable();
Power::twi_disable();
Power::timer2_disable();
Power::usart0_disable();
#endif
}void loop()
{
SLEEP(2);
}
I measured a constant current of 250 - 300 µA (3.3 V and my Attiny is cadenced at 8 Mhz). I know it is possible to get a lower current, so, what's wrong with this code?For info : BOD is disabled with the fuses and the only component I have on my breadboard is the Attiny85 and a resistor on the reset PIN (my ISP programmer is disconnected) and I have tested with two different tiny85 chip.
Any hints for me?
Thank you.
Fabien D.
—
Reply to this email directly or view it on GitHub.
from cosa.
Hi Mikael,
Yes, I have tested with a code of my own and I measured (with good tools and with the same chip) < 10 µA.
I see one thing that you can test. You must disable the ADC and possible the timers
Doesn't the code below do these?
Power::adc_disable();
Power::timer0_disable();
Power::timer1_disable();
Fabien
from cosa.
Hi Fabien.
Ok. First questions cleared. The Power class only handles the power setting and not the enable or disable of the hardware module. It is often done by a control register. The Cosa init enables the ADC.
Mikael
26 sep 2013 kl. 08:12 skrev duayfabi [email protected]:
Hi Mikael,
Yes, I have tested with a code of my own and I measured (with good tools and with the same chip) < 10 µA.
I see one thing that you can test. You must disable the ADC and possible the timers
Doesn't the code below do these?
Power::adc_disable();
Power::timer0_disable();
Power::timer1_disable();
Fabien—
Reply to this email directly or view it on GitHub.
from cosa.
Ok, I'll check this a disable the ADC, timers, etc. by using the registers.
Thank you
Fabien
from cosa.
Improve the Power class to avoid this issue; 877ffb4
from cosa.
Related Issues (20)
- Build: Support Arduino 1.6.10 HOT 2
- Release: Create R1.2.1 for Arduino IDE update
- Cleanup: Improve IOStream operators
- Installation on Ubuntu without arduino HOT 2
- Quality: Increase robustness (check const pointers)
- Refactoring: Allow multiple TWI/SPI modules
- USB/CDC no longer works with Mac OS X El Capitan/Sierra HOT 1
- API Documentation link is stale... HOT 4
- IOStream: Cannot print non-dec base without prefix HOT 1
- INET::print_mac and W5x00 compatibility HOT 1
- W5?00: Only first connection works HOT 6
- board .map file could use better namespace allocation HOT 2
- Add support for other MCU e.g SAM, ARM, ESP, etc HOT 2
- Question: Is using Cosa without Arduino based on a Makefile possible? HOT 3
- TWI::Slave broken HOT 12
- please provide examples of async analog read handling HOT 1
- [RFM 69] High-level API for Encryption Key and Frequency Selection HOT 2
- Update toolchain versions in JSON file to IDE 1.8.9 HOT 2
- Hamming codec for cheap radios question HOT 1
- Is this platform still viable ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosa.