element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
Mark's Blog Generating pulse trains with Agilent BenchLink and the 33522B
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: Instructorman
  • Date Created: 14 Oct 2013 4:43 PM Date Created
  • Views 444 views
  • Likes 1 like
  • Comments 1 comment
  • waveform
  • agilent_33522b
  • ws2811
  • led_strings
  • rgb_led
  • arbitrary_waveform_generator
  • serial_data
Related
Recommended

Generating pulse trains with Agilent BenchLink and the 33522B

Instructorman
Instructorman
14 Oct 2013

In this post I provide details about the signal format used to program the WS2811 RGB LED driver.  These details are needed to program appropriate pulse trains into the Agilent 33522B.  I will also explain an interesting anomaly I discovered while experimenting with the LED strings I purchased for this project.

 

Pulse parameters for the WS2811

Two pulses are understood by the WS2811: A pulse that represents logic 0 and a pulse that represents logic 1.  The timing parameters for these pulses are shown in the table below.

 

Pulse TypetONtOFF
Logic 0500 ns ±150 ns2.0 μs ±150 ns
Logic 11.2 μs ±150 ns1.3 μs ±150 ns

 

These values produce a constant bit cell-time of 2.5 μs for logic 0 and logic 1 cells.  At 2.5 μs/bit, the bits will be sent to the LED strings at a rate of 400,000 bits/s.  The WS2811 specifications call this the FOSC1 operation frequency.  The device is also capable of operating at 800,000 bits/s (called FOSC2 in the specs).  During tests to validate the ±150 ns tolerance on pulse widths I discovered that the availability of a high speed mode means the tolerances in the table above have to be interpreted carefully.  More on this later.

 

The Absolute Maximum Ratings table in the spec sheet lists power supply voltage as +6.0VDC ∼ +7.0VDC.  For all experiments described below the supply voltage was set to +6.0 VDC.

 

Now, back to the pulse train composition.  Each device in the LED string contains a WS2811 controller, a red LED, a green LED and a blue LED.  The WS2811 allows 8-bits of intensity control data for each of the three LEDs.  So, each WS2811 will strip off the first 24-bits of data it receives to control the three LEDs attached to it.  All remaining bits are passed on to the adjacent device in the string. The specs in the WS2811 show the 24-bit data format as follows:

 

b0b1b2b3b4b5b6b7b8b9b10b11b12b13b14b15b16b17b18b19b20b21b22b23
R7R6R5R4R3R2R1R0G7G6G5G4G3G2G1G0B7B6B5B4B3B2B1B0

 

Where "bn" is the bit number within a 24 bit sequence, "Rn" indicates the bit position for RED bits, "Gn" indicates the bit position for GREEN bits and "Bn" represents the bit position for BLUE bits.  From this table one would assume the bit pattern for the three LEDs is organized in the traditional R-G-B (Red-Green-Blue) pattern.  As is often the case, assumptions can be wrong.  The assumption made here, by the writer of the WS2811 spec, is that the end user of the WS2811 will connect a RED LED to the OUTR pin, a GREEN LED to the OUTG pin and a BLUE LED to the OUTB pin.  Nothing prevents the end user from connecting whatever colour LED they desire to each of the output pins.  Perhaps a better description of the output pins would have been OUT1, OUT2 and OUT3.  If this more generic nomenclature had been used, some of the confusion I encountered while experimenting would have been avoided.

 

Generating simple test patterns in Agilent's BenchLink

The plan now is to generate three simple pulse trains.  One each for minimum brightness RED, GREEN and BLUE.  Each pulse trains will consist of 24 bits.  To generate minimum brightness on the desired LED we will put a single logic 1 in the least significant bit position for the desired LED and place logic 0 in all other bit positions.  As an example, the bit pattern for minimum brightness on the LED connected to OUTR look like this:

 

b0b1b2b3b4b5b6b7b8b9b10b11b12b13b14b15b16b17b18b19b20b21b22b23
000000010000000000000000

 

If the LED connected to OUTR is in fact a RED LED, this pattern will produce minimum illumination on the RED LED and turn off the other tow LEDs in the package. 

 

Let's see what happens when we generate the bit pattern above, copy it to the Agilent 33522B and drive the LED string.  All of the work shown below was accomplished with Agilent Benchlink Waveform Builder Basic, because the demo period on my full version expired long ago.

 

After starting Benchlink, select New Waveform:


image

 

Then, in the New Waveform dialogue, set up a single channel waveform with a 60 μs duration (2.5 μs/bit X 24 bit = 60 μs).

image

A blank waveform creation screen pops up.  This is where a graphic of the desired waveform pattern will be built.


image

The pattern for the first LED is seven logic 0 pulses followed by a logic 1 pulse.  I'll build a single logic 0 pulse, then use cut and paste to duplicate six more and tack on a logic 1 at the end of this sequence.  First, select DC from the Waveform tab, then select a 500 ns duration with a +6.0 V offset.

 

image

 

The result will be a short piece of +6.0 VDC on the overall waveform builder view.  Returning to the DC segment dialogue, I'll add 2.0 μs of 0.0 V at the end of the waveform.  A single logic 0 pulse is thus described.

image

 

Using copy and paste tools, make six more logic 0 pulses.  The waveform now looks like this:

 

image

 

Again, using the DC component from the waveform tab, build a single logic 1 pulse with information from the timing parameters table above, then copy and paste in 16 logic 0 pulses to turn off the other two LEDs in the device. The full 24 bit pattern looks like this:

 

image

 

For this example, I saved the waveform, called "LED 1 minimum" to a USB memory stick and moved the stick over to the front panel USB socket on the Agilent 33522B.  The photo below shows the USB thumb drive inserted into the 33522B.  From the front panel I selected "Waveforms" then on the soft key menu, selected ARB, then Arbs (seems redundant, but that is the correct sequence), then "Select Arb", which brings up a file listing of the USB memory stick.  With the desired filename selected, press Select, and the file loads into the Agilent 33522B.

 

image

 

There is now one copy of the pulse train that illuminates the first LED at minimum brightness in the memory of the 33522B.  Using the Burst output mode, that single copy can be repeated any number of times to light up more LEDs in the string.  I have 4 m long strings, each with 60 devices/m.  That makes for 240 devices/string.  Two strings together makes 480 devices.  Let's start with a burst of 10 copies.  That should light up exactly the first 10 devices in the string.  The video below shows the bench set up including the various instruments used to observe system behaviour.

 


You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Finally, for this blog entry, the video below shows the 33522B being triggered to produce 10 copies of the LED 1 minimum waveform.  That lights up the first 10 devices in the string with minimum illumination on the first LED in each device.  Turns out the first LED in each device is a green LED, not a RED LED, so the WS2811 spec needs to be interpreted carefully, based on how the device manufacturer set up their devices.

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

Next time, I'll check out the current draw for each LED colour and see what happens to VDD at the end of the strings.  I'll also look at timing tolerance and see if I can create dynamic light patterns using the deep memory of the Agilent 33522B

 

Cheers,

 

Mark

  • Sign in to reply
  • DAB
    DAB over 11 years ago

    Hi Mark,

     

    Good detailed review.

     

    Thanks

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube