×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Random pulse width square wave

Random pulse width square wave

Random pulse width square wave

(OP)
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

RE: Random pulse width square wave

Try XL using the RAND or RANDBETWEEN function.

RE: Random pulse width square wave

(OP)
It gives only random numbers. Not able to create square wave.

RE: Random pulse width square wave

(OP)
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...

RE: Random pulse width square wave

(OP)
I got one idea from last post. Tomorrow I will check and confirm.

RE: Random pulse width square wave

Huh? You just use the stream of random numbers as the pulse durations and the time accumulates from that. If you need to limit the resolution to 100 us, you just round or truncate as needed.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm

RE: Random pulse width square wave

(OP)
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.

RE: Random pulse width square wave

Geeze, now you want a column with a constant time step?

I didn't try to follow your explanation because it seemed way too convoluted.




Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close