Some key features of ZIP LEDs are:
- Each ZIP LED has a Red, Green and Blue element within the LED, and each of these can achieve 256 levels of brightness. This results in 16,777,216 possible output colours.
- Integrated intelligent reverse connect protection, so a reverse connection of the power supply does not damage the IC in each of the LEDs.
- Simple 3 wire connection for all LEDs.
- LEDS can be placed up to 5m apart without the need for any additional circuitry.
How do ‘ZIP’ LEDs work?
The ZIP LEDs are connected using a three wire bus. These connects are V+ (3.5V to 5.3V), Gnd (Vss) and Data. The data is fed into the data in pin on the first LED and then out of the data out pin. This then feeds on to the next LED as shown in the graphic below which is taken from the datasheet. The control data is made up of 24bits. These are read into the first LED. When a second set of data is sent the first set is then sent out of the first LED and on to the second. In this way the data cascades from one LED to the next. Data sets are separated by reset codes. This is shown in the graphic below (again taken from the datasheet). D1 to D4 refer to four LEDs connected to each other. as you can see the first LED has three blocks of data passed through it, the second two and last LED just one. The data structure is as follows: Each 0 or 1 is sent as 1.25uS high to low cycle. The length of the high and low determines if it is a 0 or a 1 being sent. The times are as follows:T0H | 0 code, high time | 0.4us |
T0L | 0 code, low time | 0.85us |
T1H | 1 code, high time | 0.85us |
T1L | 1 code, low time | 0.4us |
RET | 1 code, low time | >50us |
Using ZIP LEDS with a BBC micro:bit:
Our ZIP LEDs use WS2812B LEDs meaning that the neopixel blocks for the MakeCode block editor can easily be used to control them. The following describes how to control the ZIP LEDs on our Servo:Lite board for the BBC microbit. STEP 1: Attach a microbit to the Servo:Lite board. STEP 2: Put batteries into the Servo:Lite PCB, and turn it on STEP 3: Connect it to a computer using a micro-USB cable. STEP 4: Bring up Javascript Blocks Editor (makecode.microbit.org). STEP 5: In the top right of the screen click on the cog. STEP 6: Select ‘Extensions’ from the menu. STEP 7: Select the ‘neopixel’ box. NOTE: This will load a set of blocks compatible with Kitronik’s ZIP LEDs, which makes them really easy to code! STEP 8: Create a variable and name it ‘PixelArray’. A variable is like a container which can store information. This could be a number, a word or a piece of information you want your program to remember. STEP 9: Create the following code. This tells the micro:bit that Pin 0 is connected to 5, colour addressable LEDs. When button A is pressed, light up all the pixels red. When button B is pressed, clear the variable and show it on the LEDs. This will turn them off. STEP 10: The program will automatically run on the simulator. Click on the ‘A’ button on the simulator to see the LED pattern. Click on the ‘B’ button to see the message. STEP 11: Try changing the code to make a different colour. STEP 12: as well as addressing all the LEDs on the Servo:LIte at once it is possible to set them individually, or as a group. The first pixel always has an address of 0 (see diagram below). STEP 13: Change the code under ‘On button A pressed’ to the following. This will set the first two pixels to red, the middle pixel to white and the last two to blue. REMEMBER: To show a change you must use a block with ‘show’ in it. NOTE: You may need to click on ‘More’ under the ‘neopixel’ toolset to view extra blocks. STEP 14: Try it out. Press A and watch the lights! STEP 15: Create the code below. This code shows a colour changing pattern when button A is pressed and stops when button B is pressed. NOTE: The ‘rotate pixels’ tool shifts each pixel colour onto the next pixel. When it reaches the end of the line, it goes back onto to the first pixel. STEP 16: Try it out. Press A and watch the light show! We have developed several products that feature ZIP LEDs, you can find links to them below:- Zip Stick.
- ZIP Arc Medium.
- ZIP Arc Large.
- ZIP Circle.
- :MOVE mini buggy kit for the BBC microbit.
- Servo:Lite board.
©Kitronik Ltd – You may print this page & link to it, but must not copy the page or part thereof without Kitronik's prior written consent.
16 comments
Cullen Lewis
Thank you for your question, these could be controlled with an Arduino and the base LEDs used are WS2812B so any Arduino library that can control those LEDs should be able to control our ZIP LED strips and so on. There are a few of them out there but I believe Adafruit do a Neopixel library that is well thought of.
Don Whalen
Can this be programed with arduino? If so what library?
Mark Donnison
Hi Torben, they can be coded with the NeoPixels extension. I hope this helps.
Torben Kristensen
Hi. Just bought some ZIP Halos (24LED) , but I can't find any extensions for them. Only for the HaloHD(60). Help, please…
Mark Donnison
Hi, Sorry to hear that you are having an issue. If you contact our support team, they will be able to help you troubleshoot the problem: support@kitronik.co.uk
Erneeraq
Hey Kitronik. I recently bought my ZIP LED. And through lots of coding it now only shows 2 colours. Red and Green. Even after coding it to show Rainbow colours. Anyway you can help me? Regards Erneeraq Lennert
Mark Donnison
Hi Tom, this URL PDF should contain the information you require for connections: https://www.kitronik.co.uk/pdf/35129-zip-strip-datasheet.pdf. If it is unclear or if you would like some guidance, our support team are always on hand to offer some direct assistance: support@kitronik.co.uk
Tom
I have purchased the zip hex leds and I do not know how to connect them to a microbit using wires to power and program all 5, any help?
Mark Donnison
Hi John, yes it is exactly as you have stated above. The unused end is for attaching other ZIP LED sticks, arcs, rings etc and can just stay as is if only using the stick that you have.
John Gordon
Hi Mark. So, one end of the ZIP Stick has 4 tabs GND, DIN, 5VDC and GND and the other end has 4 tabs GND, DOUT, 5VDC and GND. Do I connect the DIN to the PO pin, the 5VDC to the 3V pin and one of the GNDs to one of the 0V pins? It would appear, from the flashing 101 image on the Kitronik website, that nothing is connected to this other end. Thanks. John
Mark Donnison
Hi John, the guide here has the information you need. https://www.kitronik.co.uk/blog/using-kitronik-zip-leds-bbc-microbit/ Although it is the servo light that is pictured, the instructions are the same. If you use P0 to control the ZIP LEDs you can use the exact same code. Please note that the MakeCode Editor has just relaunched with a new look so the blocks now look a little different but still function as they did previously.
John Gordon
I recently bought a 5 LED Zip Stick. It did not come with any instructions, so I went to the guide on the Kitronik website but the instructions there referred to using a Servo:Lite board, which would not fit in with my project. Which pins of my Micro:bit do I use for my Zip Stick and how do I program it?
Mark Donnison
Hi Peter, Sorry, not at the moment but it is on the list!
Peter Whitehouse
any Micropython equivalent code please?
Mark Donnison
Hi Kari, in your code, there will probably be a line of code in an 'on start' block that defines which micro:bit output pin is being used, how many LEDs there are and what LED format the LEDs are. This will all be in one NeoPixel code block and your values will probably be P0, 5 and RGB (GRB format). For 16 LEDs it should be P0, 16 and RGB (GRB format). I hope this helps.
Kari Santos
Hi – I am having trouble programming additional LEDs – I have added a string of 16 neopixels, and they light white on reset, but won't change colors like the first 5 – can you show a program that has more LEDs attached.