Maker Pro
Maker Pro

Powering a PIC

  • Thread starter Jack B. Pollack
  • Start date
J

Jack B. Pollack

Jan 1, 1970
0
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)?

Thanks
 
A

Anthony Fremont

Jan 1, 1970
0
Jack said:
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.
Ok

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.

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
circuit?
Power cycling
everything fixes the problem.

Sounds like a software problem.
Why has everything worked for months without a problem, and now
started doing this?

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?
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)?

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.
 
J

Jack B. Pollack

Jan 1, 1970
0
Power cycling
Sounds like a software problem.

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.


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.

I have a .01uF disk cap across the PIC power pins
 
A

Anthony Fremont

Jan 1, 1970
0
Jack said:
Dont think it is software for seveal reasons:
1. Software has not changed

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?
2. For the past few days I am powering the PIC externally through
its own supply with no problems.


Is it still in circuit, or did you take it out for testing?
I have a .01uF disk cap across the PIC power pins.

Can you provide a schematic? Is there a battery in the thermostat?
 
J

Jack B. Pollack

Jan 1, 1970
0
Sounds like a software problem.
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?


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

Is it still in circuit, or did you take it out for testing?

Still in circuit, just powering externally.


Can you provide a schematic? Is there a battery in the thermostat?


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.
 
A

Anthony Fremont

Jan 1, 1970
0
Jack said:
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

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?

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).

Wow again, that's a fairly high end thermostat.
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

You do have the internal pull-ups turned off then, right?
 
P

Paul E. Schoen

Jan 1, 1970
0
Anthony Fremont said:
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?

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
reliable.

Paul
 
J

jasen

Jan 1, 1970
0
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.

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

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

Marra

Jan 1, 1970
0
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)?

Thanks

It could be a static discharge problem into the PIC.
I always use a 47K into the PIC pins to help reject the discharge
volts.

www.ckp-railways.talktalk.net/pcbcad21.htm
 
Top