Making Veronica’s video permanent.
Now that the video board seems to be working, it’s time to make it a real PCB so it can be installed on Veronica’s backplane. I did this with my standard PCB manufacturing procedure, which I recently realized hasn’t been photographed very thoroughly before. Since I’ve done some very wordy articles lately, this seems like a good opportunity to do more of a photo diary. So, here’s the complete fabrication of Veronica’s VGA board, in tasty thousand-word chunks.
(By the way, the Eagle schematic and PCB layout are available for the final version of this VGA board)
Here’s how it begins- with transparencies made from the Eagle BRD file. I overlay two copies, in case the printer toner is a bit light in some areas. On the bench, you can see the presensitized PCB, with the protective white film still in place.
I tape the transparencies to an old picture frame. The Eagle file that generated these masks is visible in the background.
I clamp the board against the masks using the backing plate of the picture frame, then put it a couple of inches from my desk lamp for 20 minutes. The lamp has a daylight-spectrum CFL bulb in it.
The board comes out solid green after exposure, but 60 seconds of sloshing in the developer, and magic happens.
Fully developed, this board is ready for the etchant. Note that, below my index finger on the right, I damaged the board a bit before exposure. This caused a little blob of copper where it should be solid green. No biggie.
The etchant is my usual 1:1 solution of vinegar and 3% hydrogen peroxide, with a bunch of salt. Within about a minute, the copper acquires this yellow-brown gunk on it. That’s how you know it’s working.
Wiping that gunk off every minute or so speeds up the etching dramatically.
Towards the end, the solution starts to get bright green from all the dissolved copper salts.
All the copper is gone, so it’s pulled out of the etchant, and given a quick rinse with water.
A quick wipe with nail polish remover (acetone) and we have our shiny new PCB!
Next is the drilling. This is a bit tedious, but doesn’t really take long. Choose the smallest bit that will fit each component lead, so as not to risk pulling the copper off the board.
All drilled, and ready for the soldering iron!
Let me pause for a moment and point out an embarrassing error I made on this board. If you look closely, you may note that the board in the rest of these photos is different than the one I etched above. The reason is that I applied the mask to the board upside down (way back in the first step), and thus I ended up with a mirror-image of the PCB. Sadly I didn’t realize this until the board was all drilled and ready to go. A few hours of work down the drain, but that’s how it goes sometimes. I knocked out another board (triple-checking the orientation of the mask this time) and laughed at myself as much as possible along the way.
With the board drilled, I usually start by laying out the jumpers, starting with grounds. I lay out the components and jumpers based on interference order. Eagle is helpful here, as it can guide you as to what order to place things in to minimize routing issues with the jumpers.
Normally I solder IC sockets to the board, and place the ICs last. However, this is a high-speed board, and I need to minimize noise, so the chips are soldered directly. Note the double-stack of SRAM chips, which I’m doing to save board space. I could just use a bigger SRAM, but I like the retro purity of using the 32K DIPs.
I continue to work my way around the board, placing stuff that will interfere with other stuff first. I try to color-code jumpers where possible, to imply meaning. This can help with debugging later.
All done! This part is always exciting- will it work?
I have a little procedure I go through when testing out a new board. I don’t just plug it in and turn it on, since that might fry something and make a small problem into a very big one. Here’s my process for bringing up a fresh circuit:
- Visually inspect the board for broken traces and solder bridges. A lighted magnifying headset is the shizzle for this.
- Check resistance from main Vcc to Ground. This is an easy sanity check for any dead shorts that would blow a fuse on the power supply.
- Hook up power leads to the board, then turn on the bench supply. Very quickly check the amp load and turn it off if it’s higher than expected. You can catch less obvious shorts with no damage to the board this way.
- If the circuit powers up and draws nominal current, then any remaining bugs are logical and not dangerous to the board, so it’s safe to start testing functionality.
In the case of this board, test #1 and #2 passed, but test #3 didn’t. When I first powered up the board, it was drawing over 2 amps. I would expect more like 100mA, so something was wrong. Since resistance from Vcc to Ground was comfortably high, this high current draw was likely due to a backwards chip (effectively creating an internal short in that chip). Sure enough, I found one my 74HC688 comparators was upside down. A bit tedious to desolder and resolder it (wish I could have used sockets on this board!), but an easy fix nonetheless. After that, the board was drawing ~120mA, which is right around what I would expect.
Since this is a Veronica board, it’s easy to just slap it in the backplane for testing. The VGA board is a computer in its own right, so the backplane is just supplying power here. Removing the other Veronica boards will protect them in case something major goes wrong. Before I can test it further, I need to use my trusty USBTiny ISP programmer to set the AVR fuses and upload the GPU code. Then, it’s time to plug in a monitor and see what happens!
First power-up produced this mess. Clearly something is not right! Since the signal is stable, the monitor has a good lock, and the garbage is repetitive in nature, it suggests something wrong with the VRAM. Inspecting the address lines, I found something interesting- I had used the wrong Eagle symbol for the SRAM! The pins were in the wrong order, and that problem propagated all the way down the manufacturing process. However, that’s actually harmless. It doesn’t really matter what order you assign the address lines in an SRAM, as long as you do it the same way every time. The real problem here is that I swapped a data line with the Chip Select line while soldering my jumpers. Whoops!
That’s better! The letters are a little furry, but that can be cleaned up in my signal generator code. Interestingly, this signal is very stable with no RF shielding (like my VGA dev board required). This is great, and seems to indicate that my efforts to reduce noise in the layout and construction of this board have paid off.
But wait- what’s this? After running my test routine to render a red box sprite, I got a blue box. That seems to suggest my R/B data lines on the VGA are reversed, yet the Veronica splash screen rendered properly. How is that possible? Well, if you look closely at the last picture, the red and blue are reversed there as well. It’s very subtle, and I missed it myself on first glance!
Swapping the red/blue lines has fixed that, so we’re all good now. Hooray! We have VGA.
Here’s the final board installed along side the CPU and ROM boards.Veronica finally has a way to make pretty pictures of her very own.
Here’s everything buttoned up in the case. Veronica now has a real VGA port on the back. The rest, as they say, is just a software problem.
My focus now will be on fleshing out the driver software for the VGA board. In particular, I’d like to get a text generator running so I can start doing something useful.