Russell McMahon wrote: >> Can anyone suggest a way of building a opto isolated input to feed a >> PIC. >> I would like to be able to feed in say 5 to 250 volts ac or dc, >> frequency response is not important as the pins are only sampled >> every 10mS. >> >> I was considering feeding an opto coupler with a bridge rectifier and >> a small filter cap (i don't want 50Hz ac to appear as if its going >> off and on) but the wide voltage range has me wondering if there is a >> better way, maybe some sort of constant current. > > > What are you trying to achieve. > eg > > - Is the device simply meant to indicate absence/presence of signal Yes, Just off or on > > - What bandwidth/response time do you need. Bugger all, 200mS response would be more than enough, I don't want AC 50Hz to appear to be 'toggling' > > - What power dissipation can you tolerate. I can put this in a reasonable sized case but I may have 16 in one case and I don't want to add a fan, the device is a USB (based on the 18f4550) input /output. So I guess that 1 watt per channel would be in the ball park > > > - Can you tolerate a power supply/battery/whatever on the input side > as well as the input signal. > I would prefer not to use a battery /fet, this needs to be cheap and robust. > - What isolation voltage do you want? Moderate, so what ever the spec of the opto will be fine. > > - Why, in each case :-) > > > If you want say 5 mA optocoupler current you require 5 mA x 250V = > 1.25 watt dissipation. > Adding an input battery can help muchly in dissipation. depending on > usage duty cycle the battery could be very long lasting. > A FET input stage and a battery would be about all that is needed. FET > can have a high value input resistor plus gate clamp zener and little > else is required. More demanding "real world' situations MAY require > some extra protection. I would like to keep it simple as possible, I may be able to get around a constant current using a single transistor and a diode in the emitter but was looking for a sanity check, I thought there may be an opto that does this now days... > > A simple switching regulator could cut in at moderate voltages to > reduce the power dissipation at higher voltages. (My GSR buck > converter (in the archives) would work here - passes through input > voltage to opto at low voltages and turns into a switcher at higher > inputs. > Took me an hour to find in the archive, had a look at the buck converter, I expect I can do this a little more simple with the voltage range required if I can find a suitable transistor for a series reg, I may be able to drop the current to the diode a little ... What do you think? > > > RM -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist