Arduino

From: fixrman26 Feb 2015 14:37
To: ANT_THOMAS 351 of 542
Arduino... The taste you have been looking for.
From: Chris (CHRISSS)25 Mar 2015 01:20
To: ALL352 of 542
It seems the step up reg might not be the best way after all. Either that or the Pro Mini is consuming more power than I realise. Got about a week from the last set of batteries.

New plan is to drop the clock speed so it can run at 1.8V and switch the step up regulator on when the temperature is read. The sensor needs 3V.

I've also ordered a couple of Atmega328p chips to make a barebones board.

And my Nanos have /finally/ arrived. Got one of them controlling my bedroom LEDs now. Borrowed the mini that I'd set up to do it before.
From: Chris (CHRISSS)25 Mar 2015 22:04
To: ALL353 of 542
Version 0.2 done. Hoping to get far more battery life out of this one. I have a little test module running just sending it's battery state every 2 minutes and after 3 days it's only dropped ~0.004V

Moved a couple of cables around on the board, couple of optimisations to the code so it only sends if the temp has changed (or every 10 minutes). Switching the power to the radio and temp sensor off completely when sleeping. Only problem is the DS18B20 requires a little time to start up and read the temperature so it's running for almost 1 second when it wakes up.

And it /should/ work all the way down to 1.8V as it's now running at 4MHz. I'm surprised the radio works as I read it can be fussy with timings.
EDITED: 25 Mar 2015 22:09 by CHRISSS
From: Chris (CHRISSS)26 Mar 2015 02:38
To: ALL354 of 542
I just built this. Going to use it for testing various methods of powering my devices. Quick swap of a couple of leads and I can change between battery or step up or switched from an output.
EDITED: 26 Mar 2015 02:39 by CHRISSS
From: Chris (CHRISSS)26 Mar 2015 11:43
To: ALL355 of 542
Well that's no good. The temp module's battery is dropping quickly again. I estimate maybe 6 days from it. Thought it would do better. Think I might attach an LED to it so I can see how long it's waking for. Unfortunately pin 13 doesn't work because the SPI uses it.
From: ANT_THOMAS26 Mar 2015 11:56
To: Chris (CHRISSS) 356 of 542
I bought an ATMega328p chip a while back to try and make a barebones board but couldn't get it working. Also, the price of the parts was far more than buying a Nano or Pro Mini so it seemed a little pointless.

I have seen some people running strip down boards off button cells for a very long time, usually only transmitting something occasionally though.

I might try a 433 MHz transmitter on a temp sensor setup to see how well that works.

http://jeelabs.org/tag/lowpower/
From: Chris (CHRISSS)26 Mar 2015 12:31
To: ANT_THOMAS 357 of 542
I think it /should/ be easy to get working at 8MHz. Shouldn't need many components, maybe just a cap. Maybe not so easy to sort out the boot loader. It worked out slightly cheaper to buy the chip than a Pro Mini, about 20p I think. Amazing they can sell a fully assembled board for only slightly more. Maybe the DIPs are more expensive.

I have another Pro Mini just sending it's battery voltage. That should last months. So something up with the other one. Either somethring to do with the temp sensor or the Mini.
From: koswix26 Mar 2015 12:31
To: ALL358 of 542
Is there a less power hungry way to read the temperature? What about a pressure sensor in a sealed tube and use P1/T1 = P2/T2 to sovle from a reference temp?
From: ANT_THOMAS26 Mar 2015 12:40
To: koswix 359 of 542
I imagine it's the wireless transmitting of the data which uses more power out of everything.
From: Chris (CHRISSS)26 Mar 2015 13:25
To: koswix 360 of 542
(I think) The problem is the sensor itself. It needs at least 3V so I'm using a step up to increase the battery voltage. I'm switching the power off to it when the Arduino goes sleep. When it powers on again I get a temp of 85C unless I delay the reading by about half a second, so it's staying awake too long each cycle. The actual sensor uses very little.

I wonder if leaving it on would be better. Will leaving the step up on waste much? My other option is to switch the sensor on, go to sleep for 0.5-1 second, wake up, read temp.

I think I'll remove the temp sensor, just send the voltage, and see if it is the temp sensing that is draining the battery.
From: Chris (CHRISSS)26 Mar 2015 14:24
To: koswix 361 of 542
Or I could just lick my finger and point it in the air. Or is that for wind direction?
From: Chris (CHRISSS)26 Mar 2015 16:45
To: ALL362 of 542
Stupid me. Change delay to powerdown .
From: Chris (CHRISSS)27 Mar 2015 07:48
To: ALL363 of 542
Didn't even help a little bit. Exactly the same drop in volatte. Need to do some investigating.
From: Chris (CHRISSS)27 Mar 2015 13:14
To: ALL364 of 542
Graphs!

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.

Not sure what's going on there.
From: Chris (CHRISSS)27 Mar 2015 21:21
To: ALL365 of 542
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.
EDITED: 27 Mar 2015 21:21 by CHRISSS
From: Chris (CHRISSS)30 Mar 2015 23:37
To: ALL366 of 542
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.
From: Chris (CHRISSS) 2 Apr 2015 00:23
To: ALL367 of 542
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.
From: Chris (CHRISSS) 2 Apr 2015 00:51
To: ALL368 of 542
/Much/ better. 28uA when using the same sleep test. Wonder if I can get it down further.
From: Chris (CHRISSS) 3 Apr 2015 01:16
To: ALL369 of 542
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.
From: Chris (CHRISSS) 4 Apr 2015 09:26
To: ALL370 of 542
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.