• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Ethernet disconnection circuit

Status
Not open for further replies.

crosstalk

New Member
Since I am new to this forum, please tell me if I've messed up at anything...

I am working on a system that will only allow an ethernet connection when my computer is booted into Linux (and not Windows.) I have decided I would use a microcontroller (an Atmel SAM9) to connect to the host computer via USB. It has a built in controller.

I am trying to make it disconnect the ethernet (as if it were physically unplugged) unless software tells it via USB to connect the signal. I have looked at two methods, transistor switching and relay switching.

Transistor switching is the option I would prefer, to keep it all solid-state. However, transistors generally are polarized (power goes in one direction, in case I got the term wrong.) Additionally, they have a resistance and voltage drop associated with them. They may not pass high-frequency digital transmissions. However, they would probably need less power than relays, which keeps it simpler.

Relays, on the other hand, are like physically connecting and disconnecting the wires. I don't have many worries about voltage drop and resistance with them. However, they do use more power (and may not run entirely off USB, which only guarantees 100mA.) Also, I have seen that with physical switches "bouncing" can be a problem. I would need some way to alleviate this.

I would prefer to use transistors, but which type should I use? The switching will be accomplished by connecting the base/gate (depending on the type) to positive/negative power (again, depending on the type.) For relays, a transistor will connect them to a power source, which I will have to work out (external?)

Thank you for any help or suggestions.
 

dougy83

Well-Known Member
Using a relay is the simpler solution to using transistors. Bear in mind that Ethernet uses isolated transmissions lines. If you're worried about power consumption, 'sensitive' relays and some reed relays have very low current draw.

I don't believe contact bounce will be a problem; manually plugging/unplugging of the cable creates plenty of bounce, and Ethernet adapter can handle that just fine.
 
Last edited:

crosstalk

New Member
I did think about the fact there could be bounce from plugging/unplugging the cable, but I didn't think you could really compare them (I thought they might generate pulse trains too different to compare.) Combined with the existence of low-current draw relays, I think I'll just use relays to switch them. Using DPST or DPDT (probably DPDT, I don't think DPST is common) relays, I should only need four of them and a transistor (to switch power.)

EDIT:
Do relays draw more than the coil current if they are fed power at their specified voltage? If so, Would I need a resistor, to not use too much current? It also appears I'll need a diode to protect from spikes when the coil is energized or de-energized. Is this correct?
I will probably be using the relay PB1107-ND (DigiKey part number.) This has a 16mA coil current and is DPDT. Thus, I'll need four -- at 64mA total. I'll have to see about the power scaling on the AT91SAM9261 (I think I can limit the power draw with the clock speed, but that would be another topic in a different subforum.)
I would have used latching relays, but I don't want the additional complexity (and expense) of using capacitors to store power for a burst of current capable of switching all the relays simultaneously.

Thank you. (I was hoping for an answer as simple to implement as this.)
 
Last edited:

marcbarker

New Member
You can disable the Ethernet Card from within Windows, in the Hardware setup. I think it might switch off the card into power saving.
 

dougy83

Well-Known Member
Do relays draw more than the coil current if they are fed power at their specified voltage? If so, Would I need a resistor, to not use too much current? It also appears I'll need a diode to protect from spikes when the coil is energized or de-energized. Is this correct?
No, the relay coil draws its rated current when the rated voltage is applied - much like a resistor (the coil wire has resistance); so no extra resistor is required if you're running it from the correct voltage. Yes, a free-wheeling diode would be a good idea; you can share a single diode between all 4 relays.

As an aside, 10/100 Ethernet only uses 2 wire pairs; gigabit and above uses all 4. This could affect the number of relays you wish to use.
 

crosstalk

New Member
I did think about disabling it within Windows, but I simply don't trust it. Also, this is more educational (and cooler.)

Even though, for now, I'm using 100Mbps, I want it to be compatible with gigabit ethernet, so I'll switch all the pairs.

I thought they drew their coil current at their coil voltage, but I wasn't sure. I won't rely on anything if I'm not sure -- probably why this is taking me so long.

I figure I can just stick a diode between the transistor and the relays, that protect it. I'm just a little cautious because I could potentially also fry my computer (or, at least, the USB interface.)

Thank you all for your help.
 

dougy83

Well-Known Member
I figure I can just stick a diode between the transistor and the relays, that protect it. I'm just a little cautious because I could potentially also fry my computer (or, at least, the USB interface.)
The protection diode goes across the relay coil; the cathode to the more positive side and the anode to the less positive side of the coil. The diode conducts the back-EMF when the relay is switched off.
 

crosstalk

New Member
The protection diode goes across the relay coil; the cathode to the more positive side and the anode to the less positive side of the coil. The diode conducts the back-EMF when the relay is switched off.
Thank you for catching that, I'll make sure to do that.

I could just wire them all in parallel and have the diode go across those lines, correct?

Thank you for all the help.
 

dougy83

Well-Known Member
Yep, just make sure the diode is the right way around.
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top