Search My Blog

Wednesday, April 3, 2013

SenseLamp is a lamp shade that can be remotely controlled and gathers temperature, humidity, light-levels and motion data – 32leaves

SenseLamp: a ultra-low cost, WiFi enabled sensor platform

SenseLamp: a ultra-low cost, WiFi enabled sensor platform


The SenseLamp is an ultra-low cost (less than 30GBP/45US$), WiFi enabled sensor platform that is easy to build, easy to deploy and fully open source. A SenseLamp is a lamp shade that can be remotely controlled and gathers temperature, humidity, light-levels and motion data. It runs Linux and can do some on-board processing before passing the data on to e.g. busfarhn or COSM.

The story

One can write a story from two angles: a historical account or coming from the motivation. Since my motivation is something like "it sounded like a fun thing to do", I'll give the historical account.
The purpose of all this is to put a temperature, humidity, light-level and motion sensor in every room. And while we're at it, throw in a relay to control a light-bulb. This combination allows some nice home-automation to be implemented. Even further: it provides a test-bed for activity recognition and helps to implement the idea of a quantified self. But in the end, it really just sounded like a fun thing to do.

Mark 0

SenseLamp v0.0

After I had finished a first version of busfarhn and implemented the central heating control, I wanted to take things to the next level and started working on the SenseLamp. It didn't take too long to whip up a first prototype: SenseLamp v0.0. It consisted of a TL wr703n, TI Launchpad with an MSP430G2553, a relay module, HC-SR501 PIR sensor and a DHT11 temperature/humidity sensor. All neatly wired up with jumper cables and attached to a lunchbox to which I went to town on with a Dremel. It wasn't pretty, but got the job done – and it was running for 2 months!

I learned three things from this first prototype:
  1. The Linux CDC ACM drivers are buggy: it seems to be a well known problem that the Launchpads serial interface doesn't work so well in Linux. The reason for this is a bug in the CDC ACM kernel module (see here, here and here). Despite the patches provided, I was unable to fix the issue on the WR703N resulting a bit of instability. A cronjob to reboot the router every 6 hours served as a usable workaround, but certainly does not fix the issue.
  2. HTTP only goes so far: using a simple HTTP based interface implemented via CGI worked beautifully for the central heating control as the interface was unidirectional. The SenseLamp however, needs to be able to send sensor data as well. So a different protocol/interface is needed.
  3. It will have to look better than this: While the dremeled lunchbox worked fine as a first prototype, I wouldn't want plastic lumps hanging throughout my flat. So if I was to deploy this on a bigger scale (count > 1), it would have to look better than this.
 

Mark I

SenseLamp v0.1

The next iteration was designed to do away with the flaws of the prototype. To get rid of all those jumper cables and get things neat and tidy, I designed a PCB and sent if of to SeeedStudio Fusion. As much as I favor local production and business – SeeedStudio was simply 10 times cheaper than anything I found in the UK – even with similar lead time. It only took about 2.5 weeks until I got the PCB in the mail, with the cheapest delivery option that is.
The goal for the SenseLamp PCB is to serve as a "shield&quot: for the WR703N router. The shield is powered by the router and directly talks to the routers AR7240 CPU via the serial port exposed via two test-pads (yep, fiddly soldering included). To make the power supply work, the board sports a 3.3V LDO. All sensor protocols required (the single wire protocol of the DHT11/DHT22), GPIO stuff for the PIR sensor and ADC stuff for the LDR are handled by the MSP430G2553 which is also on the PCB. A neat package all in all.
At the same I started playing around with different frame designs. The lamp shade side of things would have to support the boards, mains to 5V power supply (which handily comes with the router), some space for the light bulb and a spot to place the PIR and temperature sensor away from the light-bulb. As I happen to be interested in personal fabrication (sigh) I laser-cut a triangular frame that unfortunately is not really portable across different machines and can certainly not be ordered from services like Ponoko. But then, any other form of shade/lamp holder would do.
I ended up deploying that version in the kitchen and ran it there for a while. It successfully did away with the communication issues that plagued version 0. Also it looked quite a bit better. But it still wasn't quite there yet:
  • forgot the PIR sensor: the lesson learned here is never design a PCB in a hurry. For some reason I forgot to add the the appropriate pinheaders for the PIR sensor on the PCB. So I had to compensate for that while wiring up the whole thing – it worked, but it was messy. Because like this the PIR sensor can not simply sit on the board, it has to be placed somewhere on the frame. Yet another thing to consider.
  • assembly was still too difficult: which is in part due to the PIR screw-up. Until this version I assumed I could simply tie it all together using some good old zipties. But as it turns out the holes in the relay board, as well as the router board are close to M2 and that's too small for those standard 50mm zipties. So, I'd have to put in screws. Combine that with my tendency to pack everything too tight (on the frame) and you end up with something that's very hard to put together.
  • DHT11 sensors are too inaccurate: according to their datasheet, DHT11 sensors have a tolerance of +- 2 Celsius and 1% humidity. That's quite a lot when one wants to monitor temperatures in the range of 20 +- 3 degrees. So I needed better sensors: the pin-compatible DHT22 to the rescue.
 

Mark II

SenseLamp v0.2

That's the version that I ended up building four times and putting one up in every room. It uses a new revision of the SenseLamp PCB (taking the PIR sensor into account), has a way cleaner cable structure and sports DHT22 sensors. Let's see how it's made in the next section.
 

How it's made


Read More..
http://32leav.es/?p=1152


SenseLamp is a lamp shade that can be remotely controlled and gathers temperature, humidity, light-levels and motion data


SenseLamp automates rooms by replacing light fixtures
SenseLamp: a ultra-low cost, WiFi enabled sensor platform – 32leaves
TP-Link TL-WR703N - OpenWrt Wiki
MSP430 LaunchPad (MSP-EXP430G2) - Texas Instruments Embedded Processors Wiki
Linux Serial Communication working w/modified cdc-acm module - Energia - 43oh
AUR (en) - msp430-launchpad-uart-fix
Linux Serial Communication · energia/Energia Wiki · GitHub
Fusion PCB Service - 2 layers [PCB08511P] - $9.90 : Seeed Studio Bazaar, Boost ideas, extend the reach
3D printing, laser cutting – design, make & build your own products with Ponoko
32leaves/busfahrn · GitHub
Cosm - Internet of Things Platform Connecting Devices and Apps for Real-Time Control and Data Storage
Central heating control on the cheap – 32leaves
energia/Energia · GitHub
busfahrn/scripts/native_clients at master · 32leaves/busfahrn · GitHub
SenseLamp v0.2 BOM
senselamp/board at master · 32leaves/senselamp · GitHub

MSP430 launchpad online firmware editor inventortown.com
MSP430 launchpad online editor - YouTube
inventortown.com - Google Search
Online MSP430 Editor and Compiler
Four-Three-oh! MSP430 Forums • View topic - Welcome to the Inventortown online MSP430 forum
Gadget Dreams…
Online MSP430 Editor and Compiler
Super mario music on msp430 - YouTube
MSP430 upgraded chip shipping with the TI Launchpad
A look at the upgraded MSP430 chip shipping with the TI Launchpad - Hack a Day
TI LaunchPad. Relojes y consumo. | C.I.r.E.
Google Translate
MSP430 LPM3 - YouTube
MSP430 DCO + Xtal - YouTube
MSP430XT - YouTube
MSP430V - YouTube
MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
MSP-EXP430G2 - TEXAS INSTRUMENTS - KIT DEV, MSP430, LAUNCHPAD | Farnell Spain
Confirmed – TI Shipping Launchpad's With MSP430G2553 and MSP430G2452 | Four-Three-Oh!
TI makes a big bid for the hobby market - Hack a Day
MSP430 gaming shield based on the Gameduino - Hack a Day
MSP430 gaming shield based on the Gameduino
MSP430 gaming shield based on the Gameduino - Hack a Day
bear24rw: MSP430 Launchpad GamingPack
Gameduino - Hack a Day
MSP430 Launchpad GamingPack - YouTube
MSP430 bit banged USB 1.1
MSP430 bit banged USB 1.1
Bit-Bang USB on MSP430G2452 - General - 43oh
Mecrisp - Native code Forth for MSP430
TI MSP430 Dev Board by TI (Texas Instruments)
MSP430 Launchpad GamingPack - YouTube
MSP430™16-bit Ultra-Low Power MCUs - 2xx 16MHz Series - MSP430F2272 - TI.com
Composite video with MSP430 chip - Hack a Day
Development and Prototype boards and tools for PIC AVR and MSP430
Debugging MSP430 using Eclipse - Hack a Day
Power-sipping MSP430 mini alarm clock - Hack a Day
EZ430-F2013 - MSP430 USB Stick Development Tool
MSP430 Microcontroller | 16 bit Microcontroller | 16 bit MCU – TI.com
MSP430™16-bit Ultra-Low Power MCUs - FRAM Series - MSP430FR5739 - TI.com
MSP430 Ultra-Low-Power Microcontrollers
Four-Three-oh! MSP430 Forums • View topic - MSP430 support for 430FR (FRAM) parts?
mspgcc - GCC toolchain for MSP430
GCC toolchain for MSP430 - Browse Files at SourceForge.net
GCC toolchain for MSP430 | Free Build Tools software downloads at SourceForge.net
MSP430-based wristwatch project
Grace™, the graphical code generator for MSP430 - YouTube
MSP430™16-bit Ultra-Low Power MCUs - TI E2E Community
MSP430 LaunchPad (MSP-EXP430G2) - Texas Instruments Embedded Processors Wiki
16-Bit Ultra-Low Power MSP430™ Microcontrollers Training from Texas Instruments
MSP430™16-bit Ultra-Low Power MCUs - FRAM Series - MSP430FR5739 - TI.com
msp430fr5739 fram wireless - Google Search
TI MSP-EXP430FR5739 Experimenter Board | Mouser
DonsDeals: Beginners Guide to The TI MSP-EXP430FR5739 Experimenter Board
TI E2E Community - Search for MSP-EXP430FR5739
MSP-EXP430FR5739 with CC2520-CC2591 EVM - MSP430 Ultra-Low Power 16-bit Microcontroller Forum - MSP430™16-bit Ultra-Low Power MCUs - TI E2E Community
MSP-EXP430FR5739 Experimenter Board Linux serial connection - MSP430 Ultra-Low Power 16-bit Microcontroller Forum - MSP430™16-bit Ultra-Low Power MCUs - TI E2E Community
My new Dev.Board : MSP-EXP430FR5739 | Ahmet YILDIRIM
MSP-EXP430FR5739 | SohilPatel
MSP-EXP430FR5739 board have just arrived | CircuitGeek
TI MSP-EXP430FR5739 FRAM Experimenter Board - element14
TEXAS INSTRUMENTS: Quick Start Guide for MSP-EXP430FR5739 Experimenter Board - element14
Texas Instruments: MSP-EXP430FR5739 Experimenter Board - element14
brijesh patel's Profile Profile - element14 - Made a nice comment on my MSP-EXP430FR5739 Review
Review of MSP-EXP430FR5739 - element14 - Showing up now 06-11-12
element14: MSP-EXP430FR5739
Community Search - element14
TEXAS INSTRUMENTS: PCB Design Files for MSP-EXP430FR5739 Experimenter Board - element14
TEXAS INSTRUMENTS: Source Code for MSP-EXP430FR5739 (Rev. A) - element14
Google Custom Search
cse
msp-exp430fr5739 embedded linux - Google Search
msp-exp430fr5739 embedded linux - Google Search
ti fram msp-exp430fr5739 experimenter board - Google Search
ti msp-430 lcd - Google Search
ti msp-exp430fr5739 experimenter board - Google Search
ti msp-430 board - Google Search
ti fram msp-exp430fr5739 experimenter board code - Google Search
ti fram msp-exp430fr5739 experimenter board code open source - Google Search
ti fram msp-exp430fr5739 experimenter board lcd - Google Search
ti fram msp-exp430fr5739 experimenter board hack - Google Search
ti fram msp-exp430fr5739 experimenter board open source - Google Search
ti fram msp-exp430fr5739 experimenter board pin outs - Google Search
ti msp-430 board lcd - Google Search
Experimenter Board Texas Instruments MSP-EXP430FR5739 Description The is a development platform for the MSP430FR57xx devices It supports this new generation of MSP430 microcontrol
MSP-EXP430FR5739 Experimenter Board - MSP-EXP430FR5739 - TI Tool Folder
MSP-EXP430FR5739 Experimenter Board - YouTube
MSP-EXP430FR5739 Demonstration - YouTube
MSP-EXP430FR5739 - Experimenter Board unboxing - YouTube
MSP-EXP430FR5739 - MSP-EXP430FR5739 Experimenter Board
TI Software Approval - TI.com
TI Software Approval - TI.com
TI Software Approval - TI.com
RF Connectivity with Microcontrollers– TI.com
Getting Started from Texas Instruments
MSP430 Microcontroller | 16 bit Microcontroller | 16 bit MCU – TI.com
MSP430 Ultra-Low Power Microcontrollers Tools & Software from Texas Instruments
New MSP430F5438 Experimenters Kit - YouTube
TI MSP430 "Fraunchpad" Polyphonic MIDI Synth - YouTube
Low Power MSP430 LCD Display - YouTube
MSP430 Launchpad & Nokia 5110 LCD Display - YouTube
msp430 noklcd - YouTube
Dailymotion - MSP430F5xx microcontrollers provide breakthrough ... - a News & Politics video
MSP430Projects's Channel - YouTube
MSP430Projects's Channel - YouTube
MSP430Projects's Channel - YouTube
Quick first project with MSP430 Launchpad - YouTube
TEXAS INSTRUMENTS: User Guide for Maximizing FRAM Write Speed on the MSP430FR573x - element14
MSP430 Ultra-Low Power 16-bit Microcontroller Forum - MSP430™16-bit Ultra-Low Power MCUs - TI E2E Community
Introducing MSP430Ware and the Brand New Driver Library! - MSP430 Ultra-Low Power 16-bit Microcontroller Forum - MSP430™16-bit Ultra-Low Power MCUs - TI E2E Community
MSP430Ware - MSP430WARE - TI Software Folder
16-Bit Ultra-Low Power MSP430™ Microcontrollers Training from Texas Instruments
MSP430ware 1_00_00_00
MSP430 online code editior, compiler, and programmer | Dangerous Prototypes
MSP430 launchpad online editor - YouTube
Online MSP430 Editor and Compiler
Online MSP430 Editor and Compiler
Four-Three-oh! MSP430 Forums • View topic - Welcome to the Inventortown online MSP430 forum
Super mario music on msp430 - YouTube
ANT+ networks using an MSP430 chip and Android phone
A look at the upgraded MSP430 chip shipping with the TI Launchpad - Hack a Day
MSP430 gaming shield based on the Gameduino - Hack a Day
MSP430 LPM3 - YouTube
MSP430 DCO + Xtal - YouTube
MSP430XT - YouTube
MSP430V - YouTube
MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
MSP-EXP430G2 - TEXAS INSTRUMENTS - KIT DEV, MSP430, LAUNCHPAD | Farnell Spain
Confirmed – TI Shipping Launchpad's With MSP430G2553 and MSP430G2452 | Four-Three-Oh!
bear24rw: MSP430 Launchpad GamingPack
eZ430-Chronos-433 - Chronos: Wireless development tool in a watch
Sitara ARM Cortex-A8 and ARM9 Microprocessors - AM37x ARM Cortex-A8 - AM3703 - TI.com
Sitara ARM Cortex-A8 and ARM9 Microprocessors - OMAP3503/15 ARM Cortex-A8 - OMAP3503 - TI.com
Sitara ARM Cortex-A8 and ARM9 Microprocessors - AM1x ARM9 - AM1802 - TI.com
RF Connectivity with Microcontrollers– TI.com
DonsDeals: Using an MSP430 for time lapse photography
DonsDeals: Online MSP430 Editor and Compiler
Online MSP430 Editor and Compiler
Four-Three-oh! MSP430 Forums • View topic - Best information for those new to the MSP430?
slaa294a.pdf (application/pdf Object)
Online MSP430 Editor and Compiler
Online MSP430 Editor and Compiler
MSP430 Microcontroller | 16 bit Microcontroller | 16 bit MCU – TI.com
Search - TI E2E Community
MSP430™16-bit Ultra-Low Power MCUs - FRAM Series - MSP430FR5969 - TI.com
TI MSP - Google Custom Search
TI MSP-430 Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules
Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
AIR-BoosterPack_Quick_Start_Guide.pdf (application/pdf Object)
BoosterPack_Users_Manual.pdf (application/pdf Object)
MSP-EXP430G2 - MSP430 LaunchPad Value Line Development kit
111213b_ A110LR09A_Prod Brief.pdf (application/pdf Object)
111031 - A110LR09x_Users_Manual_V11.pdf (application/pdf Object)
BoosterStack_Programmers_Guide.pdf (application/pdf Object)
AIRFrameworkOverview.pdf (application/pdf Object)
Rich text editor, CommentHeaderMessage, press ALT 0 for help.
Code Composer Studio (CCStudio) Integrated Development Environment (IDE) v5 - CCSTUDIO - TI Tool Folder
Launch Pad Powered Robot - LaunchPad Microcontroller Projects - MCU LaunchPad - TI E2E Community
Group: C2000 - element14
MSP430 Microcontrollers: Using CCS 5 to Compile and Load example program for MSP430 + Air Booster Pack - element14
Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
Group: Stellaris Microcontrollers - element14
Group: MSP430 Microcontrollers - element14
MCU LaunchPad Evaluation Platform | Microcontroller Kit from Texas Instruments for MSP430™ , C2000™ real-time and Stellaris® ARM® Cortex™ microcontrollers
MSP430 LaunchPad - Texas Instruments Embedded Processors Wiki
Debug.jpg (JPEG Image, 1366 × 768 pixels)
msp430.jpg (JPEG Image, 1366 × 768 pixels)
TI - my.TI Account - Account Login
Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
Untitled.png (PNG Image, 1366 × 768 pixels)
TI Software Approval - TI.com
screen.jpg (JPEG Image, 1280 × 800 pixels)
ImageShack Album - 18 images
ImageShack Album - 16 images
ImageShack Album - 7 images
CC110L RF BoosterPack - 430BOOST-CC110L - TI Tool Folder
MSP430 LaunchPad Value Line Development kit - MSP-EXP430G2 - TI Tool Folder
Review of Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
CC110L AIR Module BoosterPack Embedded Antenna Module by Anaren
TI MSP-430 Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules not recognized in Air - Google Search
DonsDeals: Beginners View of the TI 430Boost-CC110L AIR Module BoosterPack Kit
Review of Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
MSP430 Microcontrollers: Using IAR to Compile and Load example program for MSP430 + Air Booster Pack - element14
Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
MSP430 Microcontrollers: Using IAR to Compile and Load example program for MSP430 + Air Booster Pack - element14
MSPDebug - programming and debugging msp430 under linux
How-to: Launchpad programming with Linux - Hack a Day
Karol Białek's Profile Profile - element14
Review of Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
MSP430 LaunchPad (MSP-EXP430G2) - Texas Instruments Embedded Processors Wiki
msp430g2231.pdf (application/pdf Object)
Review of Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
Elprotronic Inc - Flash Programmers for TI's MSP430 MCU uses Adapters from Elprotronic
Review of Texas Instruments 430Boost-CC110L BoosterPack featuring Anaren Integrated Radio (AIR) modules - element14
Forums - MSP430 Ultra-Low Power 16-bit Microcontroller Forum - MSP430™16-bit Ultra-Low Power MCUs - TI E2E Community
Group: RoadTest - element14
Forum usage - MSP430 Ultra-Low Power 16-bit Microcontroller Forum - MSP430™16-bit Ultra-Low Power MCUs - TI E2E Community

No comments: