Connect with us

Powering a PIC

Discussion in 'Electronic Basics' started by Jack B. Pollack, Mar 2, 2007.

Scroll to continue with content
  1. I have a digital thermostat that I have modified & interfaced with a
    PIC16F88 for some custom automation. The thermostat run on 24VAC and I have
    picked off one of the chips a 5VDC source to power the PIC.

    All was working well for 6 months without a problem. Lately, when I push a
    momentary switch (Switch is NO, pulled down with 10K when open ,+5V to PIC
    input when closed) that is connected to one of the PIC inputs the PIC
    executes its programming correctly, but the thermostat goes crazy (the
    back-light comes on and stays on and the display goes blank and stays
    blank). This does not happen all the time, but will usually show itself
    within 24hrs. Power cycling everything fixes the problem.

    Why has everything worked for months without a problem, and now started
    doing this?
    What would be the recommended way of isolating the PIC from the thermostat
    (I would like to try to avoid adding my own rectifier & Vreg if possible)?

  2. Is the PIC interfacing with the thermostat by simulating button pushes etc,
    or is the PIC a completely stand-alone app that just uses power from the
    Sounds like a software problem.
    Did you change anything? Maybe oxidation or some physical damage that could
    have occurred when you were poking around in it? Or if you added a new
    button, maybe pusing it over time has caused a stress crack somewhere?
    Do you have any kind of bypass cap on the PIC power pins. I'd use something
    like a .1uF across the power pins to keep noise out of the PIC and also to
    keep the PIC from gunking up the power to the rest of the circuit.
  3. Power cycling
    Dont think it is software for seveal reasons:
    1. Software has not changed
    2. For the past few days I am powering the PIC externally through its own
    supply with no problems.

    I have a .01uF disk cap across the PIC power pins
  4. Not to be smart, but doesn't mean there wasn't a bug all along. Did
    anything else change your circuitry? Is BOD enabled? Are you using a watch
    dog? Is it possible that your power supply is sagging? Exactly how much
    power are you drawing? Are you now using the A/C instead of furnace?

    Is it still in circuit, or did you take it out for testing?
    Can you provide a schematic? Is there a battery in the thermostat?
  5. Sounds like a software problem.

    Circuit is exactly the same, nothing has changed. Not using watchdog.
    Thermostat is on heat. PIC is drawing .007A while "idle" and .008A when
    button is pushed

    Still in circuit, just powering externally.

    No battery in thermostat - It is an AprilAir 8870. I am NOT using the
    automation features of the 8870, just using as a digital thermostat (I got
    it free).

    Basically, the dry contact closure of the thermostat drives an IO pin on the
    PIC high (from "stolen" +5V source) when it is closed (pulled down by 10K).
    The PIC is also monitoring the momentary push-button discussed earlier and
    through software toggles an ignore relay/listen to relay (system on/system
    off) condition.

    If the relay is closed, and the system is "on" then using the built in the
    PIC X10 commands and a PSC05 X10 interface it sends X10 commands over the
    home AC lines.

    I am getting the strange problem as soon as the push-button is pushed
    (regardless of room temp (relay state) and before X10 commands are
    processed). this does not happen all the time, but often.
  6. Wow, 7mA, that seems kinda steep for a PIC. At 8MHz uning the INTOSC, a
    16f88 should only draw about 1mA or so. What clock speed are you using?
    Maybe you can run it off INTOSC at 31kHz to cut the drain way down. I'm
    thinking you might be loading your power source too much. Especially since
    it works when powered by something else. Have checked that the 5V is
    holding up good?

    Wow again, that's a fairly high end thermostat.
    You do have the internal pull-ups turned off then, right?
  7. I had a PIC16F684 A/D input, reading current on a 1 ohm resistor, latch up
    occasionally, causing the PIC to get quite hot. I solved that by adding a
    1K resistor and a 1 uF bypass capacitor. The PIC survived, but the latch-up
    was only solved by power down reset. It is important to have capacitive
    noise spike filtering on inputs, as well as software debouncing, to make it

  8. jasen

    jasen Guest

    It might be better to get the pic power from the 24vac.

    could be ground bounce, aging capacitors in the thermostat etc...
  9. Marra

    Marra Guest

    It could be a static discharge problem into the PIC.
    I always use a 47K into the PIC pins to help reject the discharge
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day