Author Topic: Is my circuit correct?  (Read 4292 times)

0 Members and 1 Guest are viewing this topic.

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13132
Re: Is my circuit correct?
« Reply #25 on: September 01, 2020, 10:29:40 am »
The ULN2003A doesn't need a decoupling cap, as it doesn't even have a Vcc pin!

I'd recommend 1nF to ground at the MCU's switch sense input pin which will form a low pass filter with a corner frequency of 16KHz, filtering out most EMI pickup.  If the pin has a Schmitt trigger input characteristic, you can increase this capacitor for a suitable hardware debouncing time constant as per J Ganssle's article, and make your software simpler.  If not, don't, as increasing the capacitor may cause problems with the digital input not transitioning fast enough.
 
The following users thanked this post: redgear

Offline redgearTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: Is my circuit correct?
« Reply #26 on: September 01, 2020, 10:34:33 am »
The ULN2003A doesn't need a decoupling cap, as it doesn't even have a Vcc pin!

I'd recommend 1nF to ground at the MCU's switch sense input pin which will form a low pass filter with a corner frequency of 16KHz, filtering out most EMI pickup.  If the pin has a Schmitt trigger input characteristic, you can increase this capacitor for a suitable hardware debouncing time constant as per J Ganssle's article, and make your software simpler.  If not, don't, as increasing the capacitor may cause problems with the digital input not transitioning fast enough.

Thank you:)

One more question, the relay's datasheet recommends a Zener diode + Diode to supress surges between relay pin 1 and the 5v. Do I need it?
« Last Edit: September 01, 2020, 10:36:54 am by redgear »
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 13132
Re: Is my circuit correct?
« Reply #27 on: September 01, 2020, 10:58:45 am »
No, the diode(s) are built into the ULN2003.  Simply return the ULN2003 common cathode pin to +5V via a resistor equal to the relay coil resistance if you aren't going to switch off multiple relays at the same instant, or via a 4.7V Zener, cathode to common if you are.
 
The following users thanked this post: redgear

Offline redgearTopic starter

  • Frequent Contributor
  • **
  • Posts: 286
  • Country: us
Re: Is my circuit correct?
« Reply #28 on: September 01, 2020, 11:31:38 am »
No, the diode(s) are built into the ULN2003.  Simply return the ULN2003 common cathode pin to +5V via a resistor equal to the relay coil resistance if you aren't going to switch off multiple relays at the same instant, or via a 4.7V Zener, cathode to common if you are.

Alright, Thanks :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf