I switched off the temp sensor this morning. It is now just sending 20C every 80 seconds. Doing exactly the same as my battery test module and the battery use for both is completely different.
The green line is the one with the sensor, the red is (roughly) the other module.
Do you know what? I think it's the Arduino that's the problem, not the circuit/code. Maybe the way I removed the voltage regulator or cut the LED trace. Must be some leaking current somewhere.
I have another module running off a different 3.3V step up. Not switching power off to anything. And so far the voltage is steady. I removed the LED but the reg is still there.
Not had it running long enough to work out how long it's likely to last yet.
Well no wonder I'm not getting the battery life I want. This thing is using 2.2mA when sleeping with nothing else plugged in or working. Not too good. I've got my multimeter current sensing working. The fuse had blown. Made a little shunt to bypass it for now.
Nothing like the potentially 1uA some people have got them down to. More work to be done.
I've had some success with the barebones Atmel chip. I plugged it into the breadboard and tried to connect with AVRDude and nothing happened. Silly me, I didn't connect the crystal. It has an Uno bootloader so was expecting 16MHz.
I've set the fuse bits so it can run off it's internal clock, pulled the crystal out and AVRDude connecting now. Just need to work out how to program it now or which boot loader to give it.
Ive done a little bit of testing tonight. Running off the batteries I got a powrr consumption of 22uA. When I connected the battery to the 3.3av step up and used that to power the Atmel it increased to 81uA. 4 times as much.
I was playing around with my barebones last night (YJ), programming it with my USBasp. It was programming fine but as soon as it reset to actually run the sketch nothing happened. It would occasionally work when I switched the jumper on the USBasp to 5V instead of 3.3V.
Strangley plugging it into the battery worked fine. I think I shorted something on the programmer (I plugged the + and - into the - on the breadboard) and broke something on it.
Had another 1 (supposed to be 2, only 1 turned up) Atmel chip turn up but couldn't get that one to work at all.
This has been driving me nuts. I've been modifying the examples for the temperature sensor and radio to test switching them on and off and I could get them working. When I added it to my temp logger code things didn't work. AARRGGHHH!!
I /think/ I may have finally cracked it though. Not sure it is working 100% reliably though, I will have to test that. But I have something on a breadboard that consumes about 4uA when sleeping. Should last a while on batteries.
The radio works fine. It was the temperature sensor that was the pain! The 3.3V step up uses about 90uA not doing anything so I didn't want that going all the time.
I had forgotten I'd ordered this. I think I must have done it when I'd had too much wine. Turned up this morning. 10x Atmega328ps and crystals, caps, etc.
Well after not sorting the board for my timezone map I decided to do something useful with some of the LEDs. I made a dimable strip to go behind the bed-head. It worked quite well so I made a permanent board. Though they're bright white LEDs so it's a bit clinical.
Controlled via my home automation web remote, which tells a Raspberry Pi to transmit a 433 MHz signal. Different signals give different results. 100%/80%/60%/40%/20%/Off and Up & Down (by 10 units on the PWM scale).
Test breadboard:
Permanent board:
It is probably my best soldering attempt to date. Only made one mistake which was easily fixed.