Remote Controlled Slide Changer

RF-based remote-controlled slide changer using LPC2148 microcontroller as HID interface

Public Chat
Similar projects worth following
The aim of the project
The motive of our project is to design a remote-controlled slide changer using RF technology. For this, transmit the signals through a remote-controlled device, and at the receiving end, use a microcontroller to interface it with the PC for implementing the desired functionality.
Working of the Project
Once the user presses a remote button, the data will be sent to the encoder. The encoder converts this data into a serial data signal which is then serially transferred through RF transmitter and received by the RF receiver. The decoder at the receiving end is used to decode the serial data and retrieve the original signal. Using the LPC2148, as a hid keyboard interface device, implement the functionality of the received data in the PC and accordingly move the slides.

Uses C,LPC2148 microcontroller, encoder, decoder, RF transmitter , RF receiver,Keil IDE,Push buttons

Hardware level details:

1. Transmitter Operation

Encoder IC (HT12E) receives parallel data in the form of address bits and control bits.
The control signals from microcontroller along with 8 address bits constitute a set of 12 parallel signals. The encoder HT12E encodes these parallel signals into serial bits. Transmission is enabled by providing ground to pin14 (TE Pin in Encoder) which is active low. The control signals are given at pins 10-13 of HT12E. The serial data is fed to the RF transmitter through pin17 of HT12E.

2. Receiver Operation:

Transmitter, upon receiving serial data from encoder IC (HT12E), transmits it wirelessly to the RF receiver. The receiver, upon receiving these signals, sends them to the decoder IC (HT12D) through pin2. The serial data is received at the data pin (DIN, pin14) of HT12D.
The decoder then retrieves the original parallel format from the received serial data.

Software level details:

To convert LPC2148 into a HID device using the USB interface, main changes have to be done in the USB descriptor files. USB descriptor is the place, where the values of different descriptors like device, configuration, interface, report are configured. A device can be changed to HID devices like keyboard, mouse or joystick based on the values specified in these descriptors. There is no need to design a specific driver, alone making the OS recognize the device as a HID device (keyboard in our case) is sufficient.

To start with the basic, Keil provides an example setup code, which can be used to convert the LPC into a HID device. The source code is available at:

The basic code flow can be understood as:

GetInReport() is the function, which is called to receive the data stored in the InReport variable by the host. Similarly GetOutReport() is responsible to send the data from the host to the device using the OutReport, though it is not used in our implementation.

The value acquired through InReport variable is passed to the host using the endpoint0 buffer, “EP0Buf[0] = InReport” which is the by default control endpoint. But for the keyboard descriptor, the HID documentation states to have a 8 byte format of data with the first two bytes as modifier byte and reserved byte. The next six bytes contain the scan codes, unique for a key.

Thus, for better implementation, a structure has been defined as follows:

            typedef __packed struct keyboard_report_t

            {    BYTE modifier;

                 BYTE reserved;

                 BYTE keycode[6];

            } keyboard_st;

USB_Endpoint1 In has been used to send the data packets to the host. InReport  has been redefined as: BYTE InReport[8]; and it is written into the Endpoint1 In as:

USB_WriteEP(HID_EP_IN, InReport, sizeof(keyboard_st));

The changes done in USB descriptor have been summarized as follows:


remote header file

h - 1.03 kB - 11/26/2018 at 11:38



Remote functionality implementation

C Source File - 3.38 kB - 11/26/2018 at 11:38



Report for defining as hid keyboard

C Source File - 7.79 kB - 11/26/2018 at 08:10



descriptor header file

h - 1.77 kB - 11/26/2018 at 08:10



reciever end connection to lpc2148

JPEG Image - 110.04 kB - 11/26/2018 at 08:07


View all 6 files

  • 1 × LPC2148 Microcontroller
  • 1 × RF Transmitter & Reciever RF module 434
  • 1 × Coin Cell coin cell 3v
  • 1 × Resistors- 750K 750K
  • 1 × Resistor- 33K 33K

View all 14 components

  • Progress till 25-11-2018

    Sambit Patra11/26/2018 at 08:38 0 comments

    The remote was interfaced to lpc .

    Functionality of the remote was verified on the pc.

  • Progress till 21-11-2018

    Sambit Patra11/26/2018 at 08:37 0 comments

    Changed the report format of usb descriptor to keyboard format.

    Checked that micro-controller is being detected as hid keyboard interface device.

    For different scan-codes  of keyboard,functionality is checked in the pc.

    Changed the code in remote.c file for appropriate working of remote controlled slide.

    -- TO DO --

    Interfacing the remote-controller to pc through micro-controller and testing the slide change for appropriate key press.

  • Progress till 30-10-2018

    Sambit Patra11/26/2018 at 08:31 0 comments

    Transmitter,receiver,encoder and decoder were tested.

    Connected the push buttons to required  data lines of encoder.

    Remote controller circuit was designed.

    Designed and checked receiver end circuit.

    Proper output for pressing of push buttons were tested.

    --TO DO--

    Making LPC2148 as a hid keyboard device

View all 3 project logs

  • 1
    Code setup
    • Download example HID code from Keil website:
    • Make changes in the InReport size and a structure can be used to store the data format.
    • Configure the USB descriptors as explained in the project details.
  • 2
    Transmitter remote

    PCB can be designed for the remote on the transmitter side (breadboard  would also work). Make the necessary connections using the encoder and push buttons to transmit data through RF.

  • 3
    Final Step

    On the LPC, interface the RF receiver with the GPIO pins.

    Connect LPC with PC and flash the remote.c code. Disconnect and reconnect the LPC. The device must now be shown as a keyboard in Device Manager and can be directly used to change slides.

View all 3 instructions

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates