KVM Switching – PyQt and Arduino Leonardo

Introduction:

In this project, we’ve developed a unique KVM (Keyboard, Video, Mouse) switch solution that provides users with the ability to seamlessly switch between multiple computers and monitors, all while maintaining efficient performance and cost-effectiveness. By leveraging a combination of hardware components, including a central server, HDMI capture devices, Arduino Leonardos, and software solutions such as Django and PyQt, we’ve created a versatile system that surpasses traditional KVM switches in both functionality and affordability.

Don’t miss out on experiencing the future of KVM switching – check out my demo on YouTube now! 🚀

Overview:

Welcome to our groundbreaking project where we’ve redefined the KVM (Keyboard, Video, Mouse) switch game! Say goodbye to expensive, limited solutions because we’ve crafted an ingenious system that’s both cost-effective and superior in functionality.

Imagine seamlessly switching between multiple computers and monitors, controlling everything from one central server. Our innovative setup utilizes a Django server for real-time settings adjustments, enabling users to effortlessly direct their monitors to display different PCs and reroute HID (Human Interface Devices) like keyboards and mice with a few clicks.

But here’s where it gets truly revolutionary – our PyQT application, powered by GPU acceleration and cutting-edge image processing techniques, ensures lightning-fast encoding and display of HDMI inputs on respective monitors. No more annoying delays from HDMI to USB conversions – we’ve optimized every aspect for efficiency.

And let’s not forget our Arduino Leonardos, acting as the bridge between HID devices and target PCs. With custom C code, they seamlessly translate serial data into mouse and keyboard actions, making sure your commands are executed flawlessly across systems.

But it doesn’t stop there. Our secondary application decodes HID device inputs, ensuring compatibility with various devices and sending commands in real-time to the corresponding Leonardo connected to the target PC. It’s a symphony of synchronization and efficiency, all wrapped up in a safe multithreaded environment for seamless real-time IO processing.

1. Hardware Components:

  1. Central Server: Acts as the hub of the system, managing connections between computers, monitors, and HID (Human Interface Device) peripherals.
  2. HDMI Capture Devices: Used to capture HDMI output from each target computer and convert it into a format suitable for processing.
  3. Arduino Leonardos: Interface with HID peripherals (keyboards and mice) to enable seamless switching between devices.
  4. Monitors: Display the output from target computers, with the ability to dynamically switch between inputs.

2. Software Components:

  • Django Server: Provides a user-friendly interface for users to manage settings such as monitor assignments and HID device connections in real-time.
  • PyQt Application: Utilized for displaying the HDMI output from each target computer on the corresponding monitor. Implements image processing techniques for fast encoding and display.
  • HID Device Controller Application: Responsible for receiving settings from the Django server and connecting HID devices to the appropriate serial ports. Converts HID input into actionable commands for Arduino Leonardos.

3. System Workflow:

  • User Interaction: Users access the Django server to configure monitor assignments and HID device connections.
  • PyQt Display Application: Retrieves HDMI output from target computers using HDMI capture devices and displays it on the designated monitors. Utilizes GPU acceleration and image processing techniques for optimal performance.
  • HID Device Management: The HID Device Controller Application translates HID input into actionable commands and sends them to Arduino Leonardos connected to each target computer. Arduino Leonardos emulate HID devices, ensuring seamless interaction with the target computers.
  • Real-Time Updates: All system configurations are updated in real-time via communication between the Django server and the various software components, ensuring that changes take effect immediately.

4. Challenges and Solutions:

  • HDMI Capture Latency: Addressed by optimizing the PyQt application for fast encoding and display, leveraging GPU acceleration and image processing techniques.
  • HID Device Integration: Overcame the challenge of integrating diverse HID devices by developing a unified method for decoding input and transmitting commands to Arduino Leonardos.
  • Multithreading for Real-Time IO: Ensured system stability and responsiveness by implementing safe multithreading techniques to handle simultaneous input/output operations.

Conclusions:

  • Our DIY KVM switch solution offers a cost-effective and efficient alternative to traditional commercial products. By combining innovative hardware components with sophisticated software solutions, we’ve created a versatile system that meets the needs of modern users while remaining affordable and accessible. With further investment, we believe this project has the potential to disrupt the market and provide users with a superior KVM switch experience.

Leave a Comment