High Power DC Motor Speed and Direction Control using RC Transmitter – Arduino Compatible

  • Rajkumar Sharma
  • 197 Views
  • medium
  • Tested
  • SKU: EL135516
  • Quote Now

The project presented here is a low-cost solution to control the speed and direction of a high-power brushed DC motor using RC (Radio Remote Control) transmitter. This is an Arduino-compatible board, consisting of an Atmega328 chip, 2 x Relay for motor direction control, MOSFET for speed control using PWM input, Tactile switch, Slide switch, and Connector for RC Receiver interface. Traditional DC motor controllers are based on solid-state circuitry known as H-Bridge. Here the H-bridge configuration is created using 2x high-power Relays which can handle high voltage as well as high current. Additionally, MOSFET Q3 is used to control the speed of the motor by applying a PWM signal. This MOSFET can be removed in case of only direction control is required. In this case short the Drain and source pin of MOSFET. The project requires 3 control input signals 2 x CCW/CW direction control, and 1x PWM input. All inputs are optically isolated to prevent noise and high voltage going into logic circuitry. A large size of heatsink is a must for MOSFET.

Note: This board will work with any standard RC remote. In this project, we tested it with HOTRC DS-600 6CH 2.4GHz Radio System. Standard RC radio outputs is 50Hz – 1mS(1000uS) to 2mS(2000uS)

Arduino Code and Programming

A new ATmega328 chip requires a bootloader. Refer to the connection diagram for the Arduino boot-loader and Arduino programming. The Arduino example code is available as a download. The user will able to control the speed and direction of the brushed DC motor using RC remote Joystick. Connector U4 is provided to connect the RC receiver. ATMEGA328 chip reads the RC signal and generates 2 x CW/CCW TTL signals for motor direction control and one PWM signal. Two direction control signals control the Relay RE1 and RE2, contacts of relay configured in such a way where bidirectional output is provided to the motor, MOSFET drives the PWM signal for motor speed control. All three signals have optocouplers U2, U5, and U6 between motor control circuitry and ATMEGA328 chip which provides noise immunity and high voltage/current going to the digital circuitry.

Arduino Code Credits: modified code, original author Tech at Home Channel

More Info, Boot-Loader, and Arduino Programming: https://docs.arduino.cc/built-in-examples/arduino-isp/ArduinoToBreadboard

 

Features

  • Power Supply for Relay and MOSFET 12V to 15V DC @ 100mA
  • Power Supply Motor 12V to 90V DC (Maximum 100V DC)
  • Motor Load 20Amps (Maximum 30Amps)
  • Optocoupler Between Micro-Controller U1 and 2X Relays and MOSFET for optical isolation
  • 2 x Inputs for Direction Control and Brake
  • One PWM Signal to Control the speed of Motor 0 to 100 % Duty Cycle
  • PWM Frequency up to 20Khz
  • 2x LEDs for direction indication
  • PCB Dimensions 97 x 93.82mm
  • 4 x 4mm Mounting Holes

Arduino Pin

  • Arduino Digital Pin D3 and D4 = Relay Control, DC Motor Direction Control, D3 High – D4 Low = CCW, D3 Low – D4 High = CW
  • Arduino Digital Pin D5 = MOSFET Gate Driver (PWM for Motor Speed Control) – Duty Cycle (0 to 100%) Frequency up to 20Khz
Note: The project has been designed for multi-purpose motor applications. For the RC receiver interface use the U4 connector, the user may not install the following components SW1, SW2, R16, R17, SW4, SW3, and PR1 as they are not required.

Read below for the power supply requirements. The project works well with 2 power inputs. One for the MOSFET Gate Driver/Logic supply and 2nd for the motor supply. Advisable to use 3 power inputs for complete isolation between the motor output power driver and the logic circuit.

Power Supply: The project requires 3 power inputs for complete isolation between the microcontroller and motor output power driver.

  • 5V Logic supply (Do not solder U1 LM7805 and R15) for full isolation between Micro-Controller U3 and motor output power 2 X Relay and MOSFET Q3, Use Pin 4 and Pin 5 of CN4 for 5V Power Input
  • 12V to 15V DC supply for MOSFET gate driver
  • Motor Power Supply 12V to 90V DC

The project also can work well with only 2 power inputs

  • 12V to 15V DC Gate Driver (Solder U1 LM7805 and Resistor R15) for Dual power input.
  • Motor Supply 12V to 90V

Single Power Supply for 12V to 15V Motor

  • The project can work with a single supply for a lower voltage (12-15V) motor, Install U1 LM7805, R15 Resistor.
  • Tie GND-Pin2 + GD-Pin2 and +12V-Pin1 + DC-L Pin 1 of the CN1 and CN2 and apply 12V to 15V

Arduino-compatible hardware consists following important components which can be used for various applications as per user requirements. 

  • ATMEGA328 Microcontroller
  • MOSFET to control the Speed of the motor with the help of PWM (Arduino Digital Pin D5)
  • 2 x Relay for Motor Direction Control (Arduino Digital Pin D3 and D4)
  • 3 Pin Header to Connect Radio Remote Receiver or Analog Input (Arduino A1) – Connector U4
  • Trimmer Potentiometer for Analog Input (Arduino A0) – Don’t Install for this project
  • CN4: Arduino Programming and Boot-Loader Connector
  • SW1, SW2 = Tactile Switch (Optional) Control the Relay 1 and Relay 2 Directly – Don’t Install for this project
  • SW3: Slider Switch for Direct Direction Control – Don’t Install for this project
  • SW4: Tactile Switch Arduino Digital Pin D11

Connections and Other Details

  • CN1: Pin 1 = 12V DC for MOSFET Gate Driver, Pin 2 = GND
  • CN2: Pin 1 = +Motor Power Supply 12V to 90V DC, Pin 2 = GND
  • CN3: Pin 1 = Motor, Pin 2 = Motor
  • CN4: Programming Connector Pin 1 = TX, Pin 2 = RX, Pin 3 = Reset, Pin 4 = GND, Pin 5 = VCC, Pin 6 = D11, Pin 7 = D12, Pin 8 = D13
  • D2, D4 LED = Motor Direction LED
  • SW1, SW2: Optional Direction Switch
  • SW3: Optional Direction Switch
  • SW4: Optional Switch Connected to Arduino D11
  • U4: RC Receiver or Analog In (Arduino Analog A1)
  • PR1: Potentiometer Connected to Arduino Analog A0

Schematic

Parts List

NOQNTYREFDESCMANUFACTURERSUPPLIERSUPPLIER'S PART NO
11CN12 PIN SCREW TERMINAL PITCH 5.08MMPHOENIXDIGIKEY277-1247-ND
21CN22 PIN BARRIER BLOCK PITCH 9.53MMTE CONNECTIVITYDIGIKEY
31CN32 PIN BARRIER BLOCK PITCH 9.53MMTE CONNECTIVITYDIGIKEY
41CN48 PIN MALE HEADER PITCH 2.54MMWURTHDIGIKEY732-5321-ND
51C1220uF/25VRUBYCONDIGIKEY1189-3720-3-ND
63C2,C4,C50.1uF/50V CERAMIC SMD SIZE 0805YAGEO/MURATADIGIKEY
71C310uF/25V CERAMIC SMD SIZE 1206YAGEO/MURATADIGIKEY
84PR1,SW3,C6,C9DO NOT INSTALL
91C70.1uF/100VVISHAYDIGIKEYBFC2373FF104MD-ND
101C8470uF/100VNICHICONDIGIKEY493-1683-ND
112C10,C1122PF/50V CERAMIC SMD SIZE 0805YAGEO/MURATADIGIKEY
122D1,D3SM4007SMC DIODEDIGIKEY1655-1N4007FLCT-ND
132D2,D4LED 3MM RED OR RED + GREENAMERICAN OCTODIGIKEY2460-L314HD-ND
142Q1,Q2MPSA13ON SEMIDIGIKEY2156-MPSA13RA-ND
151Q3FDH3632ON SEMIDIGIKEYFDH3632FS-ND
162RE1,RE212V RELAY/30ACIT RELAY AND SWITCHDIGIKEY2449-L115F11CM12VDCS.9-ND
172R1,R71K 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
181R210K 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
194R3,R8,R16,R17470E 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
204R4,R5,R9,R102K2 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
211R610E 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
221R111M 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
232R12,R14220E 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
241R132.2E 5% SMD SIZE 0805YAGEO/MURATADIGIKEY
251R150E SMD SIZE 0805YAGEO/MURATADIGIKEY
263SW1,SW2,SW44 PIN TACCTILE SWITCHNKK SWITCHDIGIKEYHP0215AFKP2-ND
271U1LM78M05 DPAKON SEMIDIGIKEYMC78M15ABDTRKGOSCT-ND
282U2,U5PC817 4 PIN THTAMERICAN BRIGHTDIGIKEYBPC-817(BBIN)-ND
291U3ATMEGA328TQPF-32MICROCHIPDIGIKEYATMEGA328PB-AURCT-ND
301U43 PIN MALE HEADER PITCH 2.54MMWURTHDIGIKEY732-5316-ND
311U6TLP350/TLP250 8 PIN DIPTOSHIBA SEMIDIGIKEYTLP350H(F)-ND
321X116MhzECS INCDIGIKEYX1103-ND

Connections

Gerber View

Code

//This is modified code, orignal code from YouTube|Tech at Home

int in1 = 3;
int in2 = 4;
int enable1 = 5;  // pin with ~ symbol

int channel_2 = A1;  // pin with ~ symbol

void setup() 
{
  pinMode(channel_2, INPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(enable1, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  
  int pwm = 0;
  int value = pulseIn(channel_2, HIGH, 25000);
  
  if(value==0)
  {
      digitalWrite(in1, LOW);
      digitalWrite(in2, LOW);
      analogWrite(enable1, 0);
  }
  
  else if(value > 1530)
  {
      pwm = map(value, 1530, 1930, 0, 255); 
      digitalWrite(in1, LOW);
      digitalWrite(in2, HIGH);
      analogWrite(enable1, pwm);
  }
  
  else if(value < 1460)
  {
      pwm = map(value, 1460, 1090, 0, 255); 
      digitalWrite(in1, HIGH);
      digitalWrite(in2, LOW);
      analogWrite(enable1, pwm);
  }
  
  else
  {
      digitalWrite(in1, LOW);
      digitalWrite(in2, LOW);
      analogWrite(enable1, 0);
  }
  
  delay(10);
}

 

Photos

 

Video

TLP350 Datasheet

Please follow and like us:
Pin Share

PCB



Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

RELATED PROJECTS

TOP PCB Companies