Problem reading an analog voltage when using Motor Shield

I want to implement a setup that will measure the intensity of an LED’s emission as a function of angle. To do this, I have a stepper motor to rotate the LED and a photodiode amplifier to measure the LED intensity. The amplifier has an output which outputs a voltage that is proportional to the measured photocurrent – this can be up to 10 V, so I’m using a voltage divider circuit to keep that below 5 V to prevent damage to the Arduino. I’m using an Arduino Uno, and the photodiode amplifier is the Thor Labs PDA200C.

I am using the Arduino Motor Shield to move the stepper. I have connected the amplifier output to analog input A0 on the Arduino (and to Arduino GND). Everything seems to work well apart from the voltage read by A0.

When I do not use the Motor Shield, the voltage present at A0 is approximately 2.1 V at the maximum (when the LED is pointing directly at the photodiode). When I rotate the LED this gradually decreases, and is proportional to the reading on the amplifier display.

However, when I use the Motor Shield, two changes occur. Firstly, the maximum voltage present at A0 is now only about 0.5 V. Secondly, this voltage seems to saturate – meaning that it remains at 0.5 V even as the reading on the amplifier decreases, at least until the reading is quite low at which point the voltage at A0 starts to decrease.

Note that the voltage I measure at A0 (using a multimeter) is always the same as the Arduino reads, so the problem doesn’t seem to be the Arduino incorrectly reading the voltage, rather the voltage present at A0 itself isn’t behaving as I expect.

I’ve tried connecting a DC power supply to A0 to see if the Arduino can read the output voltage from that correctly, which it does even when the Motor Shield is present.

For reference, here’s what the photodiode amplifer manual says about the Analog Control Output:

“The analog output "ANALOG OUT" (R1 ) at the rear panel delivers a DC voltage proportional to the display reading of photodiode current IPD. The output voltage is 0 …+10 V for a display reading of 0 … 10000 (photodiode cathode grounded) or 0 … -10 V for a display reading of 0 … -10000 (photodiode anode grounded). The maximum bandwidth of the monitor output "ANALOG OUT" (R1) depends on the current range (see Technical Data ). The shield of the BNC "ANALOG OUT" (R1) is grounded, thus an oscilloscope or PC based AD-Converter or other recording device can be connected directly. Take care to avoid ground loops. Devices connected to these outputs should have an input resistance 10 k."

Does anyone have any ideas where the problem might be?

Have you watched the schematic of Arduino shield motor?
Ao and A1 are already used by the shield (sns1et sns2).
These two outputs are used to monitor the current. It should find a resistance between sns1 and ground, ditto for sns2.
I agree that the schematic is poorly drawn and difficult to read.

It seems that A3, A4 and A5 are free. You can try one of the 3.

Nb: Mesurement can be correct with power supply because a power supply has zero internal resistance (normal for a power supply :grin: ), but it is not the case of the photodiode amplifier analog output.

Devices connected to these outputs should have an input resistance 10 k .

This means that internal photodiode amplifier must be around 50 ohms.

That's exactly what the problem was! I switched to a different Analog pin and it works fine now. Thanks! :slight_smile:

I'll make sure to pay more attention to the allocation of pins when using shields in future.