Using a stepper motor to drive a monochromator

Hi there,

I am currently building a homemade scanning UV-VIS spectrometer using an LDR, a potentiometer (to verify the wavelength) and a stepper motor (to rotate the diffraction grating).

DATA:

-Arduino UNO R3
-28byj-48 stepper motor with uln2003 driver (5 V)

Until now i was using Labview to get the data of the LDR vs the voltage of the potentiometer, however it seems that I am not able to drive the stepper motor through Labview (It is probably possibly, but unfortunately I am a chemist which knows almost nothing about engineering/electronics ...)

Hence, I would like to drive the stepper motor directly with another Arduino Uno board, ideally the code should have the following functions:

-Scan: when a button is pressed the motor moves a certain (fixed) number of degrees (from A to B) waits for a while and go back to its original position (A).
-Go To functionality: by pressing two buttons (up and down) the motor moves (in 0,1º steps) until reaching a desired position (between A and B).

Would it be possible? And if so, where do I start from ?

Thanks in advance!

I need to understand your setup better.
Do you currently have an Arduino monitoring the pot and LDR and that Uno communicates with Labview via serial?

Or do you have a Labview board that reads the pot and LDR and you need to add the Uno, buttons and stepper. The Labview would communicate with the Uno.

A schematic or block diagram would help.

Do you have limit switches so the stepper can know when it gets to either end? It can't read it's own position, so at least once when you turn the thing on it needs to be able to find a home position. From there what you want to do is trivial matter of calculating how many wavenumbers per step.

Do you take in account that an LDR has a spectral response like this

I never used LabView in this way, I suppose that Arduino has Firmata sketch.

If you've got a tunable monochromator, its an easy step to generate a calibration curve using a good white
light source...

For 0.1 degree steps you'll need a reduction gear, probably an anti-backlash gear at that. 200 step
steppers typically have a usable resolution of a degree or so, don't expect much more even with microstepping,
its a mechanical limitation.

A reliable homing device at 0.1 degree resolution is probably going to be an issue. Can you enable a
calibration light source? That might be the way to calibrate accurately after a cruder mechanical homing
step.

You might try to find an old (cheap) Spec-20. They have a lever that rides on an off center wheel, which turns the grating. This way a full circle of the tuning dial changes the grating angle only a couple degrees. The lever has stops so at one end you'll get 950nm, and at the other 350nm. A regular 28byj48 will give you a couple thousand steps for this range. Use a slip clutch, so you will always be at the start after backing up a full circle.

Consider using a phototransistor/diode and an op amp instead of a CdS resistor. The range will be wider and the noise will be less.

mgg_96:
... unfortunately I am a chemist which knows almost nothing about engineering/electronics ...

That's a pity. When I went to school, there was a course was called Instrumental Analysis that was all about those new-fangled op amps.

ChrisTenone:
That's a pity. When I went to school, there was a course was called Instrumental Analysis that was all about those new-fangled op amps.

That was my first introduction to an op-amp. I've been building analytical and diagnostic equipment ever since. Loved that class.

Delta_G:
That was my first introduction to an op-amp. I've been building analytical and diagnostic equipment ever since. Loved that class.

Yeah, me too! Only I think we just called them "amplifiers" back then. The lab book was Electronics for Scientists, 1971ish (the year I took the class.) I'm pretty sure it's in my office at work. I'll try to scan a few choice pages tomorrow if I can find it.

This thread makes me wonder. It used to be that being a chemist meant you could do literally anything technical. I've gotten jobs in fiber optics, waste disposal, metallurgy, QA, computer programming in Forth, and well, chemistry that way.

Does that work anymore?

ChrisTenone:
Yeah, me too! Only I think we just called them "amplifiers" back then. The lab book was Electronics for Scientists, 1971ish (the year I took the class.) I'm pretty sure it's in my office at work. I'll try to scan a few choice pages tomorrow if I can find it.
...

Found it! The book was 8 years old when I took the class.


Full TOC

Bear skins and stone knives:


Field Effect Transistor


Vacuum Tube Operational Amplifier


Biasing an Op Amp