GELIS Redesign: Dirty Power Supply Part II

The test-desk.  Power supply hooked up to an old gel tray with TBE in it.

The test-desk. Power supply hooked up to an old gel tray with TBE in it.

I did some testing on the boost converter today.  My naive methodology to learn what to expect was to first RTFM on the IOR site, then read the links they provided in their documentation on boost/buck converters.  Some links I found handy on that page/that I found were:

*this design uses almost exclusively (expensive looking) SMD components, so it is a good reference

Once I read those documents and took a look at the BOM, it looked like I would be able to figure out SMD replacements for most of the components.  This is good, in case I want to make 10-20 of these, since they can be batched in an oven, or even by a PCB assembler instead of done one lead at a time by hand.  The next task, since I have the parts, was to build the power supply with as few parts as possible.  A gel power supply does not need to have low ripple, or be particularly “clean”.  This means that a lot of the decoupling caps, and associated assembly cost, can be left out.

I eventually settled on adding in all of the capacitors except the input capacitors, C2, C3, and C4.  This didn’t work very well, as I suspect it tripped the over-current protection on my 12 V 10A input from a computer power supply.  Unfortunately, I don’t have a very good scope in my room for testing this- I am using a xprotolab on the feedback pins (FB on the max1771) to take my fast measurements, and a ‘harbor fright’ multimeter for my slow higher-voltage readings.  With no input capacitors I could reach about 40V, which is about half way.  Adding in C4 allowed me to easily reach 100 V.

The next step is just to get equivalent SMD parts where I can.  Some things like the MAX1771 chip are cheaper in DIP-8 than SOIC-8, so it might be worth looking into re-flowing DIPs, but I would want to make sure that that did not also impact pick-and-place-ability.  I could look at other controller chips, or simpler types of control, but I really want to get this out fast, and with as few iterations as I can manage- after all, each iteration is a pretty big cost on my end, which reduces the other cool things I can spend time and money on to revamp the gel box.

GELIS Redesign: Dirty Gel Power Supply

New vs Old GelIS sketches

New vs Old GelIS sketches

I am proud of the Gelis system, but it has some flaws caused by the major dimensions of the box being driven by the need to accommodate the off the shelf power supply.  This causes material wastage in the mostly empty back half of the box, and forces me to use screw-terminal connections in the box for wiring.  This is kind of awesome in that you can wire it all without a soldering iron, but kind of a pain in that it requires wires being routed from four faces of the box.  Some redesign options I considered were:

  • using a terminal strip to simplify wiring instead of binding posts
  • move meter/control buttons to back of box
  • use off the shelf capacitive sensors+transistors instead of switches
  • re-evaluate multi-enclosure design
  • Build custom power supply

The last option has been something I have been avoiding, because it would be capital and time intensive- I don’t have tons of experience with power electronics.  However, an Eames quote comes to mind “Never delegate understanding”.  In this case, I had delegated the power supply design to whoever had a cheap boost converter.  Whoever designed it had different goals- probably to provide way more power than my tiny gel needs, hence the enormous heat sinks.  So I decided that it was time to take on the burden of understanding the power supply.  This freedom gives me some room to make some key design decisions:

  • I can choose a knob to control voltage
  • I can choose a better way to control the LEDs
  • I can choose a better way to connect to the LEDs
  • I can choose a better power jack

These modifications will make assembly easier with regards to wiring the LEDs, which is currently a pain.  The disadvantages will be that I need to spec out each individual part, make a board, and then possibly find somebody to assemble the boards.

To get started, I ordered the parts for the iorodeo gel power supply.  Their supply works, has amazing documentation, and has few enough parts for my tiny mechanical engineer brain to handle.  My goal in building this supply is to figure out what is absolutely necessary for it to function in terms of which capacitors and parts are totally necessary, then convert it to an SMD design.  IOR very explicitly wanted this to be all through hole- for ease of assembly by everyday people.  However, SMD assembly is cheaper, and certainly faster to do in large quantities provided you have a stencil and a reflow oven.

Olympus XA Teardown and Rebuild

The Olympus XA with several panels removed

The Olympus XA with several panels removed

I have been shooting the olympus XA recently, and it is a wonderful camera.  It is small enough to fit in my the pocket of my jeans, but it makes nice big pictures with its fast f/2.8 lens.  When shooting, all the important controls are at your fingertips.  Some would say, given that it has a full-on rangefinder, that it is the poor mans leica.  Having never tested a Leica, I wouldn’t know.

However, it does have a few niggling issues.  There is no bulb mode, which makes taking more than 10 second exposures impossible.  There is also no remote release, which means that when I put it on my pocket tripod I can still get shutter shake, and I have to run into the frame if I am taking a group shot with people.  A remote release adds a lot of hackability, like triggering on motion, or at a particular time of day.  It would also make it possible to use the +1.5ev setting with a timer.  Some people also complain about focusing with the small rangefinder patch, but it is less of a big deal to me.

Finally, there are no filters available for it.  Now I didn’t realize how important this was until I took some pictures in my suite.  They are a horrible greenish color- and filters could help with this, except that there aren’t any.

In order to figure out the feasibility of hacking on some of these missing features, I found a donor camera to take apart.  It seems to be plagued by the mysterious and dreaded lens fungus, so I decided that since I couldn’t sell it, it would be donating its body to science.

If you are going to attempt this, I suggest grabbing a copy of the repair manual found here.  It does an ok job explaining the teardown, but real photos and notes are definitely useful.  It goes without saying (but I will anyway) that if you are going to do this, you are responsible for whatever damage happens to your camera.  That being said, it is an amazing piece of mechanical engineering.

IMG_4196

The first part to go (and the last one back on) is the base plate.  It is attached to the bottom by five screws- three shorter ones on the right of the picture, and two longer ones on the left.  One of the longer screws is hiding under the options lever in the upper left part of the camera.

IMG_4198

If you pull up on the bottom cover, it should come off.  This is the inside of the cover.  The only thing that might stick is the selection lever- but there is no firm mechanical connection there.

IMG_4200

Here is the inside of the bottom of the camera.  It already looks pretty exciting!  If you are having battery/power/self check problems, this is a good way to take a really good look at the battery holder and test for (or clean out) any corrosion.

IMG_4206

A groove in the bottom plate holds the sliding door on, via the hook you can see at the bottom of the cover in this photo.  Once the bottom is gone, the sliding door can be removed by gently prying the bottom part of the door upwards.  It should pop right out, but be careful not to let the tiny roller bearing escape (and it will).

IMG_4207

The next step is to remove the rewind lever.  This is pretty simple- just unscrew the bolt right in the middle.

IMG_4240

Next is the top.  The first thing to do is to carefully pry up the iconic red shutter release.  It is fastened to the camera via some kind of glue.  With that removed, the only things keeping the top on are two more screws in the well of the rewind lever and a conspicuous screw next to the rangefinder window (on the back side of the camera).

The Olympus XA with several panels removed

The Olympus XA with several panels removed

The next thing to go is the front panel.  A few obvious screws hold it in.  This gives you access to the front of the lens and the CdS cells that control exposure, but I didn’t need to tear into it further because it turns out that the front plastic on the lens is threaded onto the brass that holds the front element!  Score, if I want to add a filter.  Could turn a metal adapter to replace the plastic that would mate with a filter.  The only complication would be adding ev compensation to the meter, without using the 1.5 ev lever.  I wouldn’t want to use the lever because then I would loose some flexibility if shooting with a filter.

IMG_4210

 

Reassembly is pretty straightforward, except for the shutter release button. The shutter release it both loved and hated by the users of the camera- it is oh-so-sensitive, but it also wears out and is not very tactile- it is a lot closer to a membrane switch than a modern DSLR release.  Personally, I like it, and when I took the camera apart I decided not to just superglue it in.  Instead I used the large mating surface of the shutter release and the button face to put on more adhesive than was originally used, but at a lower strength.  Hopefully this allows me to take the button out more easily next time.

Lightbulb PCR Usage

Exploded/Cross sectioned view of Lightbulb PCR Machine

Exploded/Cross sectioned view of Lightbulb PCR Machine

If you really really want to use the lightbulb PCR machine, here are a few tips:

Note the plug

Note the plug

It is a good idea to add a small ball of wax or a drop (20ul) of mineral oil to your reaction.  This will form a plug/barrier so that your reaction cant evaporate and condense all over your tube.  There is no heated lid here!  Watch out if you use oil because it will solidify into a plug in your tube if you don’t pipette the sample out withing a minute or so of the final extension.

It is a good idea to add a few (10-20) seconds to each PCR step to allow your sample tube to get to the same temperature as the sensor.  The reaction is almost definitely larger in thermal mass than the sensor, so it will take longer to get to the correct temperature.  To help this, use the smaller .5ml thin-walled tubes.

IMG_4973

The proper way to mount samples is by taping them inside the taper of the 2-4 coupler, as seen here.  The sensor should be taped nearby.

And dont forget to modify the parameters of your reaction per the instructions in the code section of the documentation (previous post)!

Lightbulb PCR Build Documentation

Exploded/Cross sectioned view of assembly

Exploded/Cross sectioned view of assembly

There are three main parts to this documentation: hardware, electrical, and software.  A usage post will follow this one.  A paste of the complete code is included at the end and is intended to be run on the arduino uno.  Consult the hardware and electrical bill of material lists at the end of the post before going to the hardware or electronics store if you attempt this build.  It details what parts should be available at what store- some things like lamp cord are hardware items, even though they are electrical parts by nature.  Each section also contains recommendations for improving the device at the end of the section.  Read these if you want to make your device better/more durable.  As usual, I am not responsible for your actions or accidents if you choose to build this.

Hardware:

4" pipe creates a place for the lid to sit

4″ pipe creates a place for the lid to sit

The body of the cycler is made of three pieces of PVC pipe.  Note that nominal PVC pipe sizes refer to (mostly) ID and not OD.  I think this pipe is schedule 80, but I could be wrong.  The base is made of a “4 coupling” which is a part that holds couples two 4″ pipes together.  This is attached to the lid that holds the samples,  made of 4-2 reducing coupler, which reduces the pipe size.  These are connected by a small piece of 4″ pipe.  The pipe should  be jammed as far as possible into the 4 coupler as possible, and should expose about .5″ of pipe above the lip of the coupler to make a flange the lid can sit on.  See above photo.

LID IS IMPORTANT

LID IS IMPORTANT

The lid currently has one .25″ hole on it, which was made to hold samples or route the temperature sensor wires.  Since I didn’t want to drill more holes, I just scotch taped my samples inside the lid, along with the sensor, and routed the wires through the hole.  One key thing that you cannot omit is the aluminum foil flap at the top (2 side) of the lid.  This flap prevents convection during the heating cycle and allows air to escape during the cooling cycle.  If it is omitted, your device may struggle to reach the higher cycle temperatures unless your rooms ambient temperature is very high.

Recycling!

Recycling!

The next thing to discuss is the lightbulb.  I had a 60w incandescent lightbulb, of the cheapest variety possible.  It is screwed into a bulb base of the variety that hardware stores sell to make custom lighting fixtures, and is attached to two wires like a lamp cord.  It is positioned over the fan using a rolled up coffee cup sleeve.  Our coffee cup sleeve came from the local eatery Diesel Cafe, which serves both delicious coffee and useful sleeves.

On a wire test tube rack at BOSSLAB

On a wire test tube rack at BOSSLAB

The fan is a 100mm fan from a computer, approximately the same size as the 4″ pipe.  It is duct taped to the pipe, and it is tremendously loud.  It us suggested that the machine be propped up on books or a wire rack to allow air to flow into the fan.

Hardware Improvements:

To improve heating times, do not drill a hole for the sensor wire.  Drilling such a hole provides a path for convection currents to take heat out of the system.  Instead, make a small notch in the interface between the lid and the 4 coupler to route the sensor wires.

The next obvious improvement is to get a bigger bulb.  However, there are tons of other resistive heating solutions out there that don’t use a delicate, gas filled glass bulb as a heater.  Heating blankets for example, use flexible wires that would work way better for this application, and could allow each tube to have its own personal heater, sensor, and feedback loop! Unfortunately, you can’t just buy a new custom wire heater at CVS.

Besides that, the connection between the fan and the coupler and the connection between the lightbulb and the fan could be improved.  Duct tape is fine for my build because I really only want it to work once.  An easy solution would be 3d printed brackets, or some small sheet metal adapters.

Electrical:

Electrically this thing is dead simple.  However, it does deal with dangerous voltages- 120 VAC or whatever your local mains is.  If you do this be careful! Never ever work on the wiring while it is powered up.

Really poorly connected relays are a holdover from old build

Really poorly connected relays are a holdover from old build.  Heatshink is solid though!

Basically, there is an arduino with two relays and a single i2c temperature sensor hooked up to it.  The relays have four pins.  When current flows through one pair of pins, the other pair of pins connect to each other.  so one side of the relays goes from a digital pin to ground, and the other side interrupts whatever the circuit you want to turn on and off.  Other devices can do this, but relays are cheap, hard to destroy, and are readily available.  Note that the fan needs a 12v power supply via a wall wart, while the lightbulb needs to be connected to 120vac.  We used a few wire nuts, but I highly recommend wago lever wire nuts instead.

Sketch7105850

Here is the documentation for wiring the relays.  Be sure that there are no bare120 VAC connections by covering them in heatstroke tubing.

at30ts750 free soldered to wires.

at30ts750 free soldered to wires.

The temperature sensor is an at30ts750 in SOIC-8.  It is a wonderful and cheap sensor and comes in a variety of sizes.  It talks over i2c to the arduino, and requires 5 and ground, giving it a grand total of 4 wires.  But as you can see, there are 8 pins! Don’t worry. Pin 3 is an alarm that is not used, and 6, 7, and 8 are the last 3 values of the i2c address.  For my purposes, I soldered them all to Vcc (5v), making the 7 bit address 0b1001111.  The first four bytes, “1001″ are the same for all sensors of this type.

As you can see, the chip is soldered to small solid core wires.  This was done to try to match the thermal impedance of the tube better.  Large sensors with lots of mass take time to heat up, and the tube take a different amount of time to heat up.  The only way to measure the temperature of the tube is to put a sensor in it, or to estimate the temperature with a sensor of similar thermal mass.  I guesstimated the matching based on sizes of sensors I had available.  UDFN-8 seemed too small so I went with soic-8.

Sketch711526

All of this connects to an arduino, which theoretically connects to your computer.  You don’t actually need the computer unless you want to log the temperatures, but the arduino does need power! Don’t forget that.

Electrical improvements:
Let’s start with the relays: they were chosen because you can get them anywhere, and because wiring two relays is really easy conceptually for people who have never worked with electronics.  But a transistor would suffice to drive the fan, and a solid state ac line switch might be more elegant than a relay for the bulb.  These are probably a slightly cheaper (depending on source/ratings) than the relays, and could provide proportional control of the fan or PWM the bulb.

A cheap wiring/durability improvement would be a proto shield or a relay shield for the arduino. They may be overpriced in a lot of ways, but they are very convenient and can clean the wiring up, which is nice if you are going to use it frequently. If you wanted to go all-out you could design a custom PCB.

Software:

Software deals with a lot of the complexities of this system, including temperature control, temperature sensing, and timing.  Each time you change your cycle parameters, the code needs to be recompiled and uploaded. Each of these paragraphs is meant to comment the code in more detail, with some code snippets pasted in. There is also a section for people who are not familiar with programming but want to use this code.  Complete code available at the end, and soon on github.

int temp_task(float target,float temp)
{
if(temp<(target-tol))
{
digitalWrite(FAN,LOW);
digitalWrite(HOT,HIGH);
}
else if(temp>(target+tol))
{
digitalWrite(HOT,LOW);
digitalWrite(FAN,HIGH);
}…

Temperature control is handled with a simple bang-bang controller. The control loop runs every 250 ms, which is fast enough to stay within about +/-.5 degrees. The acceptable band of temperatures is also +/-.5 degrees. A hysteretic controller was chosen because it worked, and I wanted to finish this instead of tuning a PI controller.

float get_temp(int address) {…

Wire.requestFrom(address,2);
while(Wire.available())
{
upper= Wire.read();
lower= Wire.read();
raw  = (upper << 4 ) ^ (lower >>4);
temp=(float)raw*.0625;…

Temperature sensing was done on an at30ts750, which can supply up to 12 bit temperatures (default is 9) in twos complement. There is some brief setup code at the beginning of the main loop. This is to change the value of the volatile configuration register of the chip so it returns 12 bit values and not 9 bit values. I didn’t write to the non-volatile memory because this chip is going back in the parts bin, and I don’t want non-default vales written to it.

Since it the i2c transactions happen a byte at a time, there is some code to shift out the trailing 0s and stitch the two bytes together. Negative numbers a la twos complement are not implemented, since unless your room is negative degrees C ambient, there are no subzero temperatures to read. At the end of this the temperature value is computed by taking the raw sensor value and multiplying by the conversion from adc ticks to deg. C.

for(int i=0; i<seconds*8; i++){
temp=get_temp(0b1001111);
Serial.println(temp,DEC);
temp_task(target,temp);
delay(125);
}

Timing is done by taking a loop and putting a delay in it. Interrupts would be nice, but it is way easier to just use delay, and this project is just to prove it can be done. Basically, every that loop calls get_temp and passes the temperature to control_task also has delay (250) in it. The time of the delay dominates the loop. This is not very safe because the sensor could possibly not reply, and that would cause the loop to hang.

For those of you not well acquainted with programming, it is still simple to change the PCR parameters. There is a function called single_cycle(temp, time) that ramps to a temperature in Celsius, then holds it there for the specified time in seconds. The temperature should not exceed 100 C and the time cannot exceed 30 seconds. To make it longer than 30 seconds, just have call single_cycle multiple times.

You will notice that my code does not have each pcr step pasted into it. That’s because the cycling in pcr is the same three steps over and over again- denature, anneal, and extend. These three steps live in the for loop. To add or change the steps, edit what is in the for loop by changing the parameters of single_cycle, or adding more cingle_cycle calls. To edit how many times it happens, change the line “#define CYCLE_REPEATS 30″ that is at the top of the file. Just change the 30 to the number of cycles you want. If you want to add things before the cycling, or after, just add single_cycle calls before or after the for loop.  Check the comments (the things after the //) in the code for where to add stuff before or after the loop.

Code Improvements:

Well for starters, you could have interrupt driven timing events, and a state machine instead of a bunch of nested loops.  This might make the machine more accurate time wise.  The code could also be improved to take some kind of array/serial data that encodes the cycles, so you don’t have to edit and recompile it for each different annealing temp.  The final thing to add would be input sanity checks on the single_cycle function, so people don’t go putting in a temperature of 200 or anything crazy, and saftey functions to prevent overheating, emergency stop, and pause.

Bill of Materials:

Hardware:

  • Duct tape.  Get the good stuff- 3M
  • 4″ long piece of 4″ nominal diameter PCV
  • 4-4 PVC coupler
  • 4-2 PVC coupler
  • aluminum foil
  • coffee cup sleeve, or paper plate
  • lightbulb, 60W or greater
  • lightbulb socket
  • lamp cord- this is just insulated 2 conductor cord used in lamps
  • Wire nuts or wago lever nuts
  • heat shrink is sometimes found at hardware stores

Electrical:

  • Arduino uno
  • at30ts750 or any digital or analog temperature sensor that is handy*
  • two relays capable of 12v .5A DC and 125 1A VAC.  The OJE-SH-105DM is suitable*
  • two resistors for pulling up the i2c lines.  2.2k ohms each, any tolerance*
  • heat shrink

*These items are available on digikey.  Part numbers AT30TS750-SS8-B-ND, PB874-ND, CF14JT2K20CT-ND.

ETC Items:

Here is a copy of the code- I will get around to posting it on my github once I remember the password.  Fortunately, this is not python, so whitespace does not count!

#define CYCLE_REPEATS 30
#define tol .5
#define HOT 5
#define FAN 4

#include <Wire.h>

void setup() {
Wire.begin();        //join bus as a master
Serial.begin(9600);  //start serial port to computer
pinMode(HOT,OUTPUT); //set hot and fan pins as outputs.  Default is low.
pinMode(FAN,OUTPUT);
}

//get raw value from sensor, convert it to temperature and return it as a float
float get_temp(int address)
{
unsigned short upper, lower, raw;
float temp;
Wire.requestFrom(address,2);
while(Wire.available()) //read data from sensor as a 12 bit twos complement. since this application will always be at ambient temperature, we dont need to worry about the sign.
{
upper= Wire.read();
lower= Wire.read();
raw  = (upper << 4 ) ^ (lower >>4); //get rid of trailing 0s
temp=(float)raw*.0625;              //each ADC “tick” is .0625 of a degree.
return temp;
}
}

//this is the function that decides what the machine will do- heat, cool, or idle.  the #define tol .5 at the top can be changed to an arbitrary tolerance.
//making the tolerence too small will result in your machine flipping between heating and cooling really fast, making it too big will result in more ringing
int temp_task(float target,float temp)
{
if(temp<(target-tol))
{
digitalWrite(FAN,LOW);
digitalWrite(HOT,HIGH);
}
else if(temp>(target+tol))
{
digitalWrite(HOT,LOW);
digitalWrite(FAN,HIGH);
}
else
{
digitalWrite(HOT,LOW);
digitalWrite(FAN,LOW);
}

return temp>(target-tol-tol) && temp<(target+tol+tol); //return 1 if temp is within 2 tol- approaching switchover pt. from ramping to waiting for the timer
}

//this function ramps (heats or cools) to the desired temperature, then waits a certian amount of time while holding that temperature
void single_cycle(int seconds, float target)
{
float temp;
temp=get_temp(0b1001111);
Serial.print(“BEGIN\n”); //prints this at the beginning of every cycle, useful for debugging
Serial.println(temp,DEC);
while (!temp_task(target,temp)) //while temperature is not near the target, keep ramping and checking the temperature.  delay makes each cycle take about 1/8 of a second
{
temp=get_temp(0b1001111);
Serial.println(temp,DEC);
temp_task(target,temp);
delay(125);
}
for(int i=0; i<seconds*8; i++){ //seconds*8 since this loop takes about 1/8 second.  holds at the desired temp for the desired number of seconds
temp=get_temp(0b1001111);
Serial.println(temp,DEC);
temp_task(target,temp);
delay(125);
}

}

void loop() {
float temp, target;
target=25; //arb target temp, just so the thing doesent go crazy it is set to about room temperature

//these wire commands set the prescision of the sensor to 12 bits

delay(1000);
Wire.beginTransmission(0b1001111);
Wire.write(0b00000001);
Wire.write(0b01100000);
Wire.endTransmission();

Wire.beginTransmission(0b1001111);
Wire.write(0b00000000);
Wire.endTransmission();

int time=0;

delay(1000);

//prints start at the beginning of the cycle
Serial.println(“START”);

//add stuff here that you want to do before the cycle, eg hot start, initial denaturation

single_cycle(30,98);

//this for loop is what gets repeated over and over again, change #define CYCLE_REPEATS 30 to change it
for (int i=0; i<CYCLE_REPEATS;i++){
//change what is in here to change what the denature-anneal-extend cycle is.
single_cycle(10,98);//denature
single_cycle(30,71);//anneal
single_cycle(30,72);//extend
}
//Final extension etc. goes here.  Note repeat to get correct time.
single_cycle(30,72);
single_cycle(30,72);
single_cycle(30,72);
single_cycle(30,72);
single_cycle(30,72);
single_cycle(30,72);
single_cycle(30,72);
single_cycle(30,72);
single_cycle(30,72);
single_cycle(30,72);

//this block turns off the fan and bulb and waits for the device to be reset
digitalWrite(HOT,LOW);
digitalWrite(FAN,LOW);
while(1){
Serial.println(“IDLE”);
}

}

Verified working Lightbulb PCR!

L to R: ladder, neg control, neg control, positive, positive, ladder (diff conc)

L to R: ladder, neg control, neg control, positive, positive, ladder (diff conc)

Lightbulb PCR has been kind of pipe dream of diybio.  Today, I finished off the build started at Bosslab, and confirmed the results via gel electrophoresis on a torn-down GELIS box.  What you see above in the right-most red lanes are the real deal- amplified DNA (ladders with blue dye on outside, red with no dna is negative control.  Technical details will follow soon but I really need to hit the hay.  In lieu of documentation, here is what is known about the concept of lightbulb pcr.

There has been, to my knowledge, only one confirmed working build, which was done by Brian Blais.  You can see the work here. The title of the work is “A Programmable $25 Thermal Cycler for PCR”, in case that link goes dead.  It was done back in the day when the hardware was an Intel 486 with 8 M of ram!  With a parallel port!

This style of PCR machine was resurrected circa 2011 when Russel Durrett did a build using PVC, a computer fan, and a lightbulb all controlled by an arduino.  Theoretically it was a good build, but I never saw actual results, which discouraged me from building it, due to the physical constraints of the system.  The issues stem from the use of air as a conductor of heat to the samples, a lack of heated lids and a lack of sub ambient cooling.

Using air as a conductor is really a killer, since heat distribution can be influenced by the lightbulb sitting at an angle, or air currents in the room.  Air is really not a good conductor, and this means that the feedback sensor is at a different temperature than the sample, which is no good.

At the same time, it is a brilliant build because literally all the parts can be found either at a hardware store, or at a hobby electronics type store.  And it works.  Maybe not reliably, but it works and it is cheap, so that is a good start on a tool, if someone is willing to invest the time.

Anyway, a post tomorrow will have a rough BOM, electrical schematics, and code.

Refrigeubator?

IMG_4916

Incubator.  Refrigerator.  Both actually, and connected (and configurable) over http to the LAN.

The project, whatever it will finally be called, is coming together.  In the past two days I got the relays wired up and tested, the temperature sensors hooked up, wrote the logic for controlling temperature, and made it so you can post a new setpoint via the website hosted on the pi.  This is actually a big deal because it can be used as a framework to access the pi’s GPIO over the LAN, or potentially over the web (provided there was an intermediate server).  I am sure people have done this, but it is good experience to do it, and it is fun.  This could be good for home/lab (is there a difference?) automation or a slew of other projects!

The last few details to attend to before testing with cells are to:

  • mount the sensors and electronics to the structure of the fridge
  • add some lights inside so you can see when you take a picture
  • shakedown for 48 hours or so
OJ-SH105DM relay bank

OJ-SH105DM relay bank

These are the relays.  I chose on/off relays over FETs or some kind of proportional control because they should make less heat (very low ‘Rds on’ in FET terminology), and because the temperature inside is not particularly critical, so on/off control should work ok.  Plus, the code would be easier to implement on the pi, since it would only need two digital io pins, instead of a separate DAC.  They are arranged in kind of an H-Bridge configuration for reversing (or turning off) the flow of current through the peltiers.  The screw terminals make it easy to wire to the peltiers, which are stuck into the cooler.  Air-soldering this thing on would have been a huge pain and I probably would have ended with some holes melted into the incubator.

IMG_4913These are the sensors I am using.  They are AT30TS750 temperature sensors by Atmel (I like them).  They have up to 9-12 bit precision, and talk over I2C.  Unlike he potentially useless and annoying one wire sensors, which each have a hard-coded ID address, these are user-selectable with jumpers to pins 5-7.  So I can set “inside sensor” to be 0b1001111 and then if I build 3 more of these, I don’t have to spend time correlating the address to the location.

IMG_4917This is the state of the incubator.  It has moved from ugly styrofoam container to slightly more functional ugly foam container.  One nice thing about the foam is it is easy to cut it to make channels for wires.  The hope is to give it a decent finish with foam-core (just for looks), plastic or MDF once it is done which will hide the foam, although that will depend on how much I like it.  Another thing to check out is the new fan and fan support.  The support is made of foam core, which is a material I really like.  It can make lightweight structural elements like the support in a pinch, and it looks clean (provided you are careful).  For this application it was much faster than 3d printing, and easy to work with without large tools (unlike sheet metal).  One of the next steps is to move all the wiring to the back of the box.

note: The arduino is there just because I was playing with the cc3000 module- it is not related to the project.

IMG_4902I added this picture because it shows the tiny workspace I use to fab this stuff.  Even with a small space you can get stuff done.