Jump to content
C_R_PLC

Having issues getting an arduino sensor to read properly on a V350-35-RA22 despite it being a simple 0-10v signal.

Recommended Posts

Title basically says the whole issue. I'm trying to get a usable reading from the sensor listed below, but it just seems to fluctuate between 2 and 3 volts even if nothing is plugged in. So my question is two-fold. Can I get a signal that is more precise than a whole number, and will that sensor even work with a PLC and if not is there anything I can get to interface the two?

Sensor - https://www.dfrobot.com/wiki/index.php/Turbidity_sensor_SKU:_SEN0189

Thank you very much for your time/help.

Share this post


Link to post
Share on other sites

According to your link, the sensor output is only 0-4.5 volts. However, you should be able to make that work. The standard analog input on hte V350-35-RA22 has 14-bit resolution, which even at half scale will still give you at least 2 or 3 decimal places of precision. How are you measuring the 2-3 volts you say you are getting? Is this a direct measurement with a voltmeter, or are you linearizing the analog input on the PLC?

Share this post


Link to post
Share on other sites

If you have access to a 0-10V source you can inject a signal and see if it is a code/config issue or the device. Ramping up and down the scale will give you a change in your PLC value. In the absence of a source you can even use batteries 1.5/3V/6V/9V

Some likely things to check:

  • Dip switch settings are correct as per install manual for 0-10V
  • Hardware config settings are right
  • Any scaling in your code is correct for the bit resolution of your model
  • 0V connections as per manual

The help files and examples are always worth looking at

Share this post


Link to post
Share on other sites
1 hour ago, Flex727 said:

According to your link, the sensor output is only 0-4.5 volts. However, you should be able to make that work. The standard analog input on hte V350-35-RA22 has 14-bit resolution, which even at half scale will still give you at least 2 or 3 decimal places of precision. How are you measuring the 2-3 volts you say you are getting? Is this a direct measurement with a voltmeter, or are you linearizing the analog input on the PLC?

Direct reading through the MI that the analog input is going to. No matter what I do it only gives whole value readings of 1-4.

41 minutes ago, PA_DB said:

If you have access to a 0-10V source you can inject a signal and see if it is a code/config issue or the device. Ramping up and down the scale will give you a change in your PLC value. In the absence of a source you can even use batteries 1.5/3V/6V/9V

Some likely things to check:

  • Dip switch settings are correct as per install manual for 0-10V
  • Hardware config settings are right
  • Any scaling in your code is correct for the bit resolution of your model
  • 0V connections as per manual

The help files and examples are always worth looking at

I've checked all that a few times now, I'm just trying to test this sensor so there isn't much actual logic involved. Jumpers are all correct and all that.

Share this post


Link to post
Share on other sites
2 hours ago, C_R_PLC said:

Direct reading through the MI that the analog input is going to. No matter what I do it only gives whole value readings of 1-4.

That's basically zero. The value you should see on the MI is 0-16,383, which is scaled to 0-10V (i.e. 1V = 1638, 5V = 8191, 10V = 16383).

Share this post


Link to post
Share on other sites
4 hours ago, C_R_PLC said:

Direct reading through the MI that the analog input is going to. No matter what I do it only gives whole value readings of 1-4.

Yes....but what is the actual reading at the connections at the plc using a voltmeter?  As Flex says, the MI0 is essentially indicating nothing is there at all.  As C_R says, check connections, especially that your 0V are commoned correctly.

cheers,

Aus

Share this post


Link to post
Share on other sites
9 hours ago, C_R_PLC said:

No matter what I do it only gives whole value readings of 1-4

And visiting this again, I think I see where your fundamental thinking is astray.  I have a feeling that you are expecting to see MI0 showing the actual voltage.  It doesn't work that way, it works the way Flex has pointed out in that analogue inputs generate numbers b/n a range, dependent on speed of read and type of input. 

And I still want you to use a voltmeter!

cheers,

Aus

Share this post


Link to post
Share on other sites
9 hours ago, Ausman said:

And visiting this again, I think I see where your fundamental thinking is astray.  I have a feeling that you are expecting to see MI0 showing the actual voltage.  It doesn't work that way, it works the way Flex has pointed out in that analogue inputs generate numbers b/n a range, dependent on speed of read and type of input. 

And I still want you to use a voltmeter!

cheers,

Aus

Okay, sorry for the late response. New day new voltmeter approach.

So with a voltmeter I get .756 volts when the sensor is clear and .950 volts when the sensor is covered.

Share this post


Link to post
Share on other sites

Could it have something to do with the setup that I'm using to power it? I have a variable voltage output powering the sensor itself because it has to be set to 5V, so the positive and negatives are coming from that machine instead of the PLC.

Share this post


Link to post
Share on other sites

Hi

I would say it is a wiring issue.

Make sure you common the 0 volt of your supply with the 0 volt of the PLC.

 

Share this post


Link to post
Share on other sites
23 hours ago, Ausman said:

especially that your 0V are commoned correctly.

Or better yet, run the arduino from a converter running from the plc supply, but again with the 0V commoned.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×