06/07/2017 at 18:41 •
I think ePaper displays are really cool and they are one of the reasons why I chose this project for my residency. Instead of using a backlight like LCDs, they reflect ambient light from their surface like traditional paper and ink and have an ultra-wide viewing angle. Since displays can consume nearly half the power of any computing device, this amounts to a drastic reduction in power consumption. ePaper displays are also bistable so the images will be retained even when there is no power source. LCD screens need to be refreshed at least 30Hz even when the image is static. Bistability also reduces power consumption.
The screen I am using for this project is an active matrix display and composed of a plastic substrate with an array of thin film transistors (TFT) attached to each pixel. These are directly connected to the row and column drivers. The row driver consists of a shift register, level shifter, an enable system and output buffer.
The driver operates with a gate pulse that controls the line of pixels to be programmed by turning the TFT switch on or off. A level shifter raises the voltages to the desired logical output and the output buffer reduced the impedance of the row driver so that these lines can be driven by the output signals. A storage capacitor maintains the state of the pixel until the next refresh cycle.
ePaper displays are composed of microcapsules that contain black and white ink particles suspended in a clear fluid. These are the same pigments that are used in printing, though in ePaper displays, they are electrically charged and laminated in a single layer onto film. When a negative electrical field is applied to the bottom of the film the negatively charged black particles are repelled and migrate to the top. When a positive field is applied the white particles float to the top.
The threshold voltages for eInk screens are quite high, commonly +15V / -15V for the source and +20v / -22V for the gate though other displays may use different ranges. The timing for this needs to be highly accurate and is controlled by software. Waveforms are used for this process and since they are specific to the display model, they should be provided by the manufacturer. Since temperature affects the update time, an internal temperature sensor is needed and this data is passed over I2C.
For more information about the technical details of ePaper displays, Petteri Aimonen’s site is an excellent resource.
05/31/2017 at 19:10 •
Photo credit: transphormetic (flickr)
When I was in fourth grade I convinced my dad to buy me one of those “all-in-one” science fair kits sold at Radio Shack. The kit promised 130 projects and I held the box in my lap on the drive home, my mind teeming with the possibilities. But when I opened the box, there was no instruction booklet and just a package of wires . I don’t know why I didn’t return the thing but I was impatient and undeterred and so started assembling circuits by inserting wires into the spring terminals connected to each component. Of course I got nothing to work since I had no clue what I was doing but after enlisting the help of my older brother we were finally able to get the machine gun sounds that were promised on the box. They sounded awful and nothing like a machine gun.
That was my first experience with electronics and unsurprisingly the kit was relegated to a dark corner in the basement where it sat for years. This project feels a bit like that experience. I have a bunch of parts and a firm idea of what I want to accomplish, but there’s no instruction manual and my brother is across the country. Fortunately now I have the internet and hobbyist electronics has advanced considerably since then.
Before this project I’d never designed PCBs before, I’ve always arranged my circuits on a solderable perfboard. Designing electronics in software is intimidating. There are so many details and so much that can go wrong. I think the hardest part was knowing where to begin.
On my first day of my residency Dan recommended the Contextual Electronics site, started by Chris Gammel. I watched his “Getting to Blinky” series of video tutorials on YouTube and this was instrumental in getting me over that hump. I've been a subscriber to CE ever since and I cannot extoll the benefits of their videos enough. It's practical and Chris is an entertaining instructor.
Next I tried my hand at creating a breakout board for the ESP8266 chip with the Othermill. Considering the size of the chip, the board itself is massive and doesn’t do anything exciting except that it has some resistors and sits comfortably in a breadboard. That said, going through this process and experiencing the tangible results instantly was very satisfying.
In the next few posts I will walk through my process of designing a four-layer PCB for my display's power supply.
05/12/2017 at 19:24 •
While I’m waiting for my display I bought a backup version to test some graphics on. It’s the Waveshare 4.3inch e-Paper kit and is equipped with an STM32F103ZET6 microcontroller, 128MB of Nand Flash memory and a UART interface. The resolution is 800x600 and sits on top of the circuit board. It’s also ridiculously easy to use and can be purchased online for around $50US.
Waveshare provided its own proprietary software but I opted to use this Arduino EPD library from sabas1080 on github to display bitmap images and draw some graphics onto the screen. The commands are as follows:
Startup & communication
epd_init() - initialize display (wakeup & reset)
epd_reset() - reset display
epd_wakeup() - wake up display
epd_handhshake() - establish connection
pd_set_baud() - set baud rate
epd_read_baud() - read baud rate
epd_set_memory() - Memory Mode: MEM_NAND or MEM_TF
epd_enter_stop_mode() - stop
epd_screen_rotation() - set screen rotation EPD_NORMAL or EPD_INVERSION
epd_clear() - clear screen by drawing all pixels black then white
epd_update() - refresh screen
epd_load_font() - load font from memory
epd_set_en_font() - set English font
epd_set_ch_font() - set Chinese font
epd_set_color() - set font and background color (WHITE, GRAY, DARK_GRAY, BLACK)
epd_draw_pixel() - draw a point at (x0, y0)
epd_draw_line() - draw a line starting at (x0, y0) ending at (x1, y1)
epd_fill_rect() - draw a filled rectangle starting at (x0, y0) ending at (x1, y1)
epd_draw_circle() - draw a circle with center at (x0, y0) and radius (r)
epd_fill_circle() - draw a filled circle with center at (x0, y0) and radius (r)
epd_draw_triangle() - draw a triangle with point 1 at (x0, y0), point 2 at (x1, y1) and point 3 at (x2, y2)
epd_fill_triangle() - draw a filled triangle with point 1 at (x0, y0), point 2 at (x1, y1) and point 3 at (x2, y2)
epd_disp_char() - display a character at (x0, y0)
epd_disp_string() - display a string starting at (x0, y0)
epd_load_pic() - load image from memory
epd_disp_bitmap() - display bitmap image starting at (x0, y0)
Basic Program Structure
In setup() call:
In loop() call:
- code for whatever it is that you want to draw
Waveshare user manual
Waveshare Arduino library
05/02/2017 at 17:27 •
When I started this project, I was fully aware that I had a difficult road ahead, the technical aspects of this prototype are tricky as are the material considerations for flexible circuitry.
What I didn’t predict were the challenges with procurement. I mentioned previously that I was considering two flexible screens, one manufactured by Plastic Logic and the other by eInk. On my first day of my residency I inquired about ordering a display evaluation kit from Plastic Logic. After some hesitance from them about being a “certifiable business” Dan (Resident Engineer of the Design Lab) was finally able to submit an order with them but I still haven’t received the display.
As a backup plan, I ordered an evaluation kit and flexible display from eInk and they shipped it right away. But out of the box it doesn’t work and since they are in Taiwan, the back and forth with their sales and technical support team has been lagging. I requested their source code and a data sheet for the display itself since I would need this anyway since I am developing my own hardware and software. They agreed on the condition that I sign an NDA, which I waiting on them to send.
So at this point I am halfway through my residency and I don’t have a physical prototype. This is frustrating and even though I am still working full time on this project, each day I struggle with finding the motivation to continue. But I did learn a valuable (albeit sobering) lesson that manufacturers aren’t as motivated to work with small developers.
So while I wait on the other two displays, I have ordered a third, which Todd Kurt (another Design Lab resident) recommended. It’s a rigid 4.3” ePaper display from Waveshare and is designed to be easier to work with. In an earlier post I referenced a project from davidgf.net that uses this same hardware and he added an ESP8266. Out of interest of moving forward, I am going to try it out -- even if it’s not the most direct path to my end goal. I’ll let you know how it goes.
04/18/2017 at 19:42 •
image source: unknown
My display and dev kit still haven’t arrived yet so I’ve had ample time to get up to speed with designing for embedded systems. My former career was in web and app development before I began working with Arduino and Raspberry Pi based systems. I consider myself an “advanced beginner” because with open source frameworks it’s easy to jump and start building without fully understanding what’s going on. I think of them as a gateway drug into engineering and computer science in that they provide the dopamine rush of building something amazing very quickly, but after a few times of doing this I developed a tolerance and like any addict, I’m continually on the hunt for my next peak experience.
After starting this project I quickly realized that I don’t have an intuitive grasp on embedded applications and needed a thorough primer on the fundamentals. And I needed to do it fast! Here are some of the resources that have helped me get up to speed with both hardware and software design, specifically for the MSP430 microcontroller.
Designing Embedded Hardware: Create New Computers and Devices by John Catsoulis is a very readable and high level overview of hardware architecture. In the Carrollian Wonderland of Electrical Engineering the rabbit holes (analog, DSP, FPGAs!!) but this book does an excellent job in outlining exactly what is relevant in digital electronics for computers. The chapters on peripherals and serial communication were especially helpful.
Despite being a voracious reader it’s hard for me to find technical books that I can consume cover to cover. Making Embedded Systems: Design Patterns for Great Software by Elecia White is among the top in this category. I can tell that Elecia is very passionate about her craft and while she provides an overview of the technical topics, she also exposes the art of designing embedded systems and I found this be the most valuable. It helps to have at least an introductory-level knowledge of computer science concepts but even if you don’t, this text should whet your appetite for more. Use it to get your bearings and you won’t feel as bewildered when referencing more in-depth materials for specific topics. The introductory chapters and the section on state machines and interrupts are excellent.
I haven’t read this book in its entirety and am using it as more of a reference but this is an ideal text if you are learning the MSP430 but are still new to the world of micro controllers. It’s a textbook so there’s plenty of theory and math and problem sets but it’s also a practical and in-depth guide on architecture and processor organization, interfacing with microprocessors, peripherals and serial communication. The chapter on Assembly is solid but the subsequent chapter on C is high level so I would use another resource if you intend to learn how to tweak or write your own firmware.
04/03/2017 at 18:54 •
Last Monday I finished the block diagrams for the hardware and have begun hardware prototyping. These are high-level, but provide an overview of the various subsystems I will need to build.
Plastic Logic is the company that manufactures the flexible e-ink display I’m using for the final prototype and I’ve based the hardware architecture on their evaluation kit. I’ve made some modifications, namely adding an ESP8266 module for wifi connectivity, using a different LDO / battery charger and simplifying all of the connections and access points so that I can fit everything within the footprint boundaries of the display itself and update the firmware wirelessly. I may end up using the ESP-12S since the footprint is only a little larger than the ESP 07 and has a 4MB flash chip. I'd like to utilize this for the MSP430 if it's possible.
I am using the MSP430 microcontroller to control the display itself. Since PLastic Logic also has an SDK, I am sticking with the same hardware to minimize the amount of firmware that I will have to write from scratch. If I could just run all of this off the ESP module I would, but with only a few months I want to avoid introducing any unnecessary risk and extra work and focus on just getting the thing working.
Note all of the various voltages coming out of the power supply. WTF?!?! I’ve never worked with voltages this high and the idea of placing this right next to my skin is a little unnerving (but exciting!). I did quite a bit of reading into how these e-ink displays work and in subsequent posts I will get into further detail, but the short answer is every pixel has a source voltage (+15 & -15V) and gate voltage (+25 & -32V) connected to the electrodes on the screen through thin-film transistor FETs and these need to be high enough to affect the ink particles in order to fully switch. It seems that the 9V is a reference voltage, I'm not exactly sure why this is, but I will find out.
The display also has a temperature sensor that's needed to adjust the waveforms it uses and I2C is required for that sensor, so I will need both this and SPI in the final design.
03/29/2017 at 03:36 •
This month went by too fast, I feel like I just got here. The photo above is of a simple circuit I printed with the inkjet ( I also cheated a little by adding silver marker on top). While the traces themselves aren't so bad and the circuit did work, the conductive epoxy is awful to work with! If it was this difficult with through-hole components, I can imagine how it would be with surface-mount. I think the precision would be improved by using a syringe for the epoxy, but I will wait until later to try this out.
The deeper I dive into this project the more I realize how ambitious it is. I knew going in that it would take a small miracle for me to pull it off, as did Dan* and Supplyframe. But when I am locked onto an idea it’s difficult for me to be realistic. It’s easier to work harder than it is to adjust my expectations. My mind has a mind of its own. Must be an ego thing.
I'm feeling the pressure with 3 months left. I told Dan (resident engineer at the Design Lab) yesterday that I was going to start listening to him. He looked at me in disbelief and said, “Do you know how rare it is for me to hear that phrase?” I responded, “Do you know how rare it is for me to say it?”
So, when you suspect that the ship is bearing too much weight, putting you and your precious cargo at risk, what’s the first thing you do? Unload some of your cargo in order to preserve the remainder. I’m putting the research & dev on a flexible circuit board on hold so that I can focus fully on hardware and software development. While the inkjet tests were fun and somewhat promising and I have so many more paths to explore with other materials (Kapton, Pyralux), and methods (silkscreen, lasercutting, chemical etching) I also know that it could take months or longer to come up with a robust and working solution to this problem, if it's even possible. There are manufacturers I can reach out to that have already developed a reliable and flexible (and multilayer!) circuit board and seeing how they do it may give me more ideas. But first, I need to design and build the thing.
03/21/2017 at 00:47 •
Plastic Logic's e-paper display
There are several others before me that have attempted to drive TFT active matrix electrophoretic displays and have graciously documented their experience:
Petteri Aimonen http://essentialscrap.com/eink/
ED060SC4 display with STM32 microcontroller programmed with C
ED060SC4 display with ESP8266 and PhantomJS pixel server
David Guillen Fandos https://davidgf.net/page/41/e-ink-wifi-display
GDE043A2 display with an STM32, ESP8266 and PHP
GDE021A1 display with STM32 and Bluetooth
j0z0r pwn4tr0n https://hackaday.io/project/10161-6-inch-pi-e-ink-display
ED060SC4 display with Raspberry Pi
ED060SC4 display STM32
This week I am drafting some block diagrams and starting the schematics for the power management circuit while I wait for my test displays to arrive. Reading about how these displays work is fascinating. There's something about their appearance that feels not quite digital and that's due to the millions of microcapsules of ink that are charged with 15V and -15V source voltages. The displays I'm considering have a TFT (thin film transistor) array just like LCDs. Each pixel is attached to a transistor and capacitor that store the current state while the other pixels are being addressed. The image is retained even when all power sources are removed.
As of now my plan is to use a flexible display (Plastic Logic's or E-ink) with an ESP8266. At a minimum, I'd like to be able to update a bitmap image wirelessly, ideally I would like animation or write a program that draws to the screen directly. All of this will be highly dependent on power consumption and the amount of time I have. We'll see how far I get during my residency, but a functioning prototype with all electronics integrated into a single on-skin device is my primary goal, no matter what path I take to get there.
03/20/2017 at 08:25 •
a few of the papers I reviewed and test plan notes
I've been switching back and forth this week between development of the flexible circuit board** and designing the driver board hardware so I am wading in white papers and data sheets. I'm just a one-person team but parallel pathing this project is necessary since these two streams depend on each other. Research is by far my favorite part of the process, there's a lot of uncertainty about whether or not my design will work. I also learn a lot of interesting information that is completely irrelevant to my project. I'm a diligent procrastinator.
I've converted an inkjet printer to become a circuit printer and after reading some research from others who have attempted the same or something similar, I have some ideas on what to test and measure and techniques to get better quality prints. I'll be sharing some photos of the conversion and results from the testing in my next post.
I also learned about how rigid circuit boards are made and it's a pretty wasteful process. One of the reasons why I chose inkjet over other flexible circuit options is that it's an additive method and generates less waste. It's also very fast. Theoretically. Since we have an Othermill CNC here in the lab perhaps I can pit the two processes against each other. If I do I'll broadcast it live.
** using the word "board" when referring to a flexible substrate is a contradiction; I need to come up with a new descriptor
03/09/2017 at 22:56 •
Got my initial shipment of supplies that will enable me to rapidly prototype with printed circuits. I will be using an inkjet printer to extrude silver nanoparticle ink so that I can print traces onto thin transparent film. Several layers of this film sandwiched together will form the circuit for my display driver.
I'm using the research paper "Inkjet Printed Circuits" as reference for best practices for inkjet printed circuits.