Watt's the wattage when used on a PIC?


Closed Thread
Results 1 to 32 of 32

Hybrid View

  1. #1
    Join Date
    Jan 2010
    Posts
    88

    Default Watt's the wattage when used on a PIC?

    Hi Guys,

    As the titles alludes to, I am trying to figure out what size resistor I need when using a voltage divider on a PIC as an input trigger.

    My circuit is being powered by a voltage regulator and I have been using an optocoupler to trigger my PIC, but am trying to minimize cost, so switching to a voltage divider setup. What I am trying to figure out is can I use two 1/8 watt resistors in my VD circuit along with a .1 uF cap and Zener, to make sure my circuit doesn't go above 5 volts?

    For my 12 volt circuit, I have calculated using 10k and 4.7k, which gives me just under 5 volts. Is it safe to use two 1/8 watt resistors or should I bump the 10k to 1/2 watt or 1/4 watt? This is the only things that's stumping me. The input can either be momentary or continuous (if that matters).

    Thanks,
    Tony

  2. #2
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    See the PIC data sheet for pin ma sink or source rating.
    Ohms law is amps * volts = watts.


    Norm

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,631


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    or more appropriately


    p= v*v/r ( v^2/R)
    p= r*I*I ( R*I^2)

    12 x 12 / 14700 = 0.009 watts for the total
    I = V/R I= 0.8 Ma

    P 4K7 Resistor = 4700 x 0.0008 x 0.0008 = 0.003 watts
    p 10k R = 10000 x 0.008 x 0.0008 = 0.006 w

    I don't think you can buy a resistor that would not be ok in that circuit even the smallest 603 smd could do it easily

  4. #4
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    I'm curious so here goes: Using those resistor values in a 12 volt circuit in series should yields around 3.8 Volts across the smaller resistor. That's well below 5 volts and could be considered to be in the ambiguous range if using it for a logic high. Maybe that's what you want but again I said I'm curious if that's what you really want. Those resistors can be of any size that will give you the voltage since you aren't really drawing current from them just a voltage level. Though I don't see how these will replace the opto-coupler as a trigger.

    You say you want to use a zener with a cap and two resistors for VD clamping (may not be right term). Most zeners require a turn on current and I'm going to use 100mA as my minimum guess of that current. I'm assuming you're using the same 12 volts as the voltage divider for your source. The regulating resistor would have to drop 7 volts at .1A which means it would need to be around 70 ohms. So, I^2 x R would require it to dissipate .7 watts. You can use as many resistors as you wish to dissipate that heat but they must be at least capable of dissipating that heat continuously. You could use 6 each 1/8 watt 420 ohm resistors or one big 70 if you want. Either will work for dissipating heat.

    If this isn't what you meant I apologize.

  5. #5
    Join Date
    Feb 2013
    Location
    Quebec, Canada
    Posts
    67


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Quote Originally Posted by AvionicsMaster1 View Post

    You say you want to use a zener with a cap and two resistors for VD clamping (may not be right term). Most zeners require a turn on current and I'm going to use 100mA as my minimum guess of that current.
    With zener diodes the target is 10% of their maximum current. So for a 5V/1W zener it's maximum current is 200mA so the minimum is 20mA. 7V drop @20mA=350ohm.

    If you just want to clamp the voltage at any input the PIC have protection diodes so a series resistor is sufficient. Read the datasheet to find a reasonnable current for protection diodes. Hint: check PBP manual for the SERIN command, there is a schematic to interface RS232 without level shifter...

    HTH

  6. #6
    Join Date
    Jan 2010
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Thanks for the replies. My application is for a PCB being installed in a vehicle. The voltage is usually 13.8 volts. As I had some problems with some of my optocouplers being bad and had to replace them, I wanted to try another method (voltage divider) where you don't usually get bad resistors. I calculated 10k and 4.7k to bring it down to about 5 volts (or in my case, just under 4.5 volts). The Zener was to help maintain a max voltage of 5 volts to not damage the PIC, while the bypass cap helps to filter some of the noise in the line.

    Do everyone's suggestions still stand? It seemed like a simple problem at first, but then the more I began thinking about all of the variables, I started second guessing myself. Is there anything I should change to the setup?

    Thanks,
    Tony

  7. #7
    Join Date
    May 2009
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Why do you not just use a 47k resistor in series with the input pin. The internal diodes in the pic will clamp the input voltage anyway. No need for zeners or voltage dividers.

  8. #8
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Grahang, How are you going to limit the current?
    Dave Purola,
    N8NTA
    EN82fn

  9. #9
    Join Date
    Nov 2007
    Location
    West Covina, CA
    Posts
    219


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Quote Originally Posted by grahamg View Post
    Why do you not just use a 47k resistor in series with the input pin. The internal diodes in the pic will clamp the input voltage anyway. No need for zeners or voltage dividers.
    I've used this method too but also included a small filter cap to ground at the input pin for noise.
    The DEBUG section of the PBP manual shows this as acceptable where +-25V signals are possible to the input.
    Attached Images Attached Images  
    Louie

  10. #10
    Join Date
    Aug 2011
    Posts
    453


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Bad idea.

    See http://www.picbasic.co.uk/forum/showthread.php?t=15542 post #3 for the reasons.

  11. #11
    Join Date
    May 2009
    Posts
    40


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Dave with a 47k resistor the current at 12 volts is only about 255 Micro amps. I have used this method hundreds of times and never had any problems. The input resistor can be as high as 270K and stil works well.

  12. #12
    Join Date
    Mar 2013
    Posts
    8


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    If the input is only for a trigger (e.g.. turns on with the ignition), why don't you use a 5V reg (7805)?
    I've used them and it works perfectly.

    Badger

  13. #13
    Join Date
    Dec 2010
    Posts
    409


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Quote Originally Posted by Badger View Post
    If the input is only for a trigger (e.g.. turns on with the ignition), why don't you use a 5V reg (7805)?
    I've used them and it works perfectly.

    Badger
    And it only cost about 100x as much as a resistor, and needs filtering so add another 10x, and is slow to respond, but sure a regulator and many other complex circuits will work to sense a level that doesn't change very fast. Grahamg has the cheapest solution with a single high value resistor, if the 5V VDD supply is capable of both sourcing and sinking current. A resistor divider pair will work if the supply can source only. No need for zeners or anything else.

  14. #14
    Join Date
    Jan 2010
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Quote Originally Posted by grahamg View Post
    Dave with a 47k resistor the current at 12 volts is only about 255 Micro amps. I have used this method hundreds of times and never had any problems. The input resistor can be as high as 270K and stil works well.
    So just one resistor from the input wire going to the input pin? Does this work in even the noisy environment of vehicles?

  15. #15
    Join Date
    Sep 2010
    Location
    Las Vegas, NV
    Posts
    305


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    This certainly has gone tangential to your original question. Going back to the beginning, for the 10k and the 4.7k a 1/8W current rating would be enough.

    I don't see where you said what PIC you're using. I looked at the 12F683 and see where it would be able to clamp 20mA at GPIO input. You may be able to use one resistor of sufficient size to take advantage of PIC internal circuitry to clamp that 12VDC but the datasheet shows only +.3V over VDD. To me a better way would be the voltage divider scheme you first posited.

    I hope you finally got your answers.

  16. #16
    Join Date
    Jan 2010
    Posts
    88


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    My original question asked if I had it right or if I needed to make the resistors bigger. Suggestions were made to make the voltage smaller. My question is that with 2.5 volts, will that trigger the input? For a digital signal, you need a 1 or 0, or in this case, 5 volts or 0 volts. Am I missing something?

    I am using the 16F819. After reading the other article (link that was posted), I figured I would use the VD to a transistor to trigger the input. I just don't want to blow anything up.

    Thanks for your help thus far. I just want to understand it better.

    Tony

  17. #17
    Join Date
    Jan 2013
    Location
    Texas USA
    Posts
    229


    Did you find this post helpful? Yes | No

    Default Re: Watt's the wattage when used on a PIC?

    Tony,

    I did not see where you indicated which pin on the PIC you are using for input.
    As you probably already know that which pin you use matters in the answer to your question about what voltage will be recognized as a 1 (high) or 0 (low) by the PIC.

    The PIC you are using has 3 types of digital input pins, each with different thresholds for low and high. Standard Inputs, TTL Buffered inputs and Schmitt Trigger inputs.

    Table 15.4 of the DS has the Min/Max for Input Low and Input High for each of the pin types.

    You probably already knew this, but just in case.

    Regards,
    Regards,
    TABSoft

Similar Threads

  1. High wattage speaker circuit
    By The Master in forum Off Topic
    Replies: 3
    Last Post: - 5th January 2011, 21:56
  2. High Speed Serial Comm PC - PIC and PIC - PIC
    By manumenzella in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 16th January 2007, 21:55
  3. Looking for low Wattage heater wire
    By jmgelba in forum Off Topic
    Replies: 1
    Last Post: - 21st November 2005, 18:22

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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