Industrial Sensor + Particle Photon

If I had an industrial sensor(proximity sensor) from 0V to 24V or 4 to 20mA, how can I do it to connect it to the analog input form my particle photon analog input?

I will appreciate your help!!!

@jonamleonel Do you have a multimeter and a collection of resistors? Hook the sensor up to 24V according to the datasheet. Next connect the ground connection of the 24V power supply to your Photon’s ground. That leaves connecting the sensor output to the Photon.

You cannot feed 24V to a Photon input, but reducing the voltage to an acceptable level is easy to do with a voltage divider. Just Google “Voltage Divider Calculator” and you’ll find tool like this one: http://www.raltron.com/cust/tools/voltage_divider.asp

Enter 24V for input, 3V for output, suggest an initial R1 resistor in the 10k-range that you have in your resistor collection. In this case 33k is a good place to start. When you press the Compute-button, the calc will then suggest a 4.7k resistor as R2. Connect this up, make the sensor output it’s maximum signal voltage and then measure with the Multimeter that you have less than 3.3V between ground and the output of the voltage divider before you hook it up to the Photon.

If you post a link to the datasheet I could give more specific advice?

That should do it?

2 Likes

Thanks @jenschr but I am looking for a linear voltage output. Do you know some IC ?

Here is a reference post for isolated 4-20mA signal conversion.

http://forum.arduino.cc/index.php?topic=167973.msg1250701#msg1250701

Optoisolators can also be used with your voltage divider.

Also, check your resolution criteria. The analogRead pins have a resolution of 3.3 volts / 4096 units. You may need another external ADC to get better sensor resolution if its required.

@jonamleonel if you Google the words Industrial Proximity Sensor, you’ll see what I thought you had - an inductive sensor that is either high (24V) or low (0V). For more specific advice, I’d need to know what component you’re using :slight_smile:

You can get these little pre-built 4-20mA to voltage converter modules from lots of sources: