-1

I'm building a project that uses a couple of Adafruit DTH22 temp/humidity sensors. (https://www.adafruit.com/product/385)

I have them wired into my project box through 3.5mm mini plugs (The kind that are commonly used by stereo earbud headphones for MP3 players.)

More than half the time, when I plug/unplug one of my sensors, my Arduino restarts.

My guess is that as I plug in the plug, it sometimes momentarily shorts +5V and ground, causing the +5 source to my Arduino to lose voltage.

These sensors apparently draw single-digit mA of current at peak (like 1.5mA, according to the spec.)

Could I wire a 120Ω or 150Ω resistor in line with the ground connection to the DHT22? This would limit the max current it could carry to around 40mA, which would not be a problem for my power supply (which is fed through the USB port on the Arduino, and thus is limited to 500mA.) Putting a resistor on the ground would limit the current to ground from either the VCC connection to the sensor or the data connection. It would also cause a small loss of voltage to both the data line and the VCC connection.

Would the serial connection between the DHT22 and my Arduino tolerate a 120Ω resistor, even if I connect it via ≈15M of 28-gauge wire?

I could also put the resistor into the VCC wire, but that would only current-limit a VCC-to-ground short, not data-to-ground.

  • perhaps you need to determine the cause for the resets before you start formulating a solution ..... how are the mini plugs wired? – jsotola Feb 4 '19 at 17:38
  • Outer barrel: ground Middle: hot. Tip: Data – Duncan C Feb 4 '19 at 20:55
  • 1
    If you were to change your wiring so that data was in the middle, that would cure your problem without resorting to fudges, yes? – Majenko Feb 4 '19 at 21:12
  • 1
    Wow... 5 sockets... That's a huge amount of work. I suggest you take this opportunity to do it right before you add any more sockets... – Majenko Feb 5 '19 at 1:06
  • 1
    DuncanC, a signal is relative to ground, you can put a resistor in the 5v line. With the plug on the sensor side and according to @Majenko the 5v at the tip, data in the middle, extra resistor of 150Ω from arduino 5v to "tip" (deepest part in the socket). I think that should work. Are they all gold plated or at least sturdy connections? – Jot Feb 5 '19 at 1:55
0

Your case : Check wire (shors ?) and pin configuration (out ??)

General : No resistor in a ground path.

Decoupling supply : one can insert a 100 Ohms resistor between the arduino +5V and the +5V sensor : but ALWAYS use a decoupling capacitor : connect a 100µF betwen +5V sensor and groud. One can add a 100nF ceramic in paraller for digital devices.

Safety in case of bad I/O config : Using a 1kOhms restisor between Arduino and Device is good, if next to the Arduino (not at the other end of sensor cable, or use 330 Ohms at eatch end of cable).

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.