Sciencemadness Discussion Board

Building a polarimeter

 Pages:  1    3

smaerd - 19-1-2012 at 15:57

Yea so I'm on a DIY equipment kick and keep bumping into these wonderful articles(article attached). Didn't see any threads about this so I figured I'd kick one off.

A New Cost-Effective Diode Laser Polarimeter Apparatus Constructed by Undergraduate Students
J. Chem. Educ., 2010, 87 (12), pp 1408–1410
DOI: 10.1021/ed100530f
Publication Date (Web): October 13, 2010
Attachment: build a cheap polarimeter.pdf (63kB)
This file has been downloaded 2147 times

The build concept is incredibly simple and incredibly cheap. I plan on doing a very similar build only using a cellphone charger for the power supply with a resistor to the LED.

http://projects.markslaboratory.com/polarimeter/ a successful example

Granted the LED does not have the exact same spectrum as sodium lamps it will suffice for now :).

I'm not too sure about the accuracy of such a device but checking with the theory it can't be too bad.

Has anyone here built one of these? If so what is your experience? Does it work for identifying racemic mixtures, or basic enantiomers surely the values won't be perfect?

My main concerns are the cell for holding the sample. I will probably start by using a flint glass vial, and eventually replace it with a quartz cuvette(once I get a spectrophotometer anyways). Not sure how much the index of refraction plays a role here(any advice)?

I will be doing some simple tests to see how up to snuff the design is for basic work and plan on reporting here with how it was built and maybe ask for advice for some improvements(if needed).

[Edited on 20-1-2012 by smaerd]

smaerd - 21-1-2012 at 12:29

Build day #1:

I built the base out of scrap wood, drain pipe was also scrap, the electronics where all scrap from other projects aside from the yellow LED which cost a dollar and some change. I wired a 5V 700mA cellphone charger to a 270ohm resistor after a SPST switch leading to the LED. Waiting on the polarizing film to arrive and it should be good to test. Will update then:).

DSCF0243.JPG - 154kB DSCF0244.JPG - 224kB

I found a print-out of a 360* 'protractor' with internal markings, that could easily be resized using an image editor and inch/cm scale rather then pixels.

[Edited on 21-1-2012 by smaerd]

360 protractor.jpg - 73kB

First Post

Arsole - 23-1-2012 at 02:13

Looks very interesting. My other half is always telling me to toss out my old electronic equipment. Looks like I may have a future project on my hands. :D

alterationx10 - 1-2-2012 at 12:46

That looks pretty neat so far. I've built one of these, but that happen to be my website you pointed out :-)

I've never done any real measurements with that model before; I built it mainly for demonstration purposes. I would try to measure a pure sample of one enantiomer and compare it to a literature value to get an idea of how accurate it will be when measuring with a protractor/by eye. Once you have an idea of that, you could see if it would be good for racemic mixtures.

One idea I've had, but haven't gotten around to building it, was using a little light-intensity-to-frequency chip and a stepping motor for a detector system. Basically put the chip behind a rotating polarizer; spin it 360 degrees. If you measure the light intensity every step, you should get something like a sine wave, telling you when the min/max are. Do the same thing with your sample, and you can measure the phase shift to get the amount of rotation.

As far as the cells go, you should be able to just zero out any rotation from the cuvette (i.e. running a blank). You would most likely see some optical rotation form plastic cuvettes; probably not so much from non-specialized glass. It's been a while since I've done anything with a quartz cuvette (too expensive considering I don't have any UV light sources), but I think it will polarize light as well; also it has some birefringence... (not as much as calcite, for example, but it still has a little).

Anyways, I hope to see some more pictures as your project goes along!

smaerd - 1-2-2012 at 15:42

Ah cool to see you on the forums!

I like the idea of the stepper motor it might get a bit tricky to keep track of the angles for the rotating plane though. If you do anything like this or come up with any plans feel free to post them up :) edit - I had an idea of using a webcamera for a computer and programming a very simple program to do very similar to what you're talking about with the light intensity circuit. Hmm.

Still waiting on the polarizing film to ship from over seas, should be here any day though. I tidied up the wiring a bit and staple-gunned the connections to the frame as well as put a layer of hot-glue over the screws that were near the wiring just in-case. I'll be painting the base white tonight for aesthetics. I'll take some pictures of the results and document once I have it assembled and have it tested against an enantiomer of known concentration.

Thanks for documenting your build and dropping by it's inspired me quiet a bit.

[Edited on 1-2-2012 by smaerd]

alterationx10 - 3-2-2012 at 08:12

Every once in a while I check the stats on my website to see where my web traffic comes from. I've known about this forum for a while, but have never posted much (I don't post a lot on many forums, I'm more of an introvert). I was surprised to see a lot of traffic last month coming from here; what I consider to be one of the cooler forums I lurk on!

I don't think it would be too hard to keep track of the angles. Stepper motors are used for more precise motion; every step is a predetermined angle (based on the spec of the motor). So if you keep track of the steps, which you would have to when controlling it anyways, you are also keeping track of the angles.

I've done some designs with a webcam, but it was for a Vis spectrometer. It was an earlier implementation, and I've made some design improvements, and am currently working on a nice "finished package" version. I have a little PDF outlining how it works from a presentation I gave on it in a class I took a while back, but it's over around 5mb, so I can't upload it here. I (just now) put up a link to the PDF on my site as well (in the absorbance II page), but here is the direct link if anyone wants to check it out

http://projects.markslaboratory.com/wp-content/uploads/2011/10/Home_made_Vis_Spectrometer_vs_an_HP.pdf

I have my results along side measurements with an HP 8452A. I was a little surprised with how well it turned out. In that project, I used a camera and took pictures with my sony cybershot on a tripod, and then did the data processing on those images on my computer. It's neat, because you can learn a few things from a project like this like reduction of noise from data averaging, and data processing.

I have since made a program in C/C++ to automate it all using a webcam and the opencv image processing library. If you're interested in that, you can check out the source code on my github page at

https://github.com/markslab/Spektro

You would probably need to modify it a little bit for a polarimeter, but it's not too complicated, and might be a helpful start.

I look forward to seeing your new pictures when you get them up! Maybe we can come up with some cool new plans/additions for other things.

smaerd - 4-2-2012 at 16:44

Okay so the design is complete. Now I need to figure out how to work this thing! So what I did was put markings on the tube so I knew where the light was completely black and set the paper 'protractor' at 0* on one of these points.

The vial filled with distilled water did not change the light's direction to any appreciable degree(~1*).

Here are some pictures of the 'finished' project. The first one I took using flash the others do not have flash, the second one is at 0* the third at 90*.

DSCF0246.JPG - 116kB DSCF0247.JPG - 58kB DSCF0248.JPG - 115kB

The spectrum on the light is approximately 585nm. I'm not sure if a correction is needed to fix my figures nor how to calculate it. Looked into it and couldn't find much of anything, anyone know?

edit(fixed)- Just did a 10mL of water to 10g of sucrose and got an observed rotation of about 22*. The length of the tube(filled with water) was 5.1 cm = .51dm. The total volume of the sucrose/water solution was 15mL, so 10g of solute to 15mL solvent is (2/3)

22* / (.51dm * 2g sucrose/3mL solution) = 60.75*
The listed specific rotation for sucrose is: 66.47*
So apparently I am off by quite a bit(percent error being 8.6%).

[s]I'm not sure exactly where I'm going wrong here, going to do some more research.[/s] Then I think some more trials. Anyone see anything blatantly wrong?

My previous edit was bad because I thought the equation called for grams solute/grams solvent which gave a really bad number lol.

Last edit- I think the main problems were rushing measurements in excitement. 8.6% error isn't terrible I'm sure it could be improved. I bet with an increased path length this thing would be much better as well. From what I've read a 10cm pathlength is advisible(for most samples).

I'm thinking a long thin cell could be improvised with plumbing reducing adapter, some thin copper tubing, a pipe cap with a cut in it and a cut piece of a microscope slide silicone sealanted(aquarium sealant will do the job) into place. :P

Of course a long thin vial would also work but it might be easier to go this route. Could probably build something like this even very cheaply.

Might not be stainless steel but heck some rubber septum's, copper tubing and a little silicone sealant and you're in business.

Using an line of best fit and taking 3-4 measurements I imagine this thing would be fairing just fine as it is. :) I'll test a few more chiral molecules I have access too tomorrow after I finish some org. chem home-work.

@alterationx10 - that spectrophotometer you built is impressive! I saw other designs utilizing some kind of light to something diode and a voltmeter on Instructables iirc.

I'd love to help chip in on any ideas you've got brewing I found some articles for DIY flourimeters :P. I'm not very knowledgeable when it comes to electronics but I do enjoy playing with them if the risk/reward is right :D.

So many projects so little time!

[Edited on 5-2-2012 by smaerd]

smaerd - 6-2-2012 at 20:50

I fixed the way I had my polarizing film. It wasn't a good idea to be setting vials directly onto something that flexible and prone to being scratched. So I wedged it between two pieces of wood with a hole drilled in the middle and taped a microscope slide on top after testing with a level. It was in fact, level. I could upload a picture of this 'fix' but it's pretty simplistic and probably not worth the broad-band.

Okay this time I tried it with a little bit more solution and a little more solute.
procedure
12 grams(to the 0.00g) of table sugar(sucrose) was added to to 11mL of distilled water. Supplied a little heat and stirring and a fair bit of waiting for dissolution to occur then allowed the solution to cool. The vial was placed on the 'fixed' stand for holding the vials. It measured at 27* maybe a little less but I have no way to quantify beyond the 1+/- degrees. I then measured the solution height in the vial it was 6.1cm = 0.61dm. The solution was carefully poured into a graduated cylinder and it read 17.8mL. More like 18mL we'll call it.

calculations
specific rotation:
+27deg / (0.61dm * (12g/18mL)) = 66.39*+
percent error:
[|66.39-66.47|/66.47] *100% = 0.1% (too happy to care about significant figures)

conclusion:
I'm very pleased!

If you need a basic polarimeter this is the way to go! All you have to lose is like 10$. I'll be doing more tests once I find a suitable cell that is 10cm/1dm long perhaps with L-Tryptophan. I did manage to get a far better resolution though with only 1cm more in length, kind of astonishing really.

possible improvements
Use a wider section of pipe and get a 360* protractor that has increments of 0.1* :).
Use a longer cell(10cm/1dm is the 'standard')

Thanks science madness for all the support along the way :). Hopefully this encourages others to try this out. Chirality is critical in organic chemistry as the many of you already know.

[Edited on 7-2-2012 by smaerd]

watson.fawkes - 7-2-2012 at 03:52

Quote: Originally posted by smaerd  
possible improvements
Use a wider section of pipe and get a 360* protractor that has increments of 0.1* :).
It takes more electronics, but you can get good angular accuracy with a rotary encoder and a peak detection circuit. The idea is that you rotate the sample continuously with a motor at constant angular velocity. Then you continuously sample the signal and record the time of its maximum (or compute it after the fact with an A/D converter). Then you interpolate that instant with the 'ticks' that come from the encoder. The advantage is that you are no longer limited in angular accuracy by the resolution of the encoder. It's one of the reasons not use a stepper motor.

Error sources for this method are in the accuracy of the encoder, the quality of the peak detector, and the consistency of the friction in the rotary bearing. Mechanically, the bearing doesn't need to be low friction inasmuch as it needs to minimize stick-slip motion, which causes noise in the angular velocity and limits the accuracy of interpolation. The bearings used in Dobsonian telescopes are telfon-on-melamine or polyethylene-on-melamine; these may be suitable.

Another enhancement is to use an actual sodium line instead of an approximation with an LED. Mind you, starting with an LED is a great idea, since it lowers the cost to prototype. Low pressure sodium vapor lamps are available as low as 10W, though, and their output is almost entirely from the D line doublet, so they've got good monochromaticity.

alterationx10 - 8-2-2012 at 18:34

Looks like you got some good results with this. Very nice!

more information to come

Organikum - 17-12-2012 at 14:07

Quote: Originally posted by watson.fawkes  
Quote: Originally posted by smaerd  
possible improvements
Use a wider section of pipe and get a 360* protractor that has increments of 0.1* :).

........
Another enhancement is to use an actual sodium line instead of an approximation with an LED. Mind you, starting with an LED is a great idea, since it lowers the cost to prototype. Low pressure sodium vapor lamps are available as low as 10W, though, and their output is almost entirely from the D line doublet, so they've got good monochromaticity.


The latest polarimeter models virtually all use LEDs so this will be the way to go, the days of the heating-lamps are here over for good I suppose. You may not forget that temperature is a function in the equatation and the hot sodium lamp if not very good shielded will itself distort results more then 5nm off the sodium line. Measurements anyways can be done at different frequencies of light, simple formulas to compensate exist, so thats no issue.

Now myself got into this polarimeter stuff and want to thank Smaerd for the work he already did and the information provided. Thoughg there might be more out there and yes, I just requested two articles which I believe to be about exactly whats needed now: Higher precision and automated data aqusition/storage (without having to rotate the analyser, so they claim... :D ).

Thats a highly interesting thing.....

regards
/ORG


[Edited on 17-12-2012 by Organikum]

smaerd - 17-12-2012 at 14:46

Organikum the articles you have requested are now available. Though my crude polarimeter is decent for sugars I could not get a reading from low concentration and short path length of L-Tryptophan. I trouble shooted and tried various simple improvised means and none were successful. Eliminating the rotation sounds completely ideal.

I would really enjoy being able to build an acceptable polarimeter especially if it was more affordable then commercial or surplus acquired means. Skimming through the second article(Ref 2) though it doesn't completely deliver. They require a dedicated PC(not a big deal), but a fancy lense, a CCD camera, etc. I also think they are using an automatic polarimeter? Not too sure.

However, the other article(ref 1) looks wonderful! They claim a +/- precision of 0.5 degrees and the device looks completely manage-able. Really appreciate the use of a worm-gear for the rotation. Much better then my PVC pipe hack job. I'd love to invest in working towards something like this, but right now my funds are very tight and tied to other projects.

I'd really love to find a viable and reasonable resource for hobbyist parts such as gears, worm-gears, pullies, etc. I keep begging for hints about this hoping someone will have an answer this time around.

1)Two readily-constructed instruments for the teaching laboratory
Neil S. Isaacs
J. Chem. Educ., 1983, 60 (7), p 607
DOI: 10.1021/ed060p607

2)Automatic Low-Cost Data Acquisition from Old Polarimetric Instruments Giuseppe Alibrandi, Santi D'Aliberti, Salvatore Coppolino, Antonino Villari, and Norberto Micali
J. Chem. Educ. 2005, 82, 442.
DOI: 10.1021/ed082p442

watson.fawkes - 17-12-2012 at 16:34

Quote: Originally posted by Organikum  
The latest polarimeter models virtually all use LEDs so this will be the way to go, the days of the heating-lamps are here over for good I suppose.
This is true, but monochromaticity from consumer-grade LED's is not particularly good. Last I looked, and it's been a number of years in a fast-moving field, getting sufficiently good LED's wasn't cheap. It would be be worth revisiting again, particularly if major distributors carry them now.

IrC - 17-12-2012 at 18:50

Quote: Originally posted by smaerd  
I found a print-out of a 360* 'protractor' with internal markings, that could easily be resized using an image editor and inch/cm scale rather then pixels.


Do you have a link to the original image for the scale? Posting here has altered the aspect ratio.

smaerd - 17-12-2012 at 18:59

Think this is the image at 4.5inches in diameter? - http://www.anonmgur.com/up/19c2e8de47e60d63c82c81ce8d70007f....

DJF90 - 18-12-2012 at 00:18

@Watson: A cursorary search has revealed the yellow LED's closest to me have a wavelength peak of 590 nm and a spectral line halfwidth (spectral linewidth at half height) of 35 nm. Its not monochromatic by any means, but its reasonable for an operating polarimeter, and at least it's centered in the right place for the sodium D line (589 nm).

I downloaded the first .pdf requested by Organikum a long while ago with the intention of building one, however the details are not complete in the paper (no information given on the electronic components, specifically the resistor values and the range on (what I assume is) the microammeter, G. I don't remember looking for a "corrections" paper though, so they may have added these details in the literature without me noticing.

[Edited on 18-12-2012 by DJF90]

one and one is three

Organikum - 18-12-2012 at 00:59

sometimes.

Combining the information from both articles might be the best idea - provided I have understood them correctly.

Number one rotates the polarisers at least one in the process - and they calculate the instruments resolution by the mechanical component what seems to be the determining factor. I think they are sloppy at least, leaving out other factors as temperature and lightsources (which as I feel should be identical and thats not proven, not even checked here).
Number two has the better approach as they have temperature control and a single lightsource and no moving parts. But a old polarimeter of a certain kind is needed and quite some electronic which with programming will add up considerably in time and money until it runs relieably.

Number three is my suggestion and please have a look and tell me what you think:
Tada!

- Double beam but single lightsource. One or more LEDs (or even a sodium lamp for heavens sake ;) ) placed central, light is reflected into the tubes by mirrors. This should be easy.

- Temperature control may be added by placing the glasstube with the microscope slides as endpieces (this construct convinces me, I see superior optical properties over other vessels plus the magic "asscheap" feature) in a tight fitting strong coppertube.The two tubes are both in the same box filled with water or oil and one or more Peltier-elements are place in the center working on a standard temp-control circuit. Thats something what may or may not be installed however it suits one best.

- No moving parts will be used but if I understood it right, the degree of rotation is a function of the difference of intensity of the light passing through both tubes which resemble the two halves of the circle in the integrated instrument used in the second article. So with sufficient sensible photodiodes (there are other electronic circuits doing maybe a better job I guess) and a simple comparator when the equatations of article two are applied this should result in an resolution limited mainly by the quality of the optical elements of the device.

This can be buildt in steps, basic setup without temperature control and manual calculation of the rotation from the absolut readings of the lightsensors first up to full temperature controlled automatic calibration and measurement plus data recording with an Arduino board for example, even temperature deviation and wavelength differences when LEDs are used can be factored in, the data is known and can be used by calculation and/or a lookup table stored in memory by the microcontroller.

Should work or did I mess something up?


Something else: Polarisation lenses are available for not to much money as camera equipment for the better models IIRC - high quality, maybe preferable over the foil which as mentioned in article one are the optical "weakest link".

/ORG

watson.fawkes - 18-12-2012 at 07:22

Quote: Originally posted by DJF90  
A cursorary search has revealed the yellow LED's closest to me have a wavelength peak of 590 nm and a spectral line halfwidth (spectral linewidth at half height) of 35 nm. Its not monochromatic by any means, but its reasonable for an operating polarimeter, and at least it's centered in the right place for the sodium D line (589 nm).
Could you post the manufacturer, part number, and a reference to the technical data? It would be useful for folks new to electronics to have an example of what to look for.

The main limitation of using a sodium lamp is that the D line is actually a doublet. The two peaks are about 0.6 nm apart. Thermal Doppler broadening is much less than this. So 0.6 nm is the target to have something as good as a lamp.

Any old light source can be made more monochromatic by using a prism (or diffraction grating) and collimator to select a particular frequency range. It works for both glow lamps and LED's. Clearly, the total luminance reduces as you throw away optical energy, but if you're going to use a solid-state sensor anyway, the sensitivity of the human eye is more-or-less irrelevant. Frequency separation improves with distance, so if you've got room, it's easy to separate a hot light source from the sample. This technique can easily split the D line doublet (which is readily visible even on a student-grade spectroscope) and easily get another order of magnitude of monochromaticity.

Having said all this, you can get started with a cheap LED and get some data. I'm all in favor of amateur measurement instruments. There's no need to hold them to a minimum level of quality sufficient for professional work. Yet it's also a bad idea to accept such compromises as a maximum expected level of quality. A prism-based monochromator is well within the capacity of an amateur; as optical trains go, it's a pretty simple one.

smaerd - 18-12-2012 at 07:26

Quote:
Temperature control may be added by placing the glasstube with the microscope slides as endpieces (this construct convinces me, I see superior optical properties over other vessels plus the magic "asscheap" feature) in a tight fitting strong coppertube.


If you do decide to go this route, ensure that the copper tubes diameter is wide enough to not interfere with the polarized light in any way. I tried this using some scrap tubing I believe 1cm in inner diameter and it reflected the led around the tube and was worthless. I suppose the LED could have been refined to only give a pin-hole rather then the whole size of the LED I did not experiment with this. Might be worth a try. I believe I made the copper to glass connection using aquarium silicon by DAP. Took a few tries to get it water tight however.

Quote:
Polarisation lenses are available for not to much money as camera equipment for the better models

Probably a good idea. The little plastic 'lenses' I used were very cheap, although they present a lot more error. They are flexible for one, and though they were designed to do what they do they weren't very highly rated. It might be a good idea too look into what kind of specs polarimeters polarizer's use. If I recall correctly there are several variables that take place in regards to polarizing elements but I forget them.

edit
All this talk about light makes me wish I took physics 3.

[Edited on 18-12-2012 by smaerd]

LED

Organikum - 19-12-2012 at 09:48

Quote: Originally posted by watson.fawkes  

.....
Could you post the manufacturer, part number, and a reference to the technical data? It would be useful for folks new to electronics to have an example of what to look for.
....


Available at Conrad Elektroniks the peak wavelength is 591nm, donimant is 589nm and the bandwidth is 15nm, this really should do it nicely. Not to forget the price which is 19 Cent € what makes it somehow more reasonable then a sodium lamp with ballast what would set you back 50.- € at least :D

Datasheet attached

Attachment: 156229-da-01-en-LED_3mm_gelb_klar_264_7UYC_S530_A2.pdf (102kB)
This file has been downloaded 644 times


unionised - 19-12-2012 at 09:59

The polarising / analysing filters don't need to be very good.
You could use the filters from a cheap pair of polarising sunglasses.
There's another trick that nobody seems to have mentioned. I will see if I can find a good diagram somewhere.

Organikum - 9-3-2013 at 10:58

Quote: Originally posted by unionised  
The polarising / analysing filters don't need to be very good.
You could use the filters from a cheap pair of polarising sunglasses.
There's another trick that nobody seems to have mentioned. I will see if I can find a good diagram somewhere.

Now you kept us waiting rather long, I at least would still very much like to know what trick you have had in mind? :)

Will you tell us?
Please?!

regards
/ORG

smaerd - 10-3-2013 at 13:22

Yes please, I'd really really would like having a nice functional polarimeter without the 500$ price tag.

DJF90 - 10-3-2013 at 13:30

Any idea about the electronics as I mentioned above? Thats the only thing that stopped me from gathering the required part and giving it a go.

smaerd - 3-5-2013 at 12:12

Well DJF I've finally had some spare time to inspect that publication more fully. The only big mystery to me is the G symbol in the circuit? Perhaps Woelen or a EE wizard can help shine light on that?

My only other complaint with that schematic is the '10 turn helipot' which appears to be a mechanical worm-gear with some kind of potentiometer built into it? Not really sure what thats all about or how I'd go about finding one of those.

I've actually been researching a bit more about Farraday effect polarimeters
This link has an awesome schematic: http://www.sigmaaldrich.com/etc/medialib/docs/Supelco/Genera...

Granted the photomultiplier tube would be reallly spendy I figure we could low-tech it with a cheaper detector. Although I'm not too sure about how it actually works just yet so I'll have to do some more research.

Does anyone have access to this article:
http://www.nature.com/nature/journal/v178/n4547/pdf/1781412b...
Photoelectric Polarimeter using the Faraday Effect, E. J. GILLHAM, Nature 178, 1412-1413 (22 December 1956), doi:10.1038/1781412b0




[Edited on 3-5-2013 by smaerd]

DJF90 - 4-5-2013 at 00:38

Component G is a microammeter I expect. What bothers me is the values of the two resistors, R1 and R2. If I knew that I could potentially build one of these once I have the other required components.

Attachment: Photoelectric polarimeter.pdf (243kB)
This file has been downloaded 553 times


smaerd - 4-5-2013 at 04:48

Doesn't it seem weird to have the micro-ammeter directly hooked up to the two detectors? I'm pretty certain the right hand side of the schematic + and - leads are where the micro-ammeter connects. The resistance values will depend on the photo-detector and amplification circuits out-put. Other-wise the microammeter might be 'underwhelmed' or 'overwhelmed'. That's atleast my understanding. The G must then be the generator?

Although the circuit diagram is not laid out very similar to the actual instrument(probably because it has the power supply circuit inside of it). It appears as though this "G" is some kind of amplifier circuit from some kind of photo-detector? Maybe it stands for "generator" or something. Weirdly, at least weird to me is that it seems as if both photo detectors are in series and are represented by "PR1" and "PR2". Though typically when a polorizer is referred to as an analyzer it simple means it's the second polarizer and has nothing to do with a detector. It's a bit strange they make no direct mention of the detectors used.


I'm really more interested in this farraday effect polarimeter simply because it involves no rotating mechanical parts. I'm keen to research this much more in depth, could be an arduino project.

[Edited on 4-5-2013 by smaerd]

[Edited on 4-5-2013 by smaerd]

watson.fawkes - 4-5-2013 at 08:31

I assume you all are talking about the article "Two Readily-Constructed Instruments for the Teaching Laboratory".

The "G" stands for galvanometer. You need one that stands in the center at zero, because current can flow either way.

Understanding how these circuits work requires understanding how a Wheatstone bridge works. That term is mentioned twice in the article, incidentally. You really don't need to be told the resistor values once you understand it. Unless you can source exactly the same photoresistors (that's what PR stands for) as they use you'd likely need to change the values anyway. You'll also see LDR (light-dependent resistor) used for the same part.

The "10 turn helipot" refers to a particular mechanism used for potentiometers (variable resistors). If you've got a deep electronics junk box (as the audience of this article generally would), you'd have one lying around. Stripping away the scavenging aspect, it's a worm gear driving a spur gear used to get high resolution angular positioning. Seems like angular accuracy might be much less. Other ways of doing reduction gearing could accomplish the same result.

unionised - 5-5-2013 at 01:42

Quote: Originally posted by Organikum  
Quote: Originally posted by unionised  
The polarising / analysing filters don't need to be very good.
You could use the filters from a cheap pair of polarising sunglasses.
There's another trick that nobody seems to have mentioned. I will see if I can find a good diagram somewhere.

Now you kept us waiting rather long, I at least would still very much like to know what trick you have had in mind? :)

Will you tell us?
Please?!

regards
/ORG

Oops!
I forgot about this (and I couldn't find a pic on the web)

Filter.jpg - 114kB halved.jpg - 101kB Trimmed.jpg - 99kB Recombined.jpg - 90kB Mounted.jpg - 74kB Right a bit.jpg - 135kB Just right.jpg - 101kB

[Edited on 5-5-13 by unionised]

unionised - 5-5-2013 at 02:58

Take a polariod filter- you can tell this one is really trashy 'cos you can't read through it.
Cut it in half.
Cut a diagonal sliver off one half and put the two pieces together.
tape them to a bit of glass to get a "split field analyser".
(One of the pictures is missing from the last post so I have added it here)

The idea is that you rotate the analyser until the two parts are the same brightness.
It's easier to judge that exactly than to find the minimum transmission.
(I had to mess with the pictures a bit because the camera's auto-exposure doesn't cope well but I think you can get the idea. )


[Edited on 5-5-13 by unionised]

[Edited on 5-5-13 by unionised]

Left a bit.jpg - 63kB

smaerd - 7-5-2013 at 15:01

Or a "half-shade" polarimeter looks very simple and then there is no need for a reference beam.

Theory of Using a Photoelectric Detector with a Half-Shade Polarimeter, Dan Mathews
Applied Optics, Vol. 4, Issue 6, pp. 761-762 (1965)
http://dx.doi.org/10.1364/AO.4.000761
(attached)

Something still is drawing me to the faraday modulator maybe just for the challenge and to learn more about optics. Seems to have some practical limitations though.

Attachment: polarimeter1.pdf (517kB)
This file has been downloaded 919 times


DJF90 - 8-5-2013 at 09:15

Cheers for your input watson. I've built a wheatstone bridge before so I should know this, but it was a long while ago. I'll go refresh my memory. Thanks again.

smaerd - 10-5-2013 at 11:50

Alright so I've thought about it and I think what I'm going to do is build an automatic polarimeter. Can't figure out the worm-gear potentiometer thing and figure if I'm spending money on it I might as well make it nice.

Was thinking servo's but I don't think they would provide enough resolution.

edit - alright no need for an automatic polarimeter my friend with EET experience talked me down. Too expensive and mechanical has been the standard for centuries(?) now.

[Edited on 10-5-2013 by smaerd]

watson.fawkes - 10-5-2013 at 17:40

Quote: Originally posted by DJF90  
Cheers for your input watson. I've built a wheatstone bridge before so I should know this, but it was a long while ago
The Wheatstone bridge is a basic technique of electronics for instrumentation. The basic principle, one which extends beyond this circuit, is nulling. When there's no current through the resistor in the middle (the only one not connected to a terminal), what it means is that the voltage divider on one side divides in the same proportion as the one on the other side does. It's how you compare the reference beam to the beam-with-absorption; a variation on the null is used in the paper. The same basic topology is also the traditional way of doing absorption spectroscopy, including IR, visible, and UV.
Quote: Originally posted by smaerd  
Can't figure out the worm-gear potentiometer thing [...] Was thinking servo's but I don't think they would provide enough resolution.
You don't need to use the same worm-drive mechanism. Any speed reducing gear train would would. It's exactly such a gear train that's used in those little RC servos. I found what looks like a good source of inexpensive plastic gears for such a gear train at Gizmo's Zone; in particular, they have the compound gears (two gears molded together on single axis) that a number of other vendors don't seem to carry.

smaerd - 24-5-2013 at 16:26

Okay so against the good advice I've been given I can't let go of the automatic polarimeter allure. I'm thinking about using a pulley drive and a stepper motor to get the resolution I desire. I realize the instrument would fall out of calibration rather easily but programming a calibration routine shouldn't be too hard. Rotate until black rotate the other way until black again, compare photoresistor values at half way point, etc.

The idea is this, use a 1.8* step, stepper motor. Tack on a 6mm diameter timing belt pulley. Have this run to a rotor with a ~80mm pulley directly, on the other side of the rotor fix on a 16mm timing belt pulley and have this drive another 80mm timing pulley. The rotor for the second 80mm timing pulley will be a hollow brass-tube so wires for an LED light can go through. The face of the gear will be fixed with a short length of PVC tubing with a polarizing filter on-top. The bearings for the rotors will be simple sleeve bearings and a good deal of nice thick grease. This if my calculations are correct bring the 1.8* step to a ~0.03* step. I based this on the notion that the arc-length of the original positions of a pulleys to their rotated state should be equal. Thus:
1.8deg * (6mm/80mm) * (16mm/80mm) ~= 0.03deg

The design from there on is pretty simple and based on the favored schematic discussed above. A second reference LED, photo-resistors, etc. My only twist on the electronics is to use an arduino to process the data rather then a wheat-stone bridge. I figure it'll be easier for me to actually see what is happening as I'm more programming oriented. Perhaps it'll be better for handling noise anyways. 25 dollars for an arduino isn't exactly breaking my budget anyways, especially if there is an opportunity for an automatic polarimeter with hopefully good resolution(aiming for 0.03* angular resolution) and potential for a legitimate digital display or direct computer data acquisition.

I do have some questions for the more engineering inclined members.

Would the error from a stepper motor(typically 5% "non-accumulative") be a huge burden here after it goes through the timing belt pulley mechanism? I tried looking into gear and pulley error calculations and it seemed incredibly cumbersome, but saw a few robotics experts using these components for what seemed to me like high-precision work so it seems viable. Then again looks are often so deceiving...

The other is, would sleeve bearings work for this application? I figure greased brass on slippery plastic at low speeds and low load there should be no issue, but if a more experienced builder had a gut feeling about it I'd like to be educated.

Anyhow here's the basic mechanical schematic I've worked out so far. Haven't touched the electronics aspect too much yet but I don't think that is where I'll be struggling the most.

DSCF0001.JPG - 85kB

[Edited on 25-5-2013 by smaerd]

[Edited on 25-5-2013 by smaerd]

watson.fawkes - 25-5-2013 at 06:02

Quote: Originally posted by smaerd  
I'm thinking about using a pulley drive and a stepper motor to get the resolution I desire. I realize the instrument would fall out of calibration rather easily but programming a calibration routine shouldn't be too hard. Rotate until black rotate the other way until black again, compare photoresistor values at half way point, etc.
[...]
My only twist on the electronics is to use an arduino to process the data rather then a wheat-stone bridge. I figure it'll be easier for me to actually see what is happening as I'm more programming oriented. Perhaps it'll be better for handling noise anyways.
I really would not use pulleys, but rather a gear train. The gear trains I posted up-thread look like they'd work fine. You'll get a lot of errors with a pulley, not just cumulative ones, but jitter noise from stick-slip friction. In other words, it's a mechanical source of noise. This particular application can make good use of a gear train because there's no need to ever rotate but a single direction. This eliminates issues with backlash. Suitably gearing down the motor reduces angular error on the drive shaft by the gear ratio. The encoder error will get reduced by the step-down gear ratio, and it's fairly easy to get a gear ratio high enough so that the angular error on the position of the gear teeth is the dominant source of mechanical noise.

You'll do much better with accuracy by using a servo on the drive shaft than a stepper. A servo is just a motor with an encoder. The encoder gives you an explicit measurement rather than relying upon the implicit measurement of a "step". In olden days, you might have needed some time to take a measurement while a stepper motor was in its dwell state (i.e. not moving). There's no need to stop the motor for this kind of measurement. The digitization speed from a modern A/D converter, even a cheap one as is on the Arduino, is a lot faster than the mechanics. Such a device would just rotate continuously and spit out a continuous stream of data. The digitization rate depends on whether you want to process data on the Arduino or on a host machine. The new Leonardo uses a microprocessor with on-board USB, which means that getter a big stream on data onto a PC is much easier.

Furthermore, you can use a servo mechanism, but you don't need a servo controller, that is, a closed loop rotation speed controller, since all you care about is angular position, not rate. Open loop control for this is simple; it's just a constant voltage. (Use the old standby LM317 to make an adjustable DC supply for the motor.)

Digitizing the data does not preclude use a Wheatstone bridge; it is a complementary technique. A Wheatstone bridge is a step toward a differential measurement (comparison to a reference), a technique that's always more accurate than an absolute measurement. You really want a reference beam of some sort so that you can subtract off its signal appropriately. Look up, for example, the term common mode rejection ratio (CMMR) for an introduction. For example, if the illumination beam is split into two paths, then luminance variations (from power supply variations) can get subtracted off easily.

smaerd - 25-5-2013 at 09:15

Really, really, appreciate the insight. All of my whacky projects and knowledge bank have benefited from your input.

Gears are much cheaper anyways. I think the problem was I was basing most of my information off of precision timing pulleys and belts($$$), woops! I'll still need to figure out a good way to mount them all but that shouldn't be too much of a challenge. A couple of those compound gears for example an 8:60 stacked on top of one another should do the job nicely. I'll have to figure out a way to get the LED mounted on the final gear face without twisting and pulling wires into the gear's over time but I'll think about that today should be a relatively easy problem to solve.

Ah, I see what you're saying now! Hack a conventional servo, and focus on velocity for positional measurements? Using something like this(because I am lazy and prefer off the shelf components) - https://www.sparkfun.com/products/9347 ? That's a pretty slick work around.

I see what you're saying about the wheat-stone bridge. I have an unacceptable tendency to look at circuit diagrams and get scared. This will be a good project to conquer that.

So you're saying I should use two power supplies? One for the lights and arduino, and one for the motor. That's reasonable. I'll probably need to use a dedicated computer for the Leonardo board which I purchased for this project. It's likely too much data to handle(positional calculations and the resistance measurements) on the 32kb drive(4kb dedicated already). Unless I popped on a SD card adapter.

Found a good tutorial for the PSU: http://jumperone.com/2011/08/lm317-adjustable-psu/

[Edited on 25-5-2013 by smaerd]

watson.fawkes - 25-5-2013 at 18:10

Quote: Originally posted by smaerd  
I'll have to figure out a way to get the LED mounted on the final gear face without twisting and pulling wires into the gear's over time
[...]
Hack a conventional servo, and focus on velocity for positional measurements? Using something like this(because I am lazy and prefer off the shelf components) - https://www.sparkfun.com/products/9347 ?
[...]
So you're saying I should use two power supplies? One for the lights and arduino, and one for the motor.
You only need the polarizer to move. The light source can remain in place. I don't know offhand where to get them, but a ring gear with a big hole in the middle seems ideal for this.

The servo you referenced is the general kind I'm thinking would work. It has a motor, a gear box, an encoder of some form, and a control board. This particular one, however, if my cursory reading of the data sheet is right, doesn't have an encoder output that comes out on the connector. You need such a signal in order to read out the angular position. You might be able to hack the control board to extract it (if it's there). Probably better is to find out that already has it.

You'll certainly need a separate supply for the motor, since you should always separate a motor supply from the digital supply. I mentioned using an LM317 for it. This is only if you decide that you need adjustable motor speed; you may decide that you don't need it. On the other hand, it's an easy thing to set up during the prototype to see if you want it. If you decide you need motor speed control, a pulse-width modulation scheme might by more appropriate.

You may _also_ want a separate supply circuit for the LED. It depends on whether there's enough supply noise to care or not. The digital components will be more tolerant of supply noise than an LED will. If it matters, you want a constant-current supply (which you can get with a current mirror made with two transistors) and you may want a low-pass filter on it (a simple LC filter, for example).

smaerd - 25-5-2013 at 18:58

The problem is once you make a servo open loop(continuous rotation) there is no more angular position readings. All that is is a commercial servo hacked for continuous rotation. I could do the hack myself but I'm not sure how I could get an angular reading on it don't think it's possible.


[Edited on 26-5-2013 by smaerd]

watson.fawkes - 25-5-2013 at 19:15

Quote: Originally posted by smaerd  
The problem is once you make a servo open loop(continuous rotation) there is no more angular position readings. All that is is a commercial servo hacked for continuous rotation. I could do the hack myself but I'm not sure how I could get an angular reading on it don't think it's possible.
If it's called a servo, it has an angular encoder in it somehow; it's part of the definition. In this application we don't need the encoder as part of a closed-loop control to adjust the speed finely. All we need the encoder for is to sense position so that it can be digitized. This isn't the ordinary mode for hobbyist servos, so it may take a little digging to find a COTS model that fits.

smaerd - 25-5-2013 at 19:27

http://letsmakerobots.com/node/18615 here's a solution :) the magnetic encoders aren't really ideal though.

[Edited on 26-5-2013 by smaerd]

Thought about it and yea I'm going with a stepper motor. Servo's are good for what they do but steppers are way more affordable. Industrial servos for precision measurements use absolute optical encoders. Way out of my price range.

http://www.phidgets.com/products.php?category=23&product...

45$ but its about as good as it gets. Would need a controller but I'll figure something out :).

Or if I could figure out what kind of gear train laser printer assemblies use that would be even cheaper!
Something like this:

http://www.allelectronics.com/make-a-store/item/SMT-107/STEP...

[Edited on 26-5-2013 by smaerd]

watson.fawkes - 26-5-2013 at 07:04

Quote: Originally posted by smaerd  
Industrial servos for precision measurements use absolute optical encoders. Way out of my price range.
[...]
Or if I could figure out what kind of gear train laser printer assemblies use that would be even cheaper!
"Absolute optical encoders" are what old-style mechanical mice used to use, one on each axis. I used to see lots of projects that reused of their guts with printed radially-marked wheel that ran through the optoelectronic element.

I posted a link to an inexpensive gear train above.

arsphenamine - 26-5-2013 at 20:45

Quote: Originally posted by watson.fawkes  
]"Absolute optical encoders" are what old-style mechanical mice used to use.
Minor correction: these were free-running slitted wheels using a pair of interruption optocouplers to generate quadrature output. The output is called incremental or relative motion.

An alternative is a middling stepper motor mated with one of these encoders on the shaft. Vanilla steppers move 1.8 degrees per step; that can be reduced using a lead screw with a pitch between 4:1 and 10:1, equivalent to 800 and 2000 steps per inch travel, respectively. Additionally, modern stepper controllers operate in half, quarter, and tenth step modes for even higher resolution.

Obviously, incremental encoders obligate a "home" limit sensor on whatever it is you're moving.

If you want to "hand roll" a slotted wheel for your encoder, you can gen one up in Postscript and print it out on a clear plastic sheet. Alternatively, print it as a resist pattern on copper foil that's glued to a glass or plastic disc.

Myself, I'd say fukkit (with considerable asperity) and just buy the stepper with mated encoder for ~$100 and be done with it.

smaerd - 27-5-2013 at 04:52

I realize I can not know the absolute angle of my object gear without a really nice encoder. Though, is there a reason why I cannot do the following.

Use a geared down stepper motor. Say ~0.018* per step with 5% accuracy with a 12 tooth pinion gear mated with a 96 tooth object gear. So 0.018* (12/96) ~ 0.00225* degree angle change on the object gear(the one with the LED and polarizer mounted). Then only move in one direction so there is little back-lash. Then program a calibration routine(without any sample) such that, the motor is rotated until it finds a dark region. The micro-controller would then find the half-way 'point' of one of these dark-regions and calculate how many steps to get there. Or if I have this hooked up to a computer I could use a statistical mean or standard deviation of the measurements taken in this region. Then the stepper motor will step its way along slowly(slow means less chance of missing steps). From this point the sample could be inserted and an ordinary polarimeter scan routine could be performed. Counting steps and checking for intensity of light through the wheat-stone bridge and photo-resistors etc.

With such a small geared down 'step' on the object gear even if the routine was off by 90% of a whole step(+/-0.002*) the end result would still be more than sufficient to give a great readout for any sample. In general for chemical applications 2 decimals is more than sufficient.

I just don't see why I would need to use an encoder when I have essentially an optical detector that I will be using already to take positional measurements. Of course, ideally I would be keeping track of the absolute angle, but even still using such a method I would need re-align the motor at each power up in-case it was moved or stopped during a half-run(mechanical failure), etc.

calibration concept.jpg - 11kB

[Edited on 27-5-2013 by smaerd]

Edit again - I also think a reverse biased PIN photodiode would provide better resolution then a photoresistor. They aren't too expensive either.

http://www.digikey.com/product-highlights/us/en/marktech-opt...

[Edited on 27-5-2013 by smaerd]

[Edited on 27-5-2013 by smaerd]

watson.fawkes - 27-5-2013 at 09:11

A few purchasing links from servocity.com. These are parts that would allow a polarizer to be mounted in the bore of a gear, which was driven from the outside by a gear motor.
Gear motors, from 0.5 rpm to 303 rpm, 6mm shaft. If it's possible to swap out the electric motor in one of these with a double-ended shaft version (need to call supplier), then you can put an encoder on the back shaft and leave the gearbox on the front one.
Pinion gears, 32 pitch, 6 mm bore, 16T - 32T. Used on the gearbox shaft.
1 inch bore gears for hub mounting, 32 pitch, 76T - 128T. One inch bore should be enough for both a reference beam and a standard 12.5 mm wide cuvette. Given the hole patterns, you could also bore out the gear for a larger optical path if necessary. You can build an adequate hub out of PVC pipe and mount it as a bushing.

If you picked a 100T ring gear (plenty of optical path), a 32T pinion, and a 3 rpm gear motor, it will take slightly more than a minute to make a 360° revolution and to gather all the data possible with any optical train. Assuming that you digitize at a rate of 6 kHz with a 1 rpm polarizer rotation, you're taking one sample every thousandth of a degree. If you're digitizing at 12 bits (say), you're still at less than a megabyte of data to analyze and the data rate is still rather low by USB standards. Given that accuracy is proportional to the square root of the number of samples, you can easily get another 2 or 3 digits of accuracy by decent numerical processing, since you can match on either side of the peak at every signal level. So even if you lose a digit or two because of mechanical sloppiness, you'll can get at least three decimal digits of ultimate accuracy, enough that other sources of error would come to predominate.

Quote: Originally posted by arsphenamine  
Quote: Originally posted by watson.fawkes  
"Absolute optical encoders" are what old-style mechanical mice used to use.
Minor correction: these were free-running slitted wheels using a pair of interruption optocouplers to generate quadrature output. The output is called incremental or relative motion.
True; I was being sloppy about language. The utility of this technique, though, is that it affords a fairly precise angular signal all by itself. The gear ratio of the gear box inside that 3 rpm motor is 1000:1, which means the motor is running at 3000 rpm, or 50 revolutions per second. An encoding wheel with 400 marks (a pretty easy target with photographic techniques) would give a native pulse signal at 20 kHz. 400 marks at 0.5 mm feature size gives a wheel about 2.5 inches in diameter. You could phase-lock a trigger oscillator to this signal pretty easily and use it to trigger digitization events. (The phase locking will average out variations in the marks as well.)

One advantage of using an encoder and a free-running motor is that you can completely eliminate all the circuitry and software to drive a stepper motor. While I haven't done an exact cost analysis, I have to imagine it's cheaper just it parts count to use this kind of explicit encoder rather than rely on the construction of a stepper motor to provide an implicit one.

Edits: typos. arithmetic.

[Edited on 2013-5-27 by watson.fawkes]

smaerd - 27-5-2013 at 11:08

Yea I was planning on building the gear train from servo-city parts specifically because they had nice 'channels' pre-made mounts, bearings, hollow shafting, etc. I won't be fixing the sample to the rotating polarizer I think you knew that but wanted to be clear.

I found these - http://www.robotmesh.com/optical-shaft-encoder-2-pack?gclid=... 90 ticks per revolution.
More on those:
http://content.vexrobotics.com/docs/instructions/276-2156-in...

Alright I'll be looking into optical encoders now. I'm just a bit confused about the topic in general. Edit - I see now. Optical encoder seems like the way to go.

Okay I made up a little excel sheet just to simplify the calculations(uploaded them just to save anyone else any time if they are following along). I'm sure I could have actually set up a series of equations and worked out a matrix or some crap but this will do fine. You're right watson this is the easiest and likely most affordable way to go about it. Seems like the only trick is finding a sufficiently slow motor so it can be gear reduced.

For example this motor+encoder package would work but even with another gear reduction it would go probably too fast(~8rpm). So a bit more hunting around.
http://www.dfrobot.com/index.php?route=product/product&p...
Actually I could just starve the motor of a bit of power to slow it down a bit. For some reason I was thinking that the RPM's were linked to the encoder hahaha. Need to embed in my mind that this is not a stepper motor.

Thanks again watson!

Attachment: Encoder calculator.xls (8kB)
This file has been downloaded 476 times

Attachment: Encoder calculator.ods (15kB)
This file has been downloaded 466 times

[Edited on 27-5-2013 by smaerd]

[Edited on 27-5-2013 by smaerd]

watson.fawkes - 27-5-2013 at 15:03

Quote: Originally posted by smaerd  
For example this motor+encoder package would work but even with another gear reduction it would go probably too fast(~8rpm). So a bit more hunting around.
http://www.dfrobot.com/index.php?route=product/product&p...
Actually I could just starve the motor of a bit of power to slow it down a bit.
I corrected some of the figures I used in my previous post; some of my arithmetic was wrong. Rotation at 8 rpm instead of 1 rpm, using the same sampling rate, reduces the data by a factor of eight. The resolution of the encoder is 64 counts per revolution (CPR), instead of the 400 I used to estimate. So you'd lose some accuracy, but even so it's still pretty good.

Frankly, though, at just $30 for the motor + encoder + gear box, it's a bargain. It would eliminate a large number of mechanical troubles involving getting to a first working prototype. Most of your time is going to be spent elsewhere anyway, in electronics and software. Even if you decide to replace this unit with something else, it'll get you going for pretty cheap.

smaerd - 2-6-2013 at 08:07

Alright so I finally have the mechanical aspects all figured out I think. So I've been stepping in to studying the electronics and what I'll have to be doing. So I won't be using the galvanometer in the wheat-stone bridge obviously, and instead I will be using the arduino to measure the voltage. Sure I'd like to know the current as well and all of that but the voltage is good enough as the measurement is relative and obviously V=IR is a direct relationship.

Here's a good link about how to use an arduino to make accurate voltage readings.
http://hacking.majenko.co.uk/making-accurate-adc-readings-on...

I think I will also be using the standard arduino 3.3V pin (which fluctuates) as a PSU for the LED's. I realize there will be ripple and such but at the same time the wheat-stone bridge should take care of this on the measurement end? I could also smooth it out with a capacitor or something. That way I only have two plugs for this thing. One for the motor PSU and one for the arduino(USB).

I figure the motor will be powered by a wall-wart and the smoothed through a LM317 voltage regulator circuit. Perhaps with the load it will be a bit slower anyways. Maybe I'll go by way of PWM to slow it down. Hard to say. I'd like to put a bipolar capacitor on the motor pins but I believe the encoder will block this from happening. So be it.

Biggest concern right now:
I am a bit worried about asking for too much from this arduino as it will be have to be taking a lot of measurements at once. Primarily with the quadrature encoder on the dc motor. I've calculated that at 5RPM on the object gear
(data for using this motor:http://www.dfrobot.com/index.php?route=product/product&path=47_110&product_id=633#.UaPHEc4u7Cc with another 16Tooth pinion gear driving a 100Tooth object gear)
R.P.M.: 5.28
Pulses Per Revolution:52400.0(motor shaft)
Δθ(◦ ) per pulse: 0.006870229(object gear)
Time for one Rotation(s): 11.3636363636(object gear)
Time for one pulse(s): 0.0002168633
Time for one pulse(ms): 0.2168632894

From this link someone measured the maximum transfer rate of an arduino leonardo
http://forum.arduino.cc/index.php?PHPSESSID=mclufkt52rhbep7o...
Quote:
Leonardo transfer rate at 39258 bytes/second


or 39.258 bytes per milisecond, or 0.0254 miliseconds per 1 byte. So it seems like I might be able to make this happen but I need to remember I will also be measure voltage on this same micro-controller simultaneously. So I should probably find a way to slow down the motor at least by a factor of about 10?

[Edited on 2-6-2013 by smaerd]

Edit - okay I'm learning a bit more about how this all works. I see someone has used an 8bit atmega chip to control two motors with 3000 pulses per rotation at a relatively high-speed. So I may need to factor in some sort of motor controller here. I don't care if I am getting one reading in 5 minutes to be honest but the 11 second revolution is clearly too fast. Going only one direction helps here to simplify things a lot. Lots more to learn here with the soft-ware and hard-ware. Essentially I'll need to use an interrupt routine.

I realize it may seem a bit cumbersome for me to sort of plog what I'm thinking about but I find it pretty beneficial and figure if anyone is reading they can interject and hopefully stop me from wondering down some wrong roads of thought. hehehe.

[Edited on 2-6-2013 by smaerd]

[Edited on 2-6-2013 by smaerd]

watson.fawkes - 3-6-2013 at 07:42

First things first.
Quote: Originally posted by smaerd  
I realize it may seem a bit cumbersome for me to sort of plog what I'm thinking about but I find it pretty beneficial and figure if anyone is reading they can interject and hopefully stop me from wondering down some wrong roads of thought.
Using the Leonardo may not give you all the performance you want. Regardless, it will give adequate service. More importantly, it has enough to get started. This is definitely a project where getting version 1.0 finished it important. So in general, if you have to dial down performance to make it work, just live with it. Higher performance will require more work, but more importantly, you need to understand where to put that work so that it's not wasted, and that's why version 1.0 is important.

At some point you'll need an error model. That's a mess of algebra that allows you to weigh the quantitative effect of one noise source against another.
Quote: Originally posted by smaerd  
Here's a good link about how to use an arduino to make accurate voltage readings. [...]

I think I will also be using the standard arduino 3.3V pin (which fluctuates) as a PSU for the LED's. I realize there will be ripple and such but at the same time the wheat-stone bridge should take care of this on the measurement end? [...]

I figure the motor will be powered by a wall-wart and the smoothed through a LM317 voltage regulator circuit. Perhaps with the load it will be a bit slower anyways. Maybe I'll go by way of PWM to slow it down. Hard to say. [...]

I am a bit worried about asking for too much from this arduino as it will be have to be taking a lot of measurements at once. [...]
So it seems like I might be able to make this happen but I need to remember I will also be measure voltage on this same micro-controller simultaneously. So I should probably find a way to slow down the motor at least by a factor of about 10?
One of the advantages of this design, i.e. taking measurements and locating a maximum, is that you don't ever need to know the absolute voltage. All you're ever doing is comparing one reading against another; at no point does the precise voltage that generated the reading matter. So the link you posted is more-or-less irrelevant to the current project.

On the other hand, you do want to ensure that (1) the voltage reading are consistent from sample-to-sample and (2) you're sensing at close to the maximum dynamic range of the A/D converter. For both of these, you need to know about the AREF pin (Analog REFerence), by which you can set the maximum signal expected. Because you're sensing a difference in extinction readings, which isn't going to be very large, the voltage difference in the bridge might never be very high. I can think of three techniques to address this. (a) Use an op-amp as a buffer and amplifier to move the signal you have into a more friendly range. You may want to do this anyway, even if your gain is exactly 1. (b) Increase the voltage on the sensing bridge to increase the voltage difference. Not hard, but requires another power supply. (c) Provide a lower reference point with AREF. This only requires a voltage divider, say, a pair of resistors to get in the ballpark and a trim potentiometer to set an exact point.

If you want to slow down the motor, use PWM. Your torque will be much better that way, since it's a DC motor. Since you don't need variable PWM but rather just a fixed speed, it would be easy to use an external chip to make the drive signal. Putting it inside the microprocessor reduces parts count at expense of performance. Your call.

Not only do you want a separate supply for the motor, you also want to put an optoisolator on the digital output from the microprocessor. You can get noise propagating backward through the output pin otherwise. Not strictly necessary for version 1.0, but desirable. Use of an optoisolator is recommended regardless of whether you're generating pulses on the microprocessor or just an enable signal (to turn the motor on).

The link you posted for data rate is for serial output. I don't have a definitive answer, but sending data out the USB interface is going to be faster. In any case, my surmise is that the limiting rate is the A/D converter, not the output speed.

Finally, I'll reiterate that getting to version 1.0 is what's important. Version 1.0 probably has all its electronics on a breadboard. Once you've got that, then you'll have a solid feel for how to develop an error model and more importantly, why to do so.

smaerd - 3-6-2013 at 11:38

Thanks woelen. Yea it should be a relative reading rather then anything near absolute. That'll help a lot code-wise too. Thanks again seriously.

I'm taking the financial plunge. Figure if it costs around 200 bucks I'll learn more by doing this then I would by taking a course at a college campus. Worst come to worst I'll have some awesome parts for other projects as well.

I got some 590nm 3500mcd LED's from superbrightleds.com . Have to make a warning that these suckers are bright! Think they'll do much better then the rinky dinky LEDs I was using in my previous polarimeter(from radioshack). I may consider a prism monochromator for the opitical train later on down the line. Optical grade(nonquartz as this is visible light) prisms are very affordable(10 USD or so). For version 1.0 though these should suffice and definitely didn't break the bank.

My next post will be with some semblance of progress and hopefully a fair amount less uncertainty.

watson.fawkes - 3-6-2013 at 17:54

Quote: Originally posted by smaerd  
Thanks woelen. Yea it should be a relative reading rather then anything near absolute. That'll help a lot code-wise too. Thanks again seriously.
[...]
I got some 590nm 3500mcd LED's from superbrightleds.com . Have to make a warning that these suckers are bright! Think they'll do much better then the rinky dinky LEDs I was using in my previous polarimeter(from radioshack).
It's watson. You're welcome.

As long as you're going to order materials now, make sure to pick up a box of cuvettes. The plastic ones are inexpensive; you should be able to pick up a box of 100 for less than $20. (Here's the first link I found on Google.) You need these while constructing the apparatus, because you'll want to test-fit the cuvette holder with actual cuvettes.

I'd recommend building a cuvette holder into each beam path. One cuvette is empty; the other holds the sample. By this mechanism you null out the absorption from the cuvette itself. The probably doesn't material affect the accuracy of a version 1.0 device, but it would sure be a pain to put in after-the-fact. And while this may already be obvious to you, make sure that when the lid is closed that there's no light leakage between the two optical paths.

Really bright LED's may or may not be the right thing for the device. The photoresistor you're using (or whatever other photodetector) is going to have both an upper limit and a lower limit of useful sensitivity. At the upper limit, the sensor will saturate, meaning that it doesn't register any signal difference between different impinging luminosities. At the lower end, there may be a minimum threshold before registering anything at all, acting much like saturation (but not ordinarily called that). The upshot is that you may need tune the luminosity to match your photosensor. This is pretty easy to measure once you have your electronics on the breadboard.

smaerd - 4-6-2013 at 11:26

Sorry for the name mixup!

I already ordered a quartz cuvette from ebay for 10 usd for another project I am working on. The cuvettes used in polarimeters are a bit different they tend to be 10cm long. E-bay has a decent amount of them for about 40USD a piece. The smaller the path-size the smaller the angle of polarization. For really small path-lengths of sample the farraday modulator type set up is used(applications such as HPLC etc). As it's highly sensitive but has limitations on how much it can bend light(due to the optical air coil).These types of cuvettes are easy to mount and the way I am designing the device it will be easy to adjust distances and set up a good optical train with very little hassle. The channel brackets I am using from servocity.com can be aligned with a 1/2" OD PVC pipe then machine screwed to a board. Learned my lessen about planning ahead for modifications when building the rotary evaporater the hard way.

The actual absorption of light from these cuvettes should be very small. http://www.almazoptics.com/images/Quartz%20Transmittance.gif , (Transmittance of quartz for 7mm path-length), but you're right this should be factored in. I also considered the fact that the detector will have an upper limit. I believe LED's typically have a 'relatively' linear luminous intensity verses forward current relationship, again with upper and lower limits. I'd rather not tinker with that too much. I figured this: I can always not use these LED's but if the detectors & polarizers I choose works better with more light then it would stink to have to wait a week for new LED's to arrive to play with and figure it out. I know that in my first design it wasn't very easy to see the polarized light, then again an eye isn't a detector(at least not one I can interface with a microcontroller).

I figure picking the right detector, polarizer, and light source here will probably be the most critical thing after the rotation is figured out. As there's a lot of options and I'd hate to settle on something that's just 'Okay' if I can do better without shelling out an entire paycheck.

<!-- bfesser_edit_tag -->[<a href="u2u.php?action=send&username=bfesser">bfesser</a>: fixed broken link]

[Edited on 31.12.13 by bfesser]

smaerd - 1-7-2013 at 15:45

Alright got a lot of the hard-ware figured out and put together.

Did the PWM circuit and code really basic but it works and I haven't fried my micro-controller *yet*. If anyone is curious about the circuit diagram or the code for the PWM let me know. Its nothing too intense but it was kind of scary figuring it out.

So up next is the encoder and handling the encoder. Now that the motor is slowed down it should be manage-able though.

I looked into it, and using very bright LED's is probably a good idea after-all. Most dichroic polarizer film only has 80% transmittance in the range this will be operated from. So two in the optical path is 64% transmittance disregarding anything else put the way. I've been debating not using dichroic film as its not an ideal polarizer for this application but for version 1.00 it'll be fine and cheap.

Also Watson I was wondering how bad is it to run a TIP type darlington without a heat-sink? It's being used way below its rating(~1/5 voltage) and ideally won't be run for long lengths of time.

PWM working.JPG - 220kB

IrC - 1-7-2013 at 17:04

The actual absorption of light from these cuvettes should be very small. http://www.almazoptics.com/images/Quartz%20Transmittance.gif...

smaerd not super important but the comma after gif in your link blocks the image. Easy enough to backspace it out and hit reload to see the gif but I just thought I would mention it. Nice project.

http://www.almazoptics.com/images/Quartz%20Transmittance.gif

Link fixed for you. Also I cannot load the links on the first page, below:


http://projects.markslaboratory.com/polarimeter/

http://projects.markslaboratory.com/wp-content/uploads/2011/...




[Edited on 7-2-2013 by IrC]

smaerd - 2-7-2013 at 14:53

It appears this Markslaboratory website has closed down. Shame, the fellow came in here and shared some things with us.

Thanks for fixing that link.

So today I got the encoder on the motor to count pulses over a given span of time with PWM for the motor supply. That's a big chunk down. Now I need to get a tote or similar to contain all of this in as it's quickly becoming unmanageable with all of the connections and moving parts. Once the hard-ware is mounted properly I'll be able to focus on the LED's then probably the biggest road-blocks ahead... I'll report back once it gets more neat to look at :).

Not too happy about how many power supplies I need for this. I might end up incorporating a cheap computer ATX or SFX(for size) just to deal with all these. Need 12v, 2x 5v, and an unknown voltage as I haven't hammered out the circuit yet. Don't want to have 3 wall-warts(arduino provides a 5V).

[Edited on 2-7-2013 by smaerd]

watson.fawkes - 3-7-2013 at 03:30

Quote: Originally posted by smaerd  
I looked into it, and using very bright LED's is probably a good idea after-all. Most dichroic polarizer film only has 80% transmittance in the range this will be operated from. So two in the optical path is 64% transmittance disregarding anything else put the way.
[...]
Also Watson I was wondering how bad is it to run a TIP type darlington without a heat-sink? It's being used way below its rating(~1/5 voltage) and ideally won't be run for long lengths of time.
The brightness of your LED can vary by a factor 106 depending on the current you run through it. The sensitivity of even a cheap photoresistor can be 104. You're worrying about a signal loss of about 100.2, which is unlikely to be your worst problem. Detector saturation is much more likely to be a problem. You're going to get some absorption in your sample, too.
Experimental techniques to measure the performance of a photoresistor: http://softsolder.com/2009/11/27/measuring-photoresistor-vol...
More that you can handle at present on the physics of photodetectors: http://nanohub.org/resources/9143/download/

If you're worried about power consumption in a part, measure it. Put a voltmeter across the part and an ammeter in line with it. For checking for conformance to a power dissipation capacity, these don't need to be very accurate, since you want some derating anyway. That means that cheap is fine. Multiply the voltage drop by the current and you've got your power dissipation. (Or switch a MOSFET, since current-generation devices have on-state resistances measured in m&Omega; and not &Omega;.)
Quote: Originally posted by smaerd  

Not too happy about how many power supplies I need for this. I might end up incorporating a cheap computer ATX or SFX(for size) just to deal with all these. Need 12v, 2x 5v, and an unknown voltage as I haven't hammered out the circuit yet. Don't want to have 3 wall-warts(arduino provides a 5V).
You shouldn't need more than two primary supplies. Using a separate supply for the motor is simply the easiest way to accomplish some noise isolation. Why do you say you need two 5 V supplies?

smaerd - 3-7-2013 at 20:27

I'm going with a PIN photodiode rather then a photoresistor. I figure I will do an op-amp and feed the data to the Analog pins on the arduino board. The ATMega chip should do fine for the ADC.

As much as I liked the wheat-stone bridge idea and spent time researching it I came to find out how bad photoresistors can be for measurements and it scared me off. ( http://www.electronicspoint.com/photodiode-vs-photoresistor-... here there's a discussion about this)

I'm worried about using the 5V pin on the arduino because I don't think it offers much by way of current. Also I will need two detection circuits, two LEDs, and my motor encoder all on 5V, all on the arduino pin being fed from USB of a computer. I think I'll need to isolate these rather then try and figure out a way to make that work. Maybe I can get away with running both op-amps on 3.3V. I'll try to hammer that out later I guess...

Here's some simple-ish and cheap shot-noise canceling circuits for lasers, not really LED's but the same principle applies : http://www.electrooptical.net/www/canceller/iodine.pdf

It'll be nice once I can actually hit the soft-ware part of this project hahaha.

I was originally thinking of doing this but I'd rather not flood the ADCs on the ATMega IC.
Untitled.png - 33kB

[Edited on 4-7-2013 by smaerd]

watson.fawkes - 4-7-2013 at 07:47

Quote: Originally posted by smaerd  
I'm worried about using the 5V pin on the arduino because I don't think it offers much by way of current.
It's on the spec sheet for the board, at the very least from part on the schematic.

smaerd - 4-7-2013 at 09:35

Well the current comes from the USB. USB maximum draw is 500mA. Hard to say how much the board is using. I could measure it but I'd rather isolate it for now. So if something goes wrong I can work it out then put it all together.

The 3.3V power pin on the leonardo has a 40mA maximum draw.

I'm a lot more concerned about the photodetection circuit right now and getting it to work at the pace of the encoder. I'm tossing too many ideas around right now.
I did build a very simple circuit that responded to intense light verses dim light but there was a crapload of noise but atleast I have a tiny understanding of what to do now. Now I'm thinking I might be able to use a comparator. I'm pretty lost a lot more research to do I guess.

watson.fawkes - 4-7-2013 at 10:32

Quote: Originally posted by smaerd  
Well the current comes from the USB. USB maximum draw is 500mA. Hard to say how much the board is using. I could measure it but I'd rather isolate it for now. So if something goes wrong I can work it out then put it all together.
That seems sensible. I wouldn't worry about a proliferation of power supply units for now. Use whatever you need for now, while it's in test-bench form, and figure out your final power supply needs once everything else is working. You may not be able to get away with only 2.5 W draw on the USB (0.5 A x 5 V); your LED illumination might take all of that itself.

Hint: Wall warts are probably easier to deal with than an ATX supply. You don't need all the power output of those things, and they can have stability problem driving low-power loads, which your project is.

smaerd - 20-7-2013 at 18:11

Alright I got the soft-ware essentially written and communicating with the microcontroller. Came up with a design that should work for the instrument. Have the circuit sort of planned out for the photodiode. Only thing is I need a 0.1uF nonpolar capacitor. Seems like only mouser has them and there is a 17 week wait to receive them. Tried digikey and jameco no luck. Anyone have any supplier ideas?

I also realized I don't need a double beam instrument. The intensity is a relative measurement. Doing three runs should make the results pretty clear.

[Edited on 21-7-2013 by smaerd]

watson.fawkes - 21-7-2013 at 06:08

Quote: Originally posted by smaerd  
I also realized I don't need a double beam instrument. The intensity is a relative measurement. Doing three runs should make the results pretty clear.
The reason for a double beam is to null out variations in the power supply to the LED over time (and to a lesser extend, supply variations to the detector). Those variations probably do not affect the performance of a version 1 quality instrument, unless you get a lot of motor noise coupling into the power supply. On the other hand continuous sampling over all angles does something by itself to average out such variations. Should you ever get to the point of doing a version 2 instrument, a detailed error analysis will give you an idea about how valuable it is.

Search Mouser under "film" or "multilayer ceramic" capacitors. Those are both non-polar types.

smaerd - 28-7-2013 at 11:20

Okay so I've finally started to make this project more presentable. Over the past few weeks I have made a lot of progress though.

So far I have written the java application to talk to the arduino via serial communication and set up the arduino code to talk back with operations in place to insert the 'final code'.

This weekend I finally got around to putting this thing maybe 75% together. I decided to buy some new polarizing films as the ones from my last project were kind of bent or bowed.

Made the light detection circuit just need to put it in parallel with the LED circuit as I don't want to use three wall warts for this device. Later on I'll probably try something else out so power spikes don't ruin anything.

Next steps are essentially mounting and wiring up the photo detection circuit, polarizing film, painting the box, putting up yellow sheets to absorb stray light, then digging into some more micro-controller and java code. Hopefully by next week this will be up and running with the errors to trouble shoot revealed. We'll see how lucky I got hahaha.

Here are some pictures.

DSCF0008.JPG - 186kB
Over-head assembly photo. Bottom left the PWM circuit and arduino. Upper left the motor and encoder wiring. Hidden in the upper left is the LED mount going through the rotor. Motor with gear mount. In the middle temporary LED bread board circuit, this is where the sample cell will go. To the right where the photodetector will go.

DSCF0009.JPG - 146kB
Where the photodetector will be placed behind polarizing film

DSCF0010.JPG - 168kB
Light source and gear mount

Screenshot early software.png - 151kB
Soft-ware early glimpse

[Edited on 28-7-2013 by smaerd]

smaerd - 31-7-2013 at 17:46

thought I had the transampedance photodiode circuit working but somethings going wrong. I keep getting really wild oscillations on the output. 0 to 5V back sinuisoidal even when shielded from light. Then I appeared to have a circuit that was sensitive to light but instead of going from 0V(no light) to 5V(Maximum light) it was going 5V(no light) to about 3V(full light). Did that by 'grounding' the 5V- line to the arduino ground pin. Wasn't sensitive enough to pick up the LED shining directly on it(in a dark enclosure) either so I'm not sure how amplified it really was.

The original idea was to have the photodiode and LED in parallel on the same 5V wall-wart PSU but I'm beginning to think that's impossible.

Would anyone be able to help me to troubleshoot this? I wouldn't normally ask but I've been at it for a couple of days now.

[Edited on 1-8-2013 by smaerd]

watson.fawkes - 1-8-2013 at 05:29

Quote: Originally posted by smaerd  
Would anyone be able to help me to troubleshoot this?
With no schematic? Come one, you know better than that. It's the as-built schematic that matters. If you derived it from some publically-available schematic, that would be useful also.

smaerd - 1-8-2013 at 12:54

Right I was just wondering if anyone actually would help me with this. Didn't want to post it and have it sit.

So please keep in mind I'm not an electronics person I'm very new this is the first time I've ever tried to use an op-amp.

my circuit.png - 7kB

The power supply is a 5V 0.5A wall wart. I don't have the information about the LED on hand but can get it if necessary. The resistor in series with the LED is a simple 270ohm.

The LED circuit is in parallel with the op-amp photodiode circuit. The op-amp circuit is decoupled with 'C1' which are 100 uF nonpolar film caps. The photodiode, BPW34(data sheet: http://www.vishay.com/docs/81521/bpw34.pdf) is placed on the +in and -in pins of the LTC1050 chopper stabilized op amp(data sheet: http://cds.linear.com/docs/en/datasheet/1050fb.pdf). the parallel power is connected to the V+ and V- pins respectively.

The In- is also connected to a 10Kohm resistor in parallel with a 0.1uF cap which leads to the Out pin.

The Out pin goes straight to the arduino analog pin for reading. The main difference is the external power supply.

The circuit resembles the second circuit seen here: http://outsidescience.wordpress.com/2012/11/03/diy-science-m...

It also sort of resembles the circuit seen in the LTC1050 op amp data sheet:
photodiode amplifier.png - 17kB

Here is the super basic arduino code made just for troubleshooting this circuit:
Quote:

int inPin0 = 0;
void setup() {
Serial.begin(9600);
Serial.println();
}

void loop() {
int pinRead0 = analogRead(inPin0);
float pVolt0 = pinRead0 / 1024.0 * 5.0;
Serial.print(pVolt0);
Serial.println();

delay(100);
}


here is the current output I am recieving from this code under relatively dim lighting:
Quote:

4.08
5.00
5.00
5.00
3.96
4.02
4.57
3.78
3.78
5.00
5.00
4.81
5.00
5.00
4.21
4.40
3.91
5.00
5.00
4.08
4.71
4.12
4.08
4.54
5.00
4.45
5.00
4.28
4.34
4.18
4.00
4.42
3.93
5.00
4.40
3.94
4.13
3.96
3.96
5.00
5.00
5.00
5.00
4.07


When I completely shield the photodiode from light with a roll of duct tape I get all '5V' readings with a few weird spikes down to about '4.0V'.

I've done a fair amount of research on these types of issues and before I attempt to share my opinion of what I think is going on I'd rather hear what someone with experience has to say :). Any help greatly appreciated.

[Edited on 1-8-2013 by smaerd]

watson.fawkes - 1-8-2013 at 15:17

The + input on the op-amp needs to be grounded. In the sample schematic it's grounded through a 500 K&Omega; resistor. Look up "virtual ground" for op-amps to get an idea why. You might also look up "transimpedance amplifier", since that's how the op-amp is configured. If you want to know why you should consider a photodiode a current source, and not a voltage source, take a look at the data sheet and see how the response is specified.

Is the schematic for those decoupling capacitors correct? Decoupling puts a capacitor from supply to ground at the supply pin of a chip.

smaerd - 1-8-2013 at 16:42

The main confusion for me is grounding. Probably because I've never heard or ran into the term 'virtual ground' before. Now I have a new direction to look in.

No the decoupling capacitors are probably not correct. I figured they were used just as capacitors in series on the supply simply to tame current ripple. Looks like I've got it wrong yet again hahaha.

Well much more to research now thanks for the sense of direction.

smaerd - 4-8-2013 at 11:34

well I now have the circuit 'working'. It displays around 1.6 or so V in sunlight around noon through a window. the LED light through the polarizing films however appears to be a 0.00V to 0.04V. So it looks like I need a new LED, better photodiode (the one I was using was around 0.80$), better polarizing film, or a better way to collimate the beam. Maybe all Four. Could use a small capacitor as well so I'll get on that as well.

I did work out the decoupling capacitors and all that though. I also kept a 100uF cap in place to stabilize supply ripple.

smaerd - 5-8-2013 at 16:45

The photodiode I was using has poor sensitivity in the 500-600nm range. That could explain a lot. Found one for under 10$ with great sensitivity at around 550nm.

The LED was 3500mcd(45*) which I considered to be bright. Turns out there are 21000mcd LEDs with smaller view angles(30*) for very cheap(590nm). Going to try that out. Also ordered a small 270pF cap or three rather then the 0.100uF. Think this will 'fix' the design.

*fingers crossed* Hoping to run to the code as soon as these components come(pretty big factory lead time) and tie this project together. Still have some serial communication technicalities to hammer out.

If not I will consider using a cheapy polarized laser source the same cell and one polarizer. Just happy to have gotten this far :).

[Edited on 6-8-2013 by smaerd]

[Edited on 6-8-2013 by smaerd]

watson.fawkes - 6-8-2013 at 09:22

Quote: Originally posted by smaerd  
So it looks like I need a new LED, better photodiode (the one I was using was around 0.80$), better polarizing film, or a better way to collimate the beam. Maybe all Four.
You could also increase the gain of the amplifier by changing the value of the feedback resistor. You'll want to do something like that eventually anyway, so that the cuvette-absent path as assembled yields a voltage that is near the maximum range of the A/D converter.

watson.fawkes - 6-8-2013 at 09:38

Quote: Originally posted by smaerd  
The photodiode I was using has poor sensitivity in the 500-600nm range. That could explain a lot. Found one for under 10$ with great sensitivity at around 550nm.

The LED was 3500mcd(45*) which I considered to be bright. Turns out there are 21000mcd LEDs with smaller view angles(30*) for very cheap(590nm). Going to try that out. Also ordered a small 270pF cap or three rather then the 0.100uF. Think this will 'fix' the design.
Poor sensitivity in the frequency range of the emitter is indeed an unfortunate result. That's bad regardless of the gain of the amplifier, since it has to do with noise, specifically, the ratio of the dark current to the signal current.

Think of the plastic case of an LED as a built-in lens. Now realize you don't have live with the lens that comes with the LED. Easiest is to use another little lens to focus the beam. Put the beam waist at the center of the cuvette.

Three 270 pF capacitors yield 0.810 nF, which is three orders of magnitude less than 0.810 &mu;F. But do you know why that capacitor is there at all? (Hint: filter.)

smaerd - 6-8-2013 at 12:33

Yea its to filter the high frequency noise from the resistive load. Thanks for all the advice on this watson it's meant alot. I'll be reporting back when mouser ships this stuff.

Edit - oh yea the whole problem with my opamp circuit was where I was grounding from so a little 'calculated' trial and error resulted in what appears to be success.

[Edited on 6-8-2013 by smaerd]

unionised - 6-8-2013 at 13:08

Did you know that you can use an LED as a photodiode?
It does a good job of detecting the same wavelength that it emits and the coloured plastic case acts as a filter to select out some stray light.

smaerd - 9-8-2013 at 17:58

I was aware of this but they aren't as sensitive/responsive and require a larger resistive load meaning more noise. Although one thing I did notice with my manual built polarimeter was that the color of light out of the analyzer(polarizing film) appeared as different colors near maxima and minima of perceived intensity.

I'll be willing to try it out if the new photodiode I ordered doesn't work out. I recall reading that they also can read light at wavelengths lower than their emission spectra. I found this strange knowing the little bit I know about band-gap theory. Maybe they meant a handful of nm lower but I'd have to play with a monochromator to know for sure. I think that sort of design would be more useful for a simple colorimeter or special use fluorimeter. A colorimeter build like that would be a fun way to spend a rainy after-noon.


[Edited on 10-8-2013 by smaerd]

smaerd - 8-9-2013 at 11:10

Alright new detector in(BPW-21 rather then the BPW-34), new LED in. when the LED is up close I get great readings(in the 100-200 arbitrary units range). That wasn't possible with the old set-up. From farther away(15cm) I am getting crappy readings. Thinking I need to focus this LED. It's significantly brighter but, probably still too diffuse. Kind of frustrating being able to see the detector illuminated from behind the polarizing film but get a 0 reading. Shooting the light down the steel tube probably doesn't help much either.

I probably need to increase the resistive load some... Thinking about upping the power supply to 12V to the op-amp(back to three power supplies I guess). 5V is probably just too low for this. We'll see what a 10kOhm, 20kOhm, and 50kOhm do. Right now the 2.2KOhm is probably way too low.

[Edited on 8-9-2013 by smaerd]

bfesser - 8-9-2013 at 18:27

Forgive me if this is a stupid question, but why not just use a laser diode?

DJF90 - 9-9-2013 at 01:36

Wrong wavelength, at least for measuring "standard" optical rotations. I'm not sure if theres formulae for wavelength correction, i.e. take the measurement at 690 nm, but can convert the reading to what would be observed at 589 nm.

bfesser - 9-9-2013 at 12:13

Wow. I had no idea that 589 nm lasers were so expensive.

IrC - 9-9-2013 at 17:03

While I have accumulated dyes and optics I have yet to build a tunable dye laser. Would it be fairly cheap to construct one for 589 nm using Sodium Fluorescein or similar dye? Plans are not too hard to find on the subject of dye lasers.

http://www.repairfaq.org/sam/lasercdy.htm

http://www.technology.niagarac.on.ca/people/mcsele/lasers/La...








watson.fawkes - 9-9-2013 at 18:46

Quote: Originally posted by smaerd  
Alright new detector in(BPW-21 rather then the BPW-34), new LED in. when the LED is up close I get great readings(in the 100-200 arbitrary units range). That wasn't possible with the old set-up. From farther away(15cm) I am getting crappy readings. Thinking I need to focus this LED. It's significantly brighter but, probably still too diffuse. Kind of frustrating being able to see the detector illuminated from behind the polarizing film but get a 0 reading. Shooting the light down the steel tube probably doesn't help much either.
What's the difference between the two photodiodes? There are enough variations on those part numbers that I can't tell what you're actually using.

1/R^2 loss is the reason you're getting signal up close but no farther away. Focus the output of your LED with a lens. If your beam waist is longer than 15 cm, you won't see the same kind of loss. Alternately, just increase the gain of the input amplifier to compensate; while not the best solution, I doubt your dark current will be your limiting factor on accuracy even then.

Make sure the interior of the tube is black (i.e. matte paint), to eliminate internal reflections, which would decrease the polarization of the beam.

smaerd - 10-9-2013 at 05:28

I'll get out the black paint for the tube. I figured it wouldn't be an issue but it couldn't hurt.

BPW-34: http://www.vishay.com/docs/81521/bpw34.pdf
BPW-21: http://www.mouser.com/ds/2/311/PW21_Pb_free-56087.pdf

The main difference between them is the wavelengths at which they are most sensitive. BPW-21 Wavelength of max sensitivity: 550nm. BPW-34 Wavelength of peak sensitivity: 900nm.

I'll fiddle with the gain before anything else. Wish I didn't have to wait so long for the new photodiode as now I'm back in school so progress will a bit slower unless I can get a nice day off.

smaerd - 27-10-2013 at 11:59

So I tried increasing the load resistance from 2.2k to 10k to 50k to 100k to 220k and really no notable improvement. Not really sure whats going on. I'll probably have to set the light source and photodiode on different power supplies to see if that does anything different.

In sunlight I get great readings but this LED which is quite beastly when it comes to LED's hardly touches it at all after both polarizing films. Let alone with a sample to shine through. So I'm thinking it is either, just too dim of a light source, something in my circuit is bad (Fried op-amp? Bad circuit?). Kinda lost maybe I'll get some more time soon to think about it.

[Edited on 27-10-2013 by smaerd]

[Edited on 27-10-2013 by smaerd]

bfesser - 31-12-2013 at 13:09

<strong>smaerd</strong>, I was just browsing around while researching historical LEDs, and found this page which made me think of your project. It's not much, but you may find it in some way helpful. If nothing else, it's got some neat spectra.

<a href="http://ledmuseum.candlepower.us/ledamb.htm" target="_blank">AMBER 600-615nm</a> <img src="../scipics/_ext.png" />

[edit] By the way, it looks like one of my favorite suppliers, SparkFun, is now carrying the <a href="https://www.sparkfun.com/news/1345" target="_blank">structural components</a> <img src="../scipics/_ext.png" /> you've been using. It looks like a neat system. I'd like to try it out for seismometer and spectrophotometer projects when I get funds.

[2nd edit] Sorry if I missed this while reviewing the thread, but what LED(s) have you been using?

[Edited on 31.12.13 by bfesser]

smaerd - 6-1-2014 at 14:28

Fantastic finally another supplier for these components. Spark fun is a pretty great hobbyist store as well.

The LED I am using is kind of specialty( HLMP-EL1A-Z1KDD). Nice link, the LED I am using is a 590nm from Avago tech 15* viewing angle so it is quite small if that was the hint :). 12000-21000mcd supposedly. They are quite bright.
Here's the data-sheet if you're interested: http://www.mouser.com/ds/2/38/V02-1687EN-107291.pdf

My biggest problem is simply the detection circuit. The op-amp/photodiode just isn't giving me use-able results. I've speculated that there is no amplification and this may still be the case but I have checked the circuit hundreds of times, asked several people and by all accounts it 'looks good'. No oscilloscope available to trouble-shoot it beyond looks. Maybe it needs another amplification stage, maybe the LTC1050(op-amp) got fried, I don't know. It's also very likely that the LED just isn't bright enough to do what I need it to do given the photodiode I have (tried the most sensitive one to my wavelength with-in budget). Also possible is that I junked up the circuit and am not savvy enough to make it work.

So I am considering trying a different road altogether, the TSL230RD (http://www.mouser.com/catalog/specsheets/TSL230RDTSL230ARDTS...). As this eliminates the issues with amplification and spits out frequencies depending on intensity. Supposedly these IC's can be scaled to deal with low light conditions and tweaked in the soft-ware. Sounds much more with-in reach to me. Although it won't be able to get as many theoretical measurements during rotation as the photodiode/op-amp could this can be attenuated for by doing multiple rotations and keeping track of the angle(I hope).

I would like to iterate that I am open for suggestions and ideas, as I am kind of stuck with this project but won't give up on it.

[Edited on 6-1-2014 by smaerd]

smaerd - 11-5-2014 at 16:45

Alright so I figured I'd revive the thread as I finally have time to work on this again and have some fresher ideas.

I went to work on it today. The LED is now gone, I took a 650nm laser pointer(cheap chinese one from ebay). Interestingly I have read that 670nm sources are a pretty common and use-able wavelength for polarimetry and have been used in many commercial models ("Chiral Separation Techniques: A Practical approach", Editted by Ganapathy Submramanian, Section Author: Gary W. Yanik, Chapter 16.1). Anyways, ripped the laser pointer apart. The driver circuit was pathetic! It was literally two triple A batteries, a switch, a surface mount resistor and the laser module. I soldered past the switch directly to the resistor and soldered a wire onto the other contact point. If anyone plans on doing this let me warn you... The metallic looking back end on this particular laser pointer is some type of metal paint on plastic. Meaning your soldering iron will uhm go right through it? Anyways, I built a simple NPN transistor switching circuit so the arduino can turn the laser light source on and off without any issue.

After some serious headaches trying to align the laser through the rotor, I decided to go the other way. I am going to put the photodiode inside of the rotor instead and aim the laser from the other end at it. I realized that the laser when directed through the rotating tube had a dynamic cross sectional area on a piece of paper. Even when aligned 'well' (interferance/damaged interior of tube/who knows?).

Anyways the idea is to use a mono audio jack so I can rotate the photo-cell and not tangle the leads. Not sure how the noise will be but the parts are cheap enough, and should last a while. I figure there should be a decent amount of capacitance on the jack to keep things kind of smooth, low RPM's, should be okay?... We'll see. Really just need a prototype at this point so I can tackle some of the data transfer and measurement taking issues that will undoubtably occur and get a more serious frame-work for the soft-ware going.

[Edited on 12-5-2014 by smaerd]

smaerd - 14-5-2014 at 15:49

Alright well here's an update.

Mounting the photodiode into the gear face took some pretty serious messing about to get it centered. The laser is mounted and pointing dead on the photoactive surface at all degrees of rotation. The audio jack "slip-ring" doesn't *appear* to be creating any noticeble noise.

Without amplification the red laser (or photon cannon) gives a voltage from 0-0.110 (+/-0.002) V. Not too shabby. So I went back at the amplification circuit. Turns out I had hosed the LTC1050 op amp, was hopeless trying to use it. One of the many times I had my circuit lay out all wrong and plugged it in probably did it in :(. Or maybe it was the one time I observed ESD by poking around with a multimeter on the clock pin hahaha.

Anyways, I did end up creating my first transimpedance op-amp using a spare LM358N. I actually get about 0-0.450(+/- 0.003)V depending on how I have spun the analyzer (polarizing film/detector). So I'm pretty pleased with this. Considering I didn't know what a 'single supply', 'voltage divider', or 'virtual ground' were yesterday, didn't use any hacked down guides or anything and more importantly it actually 'works'. Granted this only gives about 100 possible intensity measures for more than 360* rotation of the polarizer it will serve until I get my replacement LTC1050 and a few other necesary components. I figure if I can boost the signal from 0-2.5V it's in business(500 intensity measures). I'll settle for 0-1.5 for the prototype though especially if it's clean and I can figure out the other hundreds of issues that are lurking around the corner. I'll have some pictures up tomorrow... Camera is out of batteries and I can't think about electricity anymore...

[Edited on 14-5-2014 by smaerd]

Edit - Also I should mention, I never should have tried to shine the light through the steel tube. It was an interesting first idea but what a total nightmare. So much easier to go from the other way if there isn't a noise issue on the audio jack/slip-ring. Might, maybe, try focusing an LED after I get a working prototype with the laser pointer. That way multiple wavelengths are possible (590nm, etc). Was so easy to aim it this way though, no intereferance, just a clean shot to the target. Not sure how bad refraction/scattering will effect this with a 10cm path-length. If I can get the beam dead on the normal it shouldn't be an issue. We'll see no time for speculation, it's slowing down the science...

[Edited on 15-5-2014 by smaerd]

aga - 15-5-2014 at 12:29

Depending on your photosensor, you may want to introduce an aperture (cardboard with a hole in it) to limit the Scattered light coming off the sample.

The only polarimeter i ever saw was in a photo, and the insides were all matt black too, presumably to dampen reflected light, and thereby the pathways of scattered light too (just my guess).

My idea for a polarimeter (as part of the 'Tricorder') would be to use PIC to sense the received light value, and control a rotating polarized film/disc and automatically spin around to get the highest reading.

As a laser would already be available (for the Ramen scatter ref Radegast's thread) it would be laser light for the source.

smaerd - 15-5-2014 at 18:24

Ran into my first issue with the soft-ware/hard-ware code. Arduino cannot handle an integer array that has 2096 elements :P. Duh. Hmm, might need to purchase an external RAM IC or something to do what I need to do. I don't know if I can chuck the values over the serial fast enough (extremely doubtful).

Fore-saw this problem didn't realize how dire it might actually be. Have to do some serious thinking. However, once I can transfer this data version 0.02 will be complete. Majority of what remains is actually in the code. Hopefully in a weeks time(depending on when parts arrive) this will be a functioning proto-type.

Yea AGA that's pretty much exactly what I'm doing. Except my device won't rotate specifically to the highest out-put and will instead spin 360*(ish) and spew out all the measurements. Soft-ware will plot it and maybe depending on the resolution interpolate the value. Atleast, that's what I am thinking now.

[Edited on 16-5-2014 by smaerd]

aga - 15-5-2014 at 23:37

Software would simplest if the disc is driven by a stepper motor, so then you step forwards, take a reading, spit the data out, wait for the data to be transferred (or just add an arbitrary delay that is longer than the max expected RS232 transmission time), then repeat.

If you're using an indexed free-spinning motor then you can wait for the index, delay a precise time before taking your reading (this sets the position) then read the sensor, transmit the reading, increase the precise delay by 1, then repeat.
If the motor speed is low enough, the time for it to spin back to the index position may be enough of a delay to avoid overflowing the receiver's buffer.

smaerd - 16-5-2014 at 19:01

I have the algorithm all worked out in my head. Right now it's just a matter of solving the data transfer over the serial connection or looking into FRAM or similar external ram IC's. Other-wise it doesn't matter what idea's I have. Need the data.

[Edited on 17-5-2014 by smaerd]

smaerd - 17-5-2014 at 14:22

Well I worked out the data transfer issues without external RAM. Shaved it kind of close had to revamp my soft-ware and the microcontroller code. However, more fun then instrument pictures(bread board/wire hell). I have my first results! Granted without a sample but it's pretty legitimate. Lots of noise, bugger-all. New op-amp(s) should clean things up quite a bit though. I also really need to shield my motor and clean up some other things(shorten wires once circuit is finalized, etc). Should probably also cover the arduino LED's too with a some electrical tape. Soft-ware is not currently processing any of the data so I had to use open office calc (pretty severe lag doing so). Here it is though, 0.03* readings with 250 intensity measures possible! Takes about 9 seconds for a run. Well the initial calibration routine will likely require a minute or so.

Edit - Also I think the second peak is shorter then the first perhaps due to laser misalignment. Thought I had a steady aim when I set it up but cut me some slack the photoactive surface of the BPW-21 is(eyeballing not from the data-sheet) probably 3mm by 3mm. I can correct by scaling these things in the soft-ware anyways.

fuck yes.png - 106kB

[Edited on 17-5-2014 by smaerd]

Edit - Just realized I'll likely have to do some kind of fourrier transform or sinuisoidal regression to get what I want. Oh the joys of higher math!

[Edited on 18-5-2014 by smaerd]

aga - 18-5-2014 at 12:18

WooHoo !

Congratulations !

A Machine is Born.

Edit: Not may people know, but Excel has a feature that can perform Fourier Transformations, plus much much more..
Granted, not a perfect solution, but useful in the dev process.

[Edited on 18-5-2014 by aga]

smaerd - 18-5-2014 at 21:36

Well I don't want to get ahead of myself just yet hehehe. Yes though, theoretically I could use the instrument as is to receive some amount of polarimetry measurements. Well not right now but hopefully by tomorrow (read below to see why). I was having serious stability issues with readings and of course, the noise (I'll be bitching about that a bit until it's reasonable). Then while testing a relay to turn on/off the laser - shit hit the fan. My readings gradually ended up being a line of noise at around 0 intensity units. Had to disassemble the actual instrument detector(BPW-21) and solder the connections. Lesson learned... Cutting corners, by wire wrapping + heat shrink, isn't good enough for rotating detectors(... can I get a face-palm? ...).

On the bright side. Created and tested the new single stage transimpedance op-amp circuit (LTC1050) with the BPW-34 I was hitting nearly 5V with a high intensity flashlight and 200mV with ambient room lighting(not too shabby!). The awful disgusting sloppy how did it even work single rail LM358N op-amp was getting about 2.0V with the same light and diode. The LTC1050 is not a single rail but I created a cute little voltage divider mostly for noise handling(decoupling capacitors etc) anyways. Might, do dual stage depending on linearity and noise (resistive load is 220kOhm for now, 100kOhm was acceptable as well though). Will be testing the instrument further, working on noise reduction, and the calibration algorithm hopefully tomorrow. Hoping that the crappy connections on the diode were a contributing factor to the noise and solves the erm, minor issue of not getting data out of the test routines :P. Fingers crossed.

Thankfully I wrote a simple harmonic regression algorithm before it totally tanked. No excel unforunately (Linux OS here) but there are a few nice algorithms in the OpenOffice Calc soft-ware that I use. Thanks for the tip! A Fourier Transform would be wonderful to work on, not that there aren't royalty free Fast Fourier Transform JAVA algorithms readily available, but it's likely unnecessary. I may write one if I get incredibly bored or if this thing doesn't function well. Would be nice to explore the concept from another perspective (only dealt with it on paper).

The harmonic regression is my way to reposition/calibrate the polarimeter without a sample in the instrument. So the motor rotates a full period or (180* on the analyzer) and interpolates the next dark spot. Then it will rotate to just before that darkest region. Such that the motor can reach a 'constant' velocity (ignoring mechanical hysteriasis), hit the known dark point and take readings 360* with a sample present. The soft-ware will then plot the results and give the desired maxima information. I was developing pretty 'decent' fit's using the regression I developed but, the noise was a serious issue. Total square error with tons of noise only in the ten thousands for 6288 points (half of a rotation but a full period). Can't remember if that was before I was square-rooting the values or not. The phase shift seemed to be off by +/-0.0X radians. Didn't get to finish my analysis. Amplitude seemed suitable, had to do a mean analysis every half degree for comparison. Without the noise that routine could be really fine tuned.

Curve fitting is so useful and so often left out of instrument soft-ware. Although, it's rarely necessary especially for polarimetry measurements. How many times have I had to create a spread-sheet to use a non-linear equation solver, or make trend-lines to get a piece of information? Dozens... Having a regression off the bat is useful for interpolating future values/theoretical understandings/seeing trends or behavior. Guess if I need to develop it for the soft-ware why not include it?

Thanks for following this AGA. It's hard to be so excited about something and have no one to talk with about it. Can't wait to actually use this thing for the several projects I realllly want to do.

[Edited on 19-5-2014 by smaerd]

[Edited on 19-5-2014 by smaerd]

aga - 19-5-2014 at 02:46

Switching the Laser would be easiest/least noisy using a mosfet.
Things like the IRL2203N go full-on (7 milli-ohm!) with just 4v gate voltage, which you should easily get off the Arduino.
ISTR that it's the 'N' suffix that denotes this on most mosfets.

Supply decoupling is always helpful.
Make sure you have a 1000uF and a 100nf capacitor in parallel across the +ve and -ve supplies to the op-amps & detector.

The motor will probably be throwing junk back into the supply, so try filtering the supply leads using an RF choke or even a ferrite bead, depending on the frequency of the noise.

You might find that shielding the motor also helps, which is easily done with a bit of tin can with an earth wire soldered onto it.

Back EMF may also be happening.
This can be mitigated by putting a diode the wrong way round (anode to -ve, cathode to +ve) across the connections to the motor, plus another 100nf capacitor there as well, plus a 10nf capacitor from each motor supply connector down to ground.

Finally there is Impedance Matching between the detector and the op-amp, and between op-amp stages (if there's more than 1 stage).

smaerd - 21-5-2014 at 14:41

New op amp in place. Definitely interesting results. Looks like there isn't noise, but an AC voltage? Going to try some capacitor filtering on the transimpedance circuit to see if I can clear this up. However, the data does not look 'stray' it looks like it is oscillating (wildly). Can see my harmonic regression's predictive result giving a 'decent' fit for the phase shift at least (needs some help though). Here's to hoping all of the noise from the last circuit was from the crummy op-amp, and that I can clear this up without much effort!

new op amp drama.png - 53kB

[Edited on 21-5-2014 by smaerd]

[Edited on 21-5-2014 by smaerd]

smaerd - 22-5-2014 at 09:33

So it begins, the balancing of the filtering capacitor and gain. At least I know my circuit is oscillating now and there is very low noise even without shielding beyond a piece of tin foil from the motor/PWM!

Pictured below are two quick attempts at feed-back capacitance hunting. O.1uF cap(serious loss of gain) and a 270pF cap(loss of gain and still oscillating). Wish me luck, something tells me this will be a night-mare without an oscilliscope and a bank of capacitors...

01uF cap parallel with diode.png - 19kB 270 puff cap parrallel with diode.png - 43kB

[Edited on 22-5-2014 by smaerd]

aga - 22-5-2014 at 10:39

If it's the op-amp oscillating, it will be due to too much gain, or some loose coupling between the in and out pins.

Are you on a PCB now or still on a breadboard or wire-wrap ?

If you could post the amplifier circuitry, maybe some of us could help.

[Edited on 22-5-2014 by aga]

smaerd - 22-5-2014 at 11:15

I am still on bread board because I am afraid to transfer to PCB as the gain I am getting is too small for what I would like. Debating on a two stage but that could make the oscillations way worse.

Here is the circuit with the wild oscillations:
circuit updated but noisey.png - 23kB

Here is the circuit where the last two results came from(the Cf cap was what was changed):
circuit different cap placement testing.png - 22kB

I think in the end I might need a small capacitor in the 100-1000's of pF's parallel with the photodiode, and a larger cap parallel with the feed-back resistor. So I don't lose too much signal or clip(clipping was observed in the second circuit diagram with the 0.1uF Cf), but am not getting so much oscillation overloading the bandwidth of the op-amp, but am still smoothing the feed-back resistor noise.

[Edited on 22-5-2014 by smaerd]

aga - 22-5-2014 at 12:48

Both circuits look like madness, however i wil have to do a bit of research to work out the maths.
 Pages:  1    3