|
arduino IDEArduino
|
Touchpad Controlled Digital Servo Motor
Here is a quick and simple project where we control a digital servo motor with the slide of our finger on a PS/2 touchpad with the help of an Arduino microcontroller. So, without further ado, let's get started!
Supplies
For this project, you will need:
- A PS/2 touchpad
- An Arduino microcontroller
- An H-bridge motor driver(Examples: DRV8833, L293D, L298N, etc)
- A DC motor with an attached rotary encoder
- A 5-volt supply(For the Arduino microcontroller)
- A DC power source for the motor(If it is intended to be operated at voltages >5-volts)
- A few male to male jumper wires
Step 1: Program the Microcontroller
You can get all the firmware resources, including the Arduino code and the required libraries from here.
Step 2: Connect the Microcontroller to the Motor Driver
Connect the motor driver's +ve input to the 5-volt pin or an external supply if you are using a larger motor. Connect the GND of the motor driver to the GND of the microcontroller(And the GND of the external supply, if used). Make the following connections between the microcontroller and the motor driver:
D9 - IN1
D10 - IN2
A lot of motor drivers have an 'enable' pin(EN) that needs to be connected to the +ve of the logic voltage. If yours has such a pin, connect it to the 5-volt pin of the microcontroller.
Step 3: Connect the Motor to the Motor Driver and the Microcontroller
Check the underside of the PCB attached to the motor showing the pin labels of the connector.
Connect the pins M1 and M2 to the output pins marked OUT1 and OUT2 of the motor driver.
Connect the GND pin to the GND of the Arduino microcontroller and the VCC pin to the 5-volt pin of the Arduino microcontroller.
Make the following connections between the encoder and the microcontroller:
C1 -> D2
C2 -> D3
If you wish to change the pins of the microcontroller to be connected to the encoder, make sure that the ones you are using are interrupt pins.
Step 4: Figure Out the Connections of the Touchpad
If you have a Synaptics touchpad like the above one, the pad 'T22' is +5V(VCC), 'T10' is 'Clock', 'T11' is 'Data' and 'T23' is 'GND'. You can also solder the 'GND' wire to a large exposed copper as shown above.
Click on the above image to know more. If you have a different touchpad, try searching for its part number on the internet with 'pinouts'.
Step 5: Connect the Touchpad to the Microcontroller
Make the following connections between the touchpad and the microcontroller:
VCC -> 5-V
GND -> GND
Clock -> D6
Data -> D5
Step 6: Mount the Motor on a Stand
Though this step is optional, this can help prevent the motor from moving around while rotating.
Step 7: Add a Position Marker to the Motor
You can use something like a wheel, a gear, a shaft attachment, even a piece of tape to see the movement of the motor.
Step 8: Power Up the Setup and Test the Controls
?
Check if your setup is working in the same way as shown in the video.
Start with sliding the finger slowly for a short distance in any direction. If the motor keeps on rotating for a long time then reverse the polarity of the motor's wires.
Step 9: Try Adding More to the Project
The microcontroller is using only a single axis of movement of the finger to control the motor. Why not try adding another motor and control both of them together, one with the horizontal and the other with the vertical movement of the finger. You can also try and make a touchpad-controlled vehicle with the help of these motors. Whatever you do, all the best!
Touchpad Controlled Digital Servo Motor
- Comments(2)
- Likes(2)
- chupapi obiqobi Sep 14,2023
- Engineer Sep 15,2021
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by KushagraK7
- Raspberry Pi Pico RC Vehicle SuppliesA Raspberry Pi Pico(Almost any microcontroller can be used here, but the Pico offers great f...
- Stepper Motor Controlled Stepper Motor Without Microcontroller! Step 1: Watch the VideoWatch the video to get a full understanding of the project and learn how to t...
- Automated Model Railroad Layout Running Two Trains I made an Automated Model Train Layout with Passing Siding a while back. Upon request from a fellow ...
- Program the Raspberry Pi Pico With the Arduino IDE The Raspberry Pi Pico is a recently launched product in the family of microcontrollers and its load ...
- Reuse an Old Laptop's Touchpad to Control a Computer! PS/2 laptop touchpads are among the coolest user interface devices to use with a microcontroller. Th...
- Automated Model Railroad Layout With Reverse Loops In one of my previous projects, I showed how to make a Simple Automated Point to Point Model Railroa...
- Use a Stepper Motor As a Rotary Encoder Rotary encoders are great for use in microcontroller projects as an input device but their performan...
- Keyboard Controlled Model Train(PS/2 Interface) Using Arduino microcontrollers, there are a lot of ways of controlling model railway layouts. A keyb...
- Stepper Motor Speed and Direction Control Without a Microcontroller In one of my previous projects, I showed you how to control a stepper motor's speed using a 555 time...
- Smartphone Controlled 4X4 Robot With ESP8266 SuppliesFor this project, you will need:An ESP8266 microcontroller(Node MCU)A dual H-bridge motor dr...
- Touchpad Controlled Digital Servo Motor Here is a quick and simple project where we control a digital servo motor with the slide of our fing...
- Smartphone Controlled Model Railroad With an ESP8266 IntroA while back, I made a project where a stepper motor's position is controlled using a smartphon...
- Simple USB Volume Controller with Arduino This project uses a rotary encoder connected to an Arduino Leonardo to control the audio volume of a...
- Motor Speed and Direction Control with a Web-Server using an ESP01 Supplies:For this project, you will need:An ESP01 microcontroller(You can use any ESP8266-based micr...
- Wi-Fi Controlled Stepper Motor With an ESP Microcontroller Step 1: Get All the Required StuffFor this project, you will need:An ESP8266 microcontrollerA Steppe...
- Simple Automated Model Railroad Loop With Yard Siding Video:Supplies: For this project, you will require:An Arduino microcontroller board compatible with ...
- Laptop Touchpad Controlled Model Railroad Supplies:For this project, you will require:An Arduino microcontroller compatible with Adafruit Moto...
- Control a Stepper Motor with a Slide of Your Finger Supplies:An Arduino microcontroller boardA PS/2 touchpad from a laptop(Try to get one with a Synapti...
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
153 1 1 -
-