Inductive proximity sensor

Hello ;D ,

First of all I would like to say that I am a beginner.

I have an analog proximity sensors that I would like to read with an Arduino Mega in 24V and that has an output current of 4 to 20 mA, I have 3 wires what is the schematic and the code please.

attached diagram, Sensor telemecanique XS4P30AB9D2

Are you looking for someone to just do the work for you then head on over to gigs and collaborations, where you can pay someone to just do the thing for you.

One the other hand you might try it yourself and then when you get stuck you can post all the junk, code, fritznuts, schematic, images of your project, and explanations of what you wrote, what its supposed to do, and what it does instead. Then "we" can lend a hand at fixing the thing.


As a note using the words "arduino XS4P30AB9D2 project" does not net any results, it may be a costly project for someone else to do.


on the other hand the words "arduino analog inductive sensing" do net a good result set. Hey there's a start, research what a concept!

That is a $350 sensor.

If this is a student project it might be a good idea to ask your supervisor if they have a cheaper sensor that you can practice with first.

First question, do you have a 12v power supply?

Here is a circuit that will give you an analog value compatible with your microprocessor. The 24V is basically irelevelant, as this is a current not a voltage circuit. You are putting a 220 Ohm load across the signal and monitoring the resultant voltage. The input will not be 0-5 Volts so you will need to do some scaling. The key is that the grounds be connected.

R1 is the wrong value; should be 47Ω or 51Ω. Read using the internal 1.1V ADC reference.