Indo Analogue_In does not work with our sensor

Hi,
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:
#include <Indio.h>
#include <Wire.h>
float sensorVal1;
void setup()
{  
  Serial.begin(9600);
   while (!Serial)
   {
     // wait for serial port to connect. Needed for Leonardo only
   }
  Indio.setADCResolution(18); // Set the ADC resolution to 18bit@3.75SPS.
  Indio.analogReadMode(1, mA_p); // Set Analog-In CH4 to % mA mode (4-20mA -> 0-100%)
 
 }
void loop()
{
  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.

Lorenzo Boncompagni
Lorenzo Boncompagni
7
| 2 1 2
Asked on 1/19/17, 7:28 AM
0
vote
3711 Views

Please give brand and model of sensor. ​Also check your analog is not faulty by reading in other modes.

Stefano Giuseppe Bonvini
on 1/20/17, 10:40 AM

The same sensor works in another arduino environment with 4-20 ma input. We tried all modes in Indio but nothing. I can send you specs on Monday. Thanks.

Lorenzo Boncompagni
on 1/21/17, 9:43 AM

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.

Any sugestion?

 

 

Joaquín Murillo
Joaquín Murillo
17
| 2 1 1
Answered on 4/13/18, 11:00 AM
0
vote

Hi Joaquin, can you try with the INDIO demo code https://github.com/Industruino/democode/tree/master/IndustruinoDemoCode_D21G and let us know if that works. If not, send a picture of your wiring (by email please)

Tom
on 4/15/18, 4:26 AM

Can you please confirm that the Ind/IO Industruino is powered using 24v. I have had similar read failed errors when I have only connected the IND I/O board using USB and not powered it.

Raghuram Shenoy
Raghuram Shenoy
7
| 4 1 2
Answered on 1/27/17, 5:29 AM
0
vote

Yes its powered via 24V. We even read the with Voltmeter.

Lorenzo Boncompagni
on 1/27/17, 6:41 AM

Hi,

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

Didier, eControls

Didier DORGUIN
Didier DORGUIN
172
| 4 1 3
Answered on 1/19/17, 8:00 AM
0
vote

Thank you we are testing and reverting soon.

Lorenzo Boncompagni
on 1/19/17, 8:43 AM

Oops wait ! I just read the return of your input will be 4096 anyway, as a float, and the precision will be enhanced through decimals.

Didier DORGUIN
on 1/26/17, 3:06 PM

The error message we were getting was Measured 2047 raw and the values with and without the sensor were:

CH1: 5.548 read failed

CH2: 55.360 read failed

CH3: 11.006 read failed

CH4: 35.030 read failed
Thanks

Lorenzo Boncompagni
on 1/27/17, 4:53 AM

Hi,

did you try to initialize the 4 IN channels with function analogReadMode. I've faced to a similar issue solved with this full initialization (example libraries\Indio\examples\Indio_AnalogIn)

Best Regards

Olivier

VERNET Olivier
VERNET Olivier
7
| 0 0 1
Answered on 1/19/17, 6:32 PM
0
vote

Sadly it does not work. Data always the same and says read failed CH1: 5.548 read failed CH2: 55.360 read failed CH3: 11.006 read failed CH4: 35.030 read failed CH1: 5.548 read failed CH2: 55.360 read failed CH3: 11.006 read failed CH4: 35.030 read failed CH1: 5.548 read failed CH2: 55.360 read failed CH3: 11.006 read failed CH4: 35.030 read failed CH1: 5.548 read failed CH2: 55.360 read failed CH3: 11.006 read failed CH4: 35.030 read failed CH1: 5.548 read failed CH2: 55.360 read failed CH3: 11.006 read failed CH4: 35.030 read failed .... Thanks

Lorenzo Boncompagni
on 1/20/17, 5:37 AM

No luck. The sensor is working in another environment so its not  the sensor. Is as if the INDIO does not want to take any data from Analog Channels.

Lorenzo Boncompagni
Lorenzo Boncompagni
7
| 2 1 2
Answered on 1/19/17, 1:23 PM
0
vote

Your answer

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!

Ask a Question

Keep Informed

About This Forum

This community is for professionals and enthusiasts of our products and services.

Read Guidelines

Question tools

31 follower(s)

Stats

Asked: 1/19/17, 7:28 AM
Seen: 3711 times
Last updated: 4/13/18, 11:00 AM