How to turn off and turn on PWM signal?

5 views (last 30 days)
Yaswanth
Yaswanth on 6 Mar 2024
Commented: Yaswanth on 7 Mar 2024
I could not stop and start the PWM signal in a specifed interval of time.
For instance, the pulse should run for 0.02 sec and off for next 0.02 sec and repeate the sequence where the stop time is considered as 0.006 sec.
sample description of signal is attached for refernce.

Answers (1)

Fangjun Jiang
Fangjun Jiang on 6 Mar 2024
  1. Generate the PWM signal that is always on. Its period or width could all change as needed.
  2. Generate another pulse signal. This is your switch signal.
  3. Do an "AND" logic on the two signals. When the pulse is high (1), the PWM signal is passed on. When the pulse is low (0), the PWM signal is turned off.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!