Skip to main content

Reply to "Using an optocoupler to connect insulated rail to input pin of shift register"

For whatever reason I can't read your crude docx but in any event some comments:

- You only need to drive an optocoupler with, say, a few mA.  A 10V AC source thru a 330 ohm resistor into a ~1V optocoupler is overdriving the optocoupler if the output is driving a low-current digital input to a shift register.  That's a peak current of ((10V x 1.4) - 1V) / 330 ohms = 40 mA into the optocoupler.   A 1k resistor is more than enough.

- If you're driving any "modern" digital input, you don't need to pull it up with 10k.  You can lower current by 10x with a 100k pullup resistor.  10k pullups are a holdover from the last century with bi-polar (TTL) inputs.  Anything digital today is CMOS which has negligible input currents.

- By using 100k (instead of 10k) you can use, say, a 0.1uF capacitor across the input to smooth out the AC ripple.  Yes you can "debounce" or smooth the ripple in software but that's just silly if a 1 cent capacitor can do the same.

- Then, if you put that filtering cap on the input you can use a single-ended optocoupler rather than an AC input optocoupler.  AC input optocoupler can run you 2-3 times the cost and are fewer choices.  Of course if you already have a bag of AC optocouplers then never mind.  By using a capacitor as described above it will still filter the half-wave output from a single-ended optocoupler so your digital input still sees a steady DC voltage (no software debouncing).  Then just put in a 5 cent diode on your 10V AC source to feed all your single-ended optocouplers with half-wave DC (so as not the apply reverse voltage to the optocoupler).

 

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×