Wireless motor control speed (PWM) with NO joystick

Hello everyone

I need to make a rather (i think) simple project but as a noob I'm a bit confused and i need your help. The concept is this : I need to control wireless the speed of two 12V dc motors in a robot car but each motor is about 5A max current.

I can not use joystick since I want to set the speed wireless with a potentiometer (or whatever). In a joystick, if I release my hand from the lever, the lever comes back to "0" position and we don't want it. I search internet but I found nothing.

I would appreciate a lot if you can tell me what I will need (some ideas and some links) in order to do it. Since this is a robot car the speed of the motors should be controlled by PWM in order to keep torque (as much as possible) constant.

thank you.

In a joystick, if I release my hand from the lever, the lever comes back to "0" position and we don't want it.

The code in this Demo deals with that problem.

You have not said if you already have the wireless components. If not I recommend the nRF24L01+ transceivers which are cheap and very effective. Have a look at this Simple nRF24L01+ Tutorial

For controlling your 5amp motors you will need a suitable h-bridge or ESC (electronic speed control). If you want to control the motors independently you will need one for each motor.


Thanks man for the answer

I do not have the componets and I will buy them. I know that I will propably need a nordic nrf24l01 (receiver and transmitter) but I m not sure what else I will need (or how to connect them) in order to control the speed with PWM. It is sure that I will need a 5Amp (or bigger) motor driver, but now is where my questions begin.

Lets say we have to control wireless the speed of 1 motor 5Amp with a potentiometer (to make things simpler).

I have the potentiometer in the transmitter kit. Then the analog voltage output of the potentiometer will be delivered my andruino the it will be transmited wireless (through the nrf24l01) to the receiver kit. In the receiver side, the signal will be delivered by a nrf24l01 and then what ? lets suppose I have a motor driver like this one : https://goo.gl/QHNeGW

The PWM signal will be produced by ardruino or from the ESC above ? It seems like ardruino (in the receiver side) should transfer the wireless transmitted signal from the potentiometer to the input ot this driver, right ?

How to connect all these kits ? Do I really need 2 andruino kits ?

Forgive me if I say everything wrong but I m just a noob who try to learn :slight_smile:

Best regards.

I don't think the motor driver in your link is suitable as it expects to be connected directly to a potentiometer. You need one that receives its PWM signal from an Arduino.

When the Arduino uses analogRead() to get the position of a potentiometer it gets a value from 0 to 1023.

Use the wireless link to send that value

When the receiving Arduino gets the value it uses it to control the motor speed using analogWrite(). However analogWrite() takes a value from 0 to 255 which is 1/4 of the value from the potentiometer.


Ok ... then it seems like this motor driver should do the work :

My dc motor has a rated current of 2.8A so I believe this motor driver is OK..right ?

I will be back with a drawing ofr wire connections and then...the difficult part... the code :confused:

Cytron 10A DC Motor Driver Arduino Shield - RobotShop

Yes that motor driver shield should work with your motor.

However you must check with the supplier that it does NOT interfere with the SPI pins that you will need for the nRF24 transceiver. Personally I prefer add-ons that are not on shields so that I can choose the pins to use. But I can see how the shield makes for easier connections.

then...the difficult part... the code

Start by getting one of my nRF24 examples working (the first one is probably all you will need) and then add the motor code to it. If there are problems then debugging the wireless system will be more difficult than the motor system so get it working first.

And, just to be sure you know what you are doing, write a short separate program to control the motor without any wireless system.