Sunday, March 31, 2013

The AVR Dragon

I've been a little distracted from this project for a little while with some other projects, but I haven't forgotten about it.  As I recall, I'm getting to the point that I want to program an Atmel microcontroller.  Initially, my idea had been to use the Arduino software and libraries to develop and compile the source code for the densitometer and the Arduino UNO to load it to the microcontroller.  This sounded like a good idea, but I encountered some limitations that eventually led me to scratch the whole idea of using Arduino and look into proprietary solutions.  Enter Atmel AVR Dragon. It was reasonably priced at just over $50 and works with Atmel Studio.  It just arrived the other day.  I'll provide an update when I have time to try it out. 

Interesting box. 


Sunday, February 17, 2013

The Sensor Head



Probably one of the more intricate parts of this project is creating the end or "sensor head" portion of the swinging arm, which is used house both the reflective light source and light sensor.  To do this, I employed a "layered" approach that allowed for both compactness and access for maintenance.   

PCB circuit created in GIMP.
The PCB ready for etching.
The "base" layer in this plan is located in the uppermost portion of the sensor head (see diagram).  It consists of the OPT101 sensor head plugged into a standard IC socket that is soldered to a custom made PCB.  The socket allows for the sensor to swapped out if it needs to be replaced and the PCB was made in a manner previously described in this blog.    Once all the wire connectors for the base layer are soldiered, that layer will be glued in place as I do not anticipate any additional service requirements other than the possible replacement of the OPT101 sensor.

The "base" layer, minus the OPT101 sensor, positioned in the sensor head. 

The second layer after being cut out of the plastic sheet.
The second layer is needed to shield the sensor from any light sources other than the narrow sample of light to be measured (i.e. either the transmitted or reflected light).  After some experimentation, I eventually created this layer by heating a portion of a piece of plexiglass to the point that it became malleable and then gently poking a blunt metal rod into it to produce a cone shape.  This is actually somewhat tricky because too much heat will cause the plastic to begin to decompose, which will produce large quantities of tiny gas bubbles in the plastic and pock its surface.

This layer will eventually have a tiny aperture drilled into its tip and be painted matte black on the interior and exterior.  For access purposes, the second layer will need to be removable, which I intend to accomplish using very small screws at each corner of the layer.  





The LED layer in the sensor head consists of a doughnut-shaped PCB with four LEDs and one resistor in series.  This will function as the light source for the reflection portion of the densitometry.  The doughnut shape is intended to allow the PCB to fit snugly around the mid-point of layer two. Once all soldiering and wire connections are completed this layer will likely be glued to the second layer. 

The LED layer fitted around the second layer. 
The fourth and final layer in the sensor head is intended to "channel" the light produced by the LED layer to the surface of the item to be measured.  The hope with this layer is to make the light hitting the surface of the photographic paper hit it obliquely rather than at a 90 degree angle because light reflecting at an angle of less than 90 degrees is supposed to enable the sensor to distinguish densities over a greater range of the scale.  The fourth layer will be painted matte black on both sides and, because the LEDs on the LED layer should not need to be serviced any time in the near future, the fourth layer will be glued to the LED layer. 
The fourth layer placed in the sensor head. 
This final apparatus, when completed, should consist of a combined (with glue) second layer, LED layer, and fourth layer, which will be affixed to the glued base layer with small screws. 

Monday, February 11, 2013

The Sensor - Rediscovered!

I've now selected and tested the sensor I will use for both the transmission and reflection portions of my densitometer.  The TI OPT101, is a integrated photodiode and transimpedance amplifier.  I ordered three of the OPT101 ICs from Mouser Electronics about a year ago for this project and then forgot about it when the project took a back seat to other things.  At the time that I ordered the sensors, I had been researching photosensors heavily and probably knew exactly how each type of sensor worked and the pros and cons of each.  However, all these months later, I've forgotten the details, but remember that this was the sensor I had selected.  Basically, from what I can recall, the photodiode in this circuit produces a current when exposed to light and the transimpedance amplifier converts that current into a voltage. 


Using the basic configuration described in the data sheet and my Arduino UNO, I was able to get a nice data output with the following sketch: 

int sensorPin = A0;
float sensorValue = 0;
int outputValue = 0;

void setup()
{
  Serial.begin(9600);
}

void loop() {
  sensorValue = analogRead(sensorPin);
  outputValue = map(sensorValue, 0, 1023, 0, 255);
 
  Serial.print("sensor = ");
  Serial.println(sensorValue);
  Serial.print("output = ");
  Serial.println(outputValue);
  delay(200);
}

Sunday, February 10, 2013

LED Array

The circuit consists of four parallel groups of LEDs.  Each group contains four LEDs in series with a 180ohm resistor.   
The toner didn't transfer very well, so, after the second attempt, I used a permanent marker to fill in the spaces where the toner didn't stick.  

 For the transmission densitometry light source, I've constructed a PCB array of 16 CLM3C-MKW warm white LEDs.  To create the printed circuit board, I used the printer toner heat transfer method.  This involves creating a schematic using GNU Image Manipulation Program (GIMP), printing it with a laser printer on glossy magazine paper, using a hot iron to melt the toner on to the cleaned surface of a copper-clad board, dissolving the paper with water so only the toner remains on the board, and dissolving the exposed copper in a bath of etchant. 




Friday, February 8, 2013

Durable Outer Casing to Prevent Fall-apart

I've decided to renew my work on the densitometer, so I've ordered several components and, in the mean time, decided to work on constructing the casing.

The case is made entirely from pieces of fiberglass, cut with a dremel tool, and glued together with 5 minute epoxy. 
















The mostly completed densitometer exterior.  While some of the refinements, such sanding the arm into a more ergonomically pleasing shape and carefully painting the exterior, may seem trivial, I think they are important because they require a certain level of attention to detail and precision that also contribute to mechanical functioning of the apparatus, which will ultimately improve the repeatability of the density readings.  Just a note for anyone interested in sanding or cutting fiberglass: you will feel much healthier afterwards if you wear a respirator while working rather than a mask.  A mask is better than nothing, but it doesn't create the seal needed at the edge of the mask to give you full protection.  Also, do it outside. 

Sunday, January 13, 2013

The Display

Add caption
Decided to start working on the densitometer again.  Tested out the LCD and designed the casing in Google Sketchup.  I think I use either a ATtiny 45 or 44 with a wheatstone bridge. 


Saturday, May 19, 2012

Thinking About Using Arduino

So, in my spare time I've done some research into the many options I have for the portion of my densitometer circuit that receives the signal from the sensor and transforms it into a readable measurement of density.  The options range from having a completely analogue circuit with a readout supplied by an ammeter to a fully digitized system with an LCD display.  Because I have an interest in both analogue and digital technology, I will most likely go for a blending of the two.

In reading through online circuit schematics and expired patents, I've observed a number of variations.  One common early technique appears to employ the combination of a photoresistor and a wheatstone bridge.  This technique seems reasonable, but I'm not sure how stable or precise it is.  I will need to read more on the subject before making a decision.

Another possible solution in the digital realm is to try setting something up using an Arduino microcontroller.   The nice thing about this particular controller is that it is open source, very easy to use, the Arduino website seems very easy to understand, and many people are posting code for different applications on a number of forums.  Based upon my limited overview of what's on the web, I think it's fairly likely that there are a number of codes out there that I could adapt for use in my densitometer.  I've already ordered one Arduino microcontroller and some photoresistors, so my next steps will be to test them together in various configurations to see what works best.

Tuesday, May 15, 2012

The Long Trek Towards Accurrate Denisty Readings

This post represents the start in my long journey towards building my own combined transmission and reflection densitometer.  Believe it or not, it has been a long-standing (several years) goal of mine to be able to accurately measure the density of metallic silver in my black and white photographic negatives and my black and white photographic prints.  Why, you ask, might anyone want to do this?  Well, I guess I'm just a guy who likes to know how dense his film is.  Seriously, though, aside from the fact that understanding density is crucial to fine tuning one's basic photographic printing technique, it is also necessary for anyone interested in developing their own specialized approaches, such as, platinum printing or creating their own photographic emulsions.

Currently, I am still at the design and planning stage of this project.  This blog is intended to document how I build the densitometer as the project progresses.  Consequently, this first post as an introduction and review of what I've done thus far.

Over the past few weeks I have been reading anything I can find online about densitometry techniques. This includes classroom lectures, lab exercise instructions, documentary websites, and expired patents.  Based upon the documents I have reviewed thus far, my plans for the densitometer can be broken down into a controlled light source, a sensor for reading light from the light source, several possible types of electronic circuits designed to interpret the signal from the sensor and express it as density, and a method of visually displaying the density in a way that humans can understand.  For the controlled light source, I've pretty much settled on using separate sets of voltage controlled LEDs for the reflection and transmission portions of the densitometer.  As stated previously, my goal is to make the densitometer capable of measuring both reflected and transmitted light, so, consequently, it will need a source that emanates from a direction underneath a negative (for transmission) and another source that emanates from a direction above a photographic print (reflection).
Transmission (left) and reflection (right) require light sources in two different locations. 
For the sensor, I've thus far settled on either a photoresistor, a phototransistor, or a photodiode.  I am still comparing the pros and cons of each sensor type and will likely build prototypes with all three and see which works best.

Because it is spring and the weather is getting warmer, I anticipate that I will focus less on this project as I spend more time pursuing gardening, photography, hiking, pottery, geology, paleontology and all the other things I like to do outdoors.  However, I may work on it during the summer from time to time and will no doubt return to this project with greater focus in autumn.