Go Down

Topic: Ever use a Fairchild MID400 AC line sensing opto? (Read 1 time) previous topic - next topic


Aug 20, 2013, 06:08 pm Last Edit: Aug 21, 2013, 04:44 am by JohnHoward Reason: 1
Their application note mention no clamping or other protection on a 120VAC line.  I, on the other hand, intend to monitor 24VAC (furnace signalling lines) so I suppose I'm 'safe'?

I bought a handful, so trial and error is an option for me.  But if anyone has already been through the exercise, I could use the advice.

Maybe I should go ahead and slap a 40V MOV across the inputs just in case the motors or solenoids throw too much noise for the MID400 to handle.

I worked out a schematic and started assembling a prototype on a 70x50cm board.



Hey John, I'm working on something that looks similar to your project but less involved. I simply want to detect when the heat has been turned on. I've already checked and I can tap into the W line that goes to 24v when the thermostat calls for heat and goes back to 0 when the thermostat ends the call for heat.

Like you I've been trying to figure out a way to get the 24v AC from the furnace to the Arduino and came across the MID400. However, the datasheet has my head spinning a bit. I've looked at two schematics that you've posted and have some questions if you don't mind...

In one of your schematics you have a 10k resistor on the AC side and in the other you have a 2.2k resistor. Based on looking at the data sheets I've calculated that a 5.6k resistor would be needed for 24v. Can you tell me how you derived your values and why the change between schematics?



Figures 1 and 2 on the datasheet will tell you how to select the input resistor.  With their example of 22k, it will turn on at about 55V and turn off at 12V, so it will still show "on" even in heavy brownout conditions.  Say you accidentally fed it 240V, the input current would be 11mA RMS, which is still well below the 25mA maximum, so it's a pretty robust device.  Given that it can handle about 500VAC continuously when configured to switch on at 55V, I don't think any glitchy noise on your AC lines are going to do it damage.  Slapping a MOV on there won't hurt, but I don't think you need it.

Probably even cheaper and more effective than the MOV would be to use a small capacitor directly across the input pins to form an RC filter with corner at about 500Hz.  That should be fast enough (compared to the cycle time) to not hurt the device's response and to not much increase current consumption at 50-60Hz, but it will eat any very short/sharp spikes due to inductive loads coming on/off line.  Say about 100n if R=22k for a 450Hz cutoff.  Obviously use a high-voltage non-polarised capacitor; you would need to make sure the selected capacitor can handle the continuous current and do some testing.  Or just do like the datasheet says and use only a resistor.

For detecting 24V, I suspect that having it turn on at about 12V-16V is a good idea.  So maybe about 5k6-6k8 input resistance, which will mean it can survive being connected to 140VAC.  2k2 is I think a little too low - it will work and not be damaged by anything below about 55V, but it consumes way more current/power from the 24V line than is necessary.


Thanks polyglot.

Yeah, finally wrapped my head around it. For some reason the datasheet was confusing me. Any way in case anyone else is wondering and is confused by the datasheet, to figure out the input resistor you simply use this formula:

InputResistor = (InputVoltage - LED-FowardVoltage) / LEDCurrent

The LED requires a minimum of 4mA to trigger an "on" state on the output and can go as high as 25mA.

So in my case, assuming that I want to draw as little current as possible I'd use a 5.6k resistor:  (24v - 1.5v) / 0.004. At 4mA the resistor would have to dissipate 0.096 watts (24v x 0.004 Amps = 0.096 watts) so a 1/4 watt resistor would be more than ok.

It's my understanding that HVAC systems can be sensitive to foreign loads so it's a good idea to keep the draw as little as possible.


I originally calculated 2.2k ohms, opting to stay well above the minimum current for an 'ON' condition.  I had no idea how finicky they might be.  Ultimately, I tacked a 10K SMD resistor I had laying around onto a test board and it worked fine, so I went with that value.

Go Up