New User - Need advice on Automating Laser Data Collection System

Hi!

First off, glad to finally dip my feet into this community! I'm a chemist by profession and am trying to automate data collection from a pump/probe laser system. I've used a combination of LabView and Python to automate most of the data collection, but now I need a method of adding in some DIY hardware solutions. The signals I'm working with are incredibly low amplitude and accounting for noise is a big concern. I'm trying to make a bootleg shutter system for a photodetector linked to an oscilloscope to collect baselines in between each "run" of data collection.

I've gotten as far as reasoning that a solenoid or stepper motor system connected to a plastic opaque square plate is probably the simplest solution. However, this is going to be my first Arduino project and I have absolutely no idea where to start with figuring out what board and parts I should be purchasing. Can anyone point me in the right direction here?

I apologize if this question has already been answered in another post - I just have a bad tendency of spending too long planning and too little time doing - so I'd just like to jump into the project headfirst ASAP. Any input is greatly appreciated - thank you so much.

Out of curiosity what is a

??

To your question any arduino can drive a stepper motor, best with a stepper driver. The questions are more about the physical constraints you might have (speed, precision, power,…) to choose the stepper if that’s the right solution

The description of your requirements are pretty vague. Can you make a simple drawing showing what you want to do? What is the angular resolution required? Angular velocity?

Start with any of the development kits, they come with enough basic pieces to get rolling. Isolate the stepper motor and get that project working. Get a 3D printer and figure out a 90° mechanism (think SLR mirror) and connect that to your stepper. Add a couple of switches and lights and code away.

The steppers/solenoid need to be powered SEPARATELY from the Arduino. This is true for all models.

Something that simple should be easy to code up and most any of the Arduino's should handle it. Most basic kits come with an UNO and that should be plenty for this task.

With regards to the shutter, stating it as plainly as possible:

A way of blocking photons from reaching the photodetector by placing an opaque object in front of it. Literally blocking the laser beam by placing a physical object in its path.

Yes, I'll supply a drawing.

Ok thanks

How fast does this need to be? Steppers step but will take a bit of time to reach 90° for example. A servomotor could also be an option.

Here's a link to a very basic layout. There's a lot more going on but details are likely irrelevant here:

As for how fast it needs to be? Not fast at all really. It does need to bear a bit of weight though. The rate-limiting step is the data collection itself which takes ~60s per run at 10,000 data points.

Thank you for the input! That gives me a lot of stuff to look into.

What will trigger the shutter?

Collection of 10,000 data points for a given run.

It's a very basic while loop. Pseudocode looks something like:

x = False while n != 10,000 where i is the number of points in a given column of a csv file.

x = True iff n == 10,000.

Trigger shutter when x = True.

How do you know the points have been collected?
The CSV file is on a computer? Will the computer signal the arduino to stop?

The CSV is on a computer. I currently have it so that the entry of data into each cell of the CSV is linked to each signal detected by the oscilloscope.

Some more pseudocode might clarify:

x = False

n = 0

while n != 10,000:
for each signal detected:
n = n +1
append datapoint to column in CSV file

if n == 10,000:
x = True

if x = True:
Trigger arduino

Yes, I would like to have the computer trigger the start/stop of the arduino and its script.

Don’t worry about pseudo code now :slight_smile:

you have your Python script on that PC doing the acquisition and logging or is that a off the shelf program?

What would be needed is for that acquisition software to also connect to the Serial port where the Arduino is connected to send the signal to stop

It is on the PC that is doing the acquisition and logging. Most of the actual data acquisition and logging is done by LabView - I just call a python node at the end of each "run" to transfer data from the CSV file that LabView generated and saved to a Pandas dataframe in Jupyter notebook. The same python script then generates a lineplot with matplotlib and seaborn and saves it.

The oscilloscope is somewhat dated, it's from the 1990s but its parameters suit my needs. It is connected to the controlling PC via a GPIB port.

Ok so that Python script would be run when the motor needs activation, right? (That would be convenient)

How is the process started ? The same would be needed