2017-12-17 12:26 PM
I want to use stm8 mcu for electrical relay such as trip relay and must pass the esd and emc test . Which one is better to use for this subject ?
I thought stm8a should be better because it will be used in automotive systems , but after reading datasheet of stm8s003f3p6 and stm8af6223
It seems esd maximum rating of stm8s003f3p6 is better than stm8af6223 , so what is advantage of stm8a with respect to stm8s ?
Thanks a lot
AO
2017-12-19 03:24 AM
Yeah, I also want to know....
But here is my experience. I happen to have quite a good 'noise' maker, a 24VAC relay, which I use in a 24VDC system.
The relay must be very poor, because it definetely generates a lot of noise when disconnected from 24VDC. Why I say that, because I also have some other relays (both 24VAC and 24VDC) which don't generate such a noise. The relay is a big DPDT part, 10A, the type that fits on Omron PT08 sockets.
So I have my test bench in place.
And I tested a lot of boards with it. The board under test was completely independent from the 'noise' generator board, only conected to the GND of the board (it seems the noise comes through GND).
The board under test runs a very simple firmware, toggling a led, so you can see it's working. It also transmits a 'reset' message over an uart, to a console (teraterm) to see if the board has been restarted (by a reset, watch-dog, etc).
Here are some results:
STM8S105 ICS 16MHz ESD=2000V EFT=1000V ---- pass
STM8S105 ext crystal 16MHz --- pass
ATmega8 ext crystal 4.915MHz ---- pass
ATmega328PB ext crystal 4.915MHz --- FAIL
STM32F030 ICS 8MHz PLL 48MHz ESD=2000V EFT=500V --- pass
STM32F030 ext clock 8MHz PLL 48MHz --- pass
STM32F030 ext crystal 12MHz PLL 48MHz --- FAIL
Kinetis 'E' multiple types at both 3V and 5V w/ and w/o crystals ESD=6000V EFT=500V --- pass
For the ST parts, STM8S, STM8A, STM32 we have basically the following 'classes':
ESD=4000V, EFT=1000V
STM8S003/103/903
ESD=2000V, EFT=1000V
STM8S005/105/207/208/007
ESD=4000V, EFT=500V
STM8AF parts
ESD=2000V, EFT=500V
STM32 parts
As a BIG NOTE here, about STM32: they pass my test when clocked from ICS or from an external clock. When clocked from their crystal oscillator, they FAIL. The failing is like this: they just stop working. Blocked. Nothing. Nada. That's if you don't use the watchdog. If you use the watchdog, it resets the chip and the chip starts working again. This can be quite fast (2 milliseconds) if you want, but the glitch can be noticed.
As an interesting note here too, the ATmega328PB (a newer technology) wich failed, failed in a more dangerous mode: A single register value was corrupted (r8)!!! And it was particulary bad for my application because I had a while(1) loop in which I compared a variable against a constant value. AVRGCC compiler was very smart, and put the constant value in R8 register. This register so was constant for the entire life of the application! It was supposed nothing will change that value, no? ;-D (frankly I don't know how many registers were corrupted besides R8, this was the case of my application. - The thing is: the board didn't stopped, didn't reset, didn't do anything special, it just started to behave wrong, just like when you have a bug in your program. This can drives you crazy!)
2017-12-19 02:35 PM
Thanks for your reply
I also use relay to generate noise. My system works with 110 volt dc.
I connect the 110 volt relay coil to power supply through normaly close contacts , in this case relay will become on and off and generate noise in the system . some times the mcu does not matter stm8a or stm8s will be reset . If i use bulk capacitor in 5 volt for mcu it become better but after using capacitor x1y2 in the input of power supply and connecting the common pin of them to chasis , it become more immune to this type of noise and very stable .
But my question still is what is the main advantage of stm8a , if there is any ?
Of course threre are some stm8a with high temperature working but i think in field of noise there is no special thing for stm8a .
2017-12-19 10:50 PM
Yeah, as I said in the first line of my previous post, I also want to know.
The STM8AF parts are definetely ALL of them spec'd at 4000V/500V ESD/EFT and of course, there is the automotive temperature range. On the other hand, the STM8S003/103 are 4000V/1000V so they may be better in this respect.
What is interesting is that STM32 with crystal FAIL but STM8S105 with crystal PASS my tests, although it seems that the internal crystal oscillators behave the same, you can see a weak sinusoid between 1V and 2V (even on a STM8S at 5V!).
Probably is the process (in nanometers) which makes the difference, the STM32 part being made in a finer process I think.
My recommendation: use STM8S if you don't need automaotive temp, with ICS or external clock. If you really have applications in big noise fields, don't use their internal crystal oscillators. Use external clock generator, or just make one yourself with an unbuffered inverter (74HC1GU04) and a crystal/resonator. It will consume more power (7-8 mA) but will be much stronger and immune to noise.
Best regards,
Raimond