About Us Knowledge Base Community Forum Electronics Toolbox FAQ Shipping & Delivery

Community Forum

Share your projects and post your questions

Search
Register or Sign In
Forum

Neopixel LEDs and IO Pi expansion board

68 Views - Created 17 days ago

17 days ago

Posted by:
user387283

Users 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

https://github.com/abelectronicsuk/ABElectronics_Python_Libraries/blob/master/IOPi/IOPi.py

https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/blob/master/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? 

17 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

Hello

Unfortunatley 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.

AB Electronics UK Tech Support

15 days ago

Posted by:
user387283

Last edited: 14/05/2020

Users 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

15 days ago

Posted by:
andrew

Users Avatar

Location:
United Kingdom

Users Twitter  Users Website  

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 though the Raspberry Pis GPIO header.  Adafruit have a tutorial on their website for connecting neopixels to the GPIO port.

AB Electronics UK Tech Support

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.