Introduction to Neopixels

Introduction to Neopixels

Developed by Byron Crowe

Summary

“Neopixels” is Adafruit's brand name for a series of addressable LEDs. While this is an easy name to remember and search for, only Adafruit products are technically 'Neopixels'. On Aliexpress and other suppliers, often searching for the LED types themselves will get better results than this name.

From their guide: “Not all addressable LEDs are NeoPixels. “NeoPixel” is Adafruit’s brand for individually-addressable RGB color pixels and strips based on the WS2812, WS2811 and SK6812 LED/drivers, using a single-wire control protocol.”

Read more:


Participants will be introduced to addressable LEDs and helped through connection and basic setup of a strip to make pretty lights.

The workshop will cover:

  • Basic understanding of addressable LEDs.
  • Basic electronic skills, including how to read tiny text.
  • Introduction to colour spaces, including RGB and HSV/HSB
  • Use of online colour pickers

Activity Summary

  • Pretty lights!
  • Make lights do what you want!
  • $/meter of fun. The more $ the more fun! :)

Materials

Material Quantity Cost Supplier Alt. Supplier
Arduino Nano v3 1 $3.40 AliExpress Tronixlabs $9
Some neopixels
0.1“ headder
Silicon
Adafruit 8×8 LED Matrix 1.2” w/ Backpack and I2C 1 $18-$23 Tronixlabs AliExpress, $2.10 Not tested
Female-female jumper wires 4 $0.20 Tronixlabs AliExpress
Short USB Cable - USB-A to Micro USB 1 $2 Tronixlabs AliExpress, $0.80
TOTAL: $51.50

Tools & Equipment

  • Computer. This limits practical workshops to 10.
  • USB drive with example code

Instructions

Step Zero: Strip prep

This should be done as prep for the workshop due to soldering and silicon curing time. Strips can be used for multi-able workshops if not damaged.

  • Cut strip to requred length. Good length for workshop is 30 pixels. The upper limit of what can be driven from a single USB port.

  • Some waterproof strips have a cover, cut and peel back the last few mm to expose bare copper.

  • Tin contacts to ensure they are clean, tin short end of connector. Solder connector in place. Using a socket of some kind helps keep them aligned.

  • Cover the soldered end from the lettering up and including the plastic base of the header with neutral cure silicon.

  • After allowing to cure overnight, strip should handle quite a bit of abuse with minimal damage.

  • Another method is to solder wires directly to the strip. More work but sometimes useful.

– While silicon works under all condtions and provides the best join, if the strip is bare type or with a peel back style silicon cover, hot glue works well, is faster and easier to remove.

Step One: Arduino Software and Drivers

If you are using a genuine Arduino with the FT chipsets you won't need to download any drivers on PC and MacOS Sierra or later. If you are using a knockoff Arduino with the CH340G chip you will need to download the drivers for Mac.

Download the latest version of the Arduino IDE. Select your operating system and when prompted choose “Just Download”.

Follow the instruction and install the program on your computer.

Step Two: Connecting and Testing the Arduino Nano

Connect the USB cable to your Arduino. A red and then a green light should light up on the Arduino, indicating that it's receiving power. The green LED should glow solid. Now launch Arduino.

Tools Menu

Go to the Tools menu and change the following:

  • Board to Arduino Nano
  • Processor to ATmega328
  • Port to USB/Serial (different depending on OS and Chip)
    • If you're having problems finding a USB port you most likely need to download the correct drivers. Once again exact OS (and version) as well as the chip make a big difference.

Once that is done, run “Get Board Info” in the same menu, this should bring up a small popup with some info. As long a you're not receiving an error in the console, you have successfully connected your Arduino!

Another step you can take to test that everything is working is load one of the basic example projects and uploading it to the Arduino.

Go to File → Examples → 01.Basic → Blink

Click on the verify button (Check mark) and let it compile. You should be getting message at the top of the console telling you when it's done (should take no more than a few seconds).

Once that is done, without any errors, click the Upload button (Arrow). This will upload the instructions to the Arduino and it will say “Done Uploading” when everything worked.

Your red LED on the Nano should now be blinking, one second on, one second off. Uploading scripts to your Arduino works! Now we are ready for the real projects.

Step Three: Downloading and Installing Libraries

Go to Sketch → Include Library → Manage Libraries

Search for “Neopixel”, click on the “Adafruit Neopixel” then click the “Install” button. You will need to restart Arduino (by closing the program not just the window).

You can also download and manually install the libraries: * LED Backpack Library * Adafruit GFX Library

Once everything is installed launch Arduino again, it should now have the libraries installed and ready to use.

Go to File → Examples again, at the bottom you should find “Adafruit LED Backpack Library”, within that menu select “Matrix8x8”.

This should open up a new Arduino window with a test project. Once you've completed Step Four: Connect the LED Backpack you can upload this script to try it out.

Step Four: LED strip to Arduino

The strip requires connection of three wires to the arduino, two for power and ground and one for data.

  • Disconnect Arduino from the computer
  • Verify that the pre-attached connector is at the end of the strip with the arrows going away from it.

Arduino Nano:

  • GND (Ground) → GND
  • DI (Data In) → D6
  • +5V (Voltage In) → +5V

Step Five: Troubleshooting

Production notes

Critical Success Factors

Which of the critical success factors does this Prototype target? For more details see SLQ-Strategic-Plan-2016-20

Enable Access

  • Provide life skills and early childhood literacy programs
  • Increase free access to digital content
  • Strengthen Queensland library infrastructure and discovery platforms

Engage Community

  • Grow the State’s historical collection of Queensland culture and heritage
  • Engage with communities of interest through dedicated centres of engagement
  • Facilitate the community’s use of and interaction with content

Build Capability

  • Build capacity within our communities of interest
  • [✓ sbriggs, 2022-02-14]Generate new revenue sources
  • Position our workforce for the future

Delivering of The Edge Promises

Aside from the SLQ Strategic Plan, there is The Edge's commitments to the community and the lens we look at it through. Here are a few more check boxes for you to answer

This empowers creative experimentation across...

  • [✓ phil, 2017-06-08]Art?
  • Science?
  • [✓ phil, 2017-06-08]Technology?
  • Enterprise?

It will inspire...

  • [✓ phil, 2017-06-08]Whimsy?
  • Nostalgia?
  • [✓ phil, 2017-06-08]Curiosity?
  • [✓ phil, 2017-06-08]Awe?

Feedback

1. Feedback:

Solution:

2. Feedback:

Solution:

3. Feedback:

Solution:

4. Other observations:

References

Everything you need to know is in:

Files

facilities/hte/hte_prototypes/introneopixels.txt · Last modified: 2024/04/26 12:24 by Michelle Brown
CC Attribution-Share Alike 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International

We acknowledge Aboriginal and Torres Strait Islander peoples and their continuing connection to land and as custodians of stories for millennia. We are inspired by this tradition in our work to share and preserve Queensland's memory for future generations.