Hi, I'm introducing myself to the Kinetis family and so far it has proven to be great por my application.
Just as a note, I don't have a Deep knowledge around the operating fundamentals of this kind of boards. So still working with interrupts and timer units is a bit confusing.
However, I'm currently having a problem while Reading temperature through the ADC while having an PWM output in other pins.
So what I'm doing is Reading the temperatura of 2 external thermistors through the ADC. With that I haven't had any problem and also the signal has almost no noise (after being filtered with an RC circuit and using an OPAMP).
I'm Reading the temperature continously using the Measure(TRUE) and GetValue() methods.
At the same time I'm controlling an external IBT-2 H-Bridge using two pins with PWM (both pins share the same Timer Unit).
I'm not having any problems in the signal when I have a duty cycle in any of the PWM's of zero or full (0 or 65535 with function SetRatio16() ). However when I send a signal of 20,000, 30,000, 40,000 or anything near this values, the ADC signal turns incredibly noisy.
The H-Bridge is controlling a Peltier Cell at 14 V and máximum current demand of about 5 Amps (It's rated for Max 26 V and 43 Amps and PWM of 25 KHz)
My pwm period is 750 us so that's around 1 KHz.
It has to do with the H-bridge, since if I send a PWM of any value while reading the temperature while disconnecting the external power source that feeds the Peltier Cell, no noise arises.
I've been battling with this for some time now.
Has anyone have had this kind of problem?
Thank you.
解決済! 解決策の投稿を見る。
Hi, Leonardo,
Regarding your noise issue, I think you do not isolate the MCU GND and the power GND, you connect the MCU ground and Power ground together, I think the noise results from the mcu analog ground.
From hardware connection, you should connect the GND of the temperature sensor close to analog ground of mcu. If you can not change the PCB design, I suppose if you sample the temperature sensor voltage at the instant that PWM rising/falling edge occurs, the noise may be large. Can you sample the temperature at the center of PWM signal? at the instant, the noise voltage is stable.
Hope it can help you.
BR
XiangJun Rong
Nevermind.
When I reduced the PWM period from 750 us to 40 us, the noise diminished greatly.
Even though, it would be nice to know why this happens.
Hi, Leonardo,
Regarding your noise issue, I think you do not isolate the MCU GND and the power GND, you connect the MCU ground and Power ground together, I think the noise results from the mcu analog ground.
From hardware connection, you should connect the GND of the temperature sensor close to analog ground of mcu. If you can not change the PCB design, I suppose if you sample the temperature sensor voltage at the instant that PWM rising/falling edge occurs, the noise may be large. Can you sample the temperature at the center of PWM signal? at the instant, the noise voltage is stable.
Hope it can help you.
BR
XiangJun Rong
Thank you for the recommendation. I will try both of them. Thanks!