MSP430 & NRF24L01+ : Wireless Transmitter

by drselim in Circuits > Microcontrollers

1811 Views, 0 Favorites, 0 Comments

MSP430 & NRF24L01+ : Wireless Transmitter

MSP430 & nRF24L01+ : Wireless Transmitter

In this instructable, we'll make a Wireless Transmitter using the nRF24L01+ Tranceiver and MSP430 Launchpad. On the receiver side, we'll again use nRF24L01+ module but this time with an Arduino Nano as the microcontroller. First, we'll see the connections between the microcontrollers and the modules. In the next step you'll get the driver that I created for the MSP430 to control nRF module for the transmitter. And for the receiver you'll find the code at the same repository ready to be used for the receiver. Finally you'll upload the codes on both sides by using Arduino IDE (for the RX) and Code Composer Studio (for the TX) to test and see an 8 element integer array being sent from the TX to the RX.

You can follow this instructable with the YouTube video shown above.

This project is sponsored by PCBWay. PCBWay is a custom PCB prototyping service where you can manufacture your designs (or other designer's work) with high quality at reasonable prices. I'll create a RC Car Transmitter Controller board in the near future by PCBWay's services. Please check their website here:

https://www.pcbway.com/

Now let's quickly see the connections in the next step!

Supplies

TRANSMITTER: MSP430 Launchpad, nRF24L01+ Tranceiver, jumper cables, 100 uF capacitor (optional)

RECEIVER: Arduino (Nano or Uno), nRF24L01+ Tranceiver, jumper cables, 100 uF capacitor (optional)

Software: Arduino IDE & Code Composer Studio (CCS)

TX Connections

TX_connections.png

3.3V pin on the MSP430 Launchpad --> Vcc on the nRF24 Module

GND pin on the MSP430 Launchpad --> GND on the nRF24 Module

P2.5 pin on the MSP430 Launchpad --> CE on the nRF24 Module

P2.4 pin on the MSP430 Launchpad --> SCK on the nRF24 Module

P2.3 pin on the MSP430 Launchpad --> CSN on the nRF24 Module

P2.0 pin on the MSP430 Launchpad --> MOSI on the nRF24 Module

P2.1 pin on the MSP430 Launchpad --> MISO on the nRF24 Module

Optional: 100uF Capacitor between the GND and VCC( careful with the polarization when using electrolytic caps)

RX Connections

RX_connections.png

3.3V pin on the Arduino --> Vcc on the nRF24 Module

GND pin on the Arduino --> GND on the nRF24 Module

D8 pin on the Arduino --> CE on the nRF24 Module

D13 pin on the Arduino --> SCK on the nRF24 Module

D7 pin on the Arduino --> CSN on the nRF24 Module

D11 pin on the Arduino --> MOSI on the nRF24 Module

D12 pin on the Arduino --> MISO on the nRF24 Module

Capacitor optional as in the Transmitter.

TX Code

repos.png
main_c.png
header_file.png
header_name.png

For the TX and RX code you'll use my repository for the project:

https://github.com/selimg76/nRF24-MSP430 (1st pic)

In the Repository, the code related with the TX is:

main.c and nrf24.h

Once you create a new project in CCS, just copy the content of the main.c from the repository and paste it in the main.c which is automatically created by the CCS. (2nd pic)

Then by right clicking on the project in the project explorer and selecting New > Header File, create a header file and name it nrf24.h (3rd pic, 4th pic)

As you save your project after these updates and connect your MSP430 to your PC, you can click on the 'debug' button and after the debugging is finished, you'll have your TX up and running. And the Transmitter will be sending the "payload" integer array to the receiver.

But wait! We haven't configured the receiver. Let's do it now...

RX Code

ard_code.png
rf24lib.png

Receiver Code is residing in the same Repository with the name: "RX-Arduino Code". Select all and copy it, and paste it into your new sketch in the Arduino IDE. (1st pic)

You need to make sure that the RF24 library is installed. (2nd pic)

Making sure the Receiver is connected to your PC ( Arduino with the usb cable) click on "upload" button to compile and upload your Receiver code to the Arduino.

Running the TX and RX for Demo

last_step_demo.png

Once you have the TX and RX up and running as described in the previous steps, you can open serial monitor on the receiver side (Arduino IDE) and see the payload array being sent from the transmitter.

If you like the content please subscribe to my YouTube channel for similar tutorials and projects.

https://www.youtube.com/c/drselim

Thank you for your time.

Selim