Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Random pulse width square wave

Status
Not open for further replies.

Sa-Ro

Industrial
Jul 15, 2019
273
0
0
IN
I would like to create random pulse width square wave as follows:

ON time: 0.0 to 3.0 Milli second

OFF time: 0.1 to 10.0 Milli second

Voltage 5 VDC

Number of cycle: Continuous

Random pulse width square waves to be created from above conditions and save as CSV format to use as arbitrary waveform.

Example:

ON time--------OFF time
---1.1------------3.4
---0.5------------8.6
---2.8------------0.5
---1.6------------7.2
---2.2------------1.7

I have Tektronix AFG31000 series function generator and Tektronix MSO 4 series oscilloscope.

Any recommendations to create in MS Excel, AFG, MSO or online?

Thanks in advance
 
Replies continue below

Recommended for you

Yes. Agreed.

But the time has to increase step by step.

100 us---0
200 us---0
300 us---5
400 us---5
500 us---0
600 us---5
700 7s---0

And so on...
 
I got the solution to create random square wave in excel.

Column A as time - Milli second (ms)

Column B as ON time with random number (randbetween)

Repeat the rows equal to ON time.

Ex: for random number 1 to 5

Say 3, hence ON time is 3 ms
Repeat three consecutive rows.

Column C as ON / OFF
If random number is changed, the column C value is changed from OFF to ON or vice versa

Column D as Voltage level
If column C value as ON, then column D value as 24

If column C value as OFF, then column D value as 0

This will create random square wave.
 
Status
Not open for further replies.
Back
Top