In my last couple of blog posts, I did a brief overview of the EnOcean Pi sensor kit from Newark and demonstrated how to compile and run the example code using a Raspberry Pi. In this blog post, I will show a real world example β a four-channel remote control built using the EnOcean Pi in conjunction with the EnOcean pushbutton module.
Each pushbutton on the module is used to control a separate channel. When a button is being pushed, the duration of the hold time is used to determine whether it is an βonβ command or βoffβ command. If the hold duration is short (e.g. <1s) the load on the corresponding channel is turned on and if the hold duration is long (e.g >1s), the load is turned off. If an βonβ command is send when the channel is already in βonβ state, the channel will remain be on. The same goes for the βoffβ state.
Because the output current is limited for the IO pins, a transistor is added to drive each load for each channel. In this case the load used are four LEDs (one for each channel). Technically speaking, they could be powered directly using the IO pins with proper current limiting resistors. Also, the output voltage is limited to 3.3V. With the circuit provided, you can easily change the LED to a relay for controlling power devices.
For more detail: A four channel remote control using EnOcean Pi