Output a sequence of pulses from a signal generator - Page 1
Forum section: electronics / testgear

author: manytoolsmike
author_rank: Contributor
timestamp: April 11, 2021, 03:39:36 pm
content: Hey guys,I need to program a signal generator to output a sequence of 12 pulses. The pulses are 100 to 300 milliseconds long and range from 19 to 80 kHz. there are also pauses between some pulses up to 400 milliseconds long. The total time of the sequence is 5 seconds.another way to explain is I need to program 18 timed events (12 with a PWM and 6 with no output). each event is 200 to 400 milliseconds. The signal is a simple square wave (PWM). the sequence does not need to be triggered will be looped.The signal generators I am looking at are either the Rigol DG812 or the Siglent SDG810. Can they do this? I read the manuals for both and it is still not clear to me if this is possible using the burst mode or sequence function of the Rigol.Thank you,Mike

author: HKJ
author_rank: Super Contributor
timestamp: April 11, 2021, 03:45:43 pm
content: You could fairly easy program a Arduino to do that. The pulses would be 5V or 3.3V depending on Arduino model.

author: DL2XY
author_rank: Regular Contributor
timestamp: April 11, 2021, 04:13:31 pm
content: Quote from: manytoolsmike on April 11, 2021, 03:39:36 pmThese are AWG's. You can feed them with nearlyanyWaveform.QuoteLook at the "Arb" Mode!You have to provide the waveform data, this can be done by PC-Software or copied from scope capture.

author: TurboTom
author_rank: Super Contributor
timestamp: April 11, 2021, 04:31:53 pm
content: I also think your only option would be to generate an arbitrary waveform that resembles what you need. The "Sequence" mode of the DG800/900 series of AWGs appears to use the same parameters for each instance if you append several "pulse" waveforms to each other, so it wouldn't permit to use individual settings as you require. The problem is, you couldn't use an external modulation to modify part of that signal "on the fly" on a preconfigured arbitrary, and changing individual timing properies won't be an option as well. You may assemble a sequence of several arbitraries and a pulse train, though -- this may give you the flexibility but may be a rather "fragile" construction.If you succeed to generate the required waveform, could you possibly post how you did it -- this may be quite valuable information to the whole community ;-).

author: nctnico
author_rank: Super Contributor
timestamp: April 11, 2021, 05:08:56 pm
content: I'd look at getting a pattern generator. Since the pulses are 'digital' a pattern generator may be more suitable for the job. A pattern generator which can play patterns back according to a sequence table is very handy. You only need to create a few short patterns and use a sequence table to stitch them together to make the output signal.

author: manytoolsmike
author_rank: Contributor
timestamp: April 12, 2021, 04:13:17 am
content: Thanks for the well informed replies. TurboTom and nctnico seem to understand the problem I am facing. As best I could understand, the limitations of the sequence and AWG functions are as you described. I found a couple of good options for a Digital Pattern Generator but these require a PC to operate or they are very expensive standalone units.Ultimately I will probably program a micro controller to do the job of generating the sequence and buy a signal generator for single tones.I am leaning towards the Rigol because the sequence mode might do what I want it to. Also it has 2 outputs.... however the Siglent has a easier looking keypad and interface...I will update when I figure this out.Thank you,Mike

author: rf-loop
author_rank: Super Contributor
timestamp: April 12, 2021, 04:39:28 am
content: Honestly, least forget SDG800.It have 16k memory and more, it is fixed length fixed sampling speed (No True Arb feature)For this kind of works Arb generator is not at all best possible. Very clumsy and awkward to adjust signal details. Just if think simplified. If your signal/whole stream length is 5 minute. 16k memory give only bit over 50 points for one second. You point to point resolution (intervall) is 20ms for around 5minute pattern.Yes you can send example quite long time morse message (I have done with SDG1000X what have same memory) but for serious pattern generator use, these are clumsy, awkward and time consuming to adjust signal details.For serious use, specific programmable pattern generator.

author: egonotto
author_rank: Super Contributor
timestamp: April 12, 2021, 04:55:36 am
content: Hello,Quote from: manytoolsmike on April 11, 2021, 03:39:36 pmI don't understand this. A pulswidth larger than 100ms and 19 to 80 kHz is a contradiction. Perhaps you can draw your sequence.Best regardsegonotto

author: manytoolsmike
author_rank: Contributor
timestamp: April 12, 2021, 07:00:54 am
content: Quote from: egonotto on April 12, 2021, 04:55:36 amThe 100 to 300 ms is the duration of the pulse, not the pulse width.In the attachment you can see what I have. The pattern repeats every 5 seconds.

author: TurboTom
author_rank: Super Contributor
timestamp: April 12, 2021, 10:52:58 am
content: I'm not sure if this would be an option and if the assumption that you've already got the required signal (maybe non-repetitively) from a different source: You can always save the the scope's memory to CSV and import this to the AWG to reproduce it without any "manual effort". I see you've got a Rigol scope -- if you combine this with a Rigol AWG, ("unlocked" DG811 for example) and connect the two instruments via direct USB link, the scope's firmware lets you actually transfer the waveform data directly into the AWG's sample memory to play it back repetitively (in case you didn't know that). This would also be an argument for getting an AWG of the same brand as your scope.

author: threephase
author_rank: Regular Contributor
timestamp: April 12, 2021, 04:35:57 pm
content: I have used the technique from TurboTom above to successfully generate many pulse patterns relatively easily using a Rigol 1052 scope and a Rigol DG1022 AWG. Mine are quite old and I always had to save to CSV and then load it into the free Rigol software to convert it to the ref file the AWG reads. I believe though that this has improved and you can directly couple the scope to the newer AWGs and transfer directly.If you want an instrument to create the pattern from scratch, then a Tektronix AFG31000 series has a sequencing option that you can program in the manner you have described. In the UK they start at £1,680 and then you need to add in the sequencing option, so that might well be out of your price range.

author: nctnico
author_rank: Super Contributor
timestamp: April 12, 2021, 07:55:27 pm
content: Quote from: threephase on April 12, 2021, 04:35:57 pmYes, the AFG31000 is great (I have one myself) but it is pricey indeed. On the upside it can deal with any CSV format by itself (so no need to mess around with PC software and/or tedious conversions). Without the sequencing option it is still relatively easy to piece together a custom waveform based on multiple seperate partial waveforms. The build-in editor is good enough for that purpose.

author: manytoolsmike
author_rank: Contributor
timestamp: April 13, 2021, 07:27:28 am
content: Thanks guys,I will go with the Rigol signal generator. I did not know about the ability to connect the AWG to my Scope. It will be a few weeks before I get around to this task. I have to set up the new lab first.You guys cleared up a lot of questions for me. I share pics of the lab as we progress.Mike

author: TurboTom
author_rank: Super Contributor
timestamp: April 13, 2021, 11:58:55 am
content: Mike -just for curiosity's sake, I pulled my early generation DS1000Z from the basement and hooked it up to my "improved" DG811 (~DG992) to test direct signal transfer. It appears to be working quite well up to a sample size of ~1MSa from Scope memory. But the system is quite finnicky vs. the settings so you may need to experiment a little until you get it right. It's important that the scope doesn't display a higher voltage than the AWG is capable of outputting, so if required, you may need to enter a probe scaling factor to keep the dsiplayed voltage at less than 20Vpp (hi-Z on the AWG). If you get a warning message during import to the AWG ("signal level exceeded" or the like), chances are that the whole signal will be corrupted.When entering this "signal copy" mode, the AWG will automatically change to "Sequence" mode, and this always affects both of its channels. You still can use the other channel to output standard waveforms, but you need to configure them as part of its "sequence enseble".Moreover, at larger sample sizes the waveforms appear to turn a little awkward, don't know what's exactly going on here. For testing, I used a 1Mbps PRBS signal that obiously contained many slopes in the recorded interval. I got "some" waveform even at 6MSa, but it clearly differed a lot from the original. Maybe the AWG is performing some decimation at these large memory chunks, though as per its specs, it should be capable of up to 16Mpts. Whatsoever, I think this combination should work for you.Cheers,Thomas