I am attemting to connect my Industruino to a Pressure Transducer, SPT25-20-3000A, from http://www.automationdirect.com/static/specs/prosensespt25transmitters.pdf
This is a 4-20mA device with a 9-36volt input range. The wire configuration on the transducer cable is Red, Black, White and Case Ground (bare wire). I am using the Red, Black and Case Ground.
My power source measures 12.2volts and is attached to the V+ and GND of the Industruino. The Industruino appears to be working well. So far I have tested Digital Inputs and Outputs without issue.
I have the Red wire of the transducer attached to V+ of the Industruino
I have the Black wire of the transducer attached to a 220ohm load resister.
The 220ohm load resister is attached to Analog Input-Ch1. (per the datasheet of the transducer)
I have the Case Ground attached to GND of the Industruino.
I cannot make the Analog CH1 Input work with the transducer with the following code:
float sensorVal1; //variables to hold your sensor data
// wait for serial port to connect. Needed for Leonardo only
Indio.setADCResolution(18); // Set the ADC resolution.
Indio.analogReadMode(1, mA); // Set Analog-In CH1 to mA mode (0-20mA).
sensorVal1=Indio.analogRead(1); //Read Analog-In CH1
Serial.print("CH1: "); //Print "CH" for human readability
Serial.print(sensorVal1, 10); //Print data
Serial.print("\r\n"); // Print a new line to serial.
The output to the Serial Monitor is:
When I vary the pressure on the transducer, nothing changes.
Any ideas on what I am doing wrong?
Thanks ahead of time.
As the analog field section is isolated from the digital field/power-in section you need to tie both grounds together if you are using a single power supply to power both the Industruino and your analog section, otherwise your analog input would appear to be floating. So in general your wiring is correct, you only need to run one more wire from your power supply's ground to the analog ground.
The analog zone is isolated from the digital zone to allow you to use a seperate power supply for each section, improving stability of analog readings, but this is an optional feature and can be circumvented by connecting both grounds together.
Please let me know how it goes.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!