2

I'm building a garden monitor, so I got myself an Arduino Nano, a soil humidity sensor, an air humidity and temperature sensor as well as a luminosity sensor. Since I had not one but two Raspberry Pis laying around I thought I'll handle the receiving end with one of them. I also got a 433 MHz RF kit.

The trail of the information will look like this: Sensor(s) -> Arduino -> 433 MHz Transmitter - - - 433 MHz - - - 433 MHz Receiver -> Raspberry Pi

Now my question is, what libraries should I use? I checked rc-switch (it has libs for both Arduino as well as RPi) and managed to send some codes but it seems that I'll need to write my own protocol to use this to transmit even simple data as it wasn't developed for sending data, rather simple switch on / switch off signals to simulate remotes.

VirtualWire would seem as the ideal candidate but the problem is it doesn't have an RPi equivalent.

Any suggestions?

4 Answers 4

1

You could look into the RadioHead library - there might be a port for RPi, though I couldn't find one with a (very) quick google. This library works well, I use it actually with RFM69H 433 MHz radios (from Moteinos), a little more expensive than the simple 433 kits, but also supports encryption which might be important down the line. If you can't find a good library for RPi one solution could be to have a second Arduino acting as a receiver and sending data serially to RPi. This is what I use with a regular desktop PC which is my home server.

I also found a discussion about connecting a RFM69 to the RPi here which might give you more information about the process in general, even if you won't use the same radio.

1

There is custom made library to solve this issue here and i recomend you read this discussion.

2
  • I might be getting it wrong, but these discussions are about RPi -> Arduino communication, whereas I want the opposite. May 12, 2015 at 9:30
  • I think it goes both ways... You always use hardware anyway... Use ht12d/e encoder decoders on bothsides and convert ua data inton4 bit binary... Its easier than it sounds...
    – user8688
    May 12, 2015 at 12:31
0

Presuming you want to get results quickly, I recommend you have a look at openHab This is a Java based home automation framework and server that has plugins for many existing protocols.

Once you get your protocol running it is just a matter of plugging it into openHab for charting and storage. I use for inside home measurements: enter image description here

Also this post will help you further with connect 433 to RasPi and Arduino.

Specifically for temp and humidity sensors there is the reverse engineered Cresta protocol, that is also used in a lot of commercial sensors. See this Github repo for Arduino code. Also findable for Raspberry Pi.

1
  • The sensors I mentioned are for Arduino. So the link would look like this: Sensor(s) -> Arduino -> 433 MHz Transmitter - - - 433 Mhz - - - 433 MHz Receiver -> Raspberry Pi. I edited my question to include this information. May 12, 2015 at 9:35
0

I am fairly new to Arduino but have had a basic experience with python on RPi (Model 2). I am trying to connect ultrasonic sensors (for distance measuring) on Arduino and then send (RF transmission) the value to Raspberry Pi. I am not able to figure out how to write a code for receiving the transmitted code. I have to receive the code, decode it and then update it in my SQLITE database (on the same RPi).

I have already tried RFSniffer but I am unable to receive value other than "INT". RPi shows nothing if I send any "CHAR" or "STRING".

Please do suggest me how should I proceed.

Thanks in advance

Pradeep Verma

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.