I have been looking around here and there for the possibilities in motion sensing using RF sensors.
My search basically boiled down to, RFXCOM or other RF receiver combined with X10 or Visonic sensors.
However, I dislike the non-extensibility of these options. Especially when you also want to sense temperature etc.
I have found a good solution for the above described problem by using JeeNodes.
Part list:
- Enclosure with LITHIUM charger circuit €8
- Pir €3
- 2 x 3200 Ma LITHIUM batteries €8
- 1 x JeeNode €25
- 1-wire temp sensor €1
- 1 x temp humidity sensor €3
= 48 euro per sensor
You need an extra JeeNode or JeeLink linked to your server though.
You'll get a very easily chargable completely programmable sensor with motion and temp sensing.
There is also plenty of room and ports left to add, light intensity and humidity sensors.


Note that I still have to craft the temp and humidity sensor in.
A simple sketch (withouth ack's or double sending packages) would look like:
Code: Select all
#include <JeeLib.h>
Port pir (1);
byte sendSize;
typedef struct {
byte node;
uint8_t pir_state;
} Payload;
Payload payload;
void setup() {
Serial.begin(57600);
Serial.print("\n[HomeSensor]");
rf12_initialize(1, RF12_868MHZ, 33);
payload.node = 1;
pir.mode(INPUT);
}
void loop() {
// send only if state changes
if (pir.digiRead() != payload.pir_state) {
payload.pir_state = pir.digiRead();
// print to serial
Serial.print("\nPIR ");
Serial.print(payload.pir_state ? "on " : "off");
// send to server
while (!rf12_canSend())
rf12_recvDone();
rf12_sendStart(0, &payload, sizeof payload);
}
}
Code: Select all
#include <JeeLib.h>
MilliTimer sendTimer;
typedef struct {
byte node;
uint8_t pir_state;
} Payload;
Payload payload;
void setup () {
Serial.begin(57600);
Serial.println(57600);
Serial.println("Send and Receive");
rf12_initialize(1, RF12_868MHZ, 33);
}
void loop () {
if (rf12_recvDone() && rf12_crc == 0) {
const Payload* p = (const Payload*) rf12_data;
Serial.println((word) p->node);
Serial.print(":");
Serial.print(p->pir_state);
}
}
I have ordered some velchro tape, which might be useful.
I'm curious if other people are also crafting similar multi purpose sensors.
And If so, what more are they sensing in addition to motion en temperature?
Best regards,
Jan