IR CT Scanner Week 2

Alex Boyd, Maggie Ford, Myron Mageswaran

Because we previously finished our current to voltage op amp circuit, we spent a majority of our time this week programming the Arduino to move the stepper motor and servo.  We were then able to report the servo and stepper positions to the serial monitor along with the voltage output. We programmed the motors such that the servo with the IR LED and photodiode fans across the object that is being imaged and then returns to its initial position. Once the servo finishes fanning across the object, the stepper motor rotates a specified range to prepare a new view for the next time the servo fans across the object.

Next week, our focus will be to read the Arduino’s serial output using MATLAB (voltage and motor positions) in order to reconstruct our data into images. We also need to fine tune how much the stepper motor rotates each time the servo fans over the object in order to maximize spatial resolution.

Video 1:  This video shows the servo sweep the IR diode across the object that is being scanned, return the IR diode to its initial position, the stepper rotate the object a small amount, and the process repeats.  

Arduino Servo and Stepper Moving

Matlab Code: This is the code we have written to read the Arduino’s serial output and store the data as a matrix in Matlab. So far, we have only written code to read the voltage output, but we will add to the code to include motor positions as well.

% create arduino object

a = arduino(‘port’,‘board’);

% create time vector

v = zeros(500,1);

t = seconds(v);

t0 = datetime(‘now’);

% enter voltage readings into a vector as time elapses

for ii = 1:length(v)

    v(ii) = readVoltage(a,‘pin’);

    t(ii) = datetime(‘now’) – t0;

end

Question: The servo has an extra (white) wire on it, that reads out its built-in position potentiometer, which you can use to record the servo’s actual position (rather than just its intended position). Is your image reconstruction improved by using this value instead of the intended value?

Answer: Using the actual position output from the servo does not improve the image reconstruction because these values are no different than the servo’s intended position.  Therefore, we will utilize the servo’s intended position values for our purposes of this scanner.

Question: Why is the Matlab function fan2para() function needed?

Answer: The fan2para() function in Matlab is needed to convert the fan-beam projections into parallel-beam projections because the IR CT scanner has a fan-beam geometry, but filtered backprojection algorithms require parallel-beam geometry.

Leave a Reply

Your email address will not be published. Required fields are marked *