• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register

Idea: PIR wireless motion sensor
My idea is to use an attiny45 , a pir motion sensor and one 433mhz sender.

Just like this:


Unfortunately I don't have a arduino and don't want a arduino to compile this properly with arduino libraries )-:

I tried to get some code compiled the way Mercuri0 did, solely on my pilight raspberry and avr dudeWink Or like this: make and done

PIR sensor changes pin state on attiny, interrupt sends a 433mhz code as long a s the sensor detects movement. The PIR sensor will toggle even when there is movement, so that should be taken in consideration.

There should also be some sort of power saving option when there is no movement detected.

Some examples that mostly use arduino's:


Remote temp sensor:
Remote Temperature sensor example

Another wireless temp sensor example


Last but not least, almost ready example but without the sending part!

Hopefully I triggered some curiosity Smile
Eeh. Why don't you just buy a 433mhz PIR sensor and receive that with pilight?
We are also working on the same idea, but the PIR module would just be one of the sensors on the attiny.
Right now we have some working prototypes.
One version is able to detect movement (PIR) and when it's dark (LDR) it will send a KaKu signal.
Another version reads the temperature from a DS18B20 and send the the value to pilight by abusing the KaKu protocol. My event script will detect the receive and convert it back to a tempreature, after that it updates e generic_weather value.

We are working on a modified protocol to allow sending different sensor value to be picked up by pilight.

Me too!!!
Problem is, you have to make sure the PIR broadcast is received AND, if you make it wireless, you have to know whether the PIR sensor is still on-line (e.q. battery health is ok).

You should really check the JeeLabs site. Jean-Claude Wippler has this all figured out.

I have ordered some tranceivers and, as time permits, going to try to make some sense out of the JeeLabs setup.. Maybe with a small central ATmega (Arduino?) board to communicate with the PIR and door sensors and than let the central board communicate with pilight?
Keep you posted.
Have you already git some code to compile on the raspberry? Dive you mentioned this instructable I've been googling my as off but I can't get anything to with out, c and attiny noob I am. Also found the documentation on attmels site on the one wire devices connected to avrs but it is all gibberish to me.

@Koffie, have go got something to show as well? I think I have all hardware in posession, just no experience with the software at all but I'm highly interested to tinker with it.

Taptalked u see .. əəs n pəʞlɐʇdɐʇ
Quote:If you make it wireless, you have to know whether the PIR sensor is still on-line (e.q. battery health is ok).

Yup, for alarm purposes it's a must.

Quote:We are also working on the same idea, but the PIR module would just be one of the sensors on the attiny.

Who is 'we' ? Could you explain what you mean by a PIR module on the attiny? You mean connected on the attiny like we are talking about?
WE = a colleague and me.
It all started with the raspberry pi, and soon ended in big ideas with standalone wireless devices that can monitor everything.
The heart of the module is a attiny, conntroling multiple sensors. One of the senssors will be a PIR for simple alarm system and switching lights on and off.

One of the requirements would indeed be sending a low-power signal to the central hub (the pi) to react on this new situation.

At the moment I can't show andy code on our forked protocol: that part is in hands of my colleague and I don't know exact current status.
Whe have had 3 working prototypes:

- Attiny that detects movement and sends a KaKu command to some lights
- Same as above, but only when the LDR has enough low light detected to turn on lights
- Attiny with DS18B20 sending current temperature to pilight

Right now I abuse the KaKu dim protocol. When temp is 15 or below, send a KaKu command to unit 0 with temperature as dim value. When aboven 15 send a KaKu command to unit 1 with dimlevel (temp - 15).
The event script detects the special ID/Unit and converts it back to temperature and send it to pilight generic_weather.

In near future we hope to share te editted protocol (based on KaKu dim, but with sensor value from 0 tot 1023).
I am also exp. with this:


but i am waiting for "CHINA" parts


@BenPi, what's the advantage/disadvantage to replace your idea with the RFM69 like it's advised on circuitsonline? (to big?)

Possibly Related Threads...
Thread Author Replies Views Last Post
  using serial/uart to connect a CO2 sensor behrisch 15 4,392 10-15-2021, 01:48 AM
Last Post: DesmondOrask
Question 433mhz wireless sensor for dormer window milde 3 4,064 12-06-2015, 07:18 PM
Last Post: pilino1234
  weatherstation sensor p4co86 37 21,908 02-15-2015, 07:46 PM
Last Post: pilino1234
  TFA-Dostmann T/H-sensor not in pilight-receive fozed 0 3,104 02-10-2015, 12:59 PM
Last Post: fozed
  wired sensor Brn 3 3,432 11-29-2014, 11:36 AM
Last Post: curlymo
  Conrad no name wireless switch keesse 9 7,976 09-11-2014, 07:40 AM
Last Post: wo_rasp
  ELV power consumption sensor p4co86 0 2,785 07-06-2014, 05:40 PM
Last Post: p4co86
  Arduino sensor jpoilux 1 3,502 07-02-2014, 07:21 PM
Last Post: curlymo
  About RF and Wireless, useful links... Gregstah 0 1,974 02-12-2014, 02:23 PM
Last Post: Gregstah

Forum Jump:

Browsing: 1 Guest(s)