Page 1 of 1
PWMSTUCK error
Posted: Sun Apr 05, 2020 5:35 pm
by arber333
Hi Johannes
I completed my new board for Volt/Ampera inverter with one brain driving both sides of inverter. It is based on Rev 2 main board.
I went on and cautiously tried to start it without inverter. Just on desk with simulated inputs.
I connected every input required and i get good response from inputs and outputs.
Now when i start precharge and DC relay get on as they supposed to, but immediately i get PWMSTUCK warning. I use positive PWM trigger.
I check the actual outputs and out of Olimex i get 0V. On SN74LS06 chip i get +5V across 470R pullups. So that works as it should. Drivers on Volt inverter are negative and i invert signals with SN74LS06.
What is the actual PWMSTUCK error and how does it work?
Can i start PWM in FOC code in manual mode? How to do that without motor connected?
tnx
A
Re: PWMSTUCK error
Posted: Sun Apr 05, 2020 7:43 pm
by arber333
I just connected my scope and tried to see what happens to PWM outputs.
Hm... the moment i reset chip they move from state 0V to 1.7V! Damn! Johannes i used your V3 bootloader with FOC as well as SINE code.
Luckily i have SN74 inverter chip that remains fixed at 5V.
I dont use any pulldown resistors after chip signaling. Should i use like 10K?
Do you have another bootloader maybe?
EDIT: Well i may be the fault of that. It seems like SN74LS06 leaks some voltage through its base back to the main chip. If i disconnect main chip i get 1.7V on all PWM outputs. It seems 10K pulldowns would be an option.
EDIT2: Well it seems that PWMSTUCK only happens when reseting the main chip or on first turn-on. I will add 10K pulldowns to my design and voltage jump is then less than 0.2V. I see now where the spring sound was originating from. Whenever i had to reset my inverter i would get a sound like motor would release a spring.
Re: PWMSTUCK error
Posted: Sun Apr 05, 2020 8:24 pm
by johu
Well I could enable pull-down in software but while the boot loader runs you'll still get the floating pins. So maybe indeed some hardware pull-down will be best in your case.
Side note: how does the Tesla board behave here as it also uses a line driver?
Re: PWMSTUCK error
Posted: Mon Apr 06, 2020 7:57 am
by arber333
Johannes can you explain how to manually start 50% duty on all pwm channels with FOC code please. So to verify that signals work.
I know to do this with sine code only. Is it at all possible with FOC?
I can check resolver excitation signal if I start in manual.
Tnx
A
Re: PWMSTUCK error
Posted: Thu Apr 09, 2020 7:34 pm
by arber333
johu wrote: ↑Sun Apr 05, 2020 8:24 pm
Side note: how does the Tesla board behave here as it also uses a line driver?
I tried pulldowns. When i used 6K8 i got 150mV jump on reset with only one driver.
However when i use two drivers that are run from a single source i get 380mV on the pulldown junction. I am not sure what will happen, but i will try with both sides soon. If i get a spring sound out of the motor i will know 6K8 is not enough. Then i will try 4K7.
Johannes do you think 220R line resistor will be enough with 4K7 pulldown? I mean if it would not cause too much delay in circuit.
Is there any way of having the PWM pins off when bootloader is starting? Could the low level code have the pulldowns enabled BEFORE bootloader?
I dont see any problem with using Lebowski dsPIC30F in the same way. I do however use its power supply as a reset function.
Re: PWMSTUCK error
Posted: Thu Apr 09, 2020 8:23 pm
by johu
Yes don't see any problems with resistor.
I will not mess with pins in boot loader again, different hardware, different requirements and boot loader is hard to update.
Re: PWMSTUCK error [SOLVED]
Posted: Sun Apr 12, 2020 8:40 pm
by arber333
johu wrote: ↑Thu Apr 09, 2020 8:23 pm
Yes don't see any problems with resistor.
I will not mess with pins in boot loader again, different hardware, different requirements and boot loader is hard to update.
I have tried 6K8 resistors with SN74LS06 chip on a single PWM IGBT output set. It works, no spring sound or any kind of sound when i reset Olimex brain. Outlander motor revolves nicely.
I did notice when in reverse i get rough running above 400Hz. Maybe i will need more precise offset calibration.