Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

Neopixel LEDs and IO Pi expansion board

The IO Pi Plus is a 32 channel MCP23017 GPIO expander for the Raspberry Pi

12/05/2020

Posted by:
user387283

user387283 Avatar

Hello, this is my first time working with the IO Pi expansion board and I am having a little trouble understanding the steps needed to run neopixel leds off of the expansion board.

Hardware:

Raspberry Pi Zero, IO Pi expansion board, and neopixel leds

Software Libraries - Python:

board, digitalio, ABElectronics IOPi and neopixel

IOPi.py

neopixel.py

This is an example of how to initialize the neopixel:


# Configure the setup
PIXEL_PIN = board.D1 # pin that the NeoPixel is connected to
ORDER = neopixel.RGB # pixel color channel order
COLOR = (100, 50, 150) # color to blink
CLEAR = (0, 0, 0) # clear (or second color)
DELAY = 0.25 # blink rate in seconds

# Create the NeoPixel object
pixel = neopixel.NeoPixel(PIXEL_PIN, 1, pixel_order=ORDER)


board.D1 being digital pin 1 from the raspberry pis gpio. How am I supposed to assign a pin from the IO Pi board to the pixel?

12/05/2020

Posted by:
andrew

andrew Avatar

Hello

Unfortunately, the IO Pi is not compatible with the neopixel as the I/O pins can not be switched on and off fast enough.

The neopixel needs a data speed of 800Kbps, while the maximum speed of the I/O pins on the IO Pi is around 1KHz.

14/05/2020

Posted by:
user387283

user387283 Avatar

Okay, I have a few more questions now. What exactly is the difference between the IO Pi expansion board and the Pi Zero breakout board? The problem I am having is that I am trying to run many buttons, servos, and leds off of the pi zero and I do not have enough room on the standard GPIO pins. Could you steer me in the right direction as to which of your products would best suit my situation? Would the neopixels be compatible with your Servo PWM Pi board?

Thank you for your help

14/05/2020

Posted by:
andrew

andrew Avatar

The IO Pi Plus is a 32-channel I/O board for the larger size Raspberry Pi models and the IO Pi Zero is a 16-channel I/O board that will work on both the larger Raspberry Pis and the Zero models. Both boards use the same I2C-based MCP23017 I/O controller from Microchip, the main differences are the number of channels and the form factor.

The IO Pi boards would be suitable for buttons and LEDs but they will not control servos as they can not generate pulses fast enough. Each channel on the IO Pi can source up to 20mA of current with 125mA in total on a 16-channel bus so if you use it to drive LEDs you will need to make sure your overall current stays below 125mA.

For driving analogue servos you can use our Sero PWM Pi board which can control up to 16 Servos. The Sero PWM Pi would not be suitable for controlling a neopixel LED as it can not send data, only PWM signals.

Your best option for controlling neopixels would be through the Raspberry Pis GPIO header. Adafruit has a tutorial on its website for connecting neopixels to the GPIO port.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout