What is the purpose of the output resistor in a MID400 line monitor setup?

In the MID400 data sheet and the application notes a resistor is always shown between pins 6 and 8 in the example circuits. Pin 8 is the output circuit supply voltage, pin 6 is the output terminal, turned on when the input power goes low.

What is the purpose of this resistor? And how do you calculate its value?

It has the same purpose that the 10k pull up resistor has on the Arduino when a switch is used.

The output of the device is an NPN transistor that switches to gnd. It has to have a voltage level for the driven device to detect a change when it is switched.

The value can be any value from 1k to 39k or there abouts. Usually a value of 10k is used.

Weedpharma

You don't need to calculate the value, you trust the manufacturer's datasheet. If you
do want to calculate it you'd need to know the output transistor capacitance and leakage
and your desired bandwidth. Personally 300 ohm seems very low, but the whole device
is power hungry in the first place.

I'm very new to the hardware side of electronics, so I may be more confused than I originally suspected. I have the circuit assembled and it is working, but I'm wrestling with the idea of that resistor. I think I was imagining the internal workings of the MID400 backward originally.

So is the following correct?

  1. When the AC line is OFF the MID400 output switch is "closed" in that the 6 is connected directly to ground giving the Arduino a LOW reading.
  2. When the AC line is ON the MID400 output switch is "open" and the 6 is disconnected from ground and the pull-up resistor gives the Arduino a HIGH reading.

As already mentioned , it is a standard pullup resistor used on the collector of a transistor. When the transistor is ON, output=LOW (0v). When OFF, output = HIGH (Vcc). This means the output is "ACTIVE "LOW. This kind of pullup resistor can be seen on literally thousands of circuits.

MarkT:
.............. Personally 300 ohm seems very low, but the whole device
is power hungry in the first place.

The app notes use a pull up of 4.7k.

Weedpharma

DieselDM:
I'm very new to the hardware side of electronics, so I may be more confused than I originally suspected. I have the circuit assembled and it is working, but I'm wrestling with the idea of that resistor. I think I was imagining the internal workings of the MID400 backward originally.

So is the following correct?

  1. When the AC line is OFF the MID400 output switch is "closed" in that the 6 is connected directly to ground giving the Arduino a LOW reading.
  2. When the AC line is ON the MID400 output switch is "open" and the 6 is disconnected from ground and the pull-up resistor gives the Arduino a HIGH reading.

From the app notes:

"Consider the test circuit shown in Figure 2. Back-to-back input diodes D1 and D2 each conduct on every half cycle of the AC input waveform, producing 120Hz light pulses. The light output causes the photodiode to conduct, raising the potential of the input to the amplifier, and in turn driving the output NPN transistor ON. When input current is removed, light from the two LED’s ceases, charge established by the photodiode current on the input amplifier leaks away, and the NPN transistor turns OFF"

Therefore when the ac is not present, the output (the NPN transistor) is off. With the tie up R, there will be 5v on the output.
When the ac is present, the output goes low taking the output voltage to zero.

Weedpharma