Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Over voltage transients resetting PIC16F1947

Status
Not open for further replies.
T

treez

Guest
Newbie level 1
Overvoltage transients resetting PIC16F1947

Hello,
We built a mains transient generator, so as to test how our prototype 150W LED lamps would handle small mains overvoltage spikes up to twice mains peak.
I will try and attach the schem in pdf soon....

(Please let me find it and post the link here, i cant find it. Its in another thread on edaboard somewhere...now looking..)

(its just an LC circuit which gets quickly switched into the mains supply then switched out again at mains peak, thus it delivers a ~600V spike to the LED lamp)

I programmed it to deliver a 600V spike every 2 seconds.
The lamps don’t blow up…but the micro inside them resets, :oops: (not always, but most times) and so the lamps keep going off almost every time the transient is fired at them…then the lamps come back on, but go off again when the next transient comes…then come back on again.
The versions of LED lamps concerned here have no AC mains filter. They are linear regulator based. But do have a small 1W HV Buck bias supply. (this has a CLC filter just upstream of it)
We find that we can stop the lamps turning on and off by adding Y capacitors from the incoming Live and Neutral wires to Earth. Also, adding 100n of high voltage ceramic capacitance across the HV DC Bus inside the product, significantly downstream of the mains bridge , also stops the on/off’ing.
Also, unhooking the earth connection to the heatsink on which the PCB resides also stops the on/off'ing.
Just adding 100n of x2 capacitance either just before, or just after the mains bridge does not help.

Another strange point is that while we were doing this test, another similar prototype lamp plugged in 8 metres away in the lab also started going on/off/on in synchrony with the synthesized transient spikes. :scared: :scared:

To be honest, if the lamps go off then back on whenever a mains overvoltage spike occurs, then that may well not be a problem… :wink: :wink: :wink: ..however, if the disturbance somehow corrupts the EEPROM in the microcontroller, then that is not good :oops: :oops: …because in this prototype we use EEPROM to store values so that we can increase the average led current over time, so as to counteract the led’s light degradation with time.

Do you think that there is danger that the micro’s EEPROM may be corrupted by these spikes? –Or perhaps even the program memory could be corrupted? :oops:

Incidentally, its using PIC16F1947. We declared the MCLR pin is a input pin in the code, but have no capacitor or pullup resistor connected to the MCLR pin.......the only thing connected to MCLR is the trace going off to the programming via....so its juts not connected to anything. I wonder if this is part of the problem?
:cool:
 

Re: Overvoltage transients resetting PIC16F1947

Incidentally, its using PIC16F1947. We declared the MCLR pin is a input pin in the code, but have no capacitor or pullup resistor connected to the MCLR pin.......the only thing connected to MCLR is the trace going off to the programming via....so its juts not connected to anything. I wonder if this is part of the problem?

Almost certainly! Add a resistor (~22K) from MCLR to VDD. What is probably happening is the spike is being conducted to the track connected to MCLR and momentarily taking it high enough to put the IC in programming mode. Without then seeing the correct serial sequence on PGC and PGD, it aborts programming mode and resets. 22K should be high enough that normal programming isn't stopped but low enough to keep the spike at bay.

The EEPROM is highly protected in normal operation, a write operation is not possible unless the specific 'unlock' sequence is sent to EECON registers but bear in mind that EEPROM memory can also be written to in the same way as program memory if MCLR rises high enough.

Brian.
 
  • Like
Reactions: treez

    T

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top