Using a Pi Zero, I want to create a cheap keyboard interface and graphics card for my RC2014 homebrew computer
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Only a minor update here, but seeing that the Raspberry Pi foundation have updated the Pi Zero, I thought I should check that everything still works as expected with this RC2014 adapter board.
The most significant change is the addition of a camera header. This shouldn't affect this project, and everything else still seems pretty much the same, so I expected everything would work.
So, I soldered on the headers, inserted an SD card with Filippos PiGFX terminal software on, and yes! It still works just as planned!
Good work everybody!
Just a minor update here with regard to the software. As mentioned in the previous log, Filippo has been working on a bare metal terminal emulator for the Pi Zero which is ideal for this project.
The latest update for this is working sweet, using either the HDMI or composite ports to display the RC2014 with ANSI commands supported.
Filippos source code is up on Git Hub, although it's the kernel.img file that is needed to run this. Simply copy this to a FAT32 formatted micro SD card (Any size - it only takes a few kb), along with a copy of bootcode.bin and start.elf. These last two files can be copied from any SD card that runs on your Pi (they are different between Pi Zero, Pi 2, Pi 3 etc).
Note that this is currently display only - so you will need a serial keyboard or use a FTDI lead to type characters on the RC2014
Ok, thanks for the support from everyone that has followed this project. The goal of this project was to get a Raspberry Pi Zero working as a serial terminal on my RC2014 computer, and produce a PCB for this. Well, that has been achieved and this kit is now listed on Tindie!
I'm really happy with the way the PCB has turned out. Even the little mounting holes line up with the Pi Zero, so if additional mechanical support is needed, it's easy to do.
Setting it up is easy too. As mentioned in an earlier post, just one command to install Screen, then one command to run it after booting up.
The booting up time problem may be sorted however, as Hackaday.io user Filippo has been working on a bare metal ANSI emulator for the Pi. The code is available on Github and it already looks really promising
Best of all, is playing around with the ANSI escape codes for different colours. Wow, the RC2014 has colour! (Although worst of all is photographing a RC2014 with a bright magenta screen in the same shot!).
Ok, just a quick update about this little project.
First of all, a big Thank You to Hackaday.io and all the judges that thought this project was worthy of winning a Pi Zero! And a congratulations to the other 9 winners https://hackaday.io/contest/9326-adafruit-pi-zero-contest/log/32973-winners-of-the-10-pi-zeros
I have now sent off some new gerber files for an updated PCB. This gives more mechanical stability to the Pi Zero and fixes the composite output and should be in my Tindie store in a couple of weeks time.
Due to the limited supply of the Pi Zero, some people have asked if a regular non-Zero Pi will work. Well, yes, but no, well, kind of. Physically, it won't fit as the USB ports obscure the PCB - even without the composite socket (which you wouldn't need anyway)
However, if you used extra deep header sockets, or if you were to unsolder the header on the Pi and mount the boards back to back, then it would - although mechanical support would be a problem. Running jumper cables over to a Pi would work fine though.
Then install and run Screen;
sudo apt-get install screen screen /dev/ttyAMA0 115200
And you're good to go!
Ok, so the Pi Zero Contest is drawing to a close and I wanted to get one final update in before that ends. However, that doesn't mean that this is the end of this project for me. Sure, I've achieved something quite useful, but looking further ahead I see a real future for this little board.
Currently, I can plug my RC2014 in to a USB keyboard, VGA monitor (via adapter) and a power supply, wait 30 seconds then start up a terminal session and I'm ready to start punching in BASIC commands. That is pretty much what I wanted to achieve, so on that basis, I am happy.
But that doesn't mean that I am satisfied. There are a lot of tweaks and changes I plan to make. In no paticular order, this is what I want to do before I consider this complete;
Once I'm happy with all of that, I just need to try duplicating micro SD cards, get a bunch of boards made up and I can add it to the other RC2014 products on Tindie!
All of this will take a bit of time, and right now I don't seem to have enough of that. But hopefully soon I'll be able to update this project with the progress I've made.
Finally, I realize that this competition is mainly for fun, and I although I never had any real aspirations of winning, here's a photo of my cat Bartlett with my Raspberry Pi Zero... just in case the judges like things like that ;-)
So, after waiting for what seemed like an eternity (it really wasn't very long at all), I got a purple padded envelope through with OSHPark on it. Inside was 3 copies of my Pi Zero to RC2014 PCBs!
A quick check of the boards confirmed they'd been manufactured exactly as expected (ie perfectly!). Time to fire up the soldering iron and get testing!
As it was a test board, and I am tight when it comes to connectors, I didn't populate the entire 44 pins worth of sockets the Pi would connect to. It only needed a few for connectivity and mechanical location afterall;
Due to not ordering the components in time, I didn't have the phono socket for the composite output, so that would have to be bodged up for now. But, hey, it's a prototype, right?
The Pi itself fitted a treat. Even the holes I'd put in for PCB support lined up, although the connector seems to hold it well enough.
Initial testing proved it worked well through a mini-HDMI to VGA adapter. I soldered on a temporary lead to test the composite output, and that worked too, although the picture wasn't as great as I'd hoped. Possibly the composite traces on my PCB were too long, too thin or not shielded enough, or possibly the temporary connection was just a bit poor.
A couple of days later, the phono sockets arrived so I could complete the board. The socket fitted perfectly, which was great! However, no matter what I did, I couldn't get a picture through it! Eventually, it became apparent what was wrong; The ground and signal were reversed coming out of the phono socket!
If you recall from the previous log, this is a component that I had to add to Kicad manually. I took great care in making sure all the measurements and physical aspects were correct... although I paid less attention to the electrical side of things. In my defense, though, it seems perfectly reasonable that the center pin on a "triangle" of pins would be the signal and the other two would be ground, right? Wrong!
This, in fact was a good thing because it taught me several things; Read the datasheet. Read the datasheet again. Check the datasheet. Do not make assumptions. And READ THE DATASHEET!
Well, at least I had a working video out from the HDMI socket, so I could start looking at getting the Pi optimised for being a dumb terminal.
So, with breadboard and jumper wires, I had proved that a Pi Zero would be great as a keyboard / display adapter for the RC2014, but now I needed a neater and more permanent solution. Time to fire up Kicad...
On the face of it, there really isn't much to this. It's just a passive adapter between the Pi Zero and the RC2014 with a composite signal breakout. The Kicad library, however, didn't know what a Pi Zero was (or even a phono connector). I found some other Pi variants on line, but although the 40 pin header is the same, they didn't contain the extra 4 pins (reset and comp out), so I quickely drew up some new components
See, I told you it wasn't complicated! 5v power and ground go to the RC2014 header. Tx from the Pi goes via a jumper to Rx on the RC2014 (in case I want to add some other form of input at a later date) and Tx on the RC2014 goes via a voltage divider to Rx on the Pi. Then the ground and signal go out from the Pi to a connector for the composite out. Simples!
The PCB isn't much more complicated, although, again, I had to design new components for the Pi and also for the BNC adapter
For this board, I decided to get fancy and round off the corners! And also add some mounting holes that line up with the holes in the Pi Zero in case I want to bolt it to the board.
Once I was happy everything would turn out the way I wanted, off to OSHPark I went!
Then the waiting started...
After getting my paws on a Pi Zero, I needed to check three important things; Can the serial port talk to the RC2014, how do I use the composite output and what terminal emulation program does the NOOB install contain?
I don't have a HDMI monitor, so needed to use the composite output of the Pi. Soldering a photo adapter on to the output pins was easy enough, but initially, I couldn't get it displaying anything. Eventually I realised that you need to hold down 3 on the keyboard when it started up.
Once I had the Pi up and running, I quickly came to the conclusion that there weren't any terminal emulators included by default. So, I would have to download one... which meant I had to find a USB wifi dongle. And a hub. Ok, so after some trial and error,
sudo apt-get install screen
got me up and running with a command line terminal program. Next, to sort out the serial port stuff.
The Pi runs at 3v3 and the RC2014 runs at 5v, so plugging the two together isn't quite so straight forward. I know there are level converters that can allow 5v devices to interface with 3v3, but I wanted to try keeping things simple so used a 10k and 22k resistor as a voltage divider on the TX pin from the RC2014 to Rx (pin 10) on the Pi. This works out to 3.44v, and although the Pi isn't 5v tolerant, 3.44v seems to be close enough.
I ran the TX from the Pi (pin 8) directly in to the RX of the RC2014. Although it isn't the 5v isn't as high as the RC2014 would like, 3v3 is sufficiently high that it works ok. And, of course, it needs a common ground.
Initially, starting up Screen;
screen /dev/ttyAMA0 115200didn't work. The serial port is counterintuitive in that it needs to be turned off, either via the GUI settings or editing the cmdline.txt file, in order to use the serial port. Turning off the serial port means the Pi doesn't use it for it's own stuff, so the user is free to make use of it. Firing up Screen now works and the Pi behaves as a graphics card for the RC2014!
Next up, making a dedicated PCB for easy connection to the RC2014 and automating the boot process...
Create an account to leave a comment. Already have an account? Log In.
having issues making the files from Filippo do anything but rainbow screen.. will see if I can get screen to work
got it working by crating a smaller boot partition, like 1 gig
Excellent project. Thanks ! I just built a Z80 and will use this as the terminal. I also giggle that the Pi is much more powerful than the Z80 I build, but such is life.
But, hey, if it works ... all good.
Please make a second raspbery pi as grapics card.
creat a graphics card but not from triangle . Create a graphics card as raytracer similar PoVray
It's kinda funny to have the display/keyboard subsystem hundreds of times as powerful than the mainboard cpu. But your average PC also has about the same ratio of performance between the cpu and gpu. So it really makes sense... ^_
Based on the value of the components new, having a $5 display/keyboard on a system that would have been worth a few hundred $ in late 70's seems totally justified :-)
Become a member to follow this project and never miss any updates
Not function Rasberry PI W ver.1.1