Introduction: DIY Portable KVM Crashcart From Recycled Laptop Provides VGA Display and USB Keyboard Touchpad With Optional Raspberry Pi
Troubleshooting a headless server sometimes requires a “Crash Cart” with a keyboard, video display, and mouse (KVM). This Instructable describes how to make a KVM by replacing the motherboard in a broken laptop with a Teensy keyboard/touchpad controller and a video converter card. The basic KVM (covered in steps 1 thru 9), displays the VGA video from the server and sends keyboard/touchpad data over USB to the server. The Raspberry Pi KVM also uses steps 1 thru 6 plus steps 10 thru 13. The Pi KVM can connect to the server VGA and USB ports just like the basic KVM. In addition, the HDMI and USB from the Pi can be connected to the LCD and keyboard/touchpad, creating a Linux laptop. The server or Pi USB is selected with a switch on the side of the laptop. Pressing Fn and F8 on the keyboard selects the server or Pi video for the display. An Ethernet patch cable gives the Pi access to the server via a web browser.
This project uses the ideas from the Instructable "How to Make a USB Laptop Keyboard Controller" in order to repurpose an old broken laptop into a useful server debug tool.
I will include download buttons for the relevant files in the Instructable. You can also go to my GitHub repository to view and download all relevent files.
Step 1: Parts List
1. Select a donor laptop with the features outlined in Step 2. Start with a broken laptop and the cost should be close to free.
2. Teensy USB Controller for the Keyboard and Touchpad as outlined in step 4.
- Teensy 3.2 from Amazon costs $24 Note: some laptops can use a Teensy LC from Amazon at $16 if you are building a basic KVM
- Keyboard Scanner board from my Instructable
- Flexible Printed Circuit (FPC) connector from AliExpress costs approximately $5 for a lot of 5
3. Micro USB breakout connector ADA1833 from Adafruit costs $4.74
4. Micro USB Male jack from Amazon costs $4.47 for lot of 10
5. 40cm long LVDS cable from EBay costs $7 (or extend the short cable that comes with the converter board)
Basic KVM Laptop:
6. VGA to LVDS Converter Board part number MT561-MD and backlight power supply from EBay costs $11
Total parts cost for a basic KVM is approximately $50
Raspberry Pi KVM Laptop:
6. VGA and HDMI to LVDS Converter Board part number M.NT68676.2A and backlight power supply from EBay costs $19.53
7. Raspberry Pi Model 3B+ from Amazon costs $38
8. 32 GB microSD memory from Amazon costs $8
9. SPST switch for Pi power from Digikey cost $3.37
10. Micro USB Male jack from Amazon for power to Pi costs $4.47 for lot of 10 (see above)
11. 2.5 mm x 5.5 mm Chassis mount power connector from Digikey cost $0.86
12. 2.5 mm x 5.5 mm power plug from Digikey cost $1.04
13. Chassis mount VGA male and female connectors from Amazon cost $8.00 for lot of 10
14. 3PDT switch for Teensy USB and power from Digikey cost $5.80
15. LM2596 DC-DC Buck Converter for Pi power from Amazon cost $13.29 for lot of 10
16. HDMI Cable 6” from Amazon cost $9
Total parts cost for a Pi KVM is approximately $130
Items from your junk drawer:
1. USB cable to the server
2. VGA cable to the server
3. RJ45 Ethernet Patch Cable
4. 12 Volt DC, 3 Amp wall supply
5. Miscellaneous items: wire, solder, flux, nuts, bolts, plastic washers, shrink tubing, tape, plastic tubing, hot glue, and wood.
Step 2: The Donor Laptop
Picking a good donor laptop will make this project go smoothly. This Instructable uses a Dell D620 for the basic KVM and the nearly identical D630 for the Raspberry Pi KVM. Many other laptop models can be used for this project, based on the following selection criteria:
- Select a laptop model with a reputation for sturdy construction. Business class models tend to hold up better than home use models. If the case is cracked or the snaps won’t hold the pieces together, it’s not worth using.
- You’re probably starting with a broken laptop so you won’t know if the display or keyboard are functional. Verify all the keys on the keyboard feel and look normal and there is no visible damage to the LCD.
- Choose a laptop with a thick base so that the connectors on the Video cards and Pi don’t need to be removed. The Dell Latitude D620 and D630 are barely tall enough if the leads and tabs from the thru-hole components are cut off the back side of the boards.
- The keyboard must have a generic Flexible Printed Circuit (FPC) cable with no more than 34 signal traces that have a 1mm or 0.8mm pitch. Note that some Dell laptops (like the D620/D630) have a solderless connector on the end of the cable that can be removed in order to use a generic FPC connector. A laptop that has a connector soldered on the end of its keyboard cable like the Lenovo Thinkpad T61 will need a special Teensy connector board.
- Confirm that the LCD model number is supported by the video converter card.
- With the motherboard, hard drive, DVD drive, and battery removed from the base, the laptop will be top heavy and easy to tip over. To help with this problem, leave the battery installed in the base (but not connected). Choose a laptop with the battery located under the palm rest instead of near the hinges to give the most stability.
Step 3: Laptop Disassembly
Search YouTube for motherboard and LCD replacement videos in order to learn how to disassemble your donor laptop. For the Dell Latitude D620/D630, use the YouTube videos from “The Parts-People” for motherboard replacement and LCD replacement. These videos will show you the tricks and hidden screws for getting started, then keep unscrewing everything until you have a bare case. You don’t need to take all of the mounting rails off of the LCD since you’re not replacing it. The inverter can be removed or left installed but it won’t be used. I removed it to make more space for the video cable. Take lots of pictures and notes to help you remember where all the screws go and how to put everything back together again.
Step 4: Keyboard
Review my Instructable “How to Make a USB Laptop Keyboard Controller” to get your keyboard working with a Teensy microcontroller mounted on my FPC connector board. If you are building a Pi KVM, you will need to use a Teensy 3.2. For the basic KVM, a Teensy LC may be usable. My FPC connector board will work with either Teensy. To determine which Teensy to use, count the number of signals on the FPC cable, then add two more for the touchpad signals. If the total is 27 or less, use a Teensy LC and a level translator as explained in step 5. The Teensy 3.2 can control up to 34 keyboard/touchpad signals without a level translator. If you are using all of the Teensy LC or 3.2 I/O pins, you must unsolder the LED on the Teensy to free up the last I/O pin.
Many laptop keyboards have been converted to USB and the Teensy keyboard controller code is at my repo. If your laptop is not there, you will need to follow the procedure from my Instructable for decoding the key matrix and modifying the code to work with your keyboard.
The Dell D620/D630 keyboard does not have a typical FPC cable and needs several modifications to interface with a generic connector. The pictures above show these modifications. To remove the solderless connector, work your fingernail under the locking bar to unsnap it and allow the FPC keyboard and trackpoint cables to be removed. The end of the keyboard FPC cable includes a thick plastic backing that makes the overall thickness about 0.54mm. This won’t fit in a generic FPC connector which is designed for a thickness of 0.31mm to 0.34mm (based on micrometer measurements of several keyboards). Gently pry off the plastic backing and replace it with 2 pieces of paper from a “stick-up” pad to make the total thickness about 0.32mm. Trim the side of the cable next to pin 1 to make the traces align with the connector pins. The trackpoint cable won’t be used and should be taped to the keyboard to keep it out of the way.
The matrix for the Dell D620/D630 keyboard can be downloaded below. The FPC pin numbers connected to each keyboard switch are given first, followed by the Teensy I/O number that is connected to the switch with a short wire to the connector board.
Teensy I/O’s 13, 14, 15, 23 and 32 will not be used by the keyboard and should not be jumpered to the board so they can be used by the touchpad, LEDs, and the HDMI video converter (if building a Pi KVM).
The keyboard has LEDs for Num Lock, Caps Lock, and Scroll Lock that need a dropping resistor as shown in the schematic above. The cathodes of the LEDs are connected to FPC pins 28, 29, and 30 which are wired to Teensy I/O’s 31, 30, and 29 via the flying leads on the backside. The anodes of the 3 LEDs are tied to FPC pin 32 and routed to the pad under Teensy I/O 15 (no jumper installed). I have soldered one side of a 330 Ω resistor to this pad and the other side to 5 volts. The single resistor approach was chosen instead of replacing 3 flying leads with separate cathode resistors. The brightness is reduced when 2 or 3 LEDs are turned on but it made the wiring easier.
The key matrix shows that FPC traces 1 and 34 (I/O’s 23 and 13) are not used by the keyboard. This frees up Teensy I/O 23 for the touchpad PS/2 clock signal. I/O 13 is connected to the LED on the Teensy and is programmed as a heartbeat to show the Teensy is alive.
The power switch on the keyboard is not used. This frees up Teensy I/O 14 for the touchpad PS/2 data signal. Teensy I/O 32 (on the backside) is also freed up and if you are building a Raspberry Pi KVM, you will need to solder a wire to it so it can be connected to the video card along with I/O 15 as explained in Step 10.
The Teensy 3.2 mounted on the keyboard scanner board with resistor and jumpers is shown above.
Step 5: Touchpad
This Instructable will focus on PS/2 touchpads but USB, Serial, ADB (Apple), or TTL are also used in laptops. Newer touchpads are powered with 3.3 volts but 5 volts is more common for an old thick laptop like the one you’ll use for this project. PS/2 is an open drain (aka open collector) clock and data bus that relies on pull up resistors to set the logic high level. My code bit-bangs two of the Teensy I/O pins to create a PS/2 clock and data bus per the Synaptics touchpad interface protocol given in documents 511-000275-01 and 510-000080. Any movement or button pushes are translated by the Teensy from PS/2 to USB mouse commands. You will need to locate the PS/2 connections on the touchpad so they can be wired to the Teensy. Google your touchpad part number to see if any pinout information exists. If not, search for your laptop’s schematic on line to identify the pinout, pull-up resistors and supply voltage at the motherboard touchpad connector. Use an ohm meter to trace the power, ground, clock, and data signals thru the touchpad cable to the connector on the touchpad.
The following websites may be helpful in determining the pinout of your touchpad.
Synaptics touchpads often have round test points that are perfect for attaching wires. The typical test point numbers for a Synaptics PS/2 touchpad are:
- Clock = T10. If T10 is not present (or it doesn't work), try T12
- Data = T11. If T11 is not present (or it doesn't work), try T13
- Ground = T23 or solder to the Ground Plane
- Power = T22. This test point provides an RC power filter. You can skip the power filter and tie directly to the power pins on the Synaptics chip at T20.
If your Synaptics touchpad has numbered test points but T10/T11 or T12/T13 are not found, the touchpad may use USB or some other protocol.
Elan touchpads use a different test point numbering system as follows:
- Clock = T7
- Data = T8
- Ground = TG0
- Power = TV0
The Teensy 3.2 has 5 volt tolerant I/O and will work with a 5 volt or 3.3 volt touchpad. No level translators are needed. If you add pull up resistors, they should go to the touchpad supply voltage.
The Teensy LC is not 5 volt tolerant and can be ruined if the I/O pins go to 5 volts.
If your touchpad is powered with 3.3 volts, the Teensy LC doesn’t need any level translation because the pull up resistors will go to 3.3 volts.
If your touchpad is powered with 5 volts and ohm meter measurements of the clock and data lines show no pullups, there is still a chance that the touchpad chip contains active pullups made from small (weak) PFETs that only come alive when powered. To check for active pullups, power the touchpad with 5 volts. Just measuring the voltage on the clock and data lines won't tell you much because they will probably float to power. A better test is to pull the signal low by temporarily connecting 10K resistors from clock to ground and from data to ground. If the clock and data voltage is near zero volts, there are definitely no pull ups so you won't need a level translator. Add your own 10K pull ups on clock and data to 3.3 volts and the Teensy LC should work fine.
If the clock and data voltage is well above ground when pulled down with a 10K resistor, the touchpad has active pull ups to 5 volts and you will need to level translate the clock and data signals for a Teensy LC. A level translator is also needed if ohm meter measurements showed pullup resistors. There are several ways to level shift the signals: The Adafruit 757 level converter can be used or the surface mount pads on my Keyboard Scanner LC circuit board shown above can be populated with FETs and resistors to make your own level translator. The 10K resistors on the 5 volt side of the translator should not be installed since the touchpad already has pullups.
- The 10K 0603 resistors are Digikey part number RHM10KADCT-ND
- The BSS138 FETs are Digikey part number BSS138CT-ND
Another (hack) method to translate a 5 volt signal is to make a voltage divider by adding a pull down resistor that overpowers the small active (PFET) pull up in the touchpad chip. This method would never be a reliable production solution because the voltage at the divider will vary from unit to unit and with temperature and time. The value of the resistor is determined by experimentation. If your touchpad has resistor pull ups to 5 volts, then adding pull down resistors to make 3.3 volt logic signals should be a reliable solution.
The following touchpad examples will show how to hook up and test a touchpad:
Example 1: The touchpad on the Dell D620 and D630 does not have numbered test points. To determine the pinout, I found the laptop’s schematic online and used an ohm meter to trace the signals thru the cable to the touchpad connector. The Dell D620/D630 touchpad cable is a bundle of wires instead of a ribbon cable, making it easy to modify. The picture above shows the cable before I cut off the section I didn’t need. Then I cut the 4 touchpad wires at the motherboard connector so I could solder header pins for easy attachment to the Teensy. The 5 volt, ground, clock and data locations on the touchpad board are shown above. The Clock and Data signals measure 19K Ω to 5 volts and 57K Ω to ground. This pull up/down resistor combination gives an equivalent pull up of 14K Ω to 3.7 volts. No additional pullups are needed to make this touchpad work with a Teensy 3.2. I didn't bother testing the touchpad with a Teensy LC because the keyboard for this laptop has more pins than the LC can handle. The Dell D630 keyboard and touchpad code for the basic KVM can be downloaded below.
Example 2: The Dell 1545 touchpad shown above has a 4 pin connector that is cabled to the motherboard. Ground is the connector pin tied to the large ground plane that covers most of the board. Power is the wide trace that goes to the low value resistors of an RC filter. The other side of the resistors go to capacitors for the filter (see schematic above). The other 2 pins on the connector are the clock and data and they are identified by trial and error. An ohm meter shows both pins measure open to power so no obvious pull ups. To see if the chip contains active pull ups, I connected 10K resistors to ground on the clock and data. Powering up the touchpad with 3.3 volts (just to be safe) showed the clock and data at about 2.5 volts indicating active pull ups. If there were no pull ups, the clock and data would have been at 0 volts. I removed the 10K resistors and connected the clock and data to a Teensy 3.2. I tried swapping the clock and data lines but the touchpad would not work at 3.3 volts. Changing the touchpad power to 5 volts, I was able to find the clock and data connections that worked.
A level translator will allow the Teensy LC to reliably work with this 5 volt touchpad. I successfully used the "hack" method of adding clock and data pull down resistors and found that 4.6K on the data and 4K on the clock pulls these signals slightly below 3.3 volts.
Example 3: The Synaptics 920-000702-04 touchpad is from an HP DV9000 laptop. I soldered PS/2 and power wires from a Teensy 3.2 to the standard T10, T11, T22, and T23 Synaptics test points. It was hard to heat up the ground plane to solder a wire to pad 23 so I soldered to a nearby capacitor instead. The clock and data pins measure several Mega ohms to power. I found some websites that said this touchpad is powered with 3.3 volts and other sites said 5 volts so to be safe, I powered the touchpad with 3.3 volts first. With 10K pull downs on the clock and data, their voltage was about 2.2 volts, indicating there are active pull ups. Removing the pull downs and trying the Teensy 3.2 showed the touchpad worked at 3.3 volts. Out of curiosity, I powered the touchpad with 5 volts and it also worked so apparently this touchpad is capable of dual voltage operation.
No resistors are needed for the Teensy LC when the touchpad is powered with 3.3 volts.
Basic method for pin identification: If you can't find any information for your touchpad, use resistance and voltage measurements to determine the pinout. Most touchpad circuit boards are routed on the top layer and they use the remaining copper to make a ground plane. The ground pin on the connector will be tied to the ground plane. Different sections of the plane will be tied together with zero ohm resistors that jump over the signal traces. The power connector pin will go to a wide trace that routes to one or two low value resistors for the RC filter. If there are too many possible signal pins on the connector to use the trial and error method, use the following procedure to weed out the obvious pins that can't be clock or data:
Only look at connector pins that go directly to the main touchpad chip. Measure and record the resistance for each of these pins to power and to ground. While taking these measurements, push the left and right touchpad buttons to see if the resistance changes. Put 3.3 volts across the touchpad power and ground pins, then measure and record the voltage on each of the possible pins with a 10K pull down resistor to ground followed by the same resistor pulled up to 3.3 volts. Remove the resistors and push the left and right touchpad buttons to see if the pin voltage changes. Analyze the results of the resistance and voltage measurements as follows:
- Eliminate any pin that measures 2KΩ or less to power or to ground.
- Eliminate any pin that has a significant change in resistance or voltage when a button is pushed.
- Eliminate any pin that measures close to 3.3 volts when connected to a 10K pull down resistor.
- Eliminate any pin that measures close to 0 volts when connected to a 10K pull up resistor.
- Group pins together that have similar measurements in order to test with the Teensy.
Hopefully you have reduced the number of possible clock and data signals and can use the trial and error method to find the correct 2 pin combination. Add 10K pull up resistors from the clock and data pins to the supply voltage. You can always try removing them once you get the touchpad working. If you don't know the touchpad supply voltage, try 3.3 volts first. Connect two of the Teensy I/O pins to the suspected clock and data connector pins. Download the touchpad code below into the Arduino IDE and edit the clock and data pins to match the I/O numbers wired to the touchpad. Under Tools, set the code to the Teensy model you are using and to "Keyboard+Mouse+Joystick". Compile and load the code into the Teensy. If the LED on the Teensy stays off, the touchpad received the reset command and gave the proper response over the clock/data bus. Swipe your finger across the touchpad and push the buttons to confirm proper operation. If the Teensy LED is turned on, the touchpad failed to communicate with the Teensy. Confirm no operation by swiping your finger across the touchpad. Swap the clock and data pins in the Teensy code, recompile and try again. If that doesn't work, move the jumpers to the next possible connector pins. Keep trying until every pin combination has been tested. If no success, increase the touchpad supply voltage to 5 volts and try all possible pin combinations again. If you are using a Teensy LC, use a level translator to avoid applying 5 volts to the I/O pins.
Step 6: LVDS Cable Modifications
The LVDS cable that comes with the video card is only about 10.4 inches long (26.5cm) which will probably not reach the converter card when it’s mounted in your laptop base. You can purchase a 15.7 inch (40cm) LVDS cable for about $7 that will be long enough to reach the video board. Do an EBay search on “40cm FIX 30 Pin 1ch 6bit LVDS Cable”, “… 2ch 6bit …” or “… 2ch 8bit …” depending on which protocol your LCD uses. These cables bundle all the wires together and are much thicker than the original flat cable so you may have problems mounting the LCD back into the lid without bowing the panel. To fix this problem, remove the tape that bundles the wires together for the section of the cable that is behind the LCD panel. Place the wires side by side on a piece of tape to hold them flat as shown above. The flat cable easily fits behind the panel without bending the LCD. You will also have to lengthen the 2 wires for the backlight power supply so the inverter can be located in the laptop base.
Instead of purchasing a longer video cable, you can lengthen the short cable that comes with the kit. I used 30 gauge wires laid side by side on a piece of tape as shown above and soldered the connectors on both ends.
Ohm out your cable before doing any modifications so you can verify the extended cable is built correctly. The 3 most common LVDS cable pinouts can be downloaded below.
Step 7: VGA Converter Board - KVM Without a Pi
Jump to Step 10 if you are building a KVM with a Raspberry Pi.
A basic KVM without a Raspberry Pi only needs a VGA video input. The MT561-MD VGA to LVDS converter card shown above is smaller and less expensive than an HDMI converter. Staking pins A thru H select 1 of 25 possible LCD settings by installing a shorting bar that connects the pin to ground. There are additional staking pins to select the LCD supply voltage.
Locate your LCD part number on the back of your display and find its datasheet online. You will need to know the resolution, interface protocol, supply voltage, and the number of cold cathode fluorescent lamps (CCFL). My Dell D620 has a LG Philips LCD part number LP141WP1. A web search found the Dell LCD’s Datasheet with the following specifications: Resolution is 1440 x 900. The LVDS interface is 2 channel 6 bit. The LCD is powered with 3.3 volts. The Backlight uses a single CCFL (it has a single backlight high voltage connector). Download the PDF below that shows the 25 configuration settings that are possible with the MT561-MD. This information is also on the back side of the board (with a few typos). The Dell D620 specifications match those on line 18 so I installed a shorting bar on staking pins C and E and set the supply voltage staking pin to 3.3 volts. If you see your LCD parameters in the list, the board should work with your display. Do a search on EBay for “MT561-MD VGA to LVDS converter card”. Send an EBay message to the seller with the part number of your LCD so they can confirm that their board will work. Several EBay sellers offer the converter card for about $11 but they all say the backlight inverter is not included. I chose EBay seller “pcparts.direct” and I asked if they sold the inverter. They answered that they would include it with the converter card at no extra cost. If you have to purchase an inverter, the Universal 1 Lamp CCFL Backlight Inverter Board costs about $6.
Step 8: Prepare Chassis - KVM Without a Pi
The pictures above show the bare Dell D620 case before and after modifications. The top half of the base is plastic and easy to trim with wire cutters but the bottom half is cast aluminum. A cutting wheel on the Dremel tool works best for trimming off any mounting posts or ribs on the base.
Step 9: Place Components - KVM Without a Pi
All of the boards in the picture above are bolted to the base with plastic washers as standoffs.
I cut plastic icemaker water hose to use as spacers for the screw posts that hold the top and bottom half of the base together. The old motherboard was held in place between these posts. If you screw the top and bottom halves together without putting something between the mounting posts, the case will deform and possibly crack. I trimmed the excess leads for all thru-hole components on the video boards and covered their backside with electrical tape to avoid shorting to the base. The Teensy keyboard controller board must be located within reach of, and in-line with the FPC cable yet also be accessible for attaching the keyboard. The video converter board must be located within reach of the LVDS cable. The same is true for the backlight inverter board. Both video boards need to be mounted in a location that allows the LCD and backlight cables to be connected after the top half of the base is attached to the bottom half.
The D620 had a serial port connector on the back with the right hole spacing for the chassis mount VGA connector that comes with the kit. I had to extend the VGA cable so it would reach the chassis opening. The before/after pictures show how I used my Dremel tool on the top of the VGA connector to make it fit.
Next to the VGA connector is another chassis opening that I used for my Adafruit ADA1833 micro USB connector. I used a piece of wood to center the connector in the chassis opening. I made a short 4 wire USB cable from the Adafruit connector to a micro USB connector that plugs into the Teensy. The Teensy and touchpad are powered with 5 volts from the Server USB. The 12 volts for the video converter board is provided by a wall-wort supply with a standard 2.5mm x 5.5mm connector. I installed a mating connector where the telephone modem jack was originally located. I had to use my Dremel to enlarge the bottom of the opening so the power connector would fit. The power wires from the video board to the chassis connector were also lengthened.
This is the last Step for building the Basic KVM laptop pictured above. The following steps are for building a KVM laptop with a Raspberry Pi.
Step 10: VGA and HDMI Converter - KVM With a Pi
Steps 10 thru 13 are for building a KVM that includes a Raspberry Pi.
The M.NT68676.2A converter card is needed to display the HDMI video output from the Raspberry Pi or the VGA video from a server. The Monitor Control Board Specification gives the interface definition of this video board. The front and back sides are shown above.
As described in Step 7, locate your LCD part number on the back of the display. Do a search on EBay for “M.NT68676.2A converter card”. Send an EBay message to the seller with the part number of your LCD so they can confirm that their board will work. Several EBay sellers offer this board and the inverter for $20 to $30. I chose EBay seller “pcparts.direct” because they had the lowest price. When you purchase the board, send the seller a message asking them to flash the board with your LCD’s parameters.
When the board arrives, confirm the card works before modifying the cables. To change the language on the menu from Chinese to English, use the keypad sequence:
- Menu, Right, Menu, Menu, Left, and then Menu to select English.
Find the brightness and contrast and adjust them to your liking before chopping up the keypad cable. These signals have pull ups to 3.3 volts on the video card and a key press sends the signal to 0 volts. I have connected Teensy I/O pins 15 and 32 to the video card Menu pin (K4) and Right pin (K1) by modifying the keypad cable as shown above. This allows the Teensy to perform key presses that drill down thru the menus to the Setup-Input screen in order to select HDMI (from the Pi) or VGA (from the server).
When you press Fn and F8 on the keyboard, the Teensy routine will pulse “Menu” and “Right” in the following sequence:
- Menu, Right, Menu, Right, Right, Right, Right, Menu.
At this point you will see the Setup – Input screen shown above. Continue to hold Fn and F8 and the Teensy will pulse the “Right” signal every second. This will cause the highlighted video source to cycle from VGA, to DVI, to HDMI. Release the F8 key when the desired video input is highlighted and the Teensy will pulse Menu to select it.
The Teensy code for the D630 keyboard, touchpad, and video control can be downloaded below.
If there is only one active video input, the video converter card automatically finds it. You only need to use the Fn-F8 method if the Pi is turned on and the VGA cable is connected to the server (i.e. both video sources are active).
The M.NT68676.2A board uses the same LVDS cable as the MT561-MD VGA converter board and it will arrive with a cable that is too short to use for this project. You can either extend the cable or purchase the 15.7 inch (40cm) LVDS cable for about $7, as described in Step 6. The board comes with the same generic backlight power supply used with the MT561-MD. You will have to lengthen the 2 wires out of the LCD for the backlight power supply to be located in the laptop base.
Step 11: Prepare the Chassis - KVM With a Pi
The picture above shows the chassis modifications made with a Dremel tool. The wall next to the hard drive bay was removed to improve air flow to the Pi. Holes were drilled under the fan to provide cool input air. The video converter and Pi are a tight fit which required removing any posts or ribs in the floor under the circuit boards. Wire cutters were used to remove all leads sticking out of the back side of the boards. The back sides were covered with electrical tape just to be safe.
Step 12: Wiring - KVM With a Pi
I connected the wires and cables per the schematic shown above. 12 volts from the wall supply is connected to the M.NT68676.2A video card and switched to an adjustable buck regulator. The buck regulator is set to 5 volts to power the Fan, Pi and Teensy. The Fan is the original laptop fan, rotated 180° to blow on the Pi. The USB from the Teensy is routed to the server or the Pi with a 3PDT Switch. Two poles switch the USB data signals and a third pole switches either the server 5 volts or the Pi 5 volts to the Teensy. The on-off-on 3PDT switch provides a break-before-make so the Teensy loses power when switched from one host to the other. The Teensy then boots up in about 3 seconds and connects to the new host as if the USB cable was just plugged in.
Step 13: Place Components - KVM With a Pi
The components pictured above are bolted to the chassis with plastic washers as spacers. The Raspberry Pi is positioned in the old hard drive bay with the USB and network connectors sticking out the side. The Pi power switch is mounted in the chassis hole that was used for the input power connector. The USB switch is mounted in the chassis hole that was used for the earphone jack.
The picture above shows the base prior to installing the keyboard. The LVDS cable was easy to connect to the video board but the backlight cable needed needle nose pliers to connect to the inverter board. The keyboard had to be held sideways to connect the FPC cable to the Teensy board but with some patience, it slid into the connector. I did a quick check of the keyboard before screwing everything together in case I needed to move the FPC cable sideways to align the contacts.
The finished Pi KVM laptop is shown above from the front, sides and back.
The left side of the laptop has the Pi USB and network connectors as well as the USB switch that selects whether the server or the Pi is connected to the Teensy keyboard controller. A dust cover is installed in the Pi USB connector that is connected to the USB switch via wires soldered on the backside of the Pi. I used my Dremel to cut an opening for the Pi connectors in the old hard drive face plate.
I removed the DVD door from the player and used a hot glue gun to attach it to the opening in the base. The high voltage backlight power supply is mounted behind the door so this keeps my fingers from accidentally touching the supply.
The rear of the laptop has connectors for USB and VGA to the server, 12VDC input power, and a switch to turn on the Raspberry Pi.
Step 14: Conclusion
Testing on various servers has shown the basic KVM and Pi KVM laptops work perfectly. Front panel VGA and USB connectors provide a simple way for accessing and debugging a crashed server, especially if the network interface is down. The KVM laptop is also useful when doing the initial setup of a new server. Once the low level setup is complete, a Pi KVM can use its network connection to the server to download the operational software. In conclusion, this portable KVM laptop can replace the bulky monitor and keyboard crash-cart plus the Pi KVM provides the technician with a Linux laptop that can be networked directly to the server.
I have also built a KVM using a Toshiba 2415 laptop. This KVM uses HDMI instead of VGA as shown in the pictures above. The detailed build instructions with parts list and code can be found at my GitHub repo.
If you want your KVM to not need a power cord, check out my Instructable to make a "Battery Powered Raspberry Pi in a Repurposed Laptop". In addition to describing the Lithium battery charger, there is Pi software to read the battery status registers over an SMBus and display a fuel gauge.
I hope this Instructable helps you re-purpose your old laptop into a KVM. Leave a comment below if you have any questions, comments, or corrections.
Participated in the
1 Person Made This Project!
- brian03079 made it!