Getting output for each new measurment from external source

Hi everyone,
I am working on a project where I am using an external power source (Keithley 2400 Sourcemeter) to measure surface conductivity of a specific material. I have a fixed delay for the source (say 1000 ms) between each measurement (I am using LabTracer 2.0 to set the sourcemeter up). For the purpose of my project I have to measure the conductivity on three different points on the surface of the specimen. In order to achieve that I am using an Arduino Uno microcontroller which controls the circuit’s endings – three resistors on different places on the surface of the material. The Arduino board starts the process when it is being triggered by the Keithley (when the current flow starts – utilizing analogRead() )
My problem is that the delay time of Keithley is not exactly 1000 ms, and this causes out of sync phenomena.
An ideal solution to this would be if I could get an output in real-time each time a new measurement is taken by the Keithley. In that way I could use this output as a reference to whether open or close the circuit. The analogRead command is useful for starting the circuit, as it gives an output when the current flow starts. Ideally I would like to receive another output for each new measurement. I don't know if there is a command in the Arduino IDE for this, or a way to solve this as I am new to the use of Arduino.
The way I am thinking the whole process is this:

Initialization of the circuit by setting resistor_1 to TURN_ON ( using digitalWrite(resistor_1, HIGH))
Start power source
Take measurement
TURN_OFF resistor_1
TURN_ON resistor_2
If new measurement is taken then:
TURN_OFF resistor_2
TURN_ON resistor_3
If new measurement is taken then:
TURN_OFF resistor_3
TURN_ON resistor_1
etc...

Any suggestions on that would be much appreciated. Thanks in advance!

ummagumma2112:
An ideal solution to this would be if I could get an output in real-time each time a new measurement is taken by the Keithley.

That seems to depend on the capabilities of the Keithley which you have not told us.

And I don't understand this

In order to achieve that I am using an Arduino Uno microcontroller which controls the circuit's endings

Perhaps you can explain the role of the Arduino in full detail for people who are not familiar with what you are trying to do or the equipment you are using.

...R

Could you do a drawing of your experimental setup please as its not clear how the equipment is connected to the sample you are measuring and the arduino.

Also which arduino are you using? Ideally you would want a fast one.

Also why are you using an analog (ie slow) input to detect a binary change?

Hi,
Welcome to the forum.

Please read the post at the start of any forum , entitled “How to use this Forum”.
OR
http://forum.arduino.cc/index.php/topic,148850.0.html.
Then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you post a link to specs/data on the “Keithley”?

Thanks… Tom… :slight_smile: