5vdc from paralell port, not enough???


Results 1 to 9 of 9

Thread: 5vdc from paralell port, not enough???

  1. #1
    Member thuffner3's Avatar
    Join Date
    Oct 2003
    Location
    Cincinnati, OH
    Posts
    127
    Downloads
    0
    Uploads
    0

    Default 5vdc from paralell port, not enough???

    Hello all,
    I'm using a laptop to run TruboCNC. ANd I have a couple of relays that need to be powered via the paralell port. At this point the power through the paralell port is not enough. What is it I need to do to get enough power??

    TIA
    Neil

    Similar Threads:


  2. #2
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24223
    Downloads
    0
    Uploads
    0

    Default

    Drive the relays from 2N7000's 'Fetlingtons' at a few cents each and use 12vdc relays or use whatever voltage you have the handiest.
    Al

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  3. #3
    Member thuffner3's Avatar
    Join Date
    Oct 2003
    Location
    Cincinnati, OH
    Posts
    127
    Downloads
    0
    Uploads
    0

    Default I'm sorry Al

    I'm sorry Al, I should have said I don't have that much experience with electronis. The relays are already hooked into the board. The board is from Eftech. This so far has not been a problem. But I have a few files I want to carve that I really don't want to stand around and wait for the machine to stop to shut everything down.

    I guess I'm looking for a schematic.

    Neil



  4. #4
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24223
    Downloads
    0
    Uploads
    0

    Default

    Neil, There have been a few posts before on the subject, if you do a search for 2n7000 it should turn them up, I think this might be some thing like you want http://cnczone.com/forums/showthread...92&page=6&pp=5
    Let me Know.
    Al

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  5. #5
    Registered
    Join Date
    Nov 2004
    Location
    USA
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default

    You must add a resistor to leak charge from the FET gate. If you disconnect a cable and touch the pin with your finger, then a spindle or whatever else you control with the relay will turn on - no good at all! And if you pet a cat first or wear synthetics clothing, then the FET may go south if you touch its gate pin.

    Add a resistor between 50 kiloohm and 1 megaohm between the gate and circuit ground. It will keep the spindle off when cable is disconnected or laptop is off, and drain those stray feline electrons to the ground, so that they do not accumulate in the gate till it bursts...



  6. #6
    Member thuffner3's Avatar
    Join Date
    Oct 2003
    Location
    Cincinnati, OH
    Posts
    127
    Downloads
    0
    Uploads
    0

    Default You have to run that one by me again.

    Well that post went totally over my head.



  7. #7
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24223
    Downloads
    0
    Uploads
    0

    Default

    What he was getting at is the pin on the 2n7000 that connect to the port should have a resistor to ground to bleed off any spurious noise that may destroy or trigger the FET, if you keep the port connected it usually is not a problem, only when you have it disconnected and the external circuit is powered is it a problem. You can use a resistor to common as he suggested and I a have also used a 12v MOV (metal oxide varistor) this is a special resistor that its resistance decreases as the voltage across it increases, thereby providing a low impedance path to common or ground.
    Al

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  8. #8
    Registered
    Join Date
    Nov 2004
    Location
    USA
    Posts
    12
    Downloads
    0
    Uploads
    0

    Default

    Yes, exaclty, thanks for the clarification!

    A FET requires no electrical current to operate its gate, rather some charge. Gate is completely (order of hundreds megaohm) isolated from the source-drain structure, and its capacitance is very very small, especially in a small transistor like 2N7000. F in FET is for field - electrical field of the gate opens the transistor. Since we want a small charge to do bigger things, we must keep the gate as close to the junction as possible, to have it affected by gate field - usually a layer just a few hundred atoms thick separates it from the junction. This construction posesses a few interesting properties (which may be useful or bad, or "parasitic", depending on the application).

    First of all, small gate capacitance means that a very little charge will develop high voltage (V=q/C) and strong field enough to open the transistor. This means that if you touch the gate with your finger, you may supply enough charge to open the FET and turn on a load. Second of all, add a little more charge, and the field becomes strong enough to irreversibly break down the thin dielectrical layer insulating the gate. This means that if you touch the gate pin at an unlucky moment when you accumulated more charge than usual (dry air from an AC, nylon and pets are most often responsible), the charge will break the FET. Third of all, the charge, once on the gate and causing the transistor to open, has nowhere to go, so that the FET will stay open until you touch it with the finger but this time wearing a grounding strap.

    A simple and effective solution for all of these problems is a resistor connected between the gate pin and circuit ground. It does not allow tiny charges to develop high field strength by simply draining these charges to ground, so some current is necessary to sustain gate potential; it also obviosly allows the FET stage to turn off when its input is disconnected.

    I drew some schematics for FET and BJT switch stages on the attached picture, and I want to note key design parameters for these switches.

    FET switch design

    The smaller is the resistor the better, as the stray charges will have less chance for turning the switch on, but it must be large enough not to exceed control signal source rating. Older parallel ports could only source as little as 2mA of current. Specification guarantees +2.4V for logical "1" level, so the lowest resistor value would be R1 = 2.4V/2mA = 1.2kOhm.

    The FET selected for the circut must be almost fully open at Vin, which is only 2.4 V for a parallell port. You should look at its two parameters: gate threshold voltage (Vgs(th)) and resistance in "on" state, Rds(on). The first is the minimum gate potential that "cracks open" the fet. The second is the resistance of the open FET, specified at some gate voltages. For example, for 2N7000, Vgs(th) is 2.1V typical, 3.0V maximum, which means that some samples of this device won't even open from a parallel port pin (yours most likely will, but if I specified this FET for a production device, it would be a disaster!). From Fig.5 in the data sheet, we can see that it takes about +3.5V at the gate to turn on a 200mA load. Rds(on) helps calculate device power dissipation to ensure it does not overheat. For a DC drive, such as a spindle on/off control, P=Rds(on)*Iload^2 (^2 is for "squared").

    I do not remember which FETs fully open at 2.4V - I'll check some databooks later when I have chance and post it.

    Generally, a FET stage is beneficial when large current is switched, since it allows switching large (10s A) currents using voltage signal that has no current requirements. For a relay drive, a BJT would work better.

    BJT switch design

    BJT is a current-controlled device: current going into collector directly proportional to base current. The coefficient, essentially a transistor amplification, is specified as h[fe] in modern data sheets, but in the older ones was designated as β (greek beta). Base voltage Vbb of a BJT does not depend on base current, and rather only on its semiconductor material; for silicon, Vbb=0.7V. This means that a BJT switch has theoretically zero input impedance, and the current of control circuit needs to be limited. This is done also with a resistor, but this time in line with the control wire (see the right schematic).

    The same rule, take all current the source provides, still applies here - this will yield the most noise-resistant circuit. The resistor is calculated from the Ohm's law, but do not forget the Vbb offset: the voltage accross R1 is (Vin - Vbb), and the resistor value is R = (Vin-Vbb)/i. Using the same values as for a FET sample, R = (2.4V - 0.7V)/2mA = 850 Ohm. This is, again, the smallest value that will not overload the parallel port; the resistor can be larger as long as smaller base current is enough to open the transistor.

    This last statement is actually a criterion of transistor selection: select one with h[fe] high enough for the transistor to open "as wide as possible", or saturate, given the required load current. For example, for out parallel port switch, if we want to engage a relay requiring Iload = 100 mA, and we already limited base current to 2 mA above, then the minimum h[fe] we can use is 100mA / 2mA = 50. It is a good practice to multiply it by 2 to 4, since actual h[fe] will differ from the one given in the data sheet depending on voltages and currents of a particular circuit mode. Of medium-power popular transistors in through-hole packages, I can call PN2222, 2N4401 and 2N3704 fitting the requirement. Make also sure that maximum collector-emitter voltage, Vceo, is not exceeded. For power calculation, note that voltage accross any saturated silicon transistor is in the range of 0.1 to 0.3 V; use P = 0.3V * Iload to calculate the DC power and check that is is also not exceeded.

    Generally, BJTs are insensitive to statics and far more immune to stray charges; I think that I would specify a BJT for OP's application rather than a FET. BJTs are not used for large current switches, since they are essentially current amplifiers, and "power" BJTs capable of 100A switching are usually no good amplifiers at all, with h[fe] as low as 10 - which means you need 10A to switch on 100A, so you add another BJT to turn on 10A but you need say 500mA to turn it on, so you add a third and the fourth one to switch the load on from a parallel-port like source - where you could use only one FET.

    Circuit protection

    You can use a Zener diode, a metal-oxide varistor or a combination if the two, depending on possible surge voltage and energy.

    A Zener diode, just like a normal diode, does not conduct in reverse direction - but only until a specified voltage, when it suddenly "breaks" and conducts. The breakage is not permanent - it closes as soon as voltage drops back. They limit voltage to their rated voltage, and thus are ideal overvoltage protectors. There are devices for 3.3V and up to 200V rated for up to 5W of power.

    MOVs do not have such abrupt turn-on characteristic, and rather decreas resistance slowly as voltage grows; typically, low-voltage MOV will allow through a 5 times its rated voltage spike given sufficient surge energy (note that this is an extreme condition, like when a signal source is being fried by a lightning). MOVs, however, are capable of absorbing huge charges, compared to Zeners, and are also bi-polar devices, working equally good in both AC and DC application. Low-voltage MOVs are rare (I see only one deivce for 3.3 V application, in Littlefuse ML series, but it is available only in surface-mount chip case).

    Note that a schematic file on the left shows both Zener and a TVS connected in parallel; use either but not both - simply connecting the two like this will not increase protection.

    In many practical application, a Zener is a more usual choice. They have industry standard numeration: use 1N53xx for 5 Watt, 1N47yy for 1W devices, see the tables and choose the lowest voltage just above the maximum allowed voltage. For a parallel port, 5V is specified as the maximum, so use a 5.1 or 5.6 V zener. Use the tables to select a device in each series:

    1N53xx, 5W: http://rocky.digikey.com/WebLib/On-S...0%20SERIES.pdf
    1N47yy, 1W: http://rocky.digikey.com/WebLib/Diod...odes%20Inc.pdf

    You will not go wrong selecting a higher power device, unless there is a board space, price or similar concerns (yes, they are all under US $1 each for one, which is quite peanuts unless you are protecting 42 lines in a 420,000 batch of units ) Motorola's ON Semiconductor also makes energy-rated Zeners specially for surge protection.

    SO?

    So, personally, I would use the schematic on the right, transistor PN2222, 2N3704 or 2N4401, R1 = 1 kOm, D1 = 1N5339 (5.6V), and the diode at the relay coil same 1N5339 for Vcc=5V, or 1N5350 for Vcc=12V, or 1N5360 for Vcc=24V.

    SEE ALSO:

    http://www.lvr.com/parport.htm
    http://www.hut.fi/Misc/Electronics/c.../lptpower.html

    Datasheets:

    http://www.fairchildsemi.com/ds/PN/PN2222.pdf
    http://www.fairchildsemi.com/ds/2N/2N7000.pdf

    Attached Thumbnails Attached Thumbnails 5vdc from paralell port, not enough???-fetvsbjt-png  


  9. #9
    Gold Member
    Join Date
    Sep 2003
    Location
    USA
    Posts
    552
    Downloads
    0
    Uploads
    0

    Default

    This is another example and the link is was aquired from.

    http://www.cs.uiowa.edu/~jones/step/circuits.html

    Darek

    Attached Thumbnails Attached Thumbnails 5vdc from paralell port, not enough???-7-gif  


Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

5vdc from paralell port, not enough???

5vdc from paralell port, not enough???