Nrf24L01 modules are 2.4 GHz transceivers; they can transmit and receive at a max of 2Mbps. The modules have built in settings for setting frequency band, power of transmitter. These modules are code addressable and you can configure their address so that they communicate with only desired modules, this reduces the software complexity and also gives better use of RF channel. These all settings can be done through SPI and configurations can be updated run time, this makes nrf24l01 a very convenient and low cost wireless solution. It does not have a SOC so we need an external controller to command and read from nrf24l01; in SmartRF we have a powerful atmega324a. SmartRF has enough GPIO and processing power that a small application doesn’t even need any other peripheral.
SmartRF has inbuilt USB bridge which makes our setup ever simpler, the transmitter only will be connected to laptop and we can provide data i.e. angle to rotation to it through USART which is connected through the USB bridge, so you can directly communicate with module with your serial terminal software via virtual com port.
For communication we will set the address of receiver and transmitter same, and configure them to run at same frequency channel and data rate. When we send a data from nrf24L01, the hardware takes care about the CRC, preamble and whole communication packet. This data is received by receiver side and decoded to extract only the data packet, once a valid packet is received, IRQ is raised and the controller can read the receiver buffer, all controller has to do now is to read the data and convert it into numbers to be fed to the servo motor.
So over all interface blocks would look like following
If you attempt the setup by yourself, don’t use the USB port to power the motor as it could damage your port, rather use a mobile charger.
Now since we have the setup for receiver and drive circuit, we’ll see the transmitter side. Here we will read serial port to get the angle we desire and transmit it to the receiver. Following code snippet takes angle from serial port and sends it to the RF channel.
The setup is capable of giving commands to servo motors wirelessly; this setup with small RF modules can work up to 15-20 meters in open environment easily. The Module does not require any additional component and this system is very useful to applications where servos are to be remotely controlled. Application including home automation, office automation where servo applications are used for door lock, window pane rail, automatic curtain mover and many similar can be implemented with this setup. With high power RF modules the range can be considerably increased.