33
Low Power Wireless Sensors Glyn Hudson @openenergymon OSHUG #26 16/05/13 ...and their role in helping us build a sustainable future

OSHUG #26 Low Power Wireless Sensors

Embed Size (px)

DESCRIPTION

Short talk given at #OSHUG (Open Source Hardware Users Group) event #26 in London 16th May 2013. Quick overview of the OpenEnergyMonitor project and how we use wireless sensors to collect data. Practical examples of home temperature monitoring cross referenced with SAP calculator building fabric modelling, heat pump monitoring and bee hive temperature monitoring!

Citation preview

Page 1: OSHUG #26 Low Power Wireless Sensors

Low Power Wireless Sensors

Glyn Hudson @openenergymon OSHUG #26 16/05/13

...and their role in helping us build a sustainable future

Page 2: OSHUG #26 Low Power Wireless Sensors

2

Open-source sustainable technologies

Technology that empowers us to participate in creating a future where we live within ecological limits.

openenergymonitor.org

Page 3: OSHUG #26 Low Power Wireless Sensors

3

Sustainable EnergyTools to help us work towards sustainable energy in a way that adds up.

Energy Stacks based on DavidMacKay's book: withouthotair.comTrystan's Stack 2012

Only 17% Sustainable Energy

2030Target*

2012 UK Average

2012 Trystan

*CAT zerocarbonbritain.com/

Page 4: OSHUG #26 Low Power Wireless Sensors

4

OpenEnergyMonitor.orgOpen-source energy monitoring

Page 5: OSHUG #26 Low Power Wireless Sensors

5

The OpenEnergyMonitor System

Page 6: OSHUG #26 Low Power Wireless Sensors

6http://openenergymonitor.org/emon/emontx

Page 7: OSHUG #26 Low Power Wireless Sensors
Page 8: OSHUG #26 Low Power Wireless Sensors

8

Raspberry Pi

http://openenergymonitor.org/emon/emonbase/raspberrypi

Page 9: OSHUG #26 Low Power Wireless Sensors

9

An open-source web-app for processing, logging and visualising energy, temperature and other environmental data

●Open-source, downloadable and installable on your own server (e.g RaspberryPi)

●Specifically designed with processing and visualising energy data in mind.

● Written in php, mysql, javascript and jquery

● Follows MVC architecture

emoncms.orgopenenergymonitor.org/emon/emoncmsgithub.com/emoncms

Page 10: OSHUG #26 Low Power Wireless Sensors

Visual Dashboard Editor

Drop & drop, customisable graphs, re-sizeable widgets, buttons and live feeds

Page 11: OSHUG #26 Low Power Wireless Sensors

11

Contents

Technology of a wireless node- Wireless considerations - Wireless Module Hardware- Mircrocontrollers- Low power optimisation - Battery Life Estimation

Practical Examples - Home Temperature and Energy Monitoring- Home energy modelling & simulation - Heat Pump Monitoring- Bee Hive Temperature Monitoring

The Future - Current Hardware Prototypes

Live Demo?

Page 12: OSHUG #26 Low Power Wireless Sensors

12

Wireless Considerations – ISM bands

● Industrial Scientific and Medical

● Licence exempt

● 433Mhz, 915Mhz, 868Mhz and 2.4GHz

● Commonly used for low power, low range wireless transmission

● Applications need to be interference tolerant

● 433/868/912MHz - Restricted duty cycle <10%

● Lower frequency's have less free space attenuation and better propagation – better range

2.4GHz 433MHz / 868Mhz / 915Mhz

Wifi Doorbells

Bluetooth Security Systems

Zigbee Cordless telephones

Weather Stations

Page 13: OSHUG #26 Low Power Wireless Sensors

13

Low Power Wireless Modules

RFM12B (HopeRF)

SRF (Ciseco) TI - CC1110

XBEE (Digi) NRF24L01+ (Nordic Semi)

Interface SPI Serial / SPI Serial SPI

Freq 868 Mhz 868 Mhz 2.4GHz 2.4 Ghz

AES Encryption

NO YES YES NO

Power Supply 2.2V - 3.8V 2.0V - 3.6V 2.1V – 3.6V 1.9 – 3.6 V

Rx / TX Power 14 / 23mA 20 / 36.2mA 35/ 38mA 11.3/13.5ma

Sleep mode 1 132.2ua @ 2.6v

26uA

Sleep mode 2 0.3uA 0.2uA @2.6v <1uA <1uA (900nA)

Price (inc VAT) x1 May 2013

£4.79 £11.52made in UK!

£17 £4

Regulatory Approval FCC/ETSI

No In Progress Yes No

http://blog.homelabs.org.uk/wireless-connectivity/

Page 14: OSHUG #26 Low Power Wireless Sensors

14

Microcontrollers

● Ciseco RFu – ATmega328 MCU plus SRF / RFM12B radio in XBEE form factor

● Designed & made in UK

ATmega328 with Arduino Uno bootloader

+ commonly used+ easy to develop for using Arduino IDE+ easy to upload code and debug+ active community- not the most low power option, but not too bad:

6.8mA running @ 16Mhz 3.3V 4.6uA while sleeping

Page 15: OSHUG #26 Low Power Wireless Sensors

15

emonTx / emonTx Arduino

ShieldEnergy monitoring

node

emonTx Low Power Temp

Semi – populated emonTx with 2 x

AA and DS28B20 temperature

sensor

NanodeRFWeb-connected base station -

Arduino clone with ENC28J60

Ethernet and RFM12B wireless

onboard

RFM12PiRFM12B wireless

Raspberry Pi expansion board. Uses Pi's Serial

UART GPIO pins

OpenEnergyMonitor Modules – ATmega328 & RFM12B wireless

Page 16: OSHUG #26 Low Power Wireless Sensors

16

http://nathan.chantrell.net/tinytx-wireless-sensor/

ATtiny84 Based Nodes

x

http://harizanov.com/wiki/wiki-home/funky/

http://jeelabs.net/projects/hardware/wiki/JeeNode_Micro

+ Cheaper and smaller than ATmega328+ easily run off internal 8Mhz oscillator+ Can use Arduino IDE (with some tweaks)

- Does not support hardware serial- Requires ISP programmer to upload code- Harder to debug

Examples with DS18B20 temperate sensor and DHT22 Humidity Sensor

TinyTX – Nathan Chantrell

Funky Sensor – Martin Harizanov JeeNode Micro – JCW JeeLabs

Page 17: OSHUG #26 Low Power Wireless Sensors

17

Low Power Ticks - software

● AVR sleep mode

– Disable all unneeded functions (e.g ADC) and put processor to sleep

– Reduce current consumption from 6.4mA to 4.6uA

● Requires internal watchdog timer or external interrupt to wakeup

● Radio should also be put to sleep

– if not needed for receiving packets

– 14mA (Rx) / 23mA (Tx) reduced to 0.3uA when sleeping for RFM12B

* Running @ 16Mhz 3.3V - 6.4mA

* SLEEP_MODE_IDLE -the least power savings (2.8mA

* SLEEP_MODE_ADC

* SLEEP_MODE_PWR_SAVE

* SLEEP_MODE_STANDBY

* SLEEP_MODE_PWR_DOWN -the most power savings (4.6uA)

https://github.com/jcw/jeelib/blob/master/Ports.cpp

http://jeelabs.org/2011/06/26/current-measurements/

Page 18: OSHUG #26 Low Power Wireless Sensors

18

Simple Low Power RFM12B example

● Simple sketch to send out an ever increasing integer once every minute

● Estimated battery life of 3 years on a single 1300mAhr 3.3V LiPo battery – ATmega328 @ 16Mhz, approx average current draw <57uA

http://jeelabs.org/2013/04/18/9-50-days-and-counting/

JeeLabs Real word test, 2.5 years and still going!

Page 19: OSHUG #26 Low Power Wireless Sensors

19

Battery Life Estimator Tool

http://oregonembedded.com/batterycalc.htm

Page 20: OSHUG #26 Low Power Wireless Sensors

20

Low Power Tricks - Hardware

● Turn off sensor in-between reads – e.g. DS18B20 VCC powered from MCU digital I/O

● Don't use a voltage regulator – Eliminate quiescent current draw: MCP1702 1.6 uA , LM7805 5-8mA!)

● DC-DC boost converter ● Disable ATmega BOD – Arduino default is 2.6V (Brown

Out Detection)

● Slow down – ATmega328 can work down to 1.8V with 4Mhz clock – default is 16Mhz

● Energy harvesting – Mini solar PV

– Battery less operation

– Super capacitor

– PFET to disable RFM12B at startup

Energy consumption of RFM12B packet transmission with ATtiny84. Duration 5.7ms,

average: 10mA, peak 25mA

http://jeelabs.org/2010/09/03/jeenode-goes-solar/

http://harizanov.com/2013/04/scope-screenshots/

Page 21: OSHUG #26 Low Power Wireless Sensors

21

Practical Example – Home Temperature Monitoring

Page 22: OSHUG #26 Low Power Wireless Sensors

22

Home Heating Energy Input & Temperature Monitoring

January 2011 - April 2013

Page 23: OSHUG #26 Low Power Wireless Sensors

23

Page 24: OSHUG #26 Low Power Wireless Sensors

24

Page 25: OSHUG #26 Low Power Wireless Sensors

25

Page 26: OSHUG #26 Low Power Wireless Sensors

26

Page 27: OSHUG #26 Low Power Wireless Sensors

27

Real World Monitoring Data

Page 28: OSHUG #26 Low Power Wireless Sensors

28

Heat Pump MonitoringJohn Cantor, heat pump consultant

● Remotely monitor heat pump performance

● Identify problems

● Optimise control by providing feedback

www.heatpumps.co.ukhttp://openenergymonitor.org/emon/applications/heatpump

Page 29: OSHUG #26 Low Power Wireless Sensors

29

Page 30: OSHUG #26 Low Power Wireless Sensors

30

RF Link

Ambient Temp probe

Solar PV

Battery

Core temperature probe

Winter 2010

Bee Hive MonitoringClive Hudson, Meirionnydd Bee Keepers

http://openenergymonitor.org/emon/beehive/v2

Page 31: OSHUG #26 Low Power Wireless Sensors

31

A 'normal' bee temperature week

Page 32: OSHUG #26 Low Power Wireless Sensors

32

The Future - Hardware Prototypes

emonTHTEMPERATURE & HUMIDITY

open hardware

emonTxV3

energy monitoring node

openenergymonitor.orgopen hardware

● SMT design● Enclosures

Page 33: OSHUG #26 Low Power Wireless Sensors

33

Thank you.