Shop OBEX P1 Docs P2 Docs Learn Events
With a lower voltage out uC like the prop, are PNP's a better option? - Page 3 — Parallax Forums

With a lower voltage out uC like the prop, are PNP's a better option?

13»

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-09-27 08:56
    I felt a bit guilty about my post, a bit of a rant. I still prefer 2n2222s and 2n2907s as a starting point for designs.

    But attached is a schematic that is supposed to drive a power MOSfet from a 2n7000 specifically in a Propeller context.

    My greatest problem is that a power up, I fear the motor will momentarily jump before the software boots up. Does anyone care to pass judgment on whether this will cause a jump or not. I suppose if a motor is to be engaged, a safety relay might lock out the +12 to motors during the power up/boot process. A LM555 could implement an independent delay.

    Yes, the 2N3055s will handle up to 180watts of output @ 24V - great for audio amps. But I'd rather listen at 10-15 watts of output. Rock n' Roll may live forever, but my ears won't.
  • turbosupraturbosupra Posts: 1,088
    edited 2010-09-27 09:36
    Cluso,

    As an FYI, when they migrated the forum it broke your links.

    I 45-ed my remaining 90's and added 1 decoupler. As for decoupling the props power and ground pins. Should all 4 pins have there own decoupling cap (ceramic I assume?) or should there be one for vcc and one for ground?

    Also my prop vcc pins are tied together, but my ground pins are not directly tied together, is that what you meant?


    Bobb Fwed wrote: »
    View attachment.
    Comments in Red.
    It's a good idea to look at others' boards and the other threads Cluso mentioned are a good read. Maybe we can find those and post a link.

    Cluso99 wrote: »
    It is more common to have the ground plane on the bottom and power on the top.

    You should also check out the other threads discussing pcb layouts for the prop. Your power supply to the prop is not ideal as both sets of the power and ground pins should be directly connected and have decoupling. I published extracts of my TriBlade on one of the threads discussing pcb layouts which should help.

    Definately do not use right angle traces for anything. You will just be asking for problems.

    All ICs require a decoupling cap, as do the input and output of the regulators - you should check the regulator specifications for recommendations as they vary.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-09-27 10:09
    turbosupra wrote: »
    Cluso,

    As an FYI, when they migrated the forum it broke your links.

    I 45-ed my remaining 90's and added 1 decoupler. As for decoupling the props power and ground pins. Should all 4 pins have there own decoupling cap (ceramic I assume?) or should there be one for vcc and one for ground?

    Also my prop vcc pins are tied together, but my ground pins are not directly tied together, is that what you meant?
    Just the Vcc needs to be decoupled. The ground pin would be decoupled to what? Ground? I think your Prop decoupling is sufficient, but your other ICs are not decoupled (EEPROM, Shift Register, and BCD).

    One thing I've found is that the propeller is very prone to resetting from external EMI. If your board is going to be near transformers, relays, or anything with inductance, there is a good chance your propeller could randomly reset. What I have done to solve this, is simply put a 0.1µF capacitor connected to the RES pin (put it close to the Propeller). This won't affect functionality at all, but will prevent unexpected resets.
  • turbosupraturbosupra Posts: 1,088
    edited 2010-09-27 10:51
    Thanks Bobb!

    I'll get to adding that in and post up another pcb very shortly. Which pin needs coupled on the eeproms?


    Is this ok, with the cap "body" overlaying the trace like this?

    coupleroverlay1.png



    Bobb Fwed wrote: »
    Just the Vcc needs to be decoupled. The ground pin would be decoupled to what? Ground? I think your Prop decoupling is sufficient, but your other ICs are not decoupled (EEPROM, Shift Register, and BCD).

    One thing I've found is that the propeller is very prone to resetting from external EMI. If your board is going to be near transformers, relays, or anything with inductance, there is a good chance your propeller could randomly reset. What I have done to solve this, is simply put a 0.1µF capacitor connected to the RES pin (put it close to the Propeller). This won't affect functionality at all, but will prevent unexpected resets.
  • Bobb FwedBobb Fwed Posts: 1,119
    edited 2010-09-27 11:18
    Pin 8 on the EEPROM needs to be decoupled (that's the Vcc pin).

    The capacitor question is a bit tricky, the safe answer is no. But I think it's fine if it is a low frequency capacitor (like a power-line capacitor). But for decouple caps, it's a bad idea, and anything that requires fast frequency response, it's a bad idea. If the trace is a power trace, fluctuations in current (even small ones) would affect the capacitor. If it is a signal trace, the capacitor could affect the signal.

    Hope that answers your question.
  • Al BoothAl Booth Posts: 137
    edited 2010-09-27 11:37
    Beau,

    Thank you for your equivalent circuits. They really clear up some of this.

    Do Darlingtons (TIP120, MPSA13,...) have the same problem?

    Thanks,
    Al
  • turbosupraturbosupra Posts: 1,088
    edited 2010-09-27 12:18
    Ok,

    I've altered it to be more safe.

    I actually don't think the eeprom was connected to 3.3v? So I made an adjustment to that.


    What I'm not sure about is why pin 1 and 8 are at 3.3v, the basic template for the propeller, someone else gave me. Do you see any problems with u2 and u3? I believe I only have one 32kb eeprom on my board, not two. I'm guessing the original file creator has redundancy in there for some reason?


    eeprom1.png



    Bobb Fwed wrote: »
    Pin 8 on the EEPROM needs to be decoupled (that's the Vcc pin).

    The capacitor question is a bit tricky, the safe answer is no. But I think it's fine if it is a low frequency capacitor (like a power-line capacitor). But for decouple caps, it's a bad idea, and anything that requires fast frequency response, it's a bad idea. If the trace is a power trace, fluctuations in current (even small ones) would affect the capacitor. If it is a signal trace, the capacitor could affect the signal.

    Hope that answers your question.
  • turbosupraturbosupra Posts: 1,088
    edited 2010-09-28 06:48
    This is absolutely my goal as well, I'm tired of having to order from mouser, wait 4 days and then start back on my project, I'm definitely looking for an end all solution of a handful of transistors. My projects are automotive and simple because of that, I don't need exotic parts for switching frequencies, etc.

    So you trigger the 2n2222 with the prop for most of your apps, and if it requires more than 600mA, you add the IRF540 and trigger it with the 2n2222?

    When you refer to the current limiting resistor, are you talking about the base or the collector of the 2n2222?




    And most importantly, these days my main goal is to have merely 5-6 transistors on hand that will nearly do everything. I no longer have to clone each circuit that I find on the web with hard-to-get transistors.




    Three component to turn on and off a relay seem a bit excessive. So here is my 2 cents.

    You can generally rely on 2n3904 for a first stage of output from a Propeller, but with the 2N2222 you can actually achieve more gain and often avoid needinga second stage. And 'yes', the current limiting resistor is extremly wise even if it seems not to be required (as in the 2N7000).

    At first, I was a conservative (a paranoid conservative with grandiose designer ambitions, maybe) and wanted opto-isolators on everything. But they are less responsive and have less power output (150ma at tops) than the 2N2222 (which some say can switch 640ma).

    And then I got into Darlingtons of all sorts (an idiot zealot). The UNL2803 package is so tiny when you want 8 parallel lines, I considered that superb. But being in one package limited how much they really could sustain at full on of all 8 lines to about 60ma per channel. Darlingtons are very much about heat and sizzle.

    So back to the 2N2222....

    And then, MOSfets came along and the 2N7000 seemed to be leading edge (a masterful engineer?). So I began to pursue that. What a mess! They do work --- when you get it right. But there are more things that can go wrong (Did you know that putting one in backwards turns it to smoke because of the by-pass diode). So with both with fears of static electricity and mysterious handling damage, why bother with having to have a pull down to assure they are off or a pull up to assure they are on? They are just too sensitive.

    So once again, it I am back to the 2N2222 as my preferred choice.

    Sure I do have a few 2N3904 sitting around and often they are all I need. And I even have their mate, the 2n3906. But I have put a stop to buying more. And yet if I restock, I can buy 2N2222s and 2N2907s for the same price and complete more circuits with just one transistor rather than stages.

    I do have power MOSfets (IRF540s) now and I finally understand that they are better than power Darlingtons. But I suspect I'll just drive them from a 2N2222 for the first stage rather than being "a purist" that uses the 2N7000 to drive a bigger MOSfet as an 'all MOSfet' solution. I can afford to waste a full milliamps for the sake of a lot less construction frustration.

    And most importantly, these days my main goal is to have merely 5-6 transistors on hand that will nearly do everything. I no longer have to clone each circuit that I find on the web with hard-to-get transistors.

    I'll save my opto-isolators for long transmission lines that might get zapped by lightning - I think that is what they were originally intended for. If you really, really are afraid of damaging your Propeller I/O, you should build your board using the 40 pin DIP Propeller, leave it out until after you have completed the board and after you have tested all the pins for wrong voltage and short circuit.

    The opto-isolators are just like Linus's security blanket, excess baggage.

    If I really, really must have isolation these days, there is nothing wrong with a 2N2222 driving a 12 volt mechanical relay. You can get some really rugged 40 amp automotive relays that love to wallow in mud and grease, but don't create the heat that a power transistor does. Of course they are slow, but so are the opto-isolators.

    My only remaining dilemma is what to do with those chunky 2N3055s that thought would be so necessary for robotics.

    Have I learned anything? I hope so.
  • Heater.Heater. Posts: 21,230
    edited 2010-09-28 07:16
    Loopy Byteloose:
    Yes, the 2N3055s will handle up to 180watts of output @ 24V - great for audio amps. But I'd rather listen at 10-15 watts of output. Rock n' Roll may live forever, but my ears won't

    Ah but, the John Linsley Hood amplifier is a famous and highly regarded audiophile amp design.
    It operates in Class A so as to avoid crossover distortion problems.
    As such it is not very efficient and is intended to be used at low power outputs.
    Less than 10 or so. One watt is often quite loud enough.

    This is way off topic but your Propeller Bots really do need sound output don't they?
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-09-28 07:20
    I posted a later schematic that has a 2N7000 triggering a power MOSfet. That is claimed to be proven as a two component set up - though I've no idea of actual upper limit in Hz or KHz of the switching.
    Generally current limiting resistors are used on the base of BJTs to either/or protect the micro-controller or to limit the on condition below saturation. I was referring to protecting the micro-controller.

    Much of the discussion here has been about using an NPN to PNP to MOSfet and I suspect that is the best route for power MOSfets with BJT driving them. I am beginning to see that it is superior.

    Why so? Most power MOSfets really want a 10v signal to turn them on. As you go lower, the ON resistance climbs dramatically and means more heat. And when you get below 4 volts, there are real questions of whether they will turn on at all.

    That PNP in between assures the 10 volt signal.

    So the fork is either a 2N2222 and a 2N2907 to a power MOSfet or a 2N7000 to a power MOSfet.

    You can use a 2N2222 to directly drive automotive relays and eliminate hot power transistors as a factor in your installations. I am not sure that you really need power MOSfets. The trade-off is the relays may be a source of transients that have to be filtered from the micro-controller's power source. Using a good automotive accepted voltage regulator and an MOV that removes any transients higher than the max voltage of the voltage regulator should clean up that side of the issue.


    AND Yes, you have gotten me curious about 2n3055 audio amps. A very nice design and I am sick of hearing that tubes are the only true audio in the world.
  • Heater.Heater. Posts: 21,230
    edited 2010-09-28 08:05
    Loopy Byteloose
    ...I am sick of hearing that tubes are the only true audio in the world.

    Just as well I did not mention that then :)

    One of my goals is to find that ideal project that demands a Prop and some tubes.
    Bit like driving FETs really. Just hotter.
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2010-09-28 09:48
    Once upon a time I had a dozen or so matched pairs of 12AX7s from Tektronics that I bought for 25 cents a pair. I suppose those would work well with a Propeller. I hung on to them for years, but then threw them in with a deal on a Fisher 500c FM Stereo that I sold at a garage sale when I finally decided to stay in Taiwan.

    Audiophiles just get too flaky about the engineering side of things for me. I had a buddy that was heavily into tube pre-amps and one day I handed him a tiny IC pre-amp from Radio Shack that was as good or better than anything he had and asked if he could really hear the difference. He claimed he could.

    A few months later he had his hearing tested and found that he had flat spots in his range of hearing. I've never seen a guy so depressed.

    Tubes require substantial high voltage, generate a lot of waste in the form of heat, and are now extremely expensive to replace. Beside, it is the engineering that is fun for me, not the collecting.

    ~~~~~~
    On another front.....
    I have been thinking about driving a power MOSfet directly from the Propeller with a pulsed output and a set of diodes using a voltage doubler or voltage tripler. You just toggle on and off at the proper rate to get the higher voltage.

    Gunther had examples of how to do this in his SX manual with the SXes and I always thought the current output was too low for any useful application. But MOSfets don't require much current.

    It is a bit weird, but it should work fine with maybe an extra capacitor to reduce ripple on the output of the final stage.

    Let's see..... 3.2 volts tripled is ideal, nearly 10 volts.
  • Rick_HRick_H Posts: 116
    edited 2010-09-28 10:03
    I agree that op amps are much better than tubes in efficiency and performance without the need to use high voltages. The only exception is instrument amplifiers where the soft clipping and phase change over gain is used as an effect. Their is nothing so far that can emulate or compare to a real tube amp in this application. Like tape compression is still used today for a compression effect on recording it has some distinct advantages over emulators in that it just works the way you like to hear it right off the bat, no messing around.
  • Rick_HRick_H Posts: 116
    edited 2010-09-28 10:09
    Heater. wrote: »
    Loopy Byteloose



    Just as well I did not mention that then :)

    One of my goals is to find that ideal project that demands a Prop and some tubes.
    Bit like driving FETs really. Just hotter.



    Oooo I have one for ya, make a current sensing regulator for the cathode bias resistor, in alot of HiFi Smile they add stuff to regulate it over time.
  • turbosupraturbosupra Posts: 1,088
    edited 2010-09-28 15:06
    Does anyone see any faults with my most recent PCB? (expresspcb file also attached)


    attachment.php?attachmentid=73551&stc=1&d=1285735004
  • youngbillyoungbill Posts: 54
    edited 2010-10-02 00:35
    turbosupra wrote: »
    So is this what the consensus is? I believe this would give me 3.6mA ? or would it give me 1mA? I'm a little confused after reading all of the posts, but trying to learn/understand.


    transistornpnwithpnp1.png



    Phil, I will download that software tomorrow, it has to be better than paint :)
    Great thread,lots to learn just reading it.
    My questions are
    #1,I looked up spec sheet on 2309 no iB is listed,,Is this ICBO? (even then that column was blank) ie How is 3.9k base resistor determined?

    #2 How do I pick a suitable transistor for Q1,,ie what specs do i need to look at,( if its just to go to saturation do i need to know how to read the correct graph, or can I just look at the absolute maximum rating specs?

    From page one dwg
  • TappermanTapperman Posts: 319
    edited 2010-10-02 14:02
    youngbill wrote: »
    Great thread,lots to learn just reading it.
    My questions are
    #1,I looked up spec sheet on 2309 no iB is listed,,Is this ICBO? (even then that column was blank) ie How is 3.9k base resistor determined?

    I'm no expert, but it seems to me you'd want as much resistance between the +12v and the propeller pin as possible, should the Q1 suddenly become defective and allow current to flow from the collector to the base lead with little resistance.

    That would put your 3.9K in series with the 4.7K to the propeller pin.

    ... Tim
Sign In or Register to comment.