This week marked a huge milestone for the project. The two large page turning buttons on the V.Reader
Here's a quick rundown of the components in the video (skip to the end to see the actual test).
(WARNING: Nerdspeak ahead. Skip to the bottom if you value your sanity. You've been warned...)
The V.Reader
We'll be using seven buttons in total from this device, although for this test only the two large arrow buttons on the front panel were used to turn individual pages. They are simple dry-contact switches, which means that when they're activated it's basically the same as touching two wires together to make a connection. Two wires were used per switch, and are routed back to the microcontroller on the breadboard.
The controller
For simplicity's sake I chose to use the Teensy++. It's a USB-powered device based on an 8-bit AVR microcontroller, which allows easy connection to the PC for programming and also provides a convenient 5V supply to the rest of the circuit. In addition, it is compatible with the Arduino
The multiplexer
This is the multiplexer I chose, mainly because it's cheap, intended for digital signals, and has a breakout board already. If multiplexers confuse you, just think of one of those old-school telephone operators sitting in front of a giant switchboard. They take a jumper cable and connect two signals together so they can communicate. That's exactly what happens here.
Let's look at the left-hand circuit for starters. The short version is that pin 7 (called "1D") may be connected to any one of the four pins above it, pins 3, 4, 5 or 6 (1S4, 1S3, 1S2, or 1S1, respectively). The signals IN1 and IN2 control which connection is made, and 1EN and 2EN enable it. The EN signals allow the connection circuits to be handled independently, basically making this into a dual single-pole, quadruple-throw switch. Each chip, then, should allow up to eight distinct connections to be made.
That's fantastic, except the breakout board supplied by SparkFun doesn't break out the 1EN and 2EN pins, so any connection made on one side of the chip is mirrored on the other. 1D and 2D are still distinct, but they cannot be controlled independently. If 1D is connected to 1S3, then 2D must also be connected to 2S3. This limits us to only four independent connections per chip, rather than eight. (Yes, the two switch systems are electrically isolated, but since it is not possible to independently control them, half of the switch becomes useless for this application.)
Further, since I can't enable or disable the connection I must reserve one combination as a "home" and make sure it's not used. The reason for this is simple - each connection simulates a key press event on the Kindle. We must have a state where no keys are pressed, and the only way to do that with this chip as SparkFun sells it is to reserve one of the switch combinations and not connect it to the Kindle at all. As such, out of eight possible connections we are only able to use three.
Fortunately I decided to buy spares, so I should have enough on hand to complete the first run of the FrankenKindle. Eventually I'd like to make this project more user-friendly however, and this issue will need to be addressed. It will likely require creating a custom PCB for the project.
The software
As detailed in a previous post, two hacks were used to improve the functionality of the Kindle for this application, Jailbreak and Launchpad. When a key is pressed on the V.Reader, the Teensy sees that and uses the multiplexer to mimic pressing the specific key sequence to fire the Launchpad script, which will turn an individual page. (Whew!) This same procedure could be used without the software hack, but it would only be able to jump between chapters, not individual pages.
(This concludes the nerdspeak - welcome back!)
The test
Enough talk - here's a short video showing how it works. Apologies for the horrible sound quality.