T
treez
Guest
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, (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 …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?
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?
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,
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
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?
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?