We have an issue when reading values from our vibration sensor, we are using a transformer to pass 24V to the sensor, when we put our sensor on CH1 and use Industrino INDO library example Analogue_In it gives us ‘read failed’ error with constant value of 35.050 mA_p that displays without the sensor and if we test with use Industrino INDO library example Indio_Analogue Calibration it also gives us ‘read failed’ error with measured 2047 (raw). Below is a sample of our code:
// wait for serial port to connect. Needed for Leonardo only
Indio.setADCResolution(18); // Set the ADC resolution to firstname.lastname@example.orgSPS.
Indio.analogReadMode(1, mA_p); // Set Analog-In CH4 to % mA mode (4-20mA -> 0-100%)
sensorVal1=Indio.analogRead(1); //Read Analog-In CH1 (output depending on selected mode)
Serial.print("CH1: "); //Print "CH" for human readability
Serial.print(sensorVal1, 3); //Print data in 3 decimal places
Serial.print(" "); //Add some " " space
Serial.print("\r\n"); // Print a new line to serial.
We are powering the sensor from 24V transformer and also the INDIO from the same. Connecting the 2 grounds make no difference.
Please assist us with the solution, thank you.
I'm having a similar problem. I tried to read a 5V signal, and didn't succed. 24V input is active. I set Analog Out to 5 V and it's ok. Then, to test, I connected Analog Output 5V to Analog Input 5V and bridged both gorunds, tested 5 V at the exit and having no reading in Analog Input.
mA_p has a bad reputation. We rather use mA_raw then translate from the multiples of 2 generated (in your case your top of scale would be 2^18).
Keep in mind reading at 18 bits is much slower than, say, 14 bits.
Hope this helps
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!