I have a part that classifies what kind of power I get on ethernet by presenting different loads. For example, the part needs to have a 100 Ohm resistor across two of its pins, and the part will output a high on its output pin if the power is good (Ethernet is able to supply power). The device then switches to a 30 Ohm resistor, and if Ethernet gives it power, it'll output another high. Then it'll switch to let's say a 10 Ohm resistor, and maybe Ethernet will not supply any power, so it'll output a low.

So, the microcontroller needs to be able to disconnect and connect different resistances. When testing the 100 Ohm resistor, the 30 Ohm and 10 Ohm needs to be disconnected. When testing the 30 Ohm, the 100 Ohm and 10 Ohm needs to be disconnected. So, I know that I can use an optocoupler to connect/disconnect a resistor from the two pins from this testing part. All I have to do is output a high from the microcontroller, and the resistor will be connected.

So, essentially, I need a way of switching on and off without affecting the resistance values. I don't want to use optocouplers because they're expensive. What can I do this with? Can I use a transistor as a switch? If I do, does this affect the resistance value that the part reads across its two pins?

  • \$\begingroup\$ Why not use a digital pot? \$\endgroup\$ Commented Oct 11, 2012 at 23:49
  • \$\begingroup\$ @ignacio-vazquez-abrams - Can you show a digital pot of 10 ohms that can handle as bias of 35 to 65 volts across it. \$\endgroup\$ Commented Oct 12, 2012 at 1:36
  • \$\begingroup\$ @Jack Since you wrote that you don't want to use optocouplers, because they are expensive, I have to point out that you can get a digital optocouplers for $1 per channel (or less, see Jameco for details). That's less than a small cup of coffee. \$\endgroup\$ Commented Oct 12, 2012 at 1:59

1 Answer 1


It doesn't sound like you need very precise control over the exact resistances. Are you just trying to see at what point you cause enough of a load that the line drops? In that case you can just hook up each of the three resistors with a mosfet.

Here's an example:three resistors connected

Essentially, you have your microcontroller pull CTL1 high to connect R3 (oh jeeze I mixed these up), CTL2 high to connect R2, and CTL3 high to connect R1. Assuming that ETH_IN+ and ETH_IN- are at voltages far enough apart that the control voltage relative to ETH_IN- is "large" (i.e. more than a volt or so) this will definitely pull the rail low through the resistor.

That being said, it will also slightly affect the resistance, but not substantially.

Hope that helps!

Note that if you're willing to do tiny surface mount parts you can get super cheap mosfets (about 14 cents each on Digikey for one that can have a drain of up to 350mA continuous).

Or about 75 cents for a through hole one.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.