Shop OBEX P1 Docs P2 Docs Learn Events
A few electronics questions: Pullup resistors and transistors — Parallax Forums

A few electronics questions: Pullup resistors and transistors

DiablodeMorteDiablodeMorte Posts: 238
edited 2008-11-08 00:30 in General Discussion
First off: this is kinda sorta related to a parallax product because eventually I plan to use a Propeller in my final board.

Ok, now for the meat of this post:
I'm just now getting into the world of PCB creation and my current project calls for a GPS module. The project calls for the final board to be VERY lightweight so I looked into creating my own GPS module. I found this(http://www.sparkfun.com/commerce/product_info.php?products_id=163) at Sparkfun. It weighs 6.5 grams and I can't image the antenna weighing much more than that so that's a 13g total weight. I think this is acceptable but I have some questions about wiring the PCB.

The Pullup Resistors
The manual for the GPS module calls for 2 pull-up resistors. I've never taken any formal electronics courses but I think I've wired those pins correctly. Here's the exerp from the manual:
1.) Table 1 shows the required connections for Rx pins of Lassen iQ when the pins are not used for communication:
Pin # Assignment Required Connections
3 Serial Port - RxA TSIP-IN High (VCC) *
6 Serial Port - RxB RTCM-IN High (VCC) *

From my interpretation that means that pins 3 and 6 need pull-up resistors. I've tried my best to wire the resistors but I'm not sure I've done it correctly. If anyone could look at the attached picture(Number 1) and maybe confirm or deny my wiring that would be nice.

The transistors
I've never had much luck with transistors. I always seem to hit a wall-o-stupidity when ever I try to use one. What I want to do in this situation is use a transistor to turn on/off the GPS module. The GPS module seems to have two power supply pins(VCC and BATT). The VCC powers the chip, the BATT powers the onboard stuffs like RAM. I want to wire the module such that when the BI pin(on a seperate header) is driven high it would "activate" the transistor and allow current to flow to the VCC pin of the chip and thus turn it on(ie, consume more power). I want to do this so I can keep the GPS powered for things like ram but then be able to control when it is "on" and consumes the most power. Again, if anybody could look at the attached picture(Picture 2) and give me their take on my schematic.

Finally, I've attached the whole schematic, if anybody could glance over it that would be very appreciated!

Regards

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Current Projects:
Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
Robot Localization Via Xbee's - Research Stage
IR Tracking with Propeller - Research Stage
745 x 301 - 13K
931 x 265 - 15K
753 x 648 - 26K

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-21 00:12
    The problem you get into by using an NPN transistor to switch Vdd is that the base voltage needed to switch the transistor on is quite high (near Vdd) and the switching current (into the base) goes into the load (and may be enough to turn on part of it). It's much better to use a PNP transistor with the emitter connected to Vdd, the collector connected to the load, and the base grounded to turn the transistor on (with a pullup to Vdd to keep the transistor turned off otherwise). If Vdd is 3.3V, you can connect the base (through the series resistor) to an I/O pin and set that pin low to turn on the load. If Vdd is 5V, you might want to use an NPN transistor to switch the PNP transistor with the collector going to the base resistor, the emitter going to ground, and the base going through a series resistor to the I/O pin. In this case, the NPN transistor is another inverter and making the I/O pin high turns everything on.
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2008-05-21 00:36
    Ok, i've updated the schematic, see attached. While I go find my "electronics demystified" book could you explain to me why I need to use the PNP transistor instead of the NPN?

    Thanks for the help Mr. Green!


    -Regards

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Current Projects:
    Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
    Robot Localization Via Xbee's - Research Stage
    IR Tracking with Propeller - Research Stage
    231 x 305 - 5K
  • Mike GreenMike Green Posts: 23,101
    edited 2008-05-21 00:47
    What turns a junction transistor on? Current into (NPN) or out of (PNP) the base to (NPN) or from (PNP) the emitter causes current to flow between the emitter and the collector. How do you get this base current to flow? Figure it out and see what you get.
  • DiablodeMorteDiablodeMorte Posts: 238
    edited 2008-05-21 01:02
    Ok, that's helpful, but I still don't understand why I need a PNP. From that description it sounds like some of the current flows away from the load with a PNP while with a NPN all the current flows to the load. Maybe I'm still confused.. Thanks for the help though.

    Anybody have any other comments on the schematic?

    -Regards

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Current Projects:
    Robot Control Via Skype API - Dev Stage(50% Complete) - Total(25%)
    Robot Localization Via Xbee's - Research Stage
    IR Tracking with Propeller - Research Stage
  • FireHopperFireHopper Posts: 180
    edited 2008-05-21 01:12
    I may be wrong.. if so dun yell at me..

    one switches the high side, one switches the low side..
    somethings are done easier/better using one or the other.
    as to which is which.. its been soo long since electronics at votech.. so I dun think I can say.
    ·
  • Shane De CataniaShane De Catania Posts: 67
    edited 2008-10-29 13:14
    Hi DiablodeMorte (& others),
    Just wondering if any one has written any (propeller spin or pasm) code to use the Trimble TSIP GPS protocol ?... and how well did the Trimbol GPS unit work (sensitivity wise)
    Cheers,
    S


    .. sorry completely off topic I know - this was the only reference to Trimble TSIP I could fine here.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    News Flash!... Energizer Bunny arrested and charged with battery.

    Post Edited (Shane De Catania) : 10/30/2008 1:19:49 AM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-10-31 21:15
    I recommend against using straight transitors for switching the supply of a device. The reason for this is there are devices specifically design for this purpose, that remove the commonly encountered problems of transitor supply switching and they cost not much more than transitors do. The devices are call high side switches, I have used a Micrel part (MIC94062) with great success. If you are surface mount adverse, International Rectifier makes TO-220-5 high side switches, but they are designed for multiple amps of current flowing through them so they are more expensive (the smallest current device in this package has a peak current of 5A and costs $3.60 in individual quantities, whereas the cheapest Micrel part, MIC94071, can handle 1.2A continuous current and costs $0.84).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 10/31/2008 9:31:54 PM GMT
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-11-07 12:40
    I know this is kind of late in the response, but briefly what are the reasons to not use a transistor for switching power?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.

    www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
    www.sxmicro.com - a blog·exploring the SX micro
    www.tdswieter.com
  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2008-11-07 14:58
    Timothy D. Swieter,

    One of the most overlooked reasons when using a single bi-polar PNP transistor is that if the voltage level that you are switching exceeds the voltage level you are driving the base of the transistor with by the bandgap voltage value (typically 0.6V).· If that happens, the transistor will never turn "off" because the difference in voltage across the B-E junction will always exceed the bandgap voltage.· One way to fix that situation is to use a second NPN transistor and a pull-up resistor forming a HIGH-side driver.

    Another common reason is that if the base voltage of the PNP transistor can not be driven completely to the positive rail.· This may allow the transistor to turn on, but depending on the load demands placed on the PNP transistor, it may not completely saturate causing the transistor to operate in its linear mode, or hover right at the edge of its linear mode region.


    Edit:·· Actually the second·statement above·I got backwards... If the PNP transistor can not be driven completely to the positive rail, the transistor will not be able to turn completely "off" and it will try to operate in it's linear mode.· Similar reasons·to the first statement above.
    ·


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 11/7/2008 4:44:58 PM GMT
  • Timothy D. SwieterTimothy D. Swieter Posts: 1,613
    edited 2008-11-08 00:30
    Great - Thank you Beau for the explanation.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Timothy D. Swieter, E.I.

    www.brilldea.com·- Prop Blade, LED Painter, RGB LEDs, uOLED-IOC, eProto fo SunSPOT, BitScope
    www.sxmicro.com - a blog·exploring the SX micro
    www.tdswieter.com
Sign In or Register to comment.