infrared remote


Let’s say I have a remote like this below.


If I buy multiple linear servos like these and want to assign each to one button to push, what are the things I need to set it all up?

linear servo

Here are what I can think of..

  • separate power source (e.g. 5v / 12v)
  • linear servo
  • motor driver board?

If there are smarter solutions to push physical buttons with a raspberry pi, I would also like to know.


closed as off-topic by MilliwaysjoanSeamusDarth Vader May 25 at 9:30

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • “This question does not appear to be specific to the Raspberry Pi within the scope defined in the help center.” – Milliways, joan, Seamus, Darth Vader

If this question can be reworded to fit the rules in the help center, please edit the question.

  • A rpi controlled device. Since I can’t brake the device open, I need to physically push the buttons. – kukrtMay 17 at 13:23
  • you can teach RPI to mimic the remote control. check the “second alternative” in my answer below – andrejMay 17 at 13:27
  • The remote controller is an example. The devise buttons have to be pressed physically from rpi. – kukrtMay 17 at 13:32

2 Answers


what’s the goal? An remote control robotic tester or an RPI controlled device?

Regarding the first one you will need the servo to move things in physical world. Here https://tutorials-raspberrypi.com/raspberry-pi-servo-motor-control/ is the one of many tutorials.

For the second you can buy infrared receiver (to detect what does the remote control sends when you press desired key) and infrared transmitter to mimic the same data to target.



Push remote button to control liner servo using Rpi software


The answer is in two parts:

  1. How to use universal remote controller buttons to control Rpi.
  2. How to use Rpi python program to PWM control linear servo.

For the remote controller part using Rpi, I found the following instructable the best, with very detailed instructions. I have also included some remote controller and infra red emitter and receiver datasheets in the references below.

Raspberry Pi Zero Universal Remote Instructable – bbtinkerer, instructables 2018

For the linear servo part, I only found the following tutorial good, except using Arduino.

Arduino Controlling Linear Servos Tutorial

I found the control method for standard servo and liner servo are more or less the same, using PWM, except with different width specs (standard servo 0.9~2.1mS, linear servo 0.4~2.4mS). Therefore the Rpi python PWM control functions for standard servos can be used without any modification, for linear servos, just changing the width parameters. The post below contains a complete listing of my fully debugged Rpi python PWM functions for controlling both standard servo and linear servos.

Rpi PWM Servo Control using GPIO – tlfong01

linear servo

PCA9685 16 Channel PWM Driver

And in case you don’t have enough Rpi GPIO going around entertain all your linear servos, you can consider asking PCA9685 16 channel PWM driver for help.

pca9685 dual board

My infrared remote controllers (AC, AirCon, Fan)

remote controllers


Universal Remote Controller

Raspberry Pi Zero Universal Remote Instructable – bbtinkerer, instructables 2018

AliExpress Universal TV Remote Control US$2.34

TSAL6200e IR LED Datasheet – Vishay

TSOP38238 IR Receiver – Vishay

Linear Servo

Arduino Controlling Linear Servos Tutorial

Youtube Controlling a mini Linear Servo – MadLittleMods 2014jan29

Amazon GS1502 1.5g Linear Servo 0.08kgcm, 0.12sec/60° at 3V7 50-330Hz, 900-2100uS – US$15/pair

PCA9685 16 Channel PWM Driver Servo Control Forum Discussion

Rpi PWM Servo Control using GPIO – tlfong01

Rpi PWM Servo Control using PCA9685 – tlfong01

Not the answer you’re looking for? Browse other questions tagged   or ask your own question.

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: