input protection, for backfeed and over voltage

Hi Guys,

First time post here, I’ve designed a simple circuit to offer some protection to my Arduino. Here is a simplified drawing, forgive me if its unreadable not really a electronics guy. Can someone offer a sanity check on this, the goal is to save the inputs being damaged from overvoltage / backfeed

To Summarize

  • What I have a is 24V 4-20ma Current loop sensor.
  • A 250ohm resistor to bring that 24 volts to something safe for the Arduino 1-5 volts.
  • I’ve added a N-channel mosfet. To break the connection to the analogue input, saving the pin should sensor be powered up while the Arduino is off - Backfeed protection
  • A zener 5.1v is to help regulate the voltage to ~5V

Am i heading in the right direction?

+24v thru body diode to the cathode of a 4.7v zener going to GND probably not a good idea ???

larryd:
+24v thru body diode to the cathode of a 4.7v zener going to GND probably not a good idea ???

Larry, I am surprised at you. Voltage, as I am confident you know, does not go through anything, it is the difference in potential between 2 points. Not only that, but with the 250Ohm resistor and 20mA as shown there is no more than 5V at the output of the sensor, not 24V as shown (I am assuming that the battery symbol was all the OP could find to represent the 20mA output and that it is not 24V at all).

I’m confused about what the MOSFET is even there for.

You are too sharp today :).

:slight_smile: LMAO! :slight_smile:

Ditch the Zener diode and the MOSFET. If you want to keep the voltage on the input pin within the range of the supply voltage put 2 reverse biased Schottky diodes from the input pin, one to +5V, the other to 0V (so they both point ‘up’).

PerryBebbington:
Larry, I am surprised at you. voltage, as I am confident you know, does not go through anything, it is the difference in potential between 2 points. Not only that, but with the 250Ohm resistor and 20mA as shown there is no more than 5V at the output of the sensor, not 24V as shown (I am assuming that the battery symbol was all the OP could find to represent the 20mA output and that it is not 24V at all).

I'm confused about what the MOSFET is even there for.

You are right i struggled to find something to illustrate the 20ma / sensor,

The FET is only to prevent back feeding into the arduino if for example the arduino is off but for some reason a sensor is connected and powered on. Ask me how i know how that works out, easy way to burn up an input.

Anyway that is my logic, however flawed it maybe.

Ask me how i know how that works out, easy way to burn up an input.

I don't think I need to ask... :o
As long as you learned from the experience :slight_smile:

The FET is only to prevent back feeding into the arduino if for example the arduino is off but for some reason a sensor is connected and powered on.

I realise what you are trying to do. Did you understand about the 2 Schottky diodes? They will do the job by clamping the input to within whatever the supply voltage is (OK, + or - about 0.2V)

[EDIT]
I missed the obvious; Put a 10k resistor between the 250Ohm resistor to the input, that will limit any current into the input to a safe level.

250 ohm is a poor choice.
That implies that you are going to use the potentially unstable 5volt supply as reference.
That makes the readout as unstable as the supply.
Better to use a 51 ohm resistor (standard E24 value), and the stable internal 1.1volt Aref.

For added reverse protection, put a common 1N4004 across the 51 ohm resistor, anode to ground.
And between R and pin a ~10k resistor.
A (10-100n) cap from pin to ground can be added if the source is noisy.

See this thread, post#10.

Don't use zeners.
Leo..

PerryBebbington:
I don't think I need to ask... :o
As long as you learned from the experience :slight_smile: I realise what you are trying to do. Did you understand about the 2 Schottky diodes? They will do the job by clamping the input to within whatever the supply voltage is (OK, + or - about 0.2V)

[EDIT]
I missed the obvious; Put a 10k resistor between the 250Ohm resistor to the input, that will limit any current into the input to a safe level.

Thanks for the pointer, time for some homework nice to see a simple solution.

Wawa:
250 ohm is a poor choice.
That implies that you are going to use the potentially unstable 5volt supply as reference.
That makes the readout as unstable as the supply.
Better to use a 51 ohm resistor (standard E24 value), and the stable internal 1.1volt Aref.

For added reverse protection, put a common 1N4004 across the 51 ohm resistor, anode to ground.
And between R and pin a ~10k resistor.
A (10-100n) cap from pin to ground can be added if the source is noisy.

See this thread, post#10.

Don't use zeners.
Leo..

Interesting point you make and no harm in trying pretty sure i have all the bits laying around.

Problem with a common Arduino with 10-bit A/D could be the <=800 steps of resolution you’re getting.
The above circuit with 100 ohm sense resistor and an ADS1115 external A/D set to PGA 2 could increase that to about 25000 steps.
But then the (unspecified) sensor could be the weakest link.
Leo…

Wawa:
Problem with a common Arduino with 10-bit A/D could be the <=800 steps of resolution you’re getting.
The above circuit with 100 ohm sense resistor and an ADS1115 external A/D set to PGA 2 could increase that to about 25000 steps.
But then the (unspecified) sensor could be the weakest link.
Leo…

ok clear as day,

I’ve tried following the schematic, and it works but I have not looked into how stable / more accurate it is or is not. Next phase ironically needs greater resolution where i am planning to use a ADS1115 with a 6000 bar pressure transducer. Yes 6000 bar :slight_smile:

by using 1.1V as the reference voltage we are in the vicinity of 1mV per step… Now forgive my electronics ignorance but isn’t that asking a lot from the Arduino to be able to sense 1mV steps not to mention any AC noise, that would perhaps bounce the reading around.

So would using a higher reference voltage such as the 2.56v from the internal ref in a MEGA, give greater immunity to interference and offer better signal stability?

1mV is not that small for an A/D.
If you're going to use the ADS1115 (15-bit single-ended), then you're looking at ~50uV steps.
Leo..