Good day, everyone!
I've been wanting to read values out of industry standard sensors for quite some time now and finally I got my hand on a DP2-20 Pressure Sensor.
It's supply voltage is 12-24 volts DC and current consumption is 50mA or less. Link to the datasheet -->http://www.sunxsensors.com/products/product/download/get.html?download_id=259
I searched on interfacing with 24v sensors here in the forum and found no luck in finding a schematic diagram I could use. (There are links to a 'picture' but it was an error404)
This is the post most relevant to my topic: (convert my reading to 0-5V) Interfacing with 24v 4-20ma analog devices
Sir @deSilva says here:
You place a 220 ohms resistor between + and - of the line current. Connect - to ground and + through a 10k resistor to an analog pin.
and Sir @Grumpy_Mike explains here how to get the 220:
Its is a sensor that produces current from a minimum of 4mA to a maximum of 20mA. When it is at its maximum you want the arduino to see 5V. So ohms law says that if you have 20mA through a 220R resistor then it has to have a voltage of 20 * 220 = 4400 mV or 4.4V across it.
Here is what I think the connection should look like based on the description:
and this is how I computed R1: 50 * 100 = 5000 mV or 5V ~ R1=100
Are my assumptions correct? :drooling_face: If so, could you help me read the digital output of the sensor?
I'm using arduino UNO and SUNX DP2-20 Digital Pressure Sensor.