How To Control A Linear Servo With Your Phone Via Bluetooth
Posted by Mike Greig on 2/21/2018
We use our phones for much of what we do these days, but did you know that you can control a linear servo with your cell phone?
There are dozens of different ways to control linear actuators. From simple switches to more complex PLCs, RC control and arduino - no matter what you're trying to build, there's a control type to suit your needs.
After seeing a video on YouTube demonstrating how to control a servo with bluetooth and an android phone, I thought it would be fun to do something similar with a linear servo.
We've never covered this before because our wireless linear actuator remote control is a good solution for most who want to drive their actuator remotely.
If you want to control your linear servo using your cell phone or tablet and bluetooth, you can build your own setup just like we've got here for around $150
Now that you have your parts, it's time to get cracking on putting it all together. In this example, I'm using two different power supplies - one for the arduino board, and one for the actuator. The actuator will function driven directly from an Arduino board but generally it is recommended to power it separately. This can be accomplished using just an HC-05 bluetooth module but it's easier to just get the shield, plug it in and you're good to go.
Step 2 - Wire Up Your Circuit
Step 3 - Download The App
You'll need to download a servo motor control app to your device. There are quite a few apps out there, we're using Arduino Servo Motor Control. Of the ones we tried, this one was the most reliable. It can be found here.
Step 4 - Upload Your Code
You're going some arduino code to control your servo. Fortunately the developer of the Arduino Motor Control app offers a simple bit of code that makes it simple to get going if you're not good with code (like me). There is a link to the code sample on the app's description here.
Step 5 - Connect Your Phone To The Bluetooth Module
I don't go into detail about how to accomplish this but it's more or less the same as connecting any other bluetooth device to your phone. The documentation for the both the bluetooth module and shield can be found under the 'Useful Links' tab on the RobotShop product page.
Step 6 - Build Something Awesome
Now you're connected, you can use the app to drive your linear servo in and out using the slider within the app.
Here is a video demonstrating the setup outlined above.