A different kind of Apple-1 keyboard solution

3 replies [Last post]
Offline
Joined: Aug 16 2015
Posts: 56

I thought people might be interested in what I have been doing in terms of connecting keyboards to the Apple-1. I wanted a solution that would allow me to both use an Apple II keyboard for an appropriate vintage look and to (natively) connect a USB keyboard for convenience. Since the obvious solution would be to use a microcontroller, I have designed it in the form of an Arduino Shield. It is based around the MAX3421E USB controller chip and the USB Host Shield library.

So far, I have managed to:

  1. get the Apple II keyboard to work. (Not that impressive, but as well as being able to use the Reset button to assert a reset, I can use CTRL-R for the same function and CTRL-C for clear screen).
  2. get a USB keyboard to work. (I still have to work on the modifier keys though so that I can use CTRL as above.)
  3. get terminal emulation software (i.e. CoolTerm) to stream ASCII characters over USB direct to the keyboard connector.

At the moment, each of these functions needs a different Arduino sketch to function. I plan to work on a sketch to control all three functions (maybe using CTRL keys to switch between functions). My coding isn't brilliant though, so this may take some time.

At present, it is also a bit unreliable. I think this is to do with power supply issues. It is configured so that it draws power from the Apple-1 keyboard connector. The 'kosher' way of doing this is to supply 7-12v via the Vin connector. I was hoping to use the 12v supply for this purpose. Fortunately, SpeedyG warned me of the potential risks of drawing too much power from the 12v regulator. A very brief test drawing only modest current confirmed that the regulator got scary hot!

Instead, I am now drawing 5v from the keyboard connector and connecting that direct to the 5v rail on the Arduino. This is sort of legitimate, but it doesn't really like it and it has all sorts of weird side effects. I may have to revisit this if I ever decide to do a second prototype.

There is also the possibility of using a bluetooth wireless keyboard (which is supposedly supported by the library files). But I need to get the basic code sorted out before I move on to that.

In case anyone is interested, here are some pictures.




AttachmentSize
Shield1.jpg104.74 KB
Shield2.jpg91.18 KB
Shield3.jpg144.85 KB
Shield4.jpg115.1 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Aug 16 2015
Posts: 56
Re: A different kind of Apple-1 keyboard solution

I don't know how much interest this project is to people on here, but I have now made a fair bit of progress.

The general unreliability was not a power issue and was easily resolved with a few lines of code. I have now got both the USB keyboard and the Apple II keyboard working pretty much flawlessly. There is no need to do anything to switch between keyboards; both keyboards can be active simultaneously and keystrokes will be accepted from either. Furthermore, CTRL-C on either keyboard asserts a clear screen and CTRL-R on either asserts a reset. The RESET button on the Apple II keyboard functions as expected too.

I now need to add in the routines to read a stream of text from the USB socket to work with terminal emulation software.

I only have two problems so far as I can see and both are fairly trivial. First, in the (fairly unlikely) scenario of having both the Apple-1 and a PC connected whilst the Apple-1 is powered off, the Apple-1 tries to draw +5v power from the PC's USB connector. This can obviously be cured with an appropriately placed diode.

Secondly, when the Arduino powers up (or comes out of reset) all the pins momentarily go high and then go low (this is standard functionality). This has the result of asserting a reset on the Apple-1 at a time when this may not be desired. I am not entirely sure how to cure that.

Offline
Joined: Aug 16 2015
Posts: 56
Re: A different kind of Apple-1 keyboard solution

I've got the serial streaming from the PC working now too. To add to the list of minor problems: when the Arduino accepts a serial connection, it resets itself. This is not a problem in itself. However, because of the issue referred to in my last post, this asserts a reset on the Apple-1.

Nevertheless, I am pretty pleased to have got this all working now.

macnoyd's picture
Online
Joined: Oct 15 2012
Posts: 224
Re: A different kind of Apple-1 keyboard solution

Let us know when this solution is ready to share.
Personally, I think this project is great and would be interested in obtaining or building one.
Thumbs up from me! Thanks for sharing.

__________________

macnoyd