To get the amount of chlorine, the temperature and the pH-value from a pool and to record them you'll need a microcontroller near the pump which is hooked up with various sensors.
Because said pump is placed directly behind the pool in a manhole and furthermore it's located about 10 meters away from the house it would be a tricky task to use a cable to send the data to a recorder.
At this here comes the soulution: The controller on the pump send the data from the sensor to another controller which is palced inside the house. Pretty neat, isn't it?
Enough said, let's go on.
This is the exact name of the used module which I will present here. It is very cheap and very easy to use. The data are sent via a 2.4GHz connection.
The price: I got two of them for under 2€ on eBay (new). Free shipping.
The maximum range should be up to 100m. That's the case when you stand on an open field without any distractions (power supply, catenary, etc...) and the modules range is set to the maximum.
Everyone who needs a bigger range: The module is available with an external antenna. On the 'standard'-module is only an interconnected antenna (you can see it in the picture down left).
One thing bothers me a little bit. As you can see in the picture the pinout is set that way that you can't put it onto a breadboard. For testing that's a bit of a bummer.
You're going to need some parts:
|2||Arduino||Uno or Nano|
Additional I use my 0,96" OLED I2C display to print the data from the sending Arduino on the receiving Arduinos site. If you don't want the display just uncomment the line #define USE_SERIAL. Now the data will be print to the serial monitor.
The module's pinout need to look like this:
Important thing: The module is supplied by 3.3 Volt. 5V would damage the nrf24!
I hooked up one module with the Uno and one with the Nano. But you can also use two Unos or two Nanos. The controller on both boards is (basically) the same.
On GitHub you'll find three directories. The first one (Library) contains the necesarry library for the module. You have to copy this folder into the standard-library-directory of the Arduino IDE. It's usually called …/Arduino/libraries/
The second folder (Transmitter) hold the file for the transmitter. It takes the data from all sensors and sends them to the receiver.
The folder called Receiver contains the code for the receiver. Here the data are read and printed to the display/serial monitor.
Besides the header files (#include "SPI.h" & #include "RF24.h") you're going to need a bit of initial code. Therefor please open both *.ino-files.
- Address: This is the unique address code for both modules, but every module has its own address. So a module only receives the data which is sent to its address. That way you can have many many modules side by side without one is interrupting another.
- Setup: Here you set that the module is communicating via the SPI bus with the Arduino.
- Struct: The data is stored in a struct, which is easy to access and simlpe to process with the module.
- setPALevel: The range can be set in four different steps (Min, Low, High, Max). The higher the range the more energy will be needed - this is important when you're going to use it in handheld or any other battery driven devices.
- openWritingPipe: Here you set which addess is going to be used for sending.
- openReadingPipe: Vice versa to writing pipe.
Note, that openWritingPipe and openReadingPipe on both Arduinos must be set mirrored (you can't read and write on the same channel).
Another note: To send data you're not allowed to listen. If you want to use the write(…); command you have to throw the stopListening(); command first.
To wait for incomming masseges you habe to use the startListening(); command. Only then your Arduino is going to receive data.
The receiver's printing the data the moment they come in. And that's the nice thing about this module: There is no need for a 'startup' or 'setup' of the connection. The data is sent and who's got the right address will receive it.
Questions and comments: deloarts.wordpress.com