Story

This project will tell you how to make a simple and minimal controller for a remote-controlled car or robot made using Arduino. The controller supports the forward, backward, left and right movement along with the clockwise and anti-clockwise movement. There are many such controllers available in the market but this one is much cheaper and also it's DIY stuff. So, if you like making things on your own rather then buying them directly from the market, this project is for you.

This project is sponsored by LCSC. I have been using electronic components from LCSC.com. LCSC has a strong commitment to offering a wide selection of genuine, high quality electronic components at best price with a global shipping network to over 200 countries. Sign up today and buy major electronic components from major international electronic component manufacturer for very low prices.

Things required

  1. Texas Instruments Quad OR gate - IC 7432 x 2
  2. Texas Instruments Quad Inverter - IC 7404 x 1
  3. Tactile Switch x 6
  4. LED x 4
  5. Resistor 1k ohm x 6
  6. Resistor 330 ohm x 1

Circuit and Working

The main components the controller needs are:

There are other components like connectors, LEDs and resistors which are also required in the circuit. Go to the components list for the details.

The logic for each move, like forwarding, backward, left, right, CW and CCW rotations, is based on the truth table using a 6×4 encoder circuit formed by IC1, IC2, and IC3 logic gates. On pressing any one of the six switches (S1 through S6), a corresponding binary-coded decimal (BCD) code is generated as per the truth table.

Truth Table for the controller's encoder

Truth Table for the controller's encoder

We, in this project, will make an encoder as per the truth table using the OR-gates and NOT-gates.

When the input to the OR gate goes high, its output is high. The corresponding output is connected to an input pin of the NOT gate (hex inverter). When the input to NOT gate is high, its output is low. The same is the case with other inputs.

All input lines of OR gates are pulled down to the ground using resistors R1 through R6. When forward switch S1 is pressed, the output of OR gate N1 of IC1 goes high, which makes N2 of IC1 (OR gate) go high. At the same time, it makes OR gate N3 of IC1 go high, which makes N1 of IC2 (OR gate) go high.

Outputs of IC1 and IC2 are fed to input pins 1 and 5 of IC3 (NOT gate), respectively. Before feeding the signals to IC3, the code generated is 1010. But after passing through IC3, the output becomes 0101. This is the required logic for moving the robot in the forward direction as per the truth table.

Similarly, when backward switch S4 is pressed, it makes output gate N4 of IC1 and output gate N2 of IC2 go high. Before the signals reach IC3, code is 0101, and after passing through IC3, it becomes 1010. This is the required logic for moving the robot in a backward direction as per the truth table.

Output codes generated for all input switches are available at connector CON2.

Construction and Testing

After assembling the circuit on the PCB, connect a 5V DC across CON1. Connect all LEDs (LED1 through LED4) to the front panel for indicating output. LEDs will glow according to the code generated, indicating high (logic 1) or low (logic 0) status. That is, the status of each input switch can be checked through the glowing of the respective LED and the truth table.

You can feed the signals from CON2 either to the input of the motor controller circuit to drive the robot or to the input the joystick to control the cursor in a video game application.

A ready made RF transmitter to control the robot is easily available online or in the local market. The circuit can be used with the RF transmitter circuit to control the robot.

Connect 4-pin header (A, B, C, D) of the joystick with 4-pin input (D0, D1, D2, D3) of the RF transmitter. You will find a 6-pin header in the RF transmitter marked as D0, D1, D2, D3, +5V, and GND. If you are using a separate supply for a joystick, do not forget to make the ground common.