Author Topic: Clamping diodes on passive device?  (Read 546 times)

0 Members and 1 Guest are viewing this topic.

Offline joshuabasTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Clamping diodes on passive device?
« on: February 05, 2023, 05:27:15 pm »
Hello!

I'm wanting to use the Sparkfun Weather Meter Kit, and out of curiosity I was looking at their Arduino Weather Shield that can interface with the kit's RJ11 connectors.

The Weather Meter is a passive device, and its anemometer and rain gauge are basically just reed switches. By inspecting the associated Arduino code, the reed switch output is pulled up by with the internal resistors; however, I'm wondering what the purpose of the clamping diodes D5 and D6, for example, is? How could the RAIN output ever go below 0V or above 5V?

Thank you for your help! I'm wanting to learn why pcbs might be laid out in some ways rather than others.
« Last Edit: February 05, 2023, 05:29:29 pm by joshuabas »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11234
  • Country: us
    • Personal site
Re: Clamping diodes on passive device?
« Reply #1 on: February 05, 2023, 05:38:20 pm »
How could the RAIN output ever go below 0V or above 5V?
Lightning or general EMI on the long wires can generate really high voltages. Diodes and current limiting resistors will protect against that to an extent. They will not be able to help against direct lightning hit, but they will help against induced currents.
Alex
 
The following users thanked this post: joshuabas

Offline joshuabasTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Clamping diodes on passive device?
« Reply #2 on: February 05, 2023, 05:42:04 pm »
Oooh, that makes sense, given the application. Thanks for responding to my noobie question!
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11234
  • Country: us
    • Personal site
Re: Clamping diodes on passive device?
« Reply #3 on: February 05, 2023, 05:46:44 pm »
Note that their schematic is not ideal. It is better to have a resistor right on the input before the diodes, so that the current though the diodes themselves would be limited. I'd just split this 1K resistor into two 51 Ohm resistors one before the diodes and one after.
Alex
 

Offline joshuabasTopic starter

  • Newbie
  • Posts: 3
  • Country: us
Re: Clamping diodes on passive device?
« Reply #4 on: February 05, 2023, 05:52:48 pm »
And suppose I performed reed switch debouncing in hardware, with a capacitor as shown.

Am I right in thinking the the 51Ohm resistor, in addition to limiting current through the diodes as you said, would also limit current going into the reed switch when the capacitor discharges?

[ Attachment Invalid Or Does Not Exist ]
« Last Edit: February 05, 2023, 05:57:35 pm by joshuabas »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11234
  • Country: us
    • Personal site
Re: Clamping diodes on passive device?
« Reply #5 on: February 05, 2023, 06:02:45 pm »
There are no capacitors here. The reference schematic has one, but not the actual one. And even then it is a 10 pF capacitor, it is basically nothing.

You would need debouncing in the firmware for sure, but usually reed switches are better than manually operated mechanical ones. They still bounce though.
Alex
 
The following users thanked this post: joshuabas


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf