What is Freeside?

Freeside is a Georgia nonprofit corporation, organized to develop a community of coders, makers, artists, and researchers in order to promote collaboration and community outreach. Learn more »

Constant Current Dummy Load - continued


Since the last installment, I've finalized the initial PCB design and sent it off to Seeedstudio for fabrication. I've never designed a through-hole (TH) construction board before but in general all the same rules apply to SMD and TH boards I believe.

200W 0.1Ω load
 
30W 1Ω load
10x10Ω 3W in ||
25 turn
trimmer pot
I changed up a few things during the PCB design phase of this project that I thought would be interesting to mention. I added a pair of trim pots to design. One trim pot reduces the maximum voltage going into the first op-amp stage. The second is the in the feedback loop of the first op amp stage. At maximum resistance, 3000Ω to GND (R2 of the voltage divider), with the 820Ω R1 (there for its role as a low pass filter in addition to the voltage divider), I should see a 27% voltage gain. Turned down to 0Ω, that pot creates a situation where the output is the high output voltage of the op-amp (essentially infinite gain). Something like 8V for the op-amp/input voltage I am using. Why did I bother to design a mechanism to adjust the highest voltage output across the load down to200mV and up to 8V? Well, so I could use a bunch of different load resistors with this circuit and not have to worry about lighting anything on fire with the knob after setting trimmers to their "final" value. I 0.1Ω load resistor is going to burn 10 times the current of a given voltage than a 1Ω resistor so it occurred to me that having a flexible system made a lot of sense. I got the trimmers on ebay for a quarter each, so while they are much more expensive than a normal resistor, they save me having to build a different board for each load resistor. You can trim it up for a given load within a minute with just a multimeter.



Basic MOSFET operating voltage graph
I also included to a switch so the user can switch between operating the main current MOSFET in the linear region (aka triode mode or ohmic region) or in the saturation region (aka active mode or fully enhanced). You can operate the MOSFET in the ohmic region by applying a relatively flat DC voltage on the MOSFET gate below the saturation voltage. The MOSFET behaves like a adjustable resistor in this mode. When operated in the saturation region (by putting high voltage on the gate) the MOSFET channel has its lowest possible resistance it has to offer but as a result you need to switch it on and off in order to limit the current. I hypothesize that the MOSFET will run cooler at a constant current in saturation mode then it will in the ohmic region but it remains to be tested. I decided to offer both options in the circuit because I figure both have their objective value. I show the difference on the scope in the video above.

In addition to these admittedly minor hardware revisions I also created the previously posted rotary encoder library so I could have both fine and course control over the output current. Might as well take full advantage of the digital circuitry, right?

The two holes labeled "LOAD" top center of the PCB rendering below are points you can use to measure the voltage across the load. That number, with a little basic Ohm's Law calculus, will tell you the current going through your load. It will be a useful point to pull data for an analog panel meter. The boards should be here within a couple weeks and then I'll build a couple up and post them up. I'll also bring one to Freeside to put on the shelf. It's always handy to have a precision load when doing electronics work.

I added the Freeside logo in copper on the top of the board.
It will be interesting to see how that looks in real life.

Arduino Rotary Encoder Library with Velocity Sense


While working on the constant current load project I found that while nice, the multiple turns required to turn up the power up was a little annoying when you just wanted to hurry up and get to a high value. The standard solution is to have a "fine" and "course" knob. Since I designed the input in the digital realm it seemed like software was the obvious solution. Why not sense the speed the user is turning the knob and extrapolate the pace of change based on that input. It seems intuitive to me. I implemented it as a little C++ library that you can drop into your arduino/libraries directory.

Here is the most trivial implementation of the library.
#include <RotaryEncoder.h>;
RotaryEncoder encoder(A0,A1,5,6,1000);
void setup()
{  
  Serial.begin(57600);
}
void loop()
{
  int enc = encoder.readEncoder();
  if(enc != 0) {
    Serial.println(enc);
  } 
  delayMicroseconds(5);
}

Inside the library, the code counts the number of the sequential clicks in one direction within less than the time constant you pass in when you instantiate the object. In the above example, the selected time constant is 1000µs (the 5th variable). If the user waits longer than that amount of time the counter resets. If the user changes direction the counter resets. To determine the return value I divide the counter by the 4th variable you pass in, 6 in this case, and then multiply that by 5 (the 3rd  variable) and return that value. Turning anti-clockwise is the same except that I make it negative (multiply value by -1). So, if you turn the knob 30 times in a clockwise direction I will return (30/6)*5 or 25. Bear in mind that 30 times doesn't mean 30 detents of the encoder. Each encoder is different. The ones I have in my drawer return 4 times per detent, YMMV.

The library is available here.

In order for this to work, you need to have clean reads of the encoder (or it will reset the counter). To do this effectively, you really need to "debouce" the switch. I've never been able to effectively do this in software. I use 10000pF capacitors between the A pin and GND and B pin GND. This makes the circuit very well protected from bad reads. Furthermore, you need to check the value more frequently than it can change otherwise the quadrature signal will become out of sync and you will not know what direction you are turning.

Tonight (July 14th, 2012): Chili fundraiser for the Offroad Wheelchair Project

The Off-Road Wheelchair is a device that will enable a person of limited mobility to experience the outdoors. Freeside Atlanta is interested in putting our engineering skills to the test, and showing the world we can create anything we put our minds to. We have the space, the tools, and the talented people to make this happen - we just need your help to purchase the materials and make this project a reality. The idea originated with Robin Beattie, who participates in regional Burning Man events, like the Alchemy Arts Festival here in Georgia. The festival takes place on a farm, with terrain features like gravel, light mud, paths with tree roots, and moderate changes in elevation. The Off-Road Wheelchair will be designed to traverse this environment, enabling Robin to get around in a place that would normally be closed off to her and others with limited mobility. Upon completion, the Off-Road Wheelchair designs and notes will be released under a Creative Commons (by-nc) license, which means that anyone can continue to contribute improvements on the basic design, so long as it remains for non-commercial purposes. The hope is that the Off-Road Wheelchair can be replicated at other regional Burning Man events, so that even more of the disability community can participate in this unique survivalist camping experience. This is our second fundraising round for the project. The first round of the project was at the Alchemy Arts Fundraiser, where we were the 3rd highest funded project of the evening, pulling in about a third of our requested project budget. This is a link to the Google Document describing the project, detailing the proposed budget, and outlining a few design ideas: https://docs.google.com/document/d/1ZLHe4XJtBqOgrQDVOkIZ0MtLGelBoQc-T4lL8dtgoAE/edit Our fundraiser will feature unique chili creations from the kitchen of Joy and Pain Cooking, plus possibly an auction of some kind, and possibly other fun surprises. Additionally, let me explain how the parking situation will work. This is Freeside Atlanta's page explaining how to get to the space: http://wiki.freesideatlanta.org/the-space The parking needs to happen towards the "back" of Freeside and the Metropolitan, so that everyone comes in through the rear garage doors. This is the marker called "Roll-up door access" in the embedded Google Map. Generally, in order to avoid a parking disaster, I recommended parking along the north and north-west part of the property. Please do not park in front of any garage doors (including Freeside's) as this puts you at risk of getting towed. Don't hesitate to email me if you need help getting there. You can email [masked] with the subject gatecode (one word). That will automatically reply with this month's gate code, if you need it. http://www.meetup.com/Freeside-Atlanta/events/70965732/

Constant Current Dummy Load

I just got my first oscilloscope. Complex analog circuits are now possible.



As I mentioned in my last post, I working on a power distribution unit (PDU) for motorcycles, cars, and other DC applications. The project is very close to the testing phase and that means I will need to run this device at precise power levels and at precise temperatures. The testing protocol also includes vibration studies, but today we are just going to talk about precision current testing.

This can be done many different ways. You can just put a resistor to ground and use Ohm's Law to tell you how much current you are burning. If you want to change the current in use though, you will have to change the resistor. That is not very handy if you want to test your power supply at multiple currents as you will need a lot of different resistors. Since my system is running at about 14V and I am talking about 15A of current, I'll need some pretty beefy resistors and those are expensive.

Instead, I've decided to purpose build a constant current dummy load. This uses a single logical load resistor (I will have parallel resistors but they will behave as one) and adjusts the voltage across it to define the current that gets burned. I searched Amazon and found a pair of 100W chassis mount 0.1Ω resistors for $7. My requirement for this testing tool is to be able to burn up to 15A which is the maximum current load I have defined for the device. Using Ohm's Law that means I'll need to to be able to adjust the output voltage between near 0V and 1.5V. If you put 1.5V across a 0.1Ω resistor you get 15A, so that is the plan. I have not done all the calculations necessary to nail down the exact output for a given input, but doesn't really matter because the input is linear from 0V to 1.5V and you will measure the output across the load and do your Ohm's Law calcs based on the precisely measured (4 wire) resistance for that specific load resistor. 200W is just a tad bit low (about 10W by the numbers) but I'll mount these on a heat sink with a fan around if necessary.


There are a couple of options I could select to get 1.5V on the output. I could use a voltage regulator to get a "precise" voltage, but that isn't really a good option. Regulator's are not that precise. Instead I'll use a voltage reference. The one I had in the drawer was a 2.048V reference and I can count on it to output exactly that figure. It is a high impedance output though so I'll need to do something else with that. I could setup an op amp and voltage follower and have a low impedance voltage source. With that, the standard thing to do would be to put a voltage divider in the circuit with a potentiometer to adjust that output to another op amp and put an output transistor in that amps feedback loop. I've decided to NOT do this though. I don't have any nice pots (10 turn or 1 turn), so I've decided to doing something with some digital components as well. I've decided to use a DAC (an MCP4921) to produce the voltage, based on the aforementioned reference. To control the DAC I need a micro-controller. I had a tube of ATTiny85 MCUs and that is just perfect for my needs. The ATTiny85 is an 8 pin MCU with 5 IO, Vcc, GND, and reset pins. The DAC requires 3 pins as it uses an SPI interface. That leaves me 2 pins to the human/machine interface. I have a drawer full of rotary encoders (like a digital pot). It outputs a quadrature code which essentially tells you what direction the knob is being turned. The MCU keeps track of the current state and adds or subtracts based on the encoder input and then sends a command to the DAC to change its output. 


My DAC is referenced to 2.048V and it is 12bit so it will output a linear voltage between near 0V and 2.048V at 4096 equal steps. Since I want only 1.5V I'll put a static voltage divider in the circuit and send that to the op amps which are controlling the output transistor.


I've seen a couple projects like this on the internet and they all used a system to control the output transistor that I don't like. They use a MOSFET which I like, but they simply bias the transistor in it's Ohmic region so that it is being used as a variable resistor. That causes the MOSFET to produce a lot more heat than if it were being run fully "enhanced" or "saturated" (we are talking about N channel enhancement MOSFETs). If you fully enhance it, power flows through it at lower resistance and your MOSFET will run cooler. It also means your analog circuit will need to be able to do fast, and preferably rail to rail, switching to keep the current constant. If fast rail to rail switching is what you need, then a comparator is a good thing to use.


I am using three op amps in the output transistor loop. The DAC feeds a voltage follower op amp and its output feeds the positive input of another. It's output feeds the positive of a third whose output drives the gate of the MOSFET. The MOSFET output runs into the negative terminal of the latter two op amps. This gives me a rail to rail PWM signal to the gate of MOSFET such that for each .1V I put into the first op amp, 1A goes through the load resistor. A nice system and my MOSFET runs as cool as possible.


This is the first analog circuit I've designed and built. It was made possible by the introduction of an oscilloscope to my lab. I like it! You can see my love of digital electronics has not died by my introduction of the MCU and DAC to a circuit that could have been done just as well with a nice 10 turn pot. No matter, the encoders are a dime a dozen and small while 10 turn pots are pricey and large.

Another challenge faced in this project is the fact that I am running an SPI device on an ATTiny85. This is worth mentioning because the ATTiny doesn't have a hardware SPI interface so it needs to be done in software. I didn't see any examples of this on the interwebz, so I'll post it up here in case it's is of use to anyone. I should also mention that the DAC I am using is a MCP4921 in case someone searches for a way to use this chip with a ATTiny they won't have to reinvent this wheel. The important things to notice are the use of the word (16 bit number) and the shiftout, highbyte, and lowbyte functions I am employing. These are built into the Arduino tool chain so as long as you can handle your latch pin by yourself you are in business.

int del=0; 
word outputValue = 0;
byte data = 0;
int val = 0;

int csPin = 0;
int sckPin = 1;
int siPin = 2;
int ENC_A = 3;
int ENC_B = 4;
void setup()
{
  pinMode(csPin, OUTPUT);
  pinMode(sckPin, OUTPUT);
  pinMode(siPin, OUTPUT);
  pinMode(ENC_A, INPUT);
  pinMode(ENC_B, INPUT);
  digitalWrite(ENC_A,HIGH); //these pins do not have pull up resistors on an attiny...
  digitalWrite(ENC_B,HIGH); //you must pull them up on the board.
}
void loop()
{
  int enc = read_encoderJOM();
  if(enc != 0) {
    val = val + (enc*10);
    val = min(val,4095);
    val = max(val,0);
    setDAC(val);
  }
  delayMicroseconds(50);
}

void setDAC(int value) {
    outputValue = value;
    digitalWrite(csPin, LOW);
    data = highByte(outputValue);
    data = 0b00001111 & data;
    data = 0b00110000 | data;
    shiftOut(siPin, sckPin, MSBFIRST, data);
    data = lowByte(outputValue);
    shiftOut(siPin, sckPin, MSBFIRST, data); 
    digitalWrite(csPin, HIGH);
    delay(del);
}

int oldENC_A = 0;
int oldENC_B = 0;
int8_t read_encoderJOM() {
  int a0Pin = digitalRead(ENC_A);
  int a1Pin = digitalRead(ENC_B);
  int returnVal = 0;
  if(a0Pin != oldENC_A || a1Pin != oldENC_B) {
    if(oldENC_A == a1Pin && oldENC_B != a0Pin) {
      returnVal = -1;
    } else if (oldENC_B == a0Pin && oldENC_A != a1Pin) {
      returnVal = 1;
    }
    oldENC_A = a0Pin;
    oldENC_B = a1Pin; 
    return returnVal;
  } else {
    return 0;
  }
}

Entire circuit except for the output transistor and the load resistor. Those are visible in the video above.

Yellow is output from DAC. Green is the final output to the MOSFET gate. The DAC is outputting 1.47V (the scope is off by a factor of 10) and the meter tells me the load resistor is burning 17A. The op amps are running at 12.5V and peak the peak the PWM is 12.4V. There is lots of room in that duty cycle as well you can see.


"Making lemonade with lemons" or "Reworking your bad PCBs"

I've been working on a large project for a few months now. It's a DC power distribution unit, and as you can imagine it has need for relays. I've got the thing setup to accept cards to can perform many uses both input and output. One of the many cards I've designed for this system (dual low-side switching relay, 5V, 12V, audio sensor etc..) is a dual high-speed 12V solid state relay card.

Rendering of PDU and fresh pile of PCBs from Circuitmart
This is a photo of the relay on a breadboard.
 single channel of dual high-speed 12V solid state relay on breadboard
This is the card from both sides. The "empty" space is used for thick and wide traces to carry current. These will be built with 6oz copper and can source 23A @ 330W in theory. I've only pushed them to 100W so far but they showed no meaningful rise in temperature so I think I am on the right track. By the numbers, they are right where they should be.
Because these cards are small and parts count it large (4 diodes, 6 transistors, a driver IC, 7 resistors, 1 tant cap) I sourced  ICs with the configs I needed inside of them pre-configured. You would be amazed what you can find at Digikey if you look hard enough. Anyway, I'd never used these ICs before so I was required to design the footprints for them and lay them all out and what not. Long story short (too late), I read the datasheet wrong for one of them and got some pins confused. I didn't notice this until I had it all built up and my beautiful square wave looked like this.


Not so square... :(
I began going through everything and I found the problem, but what to do? Well, run new wires of course!
I didn't have to do any drilling because I happened to have vias available so I just needed to cut some traces and thread some wire. I used an old length of stranded telephone wire. After stripping the outer shield, I removed one of the four insulated wires inside and stripped it down to its constituent 8 strands. I used two strands (twisted) for the short trace and one strand of the longer one. In order to raise the single strand's current capacity a bit, I wet the entire length of the strand with solder. This also stiffens it so it wont bend so easy. 

My square waves have returned to me!

Bench power supply project

I found myself needing a 480W power supply to test a high current project I was working on. A 500W bench/lab power supply will set you back $100s so I figured a PC power supply was the cheapest bet. For $80 you can get a Wonhunglow brand. I checked ebay and found Dell 500W server power supplies CHEAP. Like $2 cheap.

I acquired a couple and figured out how to turn the thing on by shorting 3 pins together. Then I designed a simple little 4 rail power supply PCB and had it built by OSH Park. This power supply outputs 12V and 5V and 4V. I didn't have any use for the 4V so I skipped those pins but did add a 500mA 3.3V LDO to my board so I have 3.3V, 5V, 12V, and GND rails available. I left a large section of the solder mask missing so I could solder on some more current carrying capacity and called it done. I used a DPDT switch to short out the 3 pins required to turn on the 12V rail and added a little LED to indicate that the 3.3V regulator was running and put a small current limiting resistor on the LED so that the regulator is stabilized (I didn't check the datasheet too closely but it is common for an LDO to behave strangely until it has a minimum load). One minor complicating factor was the unusual connector on this hot swappable power supply. It had a part number on it though and I was able to get Molex to send me a couple mating adapters.

I will redesign this with a fully adjustable constant voltage and constant current output in the the future. That will be a bit of a project because 500W is a lot of power to bleed off and I want it to be accurate so I plan to use 12bit DACs and ADCs. I've been looking around for them and they are expensive enough that I think I will just use a ARM Cortex 3 microcontroller with on board 12 bit converters. More on that on some future post.

Here it is.
The business end.
Plugged into the Power Supply
Side view of the Power Supply with PCB attached
The back side featuring the LDO and Molex connector.

Successful Launch of Classes on Meetup



A little over 2 weeks ago, we at Freeside Atlanta launched a series of classes on Meetup on everything from Linux to 3D Printing. They've been a huge success so far! Our 3D Printing class, shown above, was taught by 3D Printing Expert Anthony Aragues. We had 11 students sign up for the first class, where they covered the recent iterations of hardware and software and how to use them.

In fact, every single class that we launched filled to capacity. Intro to Linux, Intro to Electronics, Intro to Arduino, CNC, and 3D printing. Thank you to all of the Teachers and Students that made this little experiment such a success! Because of how well this first round went we'll be launching more classes and workshops soon, so stay tuned!

Sharp Memory LCD - Arduino Library


This post extends the previous post.

Source Code Released!
http://code.google.com/p/arduino-sharp-memory-lcd-gfx-library/

I've got a little reflow oven simulation running on the LCD. I think its going to be great for the reflow oven project.

The source for the sketch in the video is attached below. The library now does vectors in addition to text and bitmaps. I am now extending the Adafruit GFX library so I can use those vector drawing routines in addition to my PGM space bitmaps. I still need to clean up the unnecessary banging I am doing on one pin. I'll post up the code on the interwebz for all to use once that is cleared up. I need a darn oscilloscope to inspect that pin!

If you need an early copy of the library and you don't know how to contact me, PM me from the youtube video.


#include 
#include "SharpMemoryLcd.h"

SHARPMEMORYLCD lcd;

void setup() {                
  Serial.begin(9600);
  lcd.LcdInitialize();
  lcd.LcdAllClearMode();
  lcd.LcdStartEXTC();
  
}

void loop() {
  lcd.setCursor(1,6);
  lcd.setTextColor(0, 1);
  lcd.setTextSize(1);
  lcd.setTextWrap(1);
  lcd.print("Craftycoder's");
  lcd.setCursor(1,15);
  lcd.print("Sharp Memory");
  lcd.setCursor(1,24);
  lcd.print("LCD Library"); 
  lcd.setCursor(1,33);
  lcd.print("Extends"); 
  lcd.setCursor(1,42);
  lcd.print("Adafruit GFX");  
  lcd.LcdPrintBuffer();
  delay(4000);
  lcd.LcdStopEXTC();
  lcd.LcdAllClearMode();
  lcd.LcdStartEXTC();
  lcd.drawLine(0, 0, 95, 95, 0);
  lcd.fillRect(4, 4, 7, 7, 0);
  lcd.fillCircle(7, 7, 2, 1);
  lcd.LcdPrintBuffer();
  delay(1000);
  lcd.LcdClearBuffer();
  lcd.setCursor(1,2);
  lcd.print("Draw Vectors");
  for(int x=0;x<32;x=x+4) {
    lcd.drawRect(47-x/2, 47-x/2, x, x, 0);
    lcd.drawCircle(75, 75, 20-x, 0);
    lcd.LcdPrintBuffer();
    delay(10);
  }
  delay(5000);
  lcd.invert(1);
  lcd.setCursor(1,11);
  lcd.print("Invert Them");  
  lcd.LcdPrintBuffer();
  delay(5000);  
  lcd.invert(0);
  lcd.LcdStopEXTC();
  lcd.LcdAllClearMode();
  lcd.LcdStartEXTC();
  lcd.setCursor(4,5);
  lcd.print("Reflow Oven");
  lcd.setCursor(4,14);
  lcd.print("Simulation");
  lcd.drawRect(0, 0, 96, 96, 0);
  lcd.drawRect(1, 1, 94, 94, 0);
  lcd.drawRect(2, 2, 92, 92, 0);
  for(int x=3;x<93;x++) {
    lcd.drawPixel(x,95-testTemp(x),0);
    lcd.drawPixel(x,96-testTemp(x),0);
    lcd.LcdPrintBuffer();
    delay(10);
  }
  lcd.setCursor(26,80);
  lcd.print("Remove PCBs");
  lcd.LcdPrintBuffer();
  delay(10000);
  lcd.invert(0);
  lcd.LcdStopEXTC();
  lcd.LcdAllClearMode();
  lcd.LcdStartEXTC();
  lcd.LcdPrintImage();
  delay(1000);
  lcd.LcdStopEXTC();
  lcd.LcdAllClearMode();
  lcd.LcdStartEXTC();
}
int testTemp(int x) {
  if(x<30)
    return x+1;
  if(x<60)
    return 30+((x-30)/2);
  if(x<75)
    return 45+((x-60)*2); 
  if(x<85)   
    return 75;
  if(x<94)
    return 75-((x-85)*3);    
  
}

Sharp Memory LCD - Musings

Update: Arduino Library Released

If any of you guys were at Freeside this weekend, you would have seen me staring into the oscilloscope trying to make heads or tails of its output and comparing that to a couple of datasheets. One of those datasheets was for the Atmega328P microcontroller that is on the Arduino UNO, the other was the Sharp Memory LCD. These are cool because the are ultra low power 6uW and have extremely high contrast.

The Sharp datasheet isn't what I would call straightforward, at least for the uninitiated (whom I count myself among). The power up sequence was pretty clear but once it came to pushing pixels it got a little vague. Really it was just a bunch of waves on the sheet.


One of the waves is a constant 5-60Hz pulse. That is the sort of thing that would be very irritating to create if you are bit banging on the main loop of your program, so I needed to get the AVR to pump that out in an automatic way. Researching the interwebz and reading the Atmega datasheet at length and comparing that to the output on the o-scope, I came up with this:

pinMode(11, OUTPUT);
TCCR2A = _BV(COM2A0) | _BV(COM2B1) | _BV(WGM20);
TCCR2B = _BV(WGM22) | _BV(CS22) | _BV(CS21) | _BV(CS20);
OCR2A = 65; // 60HZ roughly
Which is logically equivalent this (to but not as annoying because it happens in the absence of the loop):
int bang = 0;
void loop() {
  pinMode(9, OUTPUT);
  if(bang == 0) {
    digitalWrite(9,HIGH);
    bang = 1;
  } else {
    digitalWrite(9,LOW);
    bang = 0;
  }
  delayMicroseconds(8333);
}

The prior code puts out a "phase correct" square wave on pin 11 at 60Hz. It also screws with pin 3 (not good) which I need to address next time I am at a scope. With that, it was just a matter of reading the data sheet for the screen and deciphering the thing into C code. I also found a non-arduino project on youtube using one of these screens and asked the poster to send me his source which was very helpful in understanding the datasheet. Once that was done, I converted that C code into C++ code and made a "SharpMemoryLCD" Arduino library. Currently it can print out basic strings and read byte[]s from PROGMEM and paste them to the screen. I will also add some other features like painting vectors to the screen and loading bitmaps from a disk before I'll call it "done". The current functionality is enough to get the reflow oven project I am working on finished though. That reflow oven project will be the basis of a future Freeside project/class where attendees will get a custom PCB and firmware to use to convert their toaster oven into a high quality reflow oven. You will be required to bring a 1500W toaster oven, and I think the rest of the stuff I'll include in the class fee (custom electronics, solid state relays, and thermocouples).



This is the code that produces the images in the video above. The library is not link up yet. I'll make a google code project for this once I have it a little more mature. Feel free to post up a comment if you want a pre-release copy. I'll hook you up.
#include "SharpMemoryLcd.h"

SHARPMEMORYLCD lcd;

void setup() {                
  Serial.begin(57600);
  lcd.LcdInitialize();
  lcd.LcdAllClearMode();
  lcd.LcdStartEXTC();

}

void loop() {
  lcd.LcdPrintString("  CRAFTYCODER'S",4);
  delay(1000);
  lcd.LcdPrintString("  WIFE COMES HOME",7);
  delay(1000);
  lcd.LcdStopEXTC();
  lcd.LcdAllClearMode();
  lcd.LcdStartEXTC();
  lcd.LcdPrintImage();
  delay(1000);
  lcd.LcdStopEXTC();
  lcd.LcdAllClearMode();
  lcd.LcdStartEXTC();
}

ISP Programming Jig w/ pogo pegs


During one of the last projects I was working on, I found that the first programming jig I made had a serious draw back. It could only put the #1 pin of the programmer in two of the four corners. That meant that I could only program my board from one side. That was fine until I assembled the project in it's case. At that point, reprogramming was a difficult task that required disassembly, something I never considered when I designed the item and as it turned out it was almost impossible to do without destroying it. Annoying!

Three weeks ago I decided I wanted to flash some new firmware on my motorcycle remote so I could use it to put a GPS on my Kindle Fire. That meant I needed take it apart and risk destroying it. Not an exciting prospect. Then I thought, why don't I just build another programming jig like the last one only upside down. That seemed like a winner, because it was fast, but I didn't have any more 2x3 ISP headers. Bah! Since I needed to wait on a shipment from Digikey I went ahead drew up a custom circuit board and added a few bells and whistles and sent it to fabricator. 

The bells and whistles I spoke of are a pair of ISP headers which are mirror images of each other and a pair of LEDs that point to the #1 pin. When you plug into one the of the two headers, one of the two LEDs lights up pointing to the #1 pin. This function makes it easy to identify how to orient the PCB to the jig.

Below are images of the schematic and the board layout. The assembly is very easy. You just take two of the PCBs solder a pair of headers to the bottom board and pogo pegs to both and use some stand offs for strength. Check out the video for a better look at the final assembly.

You can modify the Eagle files posted below or send the pre-configured Gerber files directly to http://oshpark.com/ or your preferred fabricator to get some PCBs of your own.
Link to Eagle and Gerber Files

 

I drew up the board upside down for no particular reason.
Blue is the outside and red is the inside.