Reading an externally driven analog signal

Having issues with a setup similar to the post below.

Here is a (crude) wiring diagram for my setup. I’m not sure where the problem lies, but it’s likely my wiring.

The goal:

Read the 0-5VDC output from the 24VAC controller and convert that to a PWM signal for the servo. The whole thing should be powered from a single wall powered connection (120VAC). Note that the 24VAC controller and the servo are a must. Everything else is optional (including the Arduino). There is no 5VDC reference out from the 24VAC controller. It only provides 15VDC, and not enough current to run the Arduino and servo.

The problem:

The problem is, once the Arduino is attached, the output from the 24VAC controller becomes 4.7V to 5V, as confirmed with a voltmeter, instead of 0V to 5V. This is a really odd problem, and leads me to believe it’s wiring related.

My concern is that since the 24VAC controller output is not powered through the same ground as the Arduino, there is some wiring issue causing this voltage jump.

The other potential issue is that everything is wired as it should be, and something is wacky with my 24VAC controller when attached to the Arduino.

If the former, please educate me as I am out of ideas outside of an opto-coupler which I am trying to avoid. If the latter, please let me know I have the wiring correct and it’s likely a problem unrelated to my Arduino or wiring and I need to fix my 24VAC controller.

AS your first statement about the problem makes no sense, perhaps you should include some information about the 24VAC controller.

Paul

Sure, here’s my best attempt to not confuse things further.

The 24VAC controller is used in HVAC systems and is the main event in a demonstration. The device is powered using 24VAC hot and neutral, no connection to ground. The actual output is 0-10VDC. It is internally limited to 0-5 VDC which was confirmed before connecting the Arduino.

The 24VAC controller is programmed to push out a square wave on its analog output for testing. Period of 20 seconds, 10 at 5VDC, 10 at 0VDC. This is so I can hone in the servo positions before actually tying the output to another sensor on the 24 VAC controller.

The problem is, once the Arduino is attached, the output becomes 4.7V to 5V, instead of 0V to 5V. This is a really odd problem, and leads me to believe it’s wiring related.

I have attached the termination diagram for the output of the 24 VAC controller. In that diagram, the “field device” is the Arduino, and the “controller” is the 24VAC controller.

P.S. I updated the wording in the problem statement in the original post to hopefully be more clear.

Just hooked up the 24VAC controller to a 10k resister (just connecting the out and ocom pins seen in the termination diagram) to check the voltage (again, making sure my controller isn't broken), it works exactly as expected. 5V for 10 seconds, 0V for 10 seconds. But when attached to the Arduino instead of the 10k resister, 4.7V for 10 seconds, 5V for 10 seconds...

This has to be a wiring problem related to the ground, I'm just not sure how to fix.

So, some interesting wording in the controller documentation that might shed some light. I honestly find it contradictory though…

The OCOM for the analog output states
“All configurable outputs defined as analog outputs share a common, which is isolated from all other Commons except the binary input common”
Note that I am not using a binary input, therefore the binary input common is not connected.

But it also states, on the 24VAC power connection COM:
“Only isolates this terminal from the bus common”
Note the bus is in use, RS-485 signal, has it’s own signal common reference and is working correctly.

it works exactly as expected. 5V for 10 seconds, 0V for 10 seconds. But when attached to the Arduino instead of the 10k resister, 4.7V for 10 seconds, 5V for 10 seconds…

Are you using an oscilloscope to measure the square wave output? Sure looks like you are using a DVM and you can’t measure such a signal with that. Well, you can but will always be an error.

Paul

I'm using a DVM, reading the voltage to a trend table (1k samples per second, Keysight 34465A if you are interested). It's a really broad, crude signal (5V to 0V over 10 seconds is pretty big and slow) so it could be read with any sort of meter. Just look at it for 10 seconds and see if the voltage changes from 5 to 0. I don't care if the change is smooth or not, only that it is present. If this were a digital signal used for data or any frequency higher than 1 cycle per several seconds, I would use the o-scope.

I'm not interested in the square wave being pretty or correct, just that I'm getting 0V sometimes, and 5V other times, and that it is very vaguely predictable. This isn't a signaling exercise, just a converting an analog signal to PWM exercise. I do not have a scope on the PWM side, as that is confirmed working by using a pot wired to the Arduino 5V out.

In the interest of simplification, I took out the square wave and set it to just output 2.5vdc. this means I'm expecting a reading of about 50% of reference max, which in this case is just the default 5V. Since it is powered using 5vdc on the Vin pin, I assume that is acting as the reference.

As a point of interest, I took the whole Arduino out of the equation in a test and just put on a 10kohm resister and took some readings. Here are the results.

Readings were taken by voltmeter probing the out and ocom (+ and - from the 24VAC controller) at the controller

10kohm resister hooked up between the out and ocom (+ and - from the 24VAC controller) Expected value observed, 2.5v

10kohm resister hooked up as before, ocom (-) also connected to earth ground via wall socket. Expected value observed, 2.5v

10kohm resister hooked up and grounded as above, but now I added the power converter (24VAC to 5VDC) and added the - to the ground and servo power, + connected to servo power Unexpected value observed 19.8VDC, expected 2.5V

Servo removed from above test, Unexpected value observed 19.8VDC, expected 2.5V

Servo added back as before, Arduino added to circuit, converter + to Vin, converter - to Arduino ground Unexpected value observed 19.8VDC, expected 2.5V

This looks like I'm failing to understand how to ground the power from the converter in a way that doesn't disrupt the incoming signal.

I tried once more, same as the final test but the Earth ground (to the wall outlet) removed Unexpected value observed 19.8VDC, expected 2.5V