Sciencemadness Discussion Board

Simplest Colorimeter

smaerd - 28-5-2015 at 09:13

So I wanted a little colorimeter just for kicks and maybe to run a couple basic experiments. I was eyeing out op-amps and photodiodes, then I hit the literature. I ran into this wonderful little article -

"A Simple, Small-Scale Lego Colorimeter with a Light-Emitting Diode (LED) Used as Detector. Jonas Asheim, Eivind V. Kvittingen, Lise Kvittingen, and Richard Verley
Journal of Chemical Education 2014 91 (7), 1037-1039. DOI: 10.1021/ed400838n "

This is probably the simplest design for a colorimeter I've ever seen, although I do not know it's linear ranges, it seems to work okay for basic things. Basically they have a LED light source driven by a battery or in my case a wall-charger, which shines through a cuvette, and is detected by a Red LED.

DSCF0040.JPG - 47kB

The authors found like I had in a previous experiment (http://www.sciencemadness.org/talk/viewthread.php?tid=53814#...) that LED's can serve as detectors for photons of wavelengths of light up to what they emit. Ex: a 570nm LED can detect photons from 0nm->570nm (okay maybe not 0nm but you know what I mean).

Anyways, it was such a simple experiment I had to try it myself and I was skeptical that the linear range of voltage incurred by illumination would not be reproducible. Needless to say I was surprised.

Experiment - A 505nm LED was used as the light source and a 590nm LED was used as the detector. A 5v 500mA power supply was put in series with a 270ohm resistor and the source LED. 1 drop of green food coloring was solvated in ~10mL of water. then measured. The solution was diluted in half 4 times relative to the unknown initial concentration. Each time the solutions voltage was measured.

That's basically it, then I created %transmittance values and converted to absorbance and made a beer lambert law plot. The linear correlation coefficient was 0.998, indicative of an acceptable fit.

ColorimeterResults.jpg - 71kB

Try it for yourselves, its pretty nifty. I figured this might come in handy for some people needing to do some basic analysis or explain the principle of visible light spectroscopy to someone.

Attachment: colorimeter results.ods (47kB)
This file has been downloaded 881 times

With this simple design I could envision a 10$-20$ variant, which includes a single amplification stage to suite a milivolt/volt display(if a suitable display/IC could be found). So it would be without a microcontroller and without a multimeter. The math would still be required but it's really not a big deal with an Excel file.

So it's not a UV-VIS but for someone who is broke and wants to experiment with kinetics of visible light absorbing compounds, LED's are dirt cheap. Molar absorptivities could likely be calculated to about 2 decimals if the solution concentration was in an acceptable range(demonstrated by the article).

[Edited on 28-5-2015 by smaerd]

blogfast25 - 28-5-2015 at 09:58

Yep, that seems to work really, well. Well done!

Igor (aga), please build me one of those, presto!

smaerd - 28-5-2015 at 10:18

It's a 10 minute build blogfast. All you need are two lego blocks (the kind with the holes in them), two LED's, a resistor, batteries, and a multimeter. Oh and something transparent to hold the solution in.

It would be cool if Aga built an amplification stage for this though. If not I might, but I am about to be running out of free-time here pretty soon I think :/.

[Edited on 28-5-2015 by smaerd]

aga - 28-5-2015 at 10:41

Arduino, three leds, CdS cell as sensor.

PWM the three LEDS to generate a full spectrum, also measurings the resultings.

Edit :

What's it for ?

To see the Colour of stuff ?

[Edited on 28-5-2015 by aga]

smaerd - 28-5-2015 at 10:57

Aga, maybe with an RGB LED, other-wise the path-length of the light would be pretty skewed. Unless you did 3 detectors. I'm more of a fan of the LED light source swapping so you can buy a LED catered to a wavelength of interest.

Do those CdS or PbS sensors have a linear response between voltage/resistance and illumination? And I guess are they sensitive in the visible range? a phototransistor or diode would work as well.

It's for quantitation of a dissolved material at a known wavelength, or studying how much of a certain wavelength of light is absorbed per unit of compound.

It would be easy to do on a microcontroller but I feel like that might hold someone back from building one, and add cost when a purely analog circuit would suffice. Then again on a microcontroller an amplification stage becomes a likely necessity with the LED detector at least.

[Edited on 28-5-2015 by smaerd]

aga - 28-5-2015 at 11:10

Needs an Arduino, TFT shield and a PIC as far as i just sketched out on this bit of paper.

Cost should be about $30 max.

Yes, i was thinking of an RGB LED as i have some.

blogfast25 - 28-5-2015 at 11:29

Quote: Originally posted by aga  


What's it for ?

To see the Colour of stuff ?



Nope. It's a simple quantitative analytical instrument which allows to determine the concentration of coloured reagents (or reagents that can be 'given' colour) by their absorbance in solution. Principle:

http://en.wikipedia.org/wiki/Beer%E2%80%93Lambert_law

10s and 10s and 10s of published analytical protocols based on this method, BTW.

I can see a bit of improvement to smaerd's set up by means of a shielded cuvette holder (no stray light).


[Edited on 28-5-2015 by blogfast25]

aga - 28-5-2015 at 11:37

Sample in a test tube, dropped into a bit of copper pipe through which a hole has been drilled (laterally, all the way through = an in-hole and an out-hole)

Ok. Think we have that capability.

Edit

It's the Beer-Lambert Law.

Unfortunately i have no Lambert, however i do have ....

[Edited on 28-5-2015 by aga]

blogfast25 - 28-5-2015 at 11:45

Quote: Originally posted by aga  
Sample in a test tube, dropped into a bit of copper pipe through which a hole has been drilled (laterally, all the way through = an in-hole and an out-hole)



NO TEST TUBE. Cuvette has to be square, incident light perpendicular to side. Test tube would reflect light in the wrong directions, causing false readings. Trust me, I'm a Leprechaun.

aga - 28-5-2015 at 11:45

So, seeing as i have copper pipe and no small plastic pipe, here's the Plan :-

Cut some 15mm copper pipe to a length a bit longer than one of my test tubes.

Drill a hole all the way through about half way down.

Drill a copper-pipe sized hole in another, shorter length of copper pipe.
Cut that one in half.
Solder the two halves onto the longer tube so that they cover the holes in the long bit, forming a kind of cross.

Stick an RGB LED onto one of the short tubes, a detector into the other.

Vary the RGB intensity to generate a rainbow spectrum.
Measure what intensity the sensor sees.

Do a graph and shout Hoorah !

aga - 28-5-2015 at 11:46

Duh.
Damned leprechauns throwing spanners in the works.

blogfast25 - 28-5-2015 at 11:49

Square cuvettes are cheap, BTW.

I'm Leprechaun Lambert.

[Edited on 28-5-2015 by blogfast25]

smaerd - 28-5-2015 at 11:50

Quote: Originally posted by blogfast25  

NO TEST TUBE. Cuvette has to be square, incident light perpendicular to side. Test tube would reflect light in the wrong directions, causing false readings. Trust me, I'm a Leprechaun.


That may sound like a concern in theory, but many UV-VIS instruments utilize test-tubes or cylindrically shaped sample cells in their instruments. The readings are relative to a blank. As long as the test-tube is placed in the same location any internal reflectance or similar phenomena will be accounted for.

@aga - I guess I'm just confused what you're trying to accomplish by doing that. Are you going to have your light source in direct contact with the solution? That might really limit things. Edit - Why are you varrying the intensity of the light?

[Edited on 28-5-2015 by smaerd]

blogfast25 - 28-5-2015 at 11:51

All smaerd's design needs is to enclose optical part in a little light-tight box.

[Edited on 28-5-2015 by blogfast25]

aga - 28-5-2015 at 11:52

Not got any.

So, Flat is just the surface of a sphere with an infinite radius, so perhaps a bit of curvyness is ok.

In any case, the LED light source, electronics, detector and software will be the same.

May as well do those bits and try out the test tube.

If that doesn't work i'll chop a lump off some polycarbonate sheeting that has square cells.

If that fails, best ebay some square glass.

blogfast25 - 28-5-2015 at 11:55

Igor, you will do as told, FOR ONCE, remember the Frankenstein II debacle, I DON'T want to go through that again! :o

Cuvettes from FleeceBay.

[Edited on 28-5-2015 by blogfast25]

smaerd - 28-5-2015 at 11:56

Blogfast - the little thing I made doesn't seem to be effected by stray light. The stray light is probably outside of the detection of the LED and I got a pretty reasonable R^2 given the 'significant digits' I used. If the signal was amplified though, then that would be much more of a concern.

Edit - It's not like I broke out the volumetric glass-ware either. My solution measurements were made entirely via a disposable plastic pipett with half mL graduations.

[Edited on 28-5-2015 by smaerd]

aga - 28-5-2015 at 12:00

A picture speaks a 1000 words

IMG_0680.JPG - 167kB

The bottom bit is just an idea of how to make two side-arms fit nicely.

[Edited on 28-5-2015 by aga]

blogfast25 - 28-5-2015 at 12:02

Smaerd:

With all due respect, the R<sup>2</sup> means very little w/o calculating confidence levels (P values), for estimated (unknown samples) values.

ALL colourimeters I've ever used use square cuvettes and dark cells. Why change a winning horse? :D


[Edited on 28-5-2015 by blogfast25]

blogfast25 - 28-5-2015 at 12:06

Quote: Originally posted by aga  
A picture speaks a 1000 words



The bottom bit is just an idea of how to make two side-arms fit nicely.



Smaller, SQUARE cuvette. Samples cost money. A few ml is better than a few more ml.

aga - 28-5-2015 at 12:09

Still got no square glass tubes, and i've been waiting MINUTES !

Ebay is really letting standards slip.

I can't see how it will matter given the age and dirtyness of my copper pipe - the internal walls are pretty light-absorbent.

As i said, the electronics are the same no matter what setup is used, so may as well try it and see.

aga - 28-5-2015 at 12:11

I suppose lenses and focusing on a capillary tube of sample is being a bit extreme ?

What am i thinking !

A simple reflected light colorimeter would work, and also tell you your skin tone.

blogfast25 - 28-5-2015 at 12:16

Igor, you drive me into an early grave! Never will I employ an Dago again! :D

I will send you one of mine. Maybe Dos if you play nice.

[Edited on 28-5-2015 by blogfast25]

smaerd - 28-5-2015 at 12:16

Yea, like I said, this was the simplest colorimeter design I had ever found. It doesn't factor in error associated with multimeter readings, or any of that. I've also never seen someone calculate a P value for a beers-law plot. Most people just use the error associated with their solution preparation I thought. Sure a square cuvette is ideal, but like I said, I've used UV-VIS spectrophotometers that used cylindrical cuvettes without any concerns whatsoever. That's the nice thing about relative measurements.

@aga - now that makes way more sense than what I was picturing lol. Did you ever figure out the linearity of those photocells? If I had a microcontroller that wasn't being used for a project I was working on, I'd probably join you, but I really think amplification would be more fun/valuable. Maybe I'll take a crack at amplifying the signal with a basic JFET op-amp later on. I'm excited to see what you come up with though. Do a beers-law plot with your results when you get them!

Edit - reflected light would work, but you need to factor in that it's now twice the path-length and make sure it's not reflecting awkwardly through your sample other-wise you will have an unknown path-length.

[Edited on 28-5-2015 by smaerd]

blogfast25 - 28-5-2015 at 12:19

Quote: Originally posted by smaerd  
I've also never seen someone calculate a P value for a beers-law plot. Most people just use the error associated with their solution preparation I thought.


A lot do, yes. Just don't try and get into 'Nature' with that! :D

Believe me that high values of R<sup>2</sup> are deceptive, though.

[Edited on 28-5-2015 by blogfast25]

aga - 28-5-2015 at 12:33

Why is path-length important ?

If the LED and sensor are fixed, then the path-length will be the same each time between a Blank sample and the actual sample.

smaerd - 28-5-2015 at 12:44

The path length is important in accordance to beer's law.

A = e * b * c where b is the path-length. It only really matters when it comes down to comparing results, or finding e (the molar extinction coefficient).

Don't worry, I won't be publishing in nature any results I find taken by two LED's and a multimeter lol.

I don't really see how it's deceptive though, I mean, I half the concentration I get half the absorbance. I quarter the concentration I get a quarter of the absorbance. It can't be off by that much. Actually I just used a little web app to calculate the P value of the result from the correlation coefficient, the output says,
Quote:
The two-tailed P value is less than 0.0001. By conventional criteria, this difference is considered to be extremely statistically significant.

So I guess my P Value is okay as well. Physical Laws hold today!

[Edited on 28-5-2015 by smaerd]

blogfast25 - 28-5-2015 at 12:45

Quote: Originally posted by aga  
Why is path-length important ?

If the LED and sensor are fixed, then the path-length will be the same each time between a Blank sample and the actual sample.


It improves inter-apparatus reproducibility, among other things.

aga - 28-5-2015 at 12:49

So there must be a Standard path-length for a Colorimeter.

Anyone happen to know what that is ?

smaerd - 28-5-2015 at 12:51

It doesn't have to be standard, it just has to be known. Most people use 1cm... C'mon Aga, look up the equation and understand it its really easy.

aga - 28-5-2015 at 12:53

Maths ! Eeek !

I'll just build one and measure the path length.

blogfast25 - 28-5-2015 at 12:57

Quote: Originally posted by aga  
Maths ! Eeek !



Laziness! Eeek!

This is well within your capabilities, Igor. Don't put Master to shame, please?

aga - 28-5-2015 at 12:59

Egh ! Ugh ! Egh. Ooooh.

Yarm mahrster.

I shall see to it on the morn.

smaerd - 28-5-2015 at 14:26

So I made a little amplification stage. It's stable but has a pretty big offset.

It's voltage goes from 3.42V-4.97V which is about a 5x gain on signal size but a considerable off-set. It at least would give decent values for a microcontroller and could easily be improved on. Considering the op-amps cost about 0.25$ USD it's a pretty insignificant cost to factor in.

Also theres an error in my diagram, one of the 7uF cap's should be a 560pF cap.

amp stage.png - 13kB

[Edited on 28-5-2015 by smaerd]

smaerd - 28-5-2015 at 15:58

Take back my previous amplification circuit. I changed the op-amp and added a new resistor from ground to the positive input. It now goes from 0-4.56V

Seems stable, should be good for a microcontroller. I'll probably use it for my analog only circuit.

Edit - the R? is 270 ohm

LM358N amp circuit.png - 19kB]

[Edited on 29-5-2015 by smaerd]

DistractionGrating - 29-5-2015 at 09:20

I know this kit is more expensive than what is being discussed here, but I thought this link might be relevant in this thread. They have complete plans available as well: http://www.iorodeo.com/content/educational-colorimeter-kit

smaerd - 29-5-2015 at 09:41

Ah cool they are using one of the Light To Frequency detectors (http://www.mouser.com/ProductDetail/ams/TCS3200D-TR/?qs=07cg...). I wanted to buy one of those a while back. They are also using the RGB LED idea which is pretty cool.

I like their design and the fact that they give premade enclosing materials and everything else. Very solid, I don't think I'd pay 85$ + an arduino cost for one though. It's cool that they made a shield for the arduino to use their sensors for someone who wants to sort of lego something together.

Unfortunately I feel like a lot of the things they have in their design are just for appeal. Then again look at their soft-ware, its very feature rich and cleanly made. The 85$ price tag is definitely fair, it's cool that someone at home made this. It's cheaper then many other commerical options. Nice link.

I'm going for a 10-20$ build :). It won't have nearly as many output/processing features though.

PHILOU Zrealone - 5-6-2015 at 05:14

Quote: Originally posted by blogfast25  
Quote: Originally posted by aga  
Why is path-length important ?

If the LED and sensor are fixed, then the path-length will be the same each time between a Blank sample and the actual sample.


It improves inter-apparatus reproducibility, among other things.


Isn't inter-apparatus reproductibility influenced by the electronic behind and thus by each specific led, electronic part and circuit wiring specificity?
--> Are 2 leds really identical in properties and reactivity?

I think the best is to get standard procedure for calibration for each individual apparatus.

I wonder what would be the result with a UV-Led...a friend of mine showed me one about 8-7 years ago (was expensive at that time)...must be much more democratic by now.
This may require SiO2 cuvettes instead of glass for full potential.

By definition of smaerd principe exposed in the top of this tread UV-Led could be used with any of the 3 Led as detector (RGB) and maybe with a combination of the 3.

If you make a window path perpendicular to the inital beam; then not only absorbance but also emission might be analysed ;).

[Edited on 5-6-2015 by PHILOU Zrealone]

blogfast25 - 5-6-2015 at 05:33

Quote: Originally posted by PHILOU Zrealone  

Isn't inter-apparatus reproductibility influenced by the electronic behind and thus by each specific led, electronic part and circuit wiring specificity?
--> Are 2 leds really identical in properties and reactivity?

I think the best is to get standard procedure for calibration for each individual apparatus.



Inter-apparatus reproducibility is indeed affected by the whole apparatus, so path length included.

Each apparatus has to be calibrated for each specific analysis and frequently too.


smaerd - 5-6-2015 at 06:40

PHILOU Zrealone - You are correct in a lot of ways. Not every LED has the same characteristics. So my LED colorimeter may be slightly more or less sensitive in a range of concentrations then yours is. However, if both people take a measurement or a beers law plot on two different instruments, in ranges that are proportional it doesn't matter. Ex, whether the first data point is 0.878mV and 0.645mV doesn't matter so long as concentration is proportional to voltage. Absorbance units are dimensionless because they are only ever used as relative measurements. In fact this is common for all spectroscopy.

As an undergrad one day I was tasked with testing colorimeters that general chemistry students reported as malfunctioning. So I devised beers law experiments with 4 or five kinds of food coloring. Each colorimeter had slightly different values but ultimately functioned acceptably.

I do like your fluorescence idea. I was thinking along the same lines and that is why I selected the bracket that I did to hold the light sources. I was going to use my 9W UV lamp as a source rather then a UV LED though. Edit- Actually the cuvette you see me using in the OP is a quartz cuvette I purchased a long time ago to experiment with fluoresence and light scattering.


I wish I could edit my latest post in this thread. The schematic I drew up there isn't working as intended. It amplifies, but is insensitive to change or really any kind. So I'll be updating that once I get time.

[Edited on 5-6-2015 by smaerd]

IrC - 6-6-2015 at 11:16

Quote: Originally posted by smaerd  
So I made a little amplification stage. It's stable but has a pretty big offset


Try using the AD8221, and a higher quality capacitor in the feedback loop, it may improve your circuit.

Quote: Originally posted by aga  
Why is path-length important ?

If the LED and sensor are fixed, then the path-length will be the same each time between a Blank sample and the actual sample.


The sample itself will alter the actual path length compared to an empty cuvette by virtue of its Refractive index. Also this factor can bend light out of the path lowering the incident light on the detector. I would rather use something like the BPW34 instead of a red LED as a detector in the circuit. Since total flux incident on the detector is important I wonder if putting the detector at the focus of a parabolic reflector would improve the system. I was thinking about the differing refraction of various samples shifting light away from the detector (by differing amounts depending upon sample) on this last point.

aga - 6-6-2015 at 11:18

Build one IrC !

Build. Build. Build.

IrC - 6-6-2015 at 11:29

http://www.ebay.com/itm/Fire-Starter-Lighter-Parabolic-Solar...

What do you think, could this reflector be hardware hacked to work?

aga - 6-6-2015 at 11:54

Thou jesteth surely ?

IrC - 6-6-2015 at 12:39

I was considering the dual use since the apocalypse is almost upon us. How long can we trust the power grid we use to cook what we catch while living in the wild. When not performing experimental measurements we could be fishing.

aga - 6-6-2015 at 13:11

Farming on a small scale can be done in all situations.

blogfast25 - 6-6-2015 at 14:12

Quote: Originally posted by aga  
Farming on a small scale can be done in all situations.


One turnip at a time.

IrC - 6-6-2015 at 14:38

Anyway aga I was thinking of a large cell using a better detector, higher precision circuitry with lower offset. The parabolic reflector would work for that. Say in a situation where steady flow of high volumes through a (large) cuvette section which measures any changes in production. Gasoline refinery or something similar. That reflector could be taken apart and used to focus light on a BPW34 detector where monitoring of any changes in composition was required. Whats wrong with that idea?

smaerd - 9-6-2015 at 13:20

IrC there is nothing wrong with that idea. I just gave your idea shot using a LTC1050 op-amp and a BPW-34 photodiode with ~10x gain in TIA mode. (No parabolic reflector or long sample path though). My +/-1% accuracy digital voltage display(~3$) gave me another nice linear fit (R^2 = 0.997) with a populace of 4 samples! The voltage output is a little low(0-1.25V), but the BPW-34 isn't too sensitive to green light (mostly for red light).

I'm gonna build this thing a little tupper-ware container house, put in a trimmer potentiometer(so I can raise the gain a liiitttle more or lower it for longer wavelength light sources), and solder up the circuit

Do you know of any cheapy photodiodes like the BPW34 that cater more to the mid-visible range? I'd really like to increase the sensitivity for non-red sources.

Edit - also I had a really hard time reverse biasing the LED to do anything other then be a schmitt trigger(0V or 5V almost only).

[Edited on 9-6-2015 by smaerd]

IrC - 9-6-2015 at 20:40

If I had to choose I would try the S5821Si PIN photodiode from Hamamatsu.

http://www.hamamatsu.com/eu/en/product/category/3100/4001/41...

From the above link the spectral response:

341-667-k_s5821_sr_xx.jpg - 35kB

From the graph the green is roughly half the IR but still a decent choice.

This one may be even better, S10784.

http://www.ebay.com/itm/Hamamatsu-S10784-Silicon-PIN-Photodi...

Attachment: s10783_s10784_kpin1079e01.pdf (2.7MB)
This file has been downloaded 600 times

Attachment: HamaNews_0208.pdf (4MB)
This file has been downloaded 930 times

http://hamamatsu.advante.ru/catalog/997/1001.html

This page is useful since you can quickly scan specs and device number.



[Edited on 6-10-2015 by IrC]

smaerd - 10-6-2015 at 06:48

Both of those have about double the A/W rating of the BPW34. The photosensitivity is pretty darn good! In theory that would raise my green value from 0-1.25V to 0-2.5V and would put the red detection right at the 5V range. So I could get 250-500 counts of transmittance which would suit the whole cheap modular light source colorimeter idea quite well.

I found a pretty nice one on digikey the - PDB-C142 . I'm a little bummed it has about half the sensitivity at 500nm as the ones you suggested, and it's 3$ + ~3$ shipping USD. (http://advancedphotonix.com/wp-content/uploads/PDB-C142.pdf)

So it looks like so far the - Hamamatsu S10784 is the best option right now. I wish it were more available I can't find hamamatsu photodiodes anywere but that guys ebay.

Mouser has an incredibly small selection of photodiodes compared to digikey. When I ordered the BPW21 (~15$ USD) it took I think a month to ship and arrive as well. So mouser is off the list for me. I'll keep looking :) but might settle on your suggestion. Thank you

[Edited on 10-6-2015 by smaerd]

aga - 10-6-2015 at 08:12

Surprise !

http://www.ebay.co.uk/itm/SainSmart-3-5V-TCS230-TCS3200-Colo...

Based on the Taos TCS3200D sensor. Spec sheet :-
http://www.mouser.com/catalog/specsheets/TCS3200-E11.pdf

IrC - 10-6-2015 at 15:58

I bought a couple of those a while back for $7.92 (free shipping on 2nd one) from Alice, one of my favorite sellers in ShenZhen, China. $2.97 each, $1.98 shipping (additional quantity free shipping).

http://www.ebay.com/itm/TCS230-TCS3200-Color-Recognition-Sen...

Still haven't decided what to do with one mostly because I still suck at code writing. Been trying to teach myself that for over a year but I still suck at it. Alice never provided code for one so aga's listing was of great help. If you scroll down they have a nice bit of code written for it right on the page. I copied and saved it to create an .ino to try out. Thanks aga that listing helped me out with the code. Now maybe people will think I am good at it. Crap I just told everyone I suck at code. Blew that theory all to hell.

smaerd - 10-6-2015 at 17:11

Nice find there aga, I thought they discontinued those IC's :).

IrC - There are people on this forum who are good at writing code. If you need help with anything just ask and I'm sure someone can help. I dabble with it, but I'm mostly accustomed to object oriented programming(JAVA/C#) and haven't used the more base languages like C/C++/Python/etc in I don't know ~10 years? No ones gonna judge or care as long as you put some effort forward. If they do judge, screw 'em they're not acting like a community anyways.

It'd be cool to see a few colorimeter designs come out of this thread :). I went forward and bought that photodiode, couldn't find anything better for the price.

IrC - 10-6-2015 at 19:33

I bought a couple of those myself while he still has some at that price. My real problem is never having enough free hours to study the code but I did buy one of those training boards from pic16.com. The MCU development tools for just over a hundred. Plus I have a few Arduinos. I have built many things but still have to get better at code involving timing of input and output signals. At least I have been designing circuitry for decades so I am not working on two problems at the same time. Simply a matter of taking enough time to get better at the software. Back in the 80's when software development packages like Turbo C appeared on the market the costs were enormous. Would have been better to have started in programming in younger years when it was easier to learn. Or at least when I had more time to study.

Would be nice to be so wealthy I could take a year off from daily life to do nothing but study and experiment. Alas no one would pay the bills for me so I progress slowly. Getting timing critical functions and coding to agree at the same time is not that simple. As example a PIC controlled metal detector I have toyed with off and on requires rapid sampling of pulses looking at phase angles in order to discriminate various metals under varying conditions of ground balance. Most difficult getting the bugs worked out especially related to timing issues.

smaerd - 16-6-2015 at 11:29

So I got the Hamamatsu S10784 PIN photodiode. It's maybe slightly better in the amp's out vs light intensity for my set up than the cheaper BPW34. I think it's due to the smaller surface area. However, it works and I like the photodiode enough to use it over the BPW34 even though for this they are likely interchangeable :).
DSCF0044.JPG - 160kB

One thing I did to make alignment easy was to solder the photodiode onto some PCB and slap on some velcro. So I can move the velcro around on the detector "wall". Hopefully that little trick helps someone else out :).
DSCF0046.JPG - 83kB

I put together my final circuit with the LTC1050 and get from 0.00V-2.19V using the green LED. Which is more than sufficient for me. I think the schematic shows these elements being in parallel when in reality they are in series. Woops whatever.
final circuit.png - 12kB

I performed a more involve dilution trial with 7 dilutions to see if I could find a non-linear range at it's limits of detection. Not the case, linear to good agreement all the way through (R^2 = 0.997).
results.png - 32kB

I'm happy enough with the instrument to try and find a house for it (most difficult part of the project). It can't detect very very dilute solutions. I took a really bad image of about the most dilute sample I could measure just for you all to know/see. It's more dilute than it appears in the image but whatever it's a little limited :).
DSCF0045.JPG - 18kB

[Edited on 16-6-2015 by smaerd]

smaerd - 21-6-2015 at 11:07

So I found a nice little house for the colorimeter. Craft stores in the US sell boxes called "paper mache" boxes which are really some variety of cardboard easily sliced by a razor. I decided to test how well a green LED source could work with red dye rather then a green LED for green dye. As the green dye green led couldn't get very dilute.
DSCF0047.JPG - 121kB

I ended up diluting it down to 1/32 of its original concentration, and maybe could have diluted it some more. The range was again linear. As you can see the absorbance was nearly 5x compared to that of the green dye trial.
red dye green led results.png - 41kB

This time, I found that I maxed out the absorbance at high concentrations, but did quite well with low concentrations. I took a picture of the most dilute sample I measured against a white background for reference.
DSCF0048.JPG - 10kB

So in conclusion. The design I used isn't perfect. If the LED was closer to the detector it would do much better. The focussing idea IrC has is a great one. However, the thing works reliably and can be used if the limitations of the instrument are known with the right LED for the right analyte. The design is also one connection to an analog input away from being arduino compatible (which would give higher resolution especially a 3.3V arduino).

My last "content" oriented post in this thread will be an actual experiment and comparing the results to something in literature.

[Edited on 21-6-2015 by smaerd]

smaerd - 22-6-2015 at 12:23

As promised I figure I'll show a 'real world' chemistry example of the instrument in use.

The experiment was to study the inclusion phenomena between β-cyclodextrin and phenolphthalein at ~pH 11.0. Unfortunately the indicator solutions concentration could not be known as it was bought a brew store years ago. So all concentrations are essentially arbitrary.

Phenolphthalein is known to prefer the colorless lactonoid form in the presence of β-cyclodextrin due to sterical constraints and the energetic favorability of complexation. So this means at a constant concentration of phenolphthalein and a varying concentration of cyclodextrin, the concentration of the visible form of phenolphthalien should vary. As follows so should the absorbance.

1 to 1 inclusion is when one molecule (guest) docks into one other molecule (host). Meaning there aren't two guests to one host, or three, etc. Without going into the math the Benesi-Hildebrand model of 1 to 1 inclusion suggests that if the host and guest of the inclusion pair participate 1 to 1 then there should be a straight line when the inverse absorbance of the guest is plotted against the inverse concentration of the host.(https://en.wikipedia.org/wiki/Benesi%E2%80%93Hildebrand_meth...) . This method is limited and only works if some assumptions are met.

So I performed the experiment very crudely and arrived at this result.
benesi.png - 30kB

Apparently the unknown concentration of phenolphthalein was not guessed correctly. Not really surprising. The result was that of an exponential decay rather then a straight line. This result is typical for when the concentration of the host is too large relative to the concentration of the guest.Had I of had solid phenolphthalien I could have performed the actual experiment with a bit more rigor. In any event this is actually why the Job Plot method is preferred. (https://en.wikipedia.org/wiki/Job_plot )

It's not a thrilling experiment but the instrument can be used for real world chemical explorations.

[Edited on 22-6-2015 by smaerd]

I could do curve fitting from first order kinetics incurred by equiblira perturbations to try and suss out a rate constant but I haven't checked the literature enough to know if thats valid.

[Edited on 22-6-2015 by smaerd]

blogfast25 - 22-6-2015 at 12:50

smaerd:

In the experiment with the red dye what method did you use to prepare the standard solutions?

smaerd - 22-6-2015 at 16:57

Oh for the red dye, all I did was take one drop of food coloring and dissolve it in approximately 15-20mL of water.

Then I dispensed 3mL of the main solution into a cuvette.

Then using the graduations on a disposable pipette I then did 1.5mL dye to 1.5mL water(1/2). Then 1.0mL dye : 2.0 mL water (1/3). Then I diluted an aliquot of the dye solution by half. And continued on doing dilutions by half. So, that's why it starts going down by 1/4, 1/8, and 1/16, and 1/32.

blogfast25 - 22-6-2015 at 17:19

smaerd:

You would get MUCH better results (better R<sup>2</sup>;) with volumetric flasks and bulb pipettes (both calibrated).

Also, for once, run three standards for each concentration and carry out an ANOVA to work out the source of variability

[Edited on 23-6-2015 by blogfast25]

smaerd - 22-6-2015 at 18:03

I definitely would. The main thing is this, the voltage display is only accurate to +/- 1%. I'm using graduations on a pipette which is two significant decimals. So really any R^2 on the order of 0.99 is acceptable for me. In the red trial you'll also notice that I made a small spill which may have effected the last two trials slightly (lost maybe half/quarter mL of solution). Keep in mind this is a home instrument, it will only be used to get a "good inference". If I find something of interest I can take the idea/experiment to a UV-VIS at work/school. Also LED's have a spectral width of like 15-30nm iirc so it's not really designed for anything 'definite'.

I also only have 1 volumetric (100mL) at the moment because I broke my other one (10mL), and I don't have a bulb for the pipettes I have at home. I'm moving to a location where I won't have access to my home lab for quite a long time(in the next few weeks), so I'm not in the position to upgrade or add more things too my lab that aren't portable or disposable. This is why you see me posting about creating instruments and miniaturizing experiments lately. So I can still do science for funsies, just not the 500mL refluxing concentrated acids type science unfortunately.

If the question is whether the instrument reproduces the same measurements for the same concentrations the answer is yes. Even after turning it off. In the cyclodextrin experiment I actually recreated several solutions/dilutions as I went just to see and they held up each time. Also I wouldn't have to recreate solutions to test that :), just re-run the same sample. The biggest determining factor is if I place the cuvette into the slot off-axis, that really screws things up (experimental error).

I suspect that any variation that is occurring due to electronic noise is beyond three decimals (volts). Very rarely does the voltage flicker between values and if it does I just assume it is X.XX5 (which may be poor practice). I didn't create the circuit to balance thermal conditions either, but again I suspect those variations are beyond what the display can output.