Introduction: DIY RC CAR MSP430 & Arduino & NRF24l01+

About: Hi! I'm a Ph.D Electronics & Telecommunications engineer. I'm interested in microcontrollers, programming (C, Python), retro computers, embedded systems...

Hi,

In this Instructable, we'll see how to make a Two-Wheel RC Car by using MSP430 & nrf24l01+ on the transmitter (Controller) side and Arduino Nano and nrf24l01+ on the receiver (RC Car) side.

In the controller side we'll use a two-axis analog joystick & 2 potentiometers to control the movement on the RC Car.

And on the RC Car side, we'll use 2* 6 V DC motors for the two wheels and 2 SG-90 servo motors.

The component list is below:

Supplies

Transmitter (Controller):

MSP430G2ET Launchpad, nrf24l01+ transceiver module, jumper cables, 100 microFarad capacitor (optional), 2-axis analog joystick, 2*10K Potentiometer, a power bank or any 5V power supply for the lauchpad.

Receiver (RC Car):

Arduino Nano (or Uno, it's up to you), nrf24l01+ transceiver module, jumper cables, 100 microFarad capacitor (optional), 2* 6V DC motors, 2 wheels, 1 caster wheel, 2* sg90 (or any other 5V driven servo), Robot Car chassis, 2*18650 Li-İon Batteries.

Step 1: HW Connections Transmitter (Controller)

Now let's see the connections of these components for Transmitter:

Transmitter (Controller):

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

P1.7 pin on the MSP430 Launchpad --> x-Axis on the analog joystick

P1.6 pin on the MSP430 Launchpad --> y-Axis on the analog joystick

P1.5 pin on the MSP430 Launchpad --> Output of the 1st potentiometer

P1.4 pin on the MSP430 Launchpad --> Output of the 2nd potentiometer

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

You can power the Launchpad with any 5V Usb power supply (I used a power bank, which is not convenient for the reason that it shuts itself down since our transmitter circuit doesn't use enough current, it'll be better to use a constant power supply - maybe a 9V battery and a 5V regulator)

Step 2: HW Connections RC Car (Receiver)

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

VIN pin on the Arduino -->2*3.7V 18650 Li-ion battery pack

VIN of the L298N Motor Driver --> 2*3.7V 18650 Li-ion battery pack

D3 & D4 & D5 & D6 pin on the Arduino --> In1 & In2 & In3 & In4 on the L298N Motor Driver

D9 & D10 pins on the Arduino --> Signal pins of the Servos

Servos obtain their 5V supply from the 5V output of the L298N motor driver.

Enable pins on the L298N motor driver are connected via jumper cables (no PWM)

Capacitor optional as in the Transmitter.

Step 3: SW for Controller: Code Composer Studio (CCS)

For the Controller, you'll use my C code in CCS, Here's the link:

https://github.com/selimg76/nRF24-MSP430/blob/main...

You should also add my nrf24.h header file into your project:

https://github.com/selimg76/nRF24-MSP430/blob/main...

If you have made the connections correctly and debugged and run the code on the launchpad, everything should be OK.

For detailed information about the transmitter project and the nrf module you can take a look at my nrf24l01+ playlist here:

https://youtube.com/playlist?list=PLbFgDf51ZkCHATI...

Step 4: SW for RC Car: Arduino IDE

For the RC Car (Receiver), you'll use my sketch in Arduino IDE, Here's the link:

https://github.com/selimg76/nRF24-MSP430/blob/main...

If the connections are OK, your RC Car should be easily controlled with your msp430 controller. If there are problems with the directions, you may play with the in1 in2 in3 and in4 pins outputs and make corrections.

If you want to use PWM for the DC motors, you'll have to use two more pwm capable pins (shown with a ~ on the board/diagram) I could not do it since I had used a board that used earlier as a gas sensor network node and it was very hard for me to solder two more cables (2nd pic)

If you enjoyed content, please subscribe to my channel:

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

Thank you for your time