Modular ATtiny85 based sensor node, designed around Xbee series 2.

ATTiny85 variant provides a single input or output interface pin. I'm using these circuits as inputs with various sensors attached. I've included a link to my github repo that includes a DHT22 (temperature and humidity) based sensor. ATTiny84 variant of this board, provides 3x input/output pins (inc 1x PWM), and more importantly an I2C bus with 3x connectors (lab version using Sparkfun BMP085 pressure sensor). Recently added EMON sensor variant (ATTIny85 based) for CT sensors and EMON library. The code samples are optimised for sensor mode and in particular, running the XBee in pin sleep mode to save power. There's also a few AVR power saving tricks in the code too; sleep mode and watchdog timers. These allow the solution to sleep for most of the time, wake-up for 4 seconds to capture and send the reading, then go back to sleep. This means the circuit is only active for around 384 seconds per 24 hour period, which means around 25mAh during those 384 seconds and around 10uAh for the rest of the time. Sensor code on Github is optimised for transparent mode (AT). But I've recently moved the co-ordinator Arduino code to API mode (not uploaded to Github yet). This removes the need for the sensor code to 'get' its 64bit LSB address (SL) and include it in the message payload. So it saves 8 bytes per transmission, which equates to about 1/3 size reduction. Would love to get sensors working in API mode, but can't figure how to do this with the Arduino (Andrew Rapp) lib on Attiny's.

Login to post a comment...

exsertus 2 months, 2 weeks ago

I've posted a screen grab of my battery graph: Weather (BMP085), Bedroom (TMP36), Mains (EMON+current clamp).

exsertus 2 months, 2 weeks ago

Battery life varies based on the sleep vs wake interval: Temp only sensor (TMP36) @15 min sampling = 3 years+ (not replaced yet!) EMON @ 1min sampling and 10 minute upload (ie sample 10 times, then upload 10 reads to hub) = ~ 1.5years BMP085 @15 min sampling 3 years+ (not replaced yet!)

darnold 2 months, 2 weeks ago

Cheers! In the end, how long did you manage to run the sensors on two AA batteries?

darnold 2 months, 2 weeks ago

Cheers! In the end, how long did you manage to run the sensors on two AA batteries?

exsertus 2 months, 2 weeks ago

Hey darnold, good spot!, I've corrected the link now!

darnold 2 months, 2 weeks ago

Was hoping to get a copy of the code but it is no longer on GitHub