Using a replacement Kindle screen with an Arduino/whatever
E-Ink adapter schematic
Adobe Portable Document Format - 81.30 kB - 12/06/2016 at 00:18
After connecting my microcontroller and display to my board, I tried displaying test patterns with code based on sprite_tm's. I did get a reaction from the display, but I kept getting vertical streaks while trying to write a single row to the display. So I switched to my backup screen, and it worked! So I think my first screen got fried while I was attempting to use it with my v1 PCB and its improperly soldered FPC connector.
The next step is driving it properly. Each of the driver sources (essentialscrap/Sprite's mods/NekoCal) is a bit different as to when it sets the various pins high or low, especially the OE (output enable) and CKV (vertical clock) pins. I'm doing it like NekoCal now and it seems right and I get nice black and white output. But to get grayscale like NekoCal does, I need to control the timing better. This is a problem due to my use of shift registers.
I'm using the ESP8266's hardware SPI to drive my SN74HC595 shift registers, and at first I just tried using the max speed of 80 MHz. As it turns out, they can't run at that speed. If I understand it correctly, TI's datasheet says 5MHz at 2V, 25MHz at 4.5V. My board runs at 3.3V, so I set the SPI to 10MHz and it seems to be working fine. The two 8-bit shift registers are chained to get 16 bits, 8 bits of data and 8 control bits. (If I did this again, I'd split them so that data can be written faster without having to also write the control bits). Writing 16 bits at 10MHz takes 1.6us, so that's the fastest I can toggle any pin included in the shift register. Unfortunately, the CKV pin is one of those pins, and I need to time it in hundreds or maybe tens of nanoseconds - 1.6us is too much. I intend to try to work around this by removing the shift register from its socket so I can wire the CKV pin separately.
Another issue I ran into is that a full 800x600 black-and-white bitmap takes 60KB of memory. 4-bit grayscale would be 240KB. I'd thought the ESP8266 has 128KB of RAM, but it only has 96KB, of which around 40KB (maybe a bit more) is available for general use, so no storing a full bitmap for me! For now I'm streaming the bitmap over wifi in 200x200 pixel chunks, but I've ordered some 23LC1024 SPI SRAM chips so hopefully in the future I can store the full image on the ESP itself. Other options I've considered are to store the picture in flash memory instead (My ESPs should have 4MB, which would be plenty) or to try this: hackaday.com/2016/11/30/the-esp-a-new-1kb-contender-appears , as maybe with wifi off I'll have more memory.
The v2 PCBs arrived. This time the order was from pcbs.io as it was cheaper. The trickiest bit would be the FPC connector so I started with that.
At first I tried to tape one side of the connector to the board with kapton while soldering the other side, so it would stay put while I soldered it, but the connector just went up at an angle, so the taped side was touching the board and the untaped pins were touching air. I ruined 2 boards while trying this method by accidentally pulling traces off them.
Then I tried taping the middle of the connector instead (over the middle of both rows of pins) and soldering the corners, then removing the tape and soldering the pins normally. This actually worked! with only minor heat damage to the connector, where I may have accidentally touched the plastic with my soldering iron or with hot solder. Also, I think I missed some of the pins the first time around, but that's no different from the other components.
Anyway, once I got the connector soldered, I went ahead and soldered the rest of the board. A lot more carefully now as if I ruined any more traces, I'd have to do it all over with a dwindling supply of boards.
Powering it up, it all worked, except on VPOS I was getting +13V instead of +15V. It took me a while to realize that I'd gotten the sign wrong and it was actually -13V, and another while to find that the regulator was really outputting +15V, only the output pin wasn't soldered properly. So of course, I fixed that, and now the board works hardware-wise.
Next log will be about software (which I'm still working on anyway).
P.S. If you make this, make sure to set VCOM with the trimpot with the screen disconnected, as the board's max voltage is way higher than the screen's max.
P.P.S. I almost forgot! When the SMPS is on but VPOS and VNEG are off, I'm still getting ~3V for VPOS. Maybe VNEG had some voltage too, I don't remember. Searching about that, I found that that's normal with such SMPS circuits, and if I really want to turn it off I need to add more MOSFETs to switch VPOS and VNEG off. Is there some way to force them to 0V without changing the board?
I just ordered a new batch of PCBs!
The most important change is probably making the FPC connector footprint bigger (mostly longer - obviously the pin spacing stayed the same) so hopefully it'll be easier to hand-solder.
The new revision has the 2 shift registers I keep using anyway built in, and all the extra pins that you might not really need to control are set up so they can be easily connected to VCC or GND with jumpers. So now there are only 8 external pins, instead of like 30.
Finally, this time I put all the resistor and cap values right on the board so I won't have to keep looking them up while soldering.
A long time's passed since my last update...
The board is basically working (if you solder the diodes "backwards") as far as generating voltages goes, but soldering the connector is still really hard. The one connector I may have managed to stick to the board, is at least partially ruined - the lid won't stay shut anymore - and even if I keep it shut I don't know if it's really soldered properly. Anyway, after hooking everything up to the screen etc., it didn't work.
I've ordered some spare parts for basically everything including the screen itself, as I don't know if I fried the old screen. It seems this time I got a screen with all 39 pins wired, while the old one doesn't actually use all of them. (this is something Sprite_tm ran into in his project.) So the old screen should be easier to handle.
I've also ordered some FPC cables so I can attach them between my board and a spare connector, and test the pins with a continuity tester, but they haven't arrived yet.
Finally, I've fried my Teensy, so now I've switched to ESP-12Es. I've got MicroPython running and it's nice to know that if I manage to fry them, at least they were cheap.
I got my pcb some time ago and tried soldering it. I seemed to manage most of it except for the connector. It's hard to even try to solder the connector without touching and melting the plastic, or maybe I need a smaller soldering iron tip. If I order more boards, I'll be making the pads longer.
So while ruining four of my five connectors, I decided to solder everything else, if only for practice. Finally I powered it up with 2 AA batteries - not 3.3V but hopefully close enough. And got a thin column of smoke from somewhere. Turning it off and on gave the same result again, and the smoke seemed to come from somewhere around the LT1945.
After giving it a rest for a few weeks and looking at the board visually, I noticed that some of the LT1945's pins were shorted (VPOS_CTRL and GND, but I didn't check at that point), so I fixed that and tried again. Still smoke. One of the inductors wasn't soldered properly, so I fixed that, and cleaned or melted some brown stuff (flux?) next to a nearby component. No more smoke after that. Somewhere along the way, I noticed the batteries weren't giving 3V anymore, so I replaced them and finally got out the DC/DC power converter I bought from Seeedstudio a while back and got a much nicer 3.28V.
But the output voltages are all off - I'm getting +0.66V or +0.2V instead of +22/-20V. So maybe the LT1945 really is broken.
I don't really know how to continue debugging from here.
Anyway I ordered more spare parts so I can try doing it all over on a new board.
edit: I forgot but some of the LT1945's pins on the other side also looked shorted at one point, so of course I fixed that. Could maybe better explain what went wrong.
After printing out the front copper layer and checking it visually against the physical components, I uploaded the board to OSH Park and ordered it. Link is in the project links.
The components all arrived some time ago, and somehow they're smaller than I imagined. Hopefully I'll manage to solder them somehow. Maybe I'll make the PCB larger so it'll be easier, maybe not.
So I've still got to order the PCB. I accidentally upgraded to KiCad 4, which is nice, but my KiCad 3 files were suddenly out-of-date. KiCad 4 offers to "rescue" all the old components etc. but I still wanted to fix them up properly to use new KiCad 4 components and footprints before continuing with the PCB. (Well, at least for the built-in ones, the caps etc., I'm not planning on editing the footprints I made myself again if I don't have to.) While doing so I also discovered the footprint I had put for the through-hole cap was too small, so it should be fixed now.
Once I'm finished updating and rerouting the PCB and moving things around for the bigger cap footprint, I still plan on printing the PCB out and checking it against the real components, at least for the ICs and the FPC connector, and probably the inductors - I'm more confident about the size of the 0805 resistors and caps matching the 0805-size footprints :)
Just placed an order for the project components from lion.co.il (Farnell distributors in Israel), except for the FPC connector itself which isn't in stock, so I ordered it from AliExpress. And except for the PCB itself, which I still have to finish fixing and verifying.
Some of the project's component choices were influenced by stuff not being in stock when I was planning the PCB. Sometimes the components had different footprints, so it influenced the PCB, too.
I uploaded the schematic etc. to github. Of course, it's heavily based on the previous schematics (see project links). There are a few differences: My board doesn't include a microcontroller. Instead, it's basically a breakout board + specialized voltage regulators. I tried to breakout as many of the FPC pins as possible, even the ones that supposedly aren't connected, and almost none of them are hardwired to each other, to try to minimize the chance I'll need a new PCB if I discover that my display has a slightly different pinout. Also, there were slight differences between the two previous schematics, so mine is sort of a mix. Some resistor/cap values I wasn't sure about are annotated in the schematic file.
PCB layout was difficult. I really wanted to keep to a 2-layer board with the bottom layer as a ground plane, so everything except ground has to be on a single layer and none of the signals can cross each other. (I assume this is obvious for anyone who, unlike me, has ever done any PCB work.) This was difficult enough for some of the logic signals but then I had all the special voltage outputs to deal with, each coming from a different part of the board. I ended up using jumper wires for all the power outputs and another zero-ohm resistor to allow some of the logic signals to cross each other.
The exported gerber files are on OSH Park now, though I'll try to recheck some more stuff like the FPC connector pinout before I actually order. - I'm still not 100% sure about the FPC connector pinout (which side is 1 and which is 39?), even after staring at the datasheet.
btw, I got through the sparkfun "Simon Says" SMD soldering tutorial kit. Very nice! The thought put into it shows. My only complaint was that the troubleshooting section was a bit short, so I got to learn a bit of troubleshooting the hard way :) so maybe a good thing. One of the LEDs wasn't working - the manual suggests reversed polarity and the kit even has a way to reverse them by soldering some jumpers. But the polarity was correct (multimeter continuity tester lit them up). It turned out that I hadn't properly soldered all of the microcontroller pins, so it couldn't turn the LED on. Also one of the buttons wasn't working for the same reason.
My adapter board will probably be a lot harder to solder as it's a lot denser.
I did the teholabs Kicad tutorial, up to the point where they export the Gerber files, which I'll try once I have a real PCB to export. One snag I ran into was that freerouting apparently needs to be downloaded separately now; I used this fork on github: https://github.com/mirage335/FreeRouting. The prebuilt jar file didn't work for me (with an error about an unsupported Java classfile version) and I had to change the build script slightly so it would find the javahelp library on my Ubuntu installation before I managed to build it.
Afterwards I started working on my schematic, basically copying from essentialscrap's and sprite's schematics. More on that next time.