Hot!PIC operating voltage 12 volt

Page: 123 > Showing page 1 of 3
Author
hubertoli
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2017/09/03 04:01:38
  • Location: 0
  • Status: offline
2017/10/11 08:17:55 (permalink)
0

PIC operating voltage 12 volt

Hello everyone,
 
I am quite new with micro controller, I would like to buy a Pic that works with 12 volt supply, I found 4 microchips (Pic 12F609,615 and Pic16610, 616) on the microchip website that have an operating voltage of 2 to 15 volts. So those controllers would fit my project but when I look at the data sheet the voltage range is not 2-15 but is 2 to 5.5 volts. So is there a mistake in the data sheet or is there something I misunderstand?
 
Thank you in advance for your advice.
 
Olivier HUBERT
 
#1

40 Replies Related Threads

    btbass
    Super Member
    • Total Posts : 332
    • Reward points : 0
    • Joined: 2004/12/10 13:50:32
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/11 08:42:26 (permalink)
    +1 (1)
    You need the HV versions, 12HV609.
    They have an on-board shunt regulator
    #2
    mbrowning
    Just a Member
    • Total Posts : 910
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/11 08:48:42 (permalink)
    +1 (1)
    PIC16HV have an internal shunt regulator to drop the high voltage down to 5V. Very inefficient but eliminates the need for a separate regulator.

    Can't remember. I've slept since then - Mark
    #3
    hubertoli
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2017/09/03 04:01:38
    • Location: 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/12 10:53:56 (permalink)
    0
    Thank you for your answers Smile: Smile. The Pic "12F615" has also a Shunt regulator no?
    This helps me a lot, but I fact my PIC should also provide 12 volt supply. The easiest way is to add a transistor? Or is there a Pic that can do that by itself?
    #4
    NKurzman
    A Guy on the Net
    • Total Posts : 15820
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/12 12:07:06 (permalink)
    +1 (1)
    The Pic "12F615" has also a Shunt regulator no?  NO
    http://ww1.microchip.com/downloads/en/DeviceDoc/41302D.pdf
    See Chapter 13.  
     
    Make sure you have the Dropping resistor (section 13.3).  The chip does not work at 12 Volts.  It just has a Shunt Regulator built-in.  The Outputs are not 12V the are Vcc (5 Volts see TABLE 16-10).
    #5
    qhb
    Superb Member
    • Total Posts : 6262
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/12 12:17:09 (permalink)
    +2 (4)
    hubertoli
    Thank you for your answers Smile:  The Pic "12F615" has also a Shunt regulator no?

    No
     

    This helps me a lot, but I fact my PIC should also provide 12 volt supply. ]

    No PIC can run at 12V. The actual logic only runs at 5 volts or lower.
     

    The easiest way is to add a transistor?

    That's one way to do it.
    You plainly don't know much about microcontrollers, so how about you tell us what you actually want to do, then we can advise accordingly.
     

    Or is there a Pic that can do that by itself?

    No.
     
    #6
    Sobottech
    Super Member
    • Total Posts : 233
    • Reward points : 0
    • Joined: 2015/12/02 03:32:17
    • Location: 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/12 12:41:16 (permalink)
    +2 (2)
    What is the problem using some sort of DC/DC step down or LM7805?
    Just a Pic is doing nothing, so you need some Hardware. One LM7805 is compared to the other needs nothing.
    What are you trying to use with the pic? Some 12V device? The pic can for normal just manage to drive 5.5V/20mA (you got to study the datasheet...).
    So, it is not possible to use just a Pic on 12V to drive some 12V device without other hardware/electronics.
    #7
    hubertoli
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2017/09/03 04:01:38
    • Location: 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/14 09:30:59 (permalink)
    0
    Thank you for your answers
     
    My project is I think quite easy; it is for a home electrical installation with a push button that control a dimmer.
    I need an electronic device powered by 12 volts (because I only have 12-volt supply available), this device control whether the impulse of the push button is long or short.
    if the impulse is:
    • Long, it activates a dimmer (to increase or decrease the intensity of the light)
    • Short it activates an electrical relay (to turn off the light)
    Both « dimmer » and « relay » need to be powered by 12 volts. I think I will buy a « Pic12HV609 » and I will add it a shunt resistor. I tried the code with a « Pic12F609 » and it works, but I still need to find a way to activate from my Pic my dimmer and relay with 12volt.So I need to « change » the voltage from 5 volts to 12volt with a transistor or relay.
     
    What do you think? Could you advise me?
     
    #8
    DarioG
    humans, die, please
    • Total Posts : 53209
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/14 10:34:39 (permalink)
    +1 (1)
    Well, looks doable. And the 12V power should not be an issue, yep.

    if only every single human would die...

    havana!!! :D

    #9
    Ewerning
    Super Member
    • Total Posts : 77
    • Reward points : 0
    • Joined: 2017/09/08 11:02:31
    • Location: Between 1 and 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/14 15:42:51 (permalink)
    +1 (1)
    hubertoli
    ..., but I still need to find a way to activate from my Pic my dimmer and relay with 12volt.So I need to « change » the voltage from 5 volts to 12volt with a transistor or relay. What do you think? Could you advise me? 


    I have done something similar in the past using PIC12F675. Remember you are using a extremely flexible and precise (in my case) 1MHz timer. So find zero crossing from A.C., Time correctly an output to a TRIAC and you have your switch and your dimmer with only 4 resistors, a couple of diodes, a capacitor and a triac. You don't need to interface with a dimmer or a relay, your project will be the dimmer and the switch!!

    Of course it demands more programming than only recognizing a tap of a switch, but is a way more elegant solution (and cheaper, and more robust). There is a good application note from microchip explaining how to do a dimmer (TB094), and plenty examples here in the forum. Give it a try!
    post edited by Ewerning - 2017/10/14 15:44:26
    #10
    qhb
    Superb Member
    • Total Posts : 6262
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/14 16:29:24 (permalink)
    +4 (6)
    I would disagree about using a TRIAC.
    Yes for someone with electronics experience, but this sounds like a very first project for someone just starting.
    You do NOT want to be fiddling with mains voltage while you're learning the basics!
     
    #11
    PStechPaul
    Super Member
    • Total Posts : 1756
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: online
    Re: PIC operating voltage 12 volt 2017/10/14 16:35:28 (permalink)
    +3 (3)
    The problem with the PICs with an internal shunt regulator is that you must choose the series limiting resistor so that it maintains the operating voltage at worst-case conditions of maximum current draw. It will draw at least that much current and dissipate the same total amount of power under all operating conditions. Simple three terminal linear regulators such as LM78L05 are tiny and cheap, so there is little reason to use the HV PICs. They will dissipate only as much power as required for the circuit. Buck regulators are also cheap and are typically >90% efficient.

     
    #12
    Ewerning
    Super Member
    • Total Posts : 77
    • Reward points : 0
    • Joined: 2017/09/08 11:02:31
    • Location: Between 1 and 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/14 22:36:58 (permalink)
    +2 (2)
    qhb
    I would disagree about using a TRIAC.Yes for someone with electronics experience, but this sounds like a very first project for someone just starting.You do NOT want to be fiddling with mains voltage while you're learning the basics! 


    Your statement made me remember that my first project in electronics was a dimmer with LDR feedback (that did not worked). Oh, this was before microchip was created and I was 14 at that time. But everybody has its own experience and creeds, right? Maybe my parents would allow me to risk more back than.

    If the person beginning in electronics has no one experienced to help them I tend to agree to qhb, since debugging is a nightmare.

    Anyhow, still LIFE IMPORTANT: DON'T TOUCH YOUR CIRCUIT WHILE CONNECTED TO MAINS!!! Or to more than 50Vdc.
    #13
    hubertoli
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2017/09/03 04:01:38
    • Location: 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/22 13:12:42 (permalink)
    +1 (1)
    Hi everyone,
    thank you again for your answers, I bought an “LM78L05” and transistors I tried it and it works perfectly Smile: Smile
     
    Unfortunately, a new problem appears with the code of the PIC.
    The code should work like this: I have a push button link on entry "GP0", When I have a long impulse the output « GP1 » is activated just for a short time (to activate the relay) the relay turns off or on the supply voltage. For a long impulse, the output «GP5 » is activated. It is activated as long as I am pushing to the button and it is only turned off when I release the button.
    My code works partially, but sometime something weird appear: When I have a long impulsion output "GP5" is activated (so good so far) but when I release the button the other output "GP1" (the output link to the relay) blink just once (and it should not), so my relay open the contact and shut down the supply.

    What is wrong with my code ? Maybe there is an interference between “GP1” and “GP5” ?
     
    Below you can see my code :
    ""
    #pragma config OSC = IntRC 
    #include <xc.h>
    #define _XTAL_FREQ 4000000
    #define WDTE = 0
    #pragma config OSC = IntRC
    #pragma config WDT = OFF 
    #pragma config CP = OFF 
    #pragma config MCLRE = OFF
     
    void main(void) {

    TRISGPIO = 00000001;
    GPIObits.GP5 = 1;
    GPIObits.GP1 = 1;
    while(1){ 
    if (GP0==1)
    {
    __delay_ms(200) // When the button is pressed I wait 200 ms to see if it is a long or short impulse
    if (GP0==0) // If it is a short impulse
    {
    GPIObits.GP5 = 0;
    GPIObits.GP1 = 1;
    __delay_ms(200);
    }
    else // If it is a long impulse
    {
    while (GP0==1){  // GP5 is activated as long as the button is pressed
    GPIObits.GP5 = 1;
    GPIObits.GP1 = 0;
    }
    }
    }
    else
    {
    GPIObits.GP1 = 0;
    GPIObits.GP5 = 0;
    }
    }
    }
    ""
    Thank you in advance for any of your advises.
    #14
    DarioG
    humans, die, please
    • Total Posts : 53209
    • Reward points : 0
    • Joined: 2006/02/25 08:58:22
    • Location: porcodioland
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/22 13:51:40 (permalink)
    +1 (1)
    You *might* be suffering R-M-W effect... a short blink, yep...
     
    Try placing some delay in between each write to GPIObits. (next step would be using a shadow variable...)

    if only every single human would die...

    havana!!! :D

    #15
    qhb
    Superb Member
    • Total Posts : 6262
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/22 13:53:10 (permalink)
    +2 (2)
    What PIC device did you end up using?
    (I'm pretty sure you are experiencing "read-modify-write" write problems on the IO port, but need to know the PIC model to advise further..)
     
    #16
    hubertoli
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2017/09/03 04:01:38
    • Location: 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/22 14:03:35 (permalink)
    0
    Hi,It is a Pic12F508
    #17
    Ewerning
    Super Member
    • Total Posts : 77
    • Reward points : 0
    • Joined: 2017/09/08 11:02:31
    • Location: Between 1 and 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/22 14:03:50 (permalink)
    +2 (2)
    DarioG
    You *might* be suffering R-M-W effect... a short blink, yep... Try placing some delay in between each write to GPIObits. (next step would be using a shadow variable...)

    Or since it is a simple code write the byte instead of the bits. I just looked up if the mentioned PIC12F60X had a latch, it does not.
    #18
    Ewerning
    Super Member
    • Total Posts : 77
    • Reward points : 0
    • Joined: 2017/09/08 11:02:31
    • Location: Between 1 and 0
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/22 14:12:49 (permalink)
    +2 (2)
    So try the following
    hubertoli

    ...
    main(void) {
    TRISGPIO = 00000001;
    ;GPIObits.GP5 = 1;
    ;GPIObits.GP1 = 1;
    GPIO=34 ; bit 1 on bit 5 on (2+32)
    ...
    ;GPIObits.GP5 = 0;
    ;GPIObits.GP1 = 1;
    GPIO=2 ; bit 1 on, bit 5 off
    ...
    ;GPIObits.GP5 = 1;
    ;GPIObits.GP1 = 0;
    GPIO=32 ; bit 1 off, bit 5 on
    ...
    ;GPIObits.GP1 = 0;
    ;GPIObits.GP5 = 0;
    GPIO=0 ; all off
    ...

    #19
    qhb
    Superb Member
    • Total Posts : 6262
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: PIC operating voltage 12 volt 2017/10/22 14:23:42 (permalink)
    +2 (2)
     
    Ewerning

    ...
    GPIO=34 ; bit 1 on bit 5 on (2+32)

    For those not adept at decimal <-> binary conversions in their head, I think it's better to express the contant in binary to see what's going on. e.g.
    GPIO = 0b00100010;

     
    equally, an earlier line looks like it's trying to use binary, but it's actually using octal, it just doesn't matter in this precise instance
    TRISGPIO = 00000001;

    should be
    TRISGPIO = 0b00000001;

     
     
    #20
    Page: 123 > Showing page 1 of 3
    Jump to:
    © 2018 APG vNext Commercial Version 4.5