New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building of a wireless sensor box #74
Comments
Great idea, sadly I, as you have already noticed, have not very much time 2014-02-24 9:14 GMT+01:00 sweetpi notifications@github.com:
|
Just starting with pimatic, because it is the first good looking project which can handle my Intertechno devices by default. Some nice inspiration about the hardware could be found here for example: Or we could use the TinyTX Sensors: http://nathan.chantrell.net/tinytx-wireless-sensor/ |
Fully agree.
I would use pilight for receiving, so we have almost nothing to build at the receiver side. We could just use on of the existing implemented protocols for temperature and humidity. The only remaining Problem would be integrating light intensity and motion detection. We would have to implement a additional pilight protocol for that. Your given readings are looking very interesting. The TinyTX would be a nice sensor. What I don't like is the expensive HopeRF module but it looks like there is a version that uses the cheap OOK/ASK sender. |
You are right the Hope RF Modules are expensive. But they have some advantages for example an integrated sleepmode and we should not forget that these modules are transceivers. That save some space and cables. I like the idea using an existing protocol that would make things much easier. |
But do we need receiving capabilities for the sensor? I think both RF modules are ok. But these OOK/ASK senderes are so extremly cheep and easy to use. But supporting both or just the Hope RF module in the beginning would of cause be another option. |
Have a look at this thread: http://www.forum-raspberrypi.de/showthread.php?tid=7472 They have developed a rf sensor. Even a PCB is available. I did not have a look at the protocols so I do not know if it will work with pilight/pimatic. |
Unfortunately i have no RFM12B at hand, but maybe i have some time this weekend to tinker around with my arduino und my Low Cost 433MHz sender. |
Would be cool. |
Tried a bit last night, but the simple problem is that i dont get my RF receiver working with pilight, the transmitter is no issue. Also i have seen that the description in the pilight wiki does not directly reflect pulse lenght etc. Maybe it would be simpler to create a completely new datagram for the "Pimatic"-Sensor. But first i have to get my receiver running in combination with pilight. |
Which one are you using? http://wiki.pilight.org/doku.php/receivers
I think thats not a problem, we can calulate the pulse length out of the stated timings or do some trial and error with pilight-debug. But the advantage of a own protocol would be that we could include a checksum and detect transmission errors. Just read that @koffienl has already build a temperature sensor that is workgin with pilight: http://koffie.tweakblogs.net/blog/9847/diy-draadloze-temperatuursensor-voor-pilight.html @koffienl: Could you give some details (in english) how you are getting the data into pilight? |
The post you mentioned talks about my prototype. Offcourse, as a nerd who is automating his household, I allready have taken the prototype in production ;) First prototype was sending the temperature by abusing the KaKu dim protocol. If the temperature is 15 of less, it uses ID 1, when between 15 and 30 degrees ID 2. Because our main goal was/is to build a same type of device as mentioned by @sweetpi we adopted the KaKu_dim protocol into a new prtocool. At this moment, the prototype is powered by a USB-port on my TV decoder, so there is absolutely no powersavings and sleepmodes yet. Offcrouse, the main goal is to make it low-powered and standalone. For now, pilight receives the probe-protocol and write it back to config.json My pilight process script detectes the incoming probe update and resend it to pilight as a generic_weather update. The modified protocol is build by a colleague from work, who is running the project with me. At this moment pilight is capable of receiving our protocol, and in theory sending the protocol. |
Same here ;)
Great idea. So just one protocol is needed for all sensor types. Is the protocol and ATtiny code public available (open source). I would love to try it out.
I had the same idea. A 433mhz -> IR gateway would be cool. |
Problem is: the code is not completely finished yet. |
+1 for an own Protocol. Would be good if it could transport min. two Values per Datagram, e.g. Temp and humidity, a sensor ID, maybe network id and Battery status. That could be saved into a byte array and than send over the virtual wire. So IR Gateway would be an actor in this case the HopeRF modules would be worth a look at. |
Our idea was to specify eveything as a seperate sensor in the module. |
That would be create. However a public github repository would be much greater, so we could build and test it together.
Sounds good. I think it doesn't make a big differents if we send packages with single values or combine more values.. |
remember to add some error correction and crc to the protocol some 2014-03-11 21:17 GMT+01:00 sweetpi notifications@github.com:
|
We don't have such options on a roadmap ;) |
Do you plan to make your code open source? That would rise the chances to be well supported by pimatic extremly :) |
Sure it will, it basicly is a simple fork from the KaKu_dimmer protocol. |
Changed the behavior of the protocol a bit yesterday. So, all the sensors (1-15) are put into the device object of the corresponding ID. These are the sensros we would like to use:
Any ideas for other sensors to add to the module? It should be a universal standalone module, that you can please in every room you like to gather information. One of our biggest concerns is power consumption. We think we can reduce consumption by adding a very small second attiny based on the new band-filter from the pilight project. When received signals validate the protocol, it is allowed to wake up the main microprocessor at an interrupt. Also changing communication from 433Mhz to 315Mhz should rule out a lot of useless signals Again: ideas are more then welcome |
Sound great.
A carbon dioxide (CO2) sensor would be cool, but seems to be very expensive.
I don't understand why adding another Attiny should safe power. To reduce power consumption we have to dynamically lower the clock rate of the Attiny to the minimum needed, use sleep mode when possible and shut down power of all unused sensors, when they are not needed. Also we should really add some error detection/correction codes like CRC or hamming codes.
Don't know for what these 315Mhz frequencies are used here in Germany, but no option for me because it it's not legal to use these here. |
If we want to measure air-quality a VOC-sensor could be an affordable alternative: http://www.exp-tech.de/Sensoren/Seeed-Studio-Grove---Air-Quality-Sensor-1-0.html http://www.voelkner.de/products/186298/Gassensor-Figaro-Tgs2600-B00.html The power consumption of these sensors is very high though because of the heating. |
@sweetpi regarding the power consmption : every single type of noise would trigger the RF-receiver interrupt on the attiny. On the other hand : I personally can live with the fact that the module is powered with a 5v USB wire. Can be easily tucked away. I had some strange issues with my prototype last days. The problem was : I no longer received info from the probe. |
I posted the tranmsitting (attiny) and receiving (pilight) code online : http://forum.pilight.org/Thread-Idea-PIR-wireless-motion-sensor?pid=4483#pid4483 |
Great thanks for sharing! I will upload it to a github repository to manage changes. Whom should I mention as original author? Do you want some special license? (I would use GPL 2.) |
The actual code is written by co-rowker from work. His name is Michael. Feel free to copy/use/alter the code. Let 's make a universal protocol capable of sending enough information to house all the sensor information in one module. |
Exact this is my RF-IR-Remote. It received 433MHz Kaku commands and sends a stored IR Command. So i can control home cinema with pimatic. |
No pleae hijack this topic! My first try for code sharing can be found here: https://github.com/koffienl/pimatic-probe |
Jeah, stay here Icesory i guess if we pull the stuff together this could be quite nice. Well, i see i need to buy some Hardware, what hardware are u using ? |
Ok I have my first RF multi device. Any one wanting to test. |
Currently working:
shortlist todo:
Prio for me is the relay. The idea is to configure pimatic device with a 'fake' unit/ID that is not configured on the receiver. When the specific modules receive the fake code, it will resend it using the correct code. When a kaku sender is sening with its real code, the probe will resend it using the fake code. |
I got the sonar working if you want it https://github.com/incmve/generic-rfbox/blob/development/sonar-ds18b20.ino |
Nice :) |
Guys .. I really need some coding help, I don't see where my problem is. I have a working prototype with the following hardware:
Currently, this is what the sensor is capable of:
Now my problem is as follow: Every seperate function/module works perfect standalone. The problems start when I put it all together. The KaKu->IR code is this part:
For sending a ON signal, I would use
The problem is : the moment I use 2 different variables for the So, this works:
This also works:
But this does not work:
My code is on github: https://github.com/koffienl/pimatic-probe in development branch. |
I think you use to much ram. |
Thanks, I was allready guessing it has somethin to do with memory/buffer. When I change
Probably something obvious, but I'm no coder :( |
After reading some extra info today, I guess it has something to do with using to much RAM. I could store the long IR into PROGMEM, but that give other problems: http://forum.arduino.cc/index.php?topic=111179.0 If I cut down all my fancy debug text, it should give me some more space to do stuff. |
An const array is stored in the progmem. On the weekend I would look in to the Ir code the get an const array working. |
Sorry i have forgot you. void IRsend::sendRaw(const unsigned int buf[], int len, int hz) |
No problem for delay ;) Now, something different: I found some bluetooth modules on ebay for the same price (or less) then a good RF kit. The arduino part is easy: hook up on the rx and tx port, open a serial and you are done. Is there anyone with experience on this? Can this solve our problem? |
Take a look at this: http://maniacbug.wordpress.com/2012/03/30/rf24network/ Already works on arduino and has Some battery powered models as well. |
I like this idea, the benefit of 433 is that you can find a lot of HW for cheap, for homemade nodes i would also prefer to go to bluetooth LTE to avoid RF trafficjam |
Biggest disadvantage of BT couldbe the limited range of these devices compared to the 433MHz RF equiptment. |
Somehow I think the range could be the same. On the other hand : with some effort we could make a mash network ;) |
I'd like to get onboard with the "Remote Sensors Box" project. Can anyone list the requirements all in one place? Like what's needed on the raspberry (plugins and hardware) and what's the recommended remote sensor box setup. |
Another option seems to be to go straight to WiFi instead of BT, for example with the very interesting ESP8266 SoC. Would only be the question how high the power draw is. I think it would be most useful if the sensor box could run battery powered. Yep i also think that a Pimatic Forum or so would be great. Would it make more easy for beginners. I think i will setup my Pimatic HW over the holidays, than i might have time for that. |
Interesting! Costs seem to be the same as BT or RF kit. Personally I would prefer stable connections prior to battery power |
Btw one German guy already did a nice example which could be useful: http://blog.schatenseite.de/archives/2014/09/30/wlan-mit-arduino-und-esp8266/ |
since this esp8226 is a SOC with GPIO and other stuff, could this be a single chip solution, without an arduino (sorry if this sounds stupidm but microcontrollers are not my world ;) ? |
Yep its a SoC but i dont know what possibilities you have with the cheap breakout boards your get from china. I think they are only meant to be used together with a microcontroller. About the power draw, i think i read something about 80mA? But it also seems to support sleep modes etc. |
well it can be set to deep sleep mode. could save some power. |
How about a fleet of these BlueDuino with BLE for low power and iBeacon capabilities for "future-proofness" and maybe make our pimatic "location aware" of sensors and/or users, and enhance pimatic-ping (could default pimatic tab on connection whether you're closer to this beacon or this one, create rules based on bluetooth presence or proximity). Ordering a couple anyway. |
I'm really exited about de the ESP8266 wifi modules. Ordered a few today :) |
The next big thing is to build some open hardware sensors for pimatic.
The Quest is to build a hardware 433mhz sender based on arduino or a ATtiny AVRs that collects environment data like light intensity, temperature, humidity and motion.
I already did some work with a ATtiny. I think it shouldn't be to hard to extend this.
Design goals are: Low Cost and battery powerd.
I would do it myself but want to focus on developing/stabilisation and documentation at the moment, so help would be nice :)
The text was updated successfully, but these errors were encountered: