Jared Sanson


Repaper e-Ink Display

Jul 05, 2013 pic, eink Uncategorized

E-Ink displays have been unavailable to hobbyists for quite some time, which is rather disappointing since it is an exciting technology! Fortunately rePaper has started producing small e-ink displays complete with Arduino-compatible development boards, which has finally made e-ink displays available to hobbyists!

I ordered a 1.44" display for experimenting with, which was actually pretty easy to get working with an Arduino. I had the display showing an image in no time at all!

The display I got is 128x96 pixels, black and white. The data is arranged 8 pixels per byte.

I love my PIC microcontrollers, so porting their code to PIC was my next task. It took me a bit to get it working correctly, because for some reason it wasn't generating the ±20V supply. It turns out you need a 1-2us delay between SPI bytes, which wasn't mentioned in rePaper's documentation. After that it all worked fine!

I'm still having some issues with the image fading over time (it doesn't fade if you unplug the display FPC though), and also some ghosting/burn-in issues.

I could get some reasonably fast update times (500ms) if I didn't do any display compensation or image inverting, though I suspect that may be causing some burn-in since I can still see earlier test patterns when the image goes dark. Either that or I've damaged the display while trying to get it to work.

The faster update time could be useful for simple animations, and also has the possibility of updating a portion of the display without going through the inverse cycle (eg. for a clock readout, or incrementally showing things)

Interestingly, the Chip-On-Glass (COG) is affected by bright light, hence the black tape over that part of the screen! The display either stops responding, or shows garbage pixels if exposed to a bright light source. Also the PWM line isn't actually used to generate the display voltages, it's just used to keep a bit of negative voltage on VGL while the display is starting up. That lead me down the wrong path when I was trying to figure out why the display wouldn't work.

The photo at the top of this post shows some sample fonts from my graphics library. I might touch on this in a separate blog post, but basically I found a whole heap of free pixel fonts online, converted them to bitmap form, and embedded them in c header files.

If you want to connect the e-ink display to a PIC32 or another PIC MCU, check out my code on github


View Comments...


As a side project, I decided it'd be neat to have a programmable wrist watch. I had an OLED lying around with the right dimensions (approx 1 inch diagonal), but I needed a breakout board to be able to use it. So instead of simply making a breakout board, I decided I'd turn it into a smart-watch platform!

My design uses a PIC24FJ256GB206 MCU, which is pin compatable with the PIC24FJ256DA206 (the DA series have an inbuilt graphics accelerator peripheral).

I also decided to include some cheap sensors, like an accelerometer, magnetometer, light, temperature, air pressure, etc. And of course, some GPIO.

I'm going to state now I have absolutely no idea where this will go, I'm learning a lot of new stuff to do this!


I based quite a few of my designs off sparkfun products, since they already work properly. I decided to use an MMA7455 for the accelerometer, and a HMC5883L magnetometer, both of which are available from Element14.

The OLED requires a 12V supply, so I followed sparkfun's breakout board (which seems to be missing from their site now). Their design uses an LM27313 boost converter to generate the +12V.

Charging is done through the USB port using an MCP73831 Li-Ion charger.

Since the board is going to be the same size as an OLED, I found a Li-Ion battery that perfectly fits inside the dimensions: 400mAh Lithium Ion Battery


After I was happy with the schematic, I started the PCB design. I have only had a little bit of PCB layout experience in Altium, so I was learning a lot of new things. The trickiest thing for me at first was figuring out which footprints I should assign to the components.

Starting PCB LayoutStarting PCB Layout
Assigning FootprintsAssigning Footprints

After I was happy with the footprints, I started organising the components roughly where I wanted them. Somewhere along the line I added a vibration motor, which will be very useful for alerts.

Completed LayoutCompleted Layout
Completed LayoutCompleted Layout

Now the board is ready to be produced! I decided to go with OSHPark, since they had a good price and also a gold ENIG finish. Since then BatchPCB have merged into OSHPark, so looks like they are quite a good choice!

Final TopFinal Top
Final BottomFinal Bottom

And here are the completed PCBs!

Showing the purplenessShowing the purpleness

Then a realisation struck me...

Looks like it's time for Revision 2. Remember: Always double check everything before sending it off! Somehow I messed up the footprint for the MCU, and it's half the size of the actual chip!

Keep an eye out for my next blog post. I'll show my development of Revision 2, along with some more schematics and design stuff.

View Comments...

Datasheet Indexer

Mar 13, 2013 programming Uncategorized


I wrote a simple program a few years back, it's just a simple list of datasheet files (for example .pdf), with real-time filtering. While it seems like it may not do much, it makes it extremely quick to pull up an IC datasheet when I need it, instead of having to browse/search my filesystem or the web.

As an extra feature, it can also automatically download missing datasheets!

It is also completely non-invasive and runs stand-alone, so you can run it on a flash drive, or even have multiple datasheet libraries. Config files are stored in the same folder as the .exe


  • Options can be accessed through right clicking the list
  • You can drag'n'drop new datasheets directly onto the window
  • You can add multiple aliases for a single datasheet by separating with a '/'
  • You can modify the auto-download behaviour by modifying the import.pas script, if you know a bit of pascal.


datasheets.zip (600KiB)

source.zip (300KiB)

View Comments...


Me and a bunch of friends decided to build a 3D printer. We all collaborated and built different parts of it, and after a few months work we had a working printer! This particular model is called the Prusa Mendel, a popular DIY printer. You can read more about 3D printers on wikipedia: RepRap Project

Wires everywhere!Wires everywhere!

The 3D printer works by extruding a plastic filament through a hot nozzle (much like a hot glue gun), and onto a build plate, building layer upon layer. 

Depending on how high it stacks each layer, a print can take anywhere between 30 minutes and 8 hours! It is possible to get a resolution of 100 microns (0.01mm) with a lot of calibration and patience.

The plastic filament we're using is called PLA, or Polylactic Acid. It is a polymer that is derived from sugars, and is also biodegradable! When we're printing, it fills the room with a sweet sugary smell.

Other plastics can be used, such as ABS or Nylon, but they are harder to print and produce toxic fumes.

Building It

My task was wiring it up and getting the electronics together. I didn't want to use the Arduino + Plugin boards that most people use, since it's rather ugly and inefficient. Instead I decided to hand solder a Generation 6 Electronics board.

Unfortunately when I had finished soldering it, it didn't work! After another month, I realised that I had ordered 20ohm resistors instead of 0.2ohm resistors. doh!

After switching in some new resistors, it all worked beautifully. Unfortunately a day later, one of the motor driver chips blew up, so I decided to just go with a prebuilt module. This time I chose the Printrbot electronics, which is a step up from the Gen6.


The next part was definitely the trickiest, and that was to calibrate the thing. Unfortunately our build plate wasn't very flat, so we only had marginal success. We found we could only really print small objects, since anything too big would either not stick or it would warp.

Here are some photos of our early calibration prints:


After calibration, we tried some harder prints:

Stanford BunnyStanford Bunny
Double TorusDouble Torus

One of the first prints we tried was the Stanford Bunny, a popular object in computer graphics classes.

I also tried a few other prints while I had it properly calibrated:

Misc Test PrintsMisc Test Prints

Failure Strikes Again!

There's a leak somewhere inside it, and the molten plastic is oozing into the firecement and causing it to crack. It was also causing large amounts of smoke! (Incidentally, it smells like burning sugar, which makes sense since PLA is derived from corn starch)

Future Improvements:

We're planning on replacing the build-plate with glass, which is very flat, and should hopefully enable us to do bigger prints. Finding glass the right size is proving to be tricky however.

We are also thinking of replacing the extruder with one that doesn't leak! Though the current one seems to be holding out for now.

View Comments...