gaspo Regular Member Joined: 25/06/2018 Location: AustraliaPosts: 65
Posted: 04:04pm 06 Nov 2018
Poida, yes the pro-mini is using the same 328P chip as Uno. I have Uno as well and the code behaves the same.
By looking at the code in uno_inverter_2x_sinewave_pwm.ino it seems that what I observe on pins 9/10 in stop mode is correct.
When you stop inverter it decrements sst to zero while gradually reducing the pwr factor to a minimum value of 0.01. When sst == 0 the code clears pin PD5 (driving /SD on IR2184 low?). The TIMER1_OVF ISR keeps running trying to produce SPWM duty using the minimum power 0.01 (vpwr). Because calculated duty written to OCR1A/B is not zero I see very narrow 100-600ns pulses.
But that does not matter if the IR2184 is disabled when stopped. I like your inverter code, how simple and stable it is while utilising the PID and the LP filter on analog pins.