Pico2DVI the Graphics Card You Can Build Yourself!

by Aiden C in Circuits > Electronics

290 Views, 5 Favorites, 0 Comments

Pico2DVI the Graphics Card You Can Build Yourself!

cover.jpg
subzero cooler.png
schematic.png
pcb.png

Recently, I began exploring circuit design, and I liked the idea of creating my own custom graphics card because it sounded like a fun project. After some back and forth of choosing requirements for the GPU, I settled on using a Raspberry Pi Pico as the main processor. It already had a graphics library made for it, which would make adding HDMI support simple. I saw PicoDVI by Luke Wren, but I wanted to add more RAM and some extra capabilities. I added 32MB of VRAM (Video Random Access Memory), which is about 250 times less capacity and 36 million times slower than the memory on a modern GPU. (As you can probably tell, I was not going for speed.) The Pico also has Wi-Fi and extra general-purpose pins. That means the card can take in user inputs like a keyboard and output data in ways other than just a display. It can also fetch data (e.g stock market information) from the Internet. I prioritized versatility over speed.

Supplies

equipment.JPG

Tools and Materials:

  1. Soldering Iron
  2. Hot Air Gun
  3. Wire Cutters
  4. Wire Strippers
  5. Pliers
  6. Solder (Strand and Paste)
  7. Soldering Wick
  8. Flux
  9. Tweezers
  10. Soldering Mat
  11. Computer
  12. USB-A to USB-Micro Cable
  13. HDMI Cable
  14. Power Supply with 6 Pin PCIe Cable (If using sub-zero cooler)


Parts:

Base: ~$75 with PCB (Required)

  1. The PCB (You can find the gerber files on Github)
  2. Raspberry Pi Pico 2W
  3. 8x Memory Chips
  4. Power Connector
  5. 5V Power Regulator
  6. HDMI Connector
  7. 8x 22 Ohm Resistor
  8. 5.1K Ohm Resistor
  9. 10K Ohm Resistor
  10. 8x 0.1μF Capacitor
  11. 0.33μF Capacitor
  12. 1μF Capacitor
  13. 4.7μF Capacitor
  14. GPU Port


I recommend ordering more of the components that are hard to solder to allow room for mistakes. (Resistors, capacitors, memory chips, and the HDMI connector)


Sub-zero Cooler: ~$40 (Optional)

  1. 3D printed parts (Also on Github)
  2. MOSFET
  3. Thermal Pad
  4. Peltier Module
  5. Heatsink
  6. Fan
  7. 8x Zipties (Width < 3mm)
  8. Thermal Paste


I/O Addons: ~$50 (Optional)

  1. Cable
  2. Breadboard Port
  3. Breadboard
  4. Buttons
  5. Wire

Soldering

Soldering Order.png
side.png
DSC05795.JPG
DSC05801.JPG

Solder each component from smallest to largest. (Red to purple)

1. Resistors and Capacitors (Red)

Since these components are small, I recommend setting your hot air gun fan down to the lowest setting so the tiny parts don't blow away.

Here is a list of each component and its value. (Labeled on the PCB)

  1. C1: 0.33μF
  2. C2: 1μF
  3. C3-10: 0.1μF
  4. C11: 4.7μF
  5. R0: 10K ohm
  6. R1: 5.1K ohm
  7. R2-9: 22 ohm

2. Memory Chips (Orange)

Unlike the previous parts, the memory chips are directional, so orientation matters. To get the orientation right, look at each one from the side. There should be one side with a bevel of 45 degrees. That side has pin one. When you attach it, make sure that side is next to the little dot that is printed on the circuit board.

3. 5V regulator (Yellow)

This component is easier than the ones before. When soldering, you should use a little extra solder paste on the square pad. It spreads out and allows for better connection and heat dissipation.

4. HDMI connector (Green)

This is definitely the hardest component to solder. Don't worry if it takes a few attempts ;)

The most important part of soldering the HDMI connector is making sure there is enough solder for a good connection but making sure there isn't a bridge between the pins.

First, add a small amount of paste and use your soldering iron to spread it out by swiping it back and forth. Then take your HDMI connector and place it in the through holes. Put the PCB on a stand so the pins are flush with the board, or snip a small amount off the mounting shield. The goal is to make the connector flat with the board. Use a hot air gun to make a connection with the pins. DO NOT USE A SOLDERING IRON! If you mess up and the tip hits the plastic part of the connector, it will melt and ruin it.

With a phone camera or magnifying glass, check the pins to see if there is a bridge between them. If there is a bridge, then it will short circuit. Also, check with a pair of tweezers to see if each pin wiggles or not. If it does, then that means the connection is not good and will not work. If you need to try again you can use your hot air gun and pull the connector off. Once all the pins have a solid connection, you can use your soldering iron on the through hole parts.

5. Raspberry Pi Pico (Blue)

The hard part is done and the rest is simple. For the Pico, add a little bit of paste on each of the 40 pads. Then line up the component and use a hot air gun.

6. THT components (Purple)

These are pretty easy. For the power and peripheral connector, just solder it like a normal THT part. For the MOSFET (Only for the Cooler), make a 90 degree bend around 8 mm from the bottom. When you finish soldering it, you can use wire cutters to get rid of the extra part poking out of the bottom.

7. If you are not making the cooler, skip to step 5.

Cutting Wires (Only for the Cooler)

DSC05672.JPG
thermal pad.png
DSC05712.JPG
DSC05718.JPG
DSC05719.JPG
DSC05729.JPG
DSC05733.JPG
DSC05763.JPG

Thermal Pad

First, take the 30mm² thermal pad and cut it in half. Then, stack them so you have a tower. Last, cut 10mm off of that piece and you should be left with a thermal pad that is 15x10x3mm. Take it and stick it onto the processor. (The black chip, not the silver Wi-Fi module.)

3D Printed Parts

Take the mounting piece with the two channels in it and drop it on the left side with the cutout for the components matching. Attach the right piece the same way.

Peltier Module

Put the module in the cutout. The module has to be the right way, so make sure the side without writing is on top. Then wrap the wires around the 60x60mm unit to measure out the length. The Peltier module goes into the big holes. The square hole is positive and the circle hole is negative. Use wire cutters and strippers to get the wire to size.

Heatsink

Place the heatsink on top of the Peltier module. (Do not add thermal paste yet.) The fins should be facing towards the PCIe adapter.

Fan

Put the fan on top with the wires going out the right side. Measure and cut the wires the same way with the Peltier module. The wires route to the small holes.

Soldering Again... (Only for the Cooler)

DSC05777.JPG
DSC05781.JPG

First disassemble the graphics card, then solder the fan and Peltier Module to the PCB.

Assembly (Only for Cooler)

DSC05720.JPG
DSC05736.JPG
DSC05742.JPG
DSC05744.JPG
DSC05746.JPG
DSC05751.JPG
DSC05868.JPG

Now, you can reassemble the graphics card the same way you did before, just with thermal paste this time.


Zipties

To keep everything together, I decided to use zipties because the screw holes on the heatsink and fan are not aligned.

First, take eight zipties and shape them into four Ls. Put them in the graphics card as shown in the images. Pull them tight until the cooling assembly is secure.

Lastly, cut the zipties.

Install

preferences.PNG
board.PNG
lib.PNG

1.Install the Arduino IDE

2.In the IDE go to File → Preferences

3.Paste https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json into Additional Boards Manager

4.Go to Tools → Board → Boards Manager

5.Search for Raspberry Pi Pico/RP2040/RP2350

6.Click Install

7.Go to Tools → Manage Libraries

8.Search for PicoDVI - Adafruit Fork

9.Click install all

10.Download common_dvi_pin_configs.h

11.Paste into c:/Users/YourUsername/Documents/Arduino/libraries/PicoDVI_-_Adafruit_Fork/software/include

12.Click replace the file in the destination


If you followed this tutorial all the way, congrats! You finished making your own graphics card!


Example folder has a template with instructions on how to program the graphics card.

To upload code on the graphics card, press down the boot select button on the Pico. Plug it into your computer, then release the button. Before each time you upload code, first unplug the graphics card and repeat the process.

If you want to make a program more permanent you can plug it into a computer with a 6 pin PCIe power cable.

Hello World!

DSC05873.JPG

When I first got the graphics card working I was so excited. It took four revisions to get the circuit board design right. The months of designing and building finally paid off!

Then, I started work on making a frame to build off of. I first started to work on controlling the cooler. It uses a feedback loop so it can idle at a set temperature. It can even go below zero! Next, I added a overlay that shows all the data of the graphics card, including FPS, clock speed, and more. I also made a simple render script so that the card can display pixels instead of just plain text.

Conways Game of Life

DSC05883.JPG

Conway's Game of Life is a zero player game where there is a grid with cells. Each cell can either be alive or dead. The eight pixels around a cell are called its neighbors. If there are less than two neighbors, that cell will die. If there are two or three neighbors around a live cell, then it will move on to the next generation. If there are more than three neighbors, it will die. If there are exactly three cells around a dead cell, it becomes alive. These four simple rules create a complex system.

To make the game, I used two screen buffers. One buffer to render to the screen and in the background, I would use the second one to calculate the next generation. Each pixel needs to know its neighbors around it, so I created an indexing system. Each pixel has its own index which I add or subtract a certain value to get the position of the pixels around it. Using the position, it checks whether or not the cell is alive.

The Future

DSC05655.JPG
DSC05688.JPG

In the future, I want to expand this project by making a couple games like Tetris or maybe Doom. I think a simple raytracing engine would be cool. I have tried making a simple engine in Shadertoy and it was pretty fun. I could even use the memory to make a neural network!

But that is just what I want to do. If you create this project, I challenge you to create your own programs! There is a template where you can try making your own code.

Thanks for reading! This is my first Instructables so I hope you liked it!