This project implements an infrared (IR) remote-controlled LED system using an AVR microcontroller. It allows users to adjust LED brightness and toggle RGB LED colors using a compatible IR remote control.
- Adjust RGB LED colors with volume up and down commands.
- Control LED brightness with channel up and down commands.
- Turn off all LEDs with the power command.
- Smooth LED dimming achieved through software PWM.
- AVR microcontroller (e.g., ATmega328P or Arduino uno)
- 1x IR receiver (VS1838B)
- 5x LEDs
- 4x single-color
- 1x RKGB
- 7x 330 Ohms resistors
- 1x IR remote control
- 1x Power supply (9V)
For PCB
- 2x 20pf ceramic capacitors
- 2x 10uf 50V electrolytic capacitor
- 1x 16Mhz crystal osclilator
- 1x 100 Ohms resistors
- 2x 10k Ohms resistors
- 1x PCB mount DC jack
- 1x 28 pin IC socket
- 1x 1x5 Female header SIL
- 1x 7805 5V voltage regulator
- 1x ATMEGA328P IC
Prototype |
PCB |
Pinout |
- AVR-GCC toolchain
- AVRDUDE (for flashing the microcontroller)
- Required AVR libraries (included in the
./src/libs
directory)- IRremote.h
- softwarePWM.h
- uart.h (Optional)
- Connect the hardware components according to the schematic.
- Clone this repository to your local machine.
- Compile the source code using the AVR-GCC toolchain.
make all
- Flash the compiled binary onto the AVR microcontroller using AVRDUDE.
make flash
Build the docker image for easy toolchain deployment
- Build the image
docker build -f Dockerfile -t avr-dev .
- Run the container
docker run --rm -it --name avr-dev --device=/dev/ttyACM0 avr-dev
- Flash
make flash
- Power on the system.
- Point the IR remote control towards the IR receiver module.
- Press the appropriate buttons on the remote control to control the LEDs:
- Volume up/down: Change RGB LED colors.
- Channel up/down: Adjust LED brightness.
- Power: Turn off all LEDs.
- LED status updates will be displayed via UART communication (if needed).
- Uncomment uart if needed.
- You may need to change command codes according to your IR remote, use uart to find your codes.
- Changing ports have to be changed in softwarePWM.h's channel sections.
- IRremote.h - Liviu Istrate
- softwarePWM.h - Liviu Istrate
Contributions are welcome! Feel free to submit bug reports, feature requests, or pull requests.