3

I have an idea for a project, but I am unsure of the best route to take.

I am going to create a custom 11x10 LED matrix (addressable LEDs like WS2812) with the intention of lighting up certain LEDs given different input arguments in my code.

However, I haven't yet seen a good example of people doing such a thing on Youtube or Instructables etc.

This is not a scrolling text banner, but this matrix could be used for such a thing later in life.

So far from my research it seems that most people use an Arduino Nano to achieve something like this, and can even power the Nano from the same 12v 4A power supply that the LEDs require.

I have also seen of course the small 8x8 matrix that is already on offer, but this is far too small for my purposes.

Can anybody advise or point me to any information on if this is possible?

I currently have a RPi 3B, but I am wondering if I could get away with using the small ZeroW board to do this.

  • You are using standard LEDs or adressables LEDs like the WS2812 ? – Arnaud Jul 10 '19 at 7:51
  • 1
    Oh sorry, I forgot to clarify. I have seen many people use addressable LEDs such as the WS2812 for their Arduino builds, so I guess I would go that route. – physicsboy Jul 10 '19 at 7:52
  • I suggest you use APA102 based LEDs rather than WS281x based ones. The APA102 have separate data and clock lines and are much easier to drive from the Pi. If you use WS2812x you will have to use existing drivers and will be limited to using a few GPIO. – joan Jul 10 '19 at 8:07
  • OK, so you want to make a LED matrix. Which hardware and software to start with depends on many things, including: (1) Objective, say, it is educational - to learn new things for your future academic studies, or it is practical, making a product you can sell and make money. (2) Time, say is it a summer holiday hobbyist project, or a lifelong learning and professional development project, (3) Money, say do you have US$1,000, or like me, a poor hobbyist, US$100 for whole project, ... I can list a couple of more things you can consider, before deciding things Arduino or Rpi, C or python etc. – tlfong01 Jul 10 '19 at 8:58
  • If you have 2 years, you can start with Arduino or Rpi, C or python, using library or code from scratch. You can change mind later. For Rpi3, I suggest to start with: MAX7219 8*8 Dot Matrix LED, 5V Common Cathode for Arduino - US$1 (fr.aliexpress.com/item/… ) – tlfong01 Jul 10 '19 at 9:06
2

What you are trying to achieve doesn't take a lot of ressources, so if it is possible on a Arduino nano, it is possible on a Raspberry Zero (in terms of ressources)

Then, you will have to drive the LEDs from the Raspberry, for that you will have to use GPIO. GPIO can simply, and in an Arduino way be used with WiringPi. It's a library that allow you to use the GPIO on a Raspberry pretty much like on Arduino.

So in fact using wiringPi and with a basic understanding of the Raspberry and Linux, you should reach your goal by following any Arduino tutorial and adapting to Raspberry.

Thus libraries for Arduino (for adressable LEDs for example are written in C so implementing them on Raspberry shouldn't be that difficult)

EDIT : I believe WS2812 are working on 5v, so in fact you could even use the same power supply for your LEDs and for the Raspberry, maybe just adding some capacitors for filtering and decoupling : in order for the Raspberry to have a clean 5V supply.

An example of similar project Neo Pixel Library for Raspberry

| improve this answer | |
  • Ah I thought there may be a library out there for something like this, just knowing what to search for is the hard part. I will have to have a go at getting this library and playing with it. Maybe a few posts to Stackoverflow if I get stuck on the programming side. Never used C before, but it can't be that difficult XD. – physicsboy Jul 10 '19 at 8:00
  • Follow some tutorials either for Arduino or Raspberry, work in C and use WiringPi. Doing so, whatever you find, (for Raspberry or Arduino) may be valuable for your project thus Arduino have a big community you could even ask help from them. – Arnaud Jul 10 '19 at 8:03
  • 3
    I doubt that wiringPi can drive WS281x LEDs. They are self clocking in the microsecond range. – joan Jul 10 '19 at 8:08
0

Yes. APA102 ("dotstar") LEDs are easier from a hardware standpoint, as they can be driven directly by the Pi's SPI bus. Adafruit has a library for their CircuitPython, and there are many others for Python and other languages.

WS281x LEDs are cheaper, but require more precise controlling. Previously, it was recommended to not use a Pi. However, the rpi_ws281x library uses the Pi's capabilities to drive the LEDs with hardware, meaning that the failures of previous software-based systems are completely avoided. It has bindings for Python, Rust, Powershell, Java, C#, and Go. Adafruit also has their own version available with a different API more like the rest of their ecosystem. It uses minimal CPU (a test with 240 LEDs on a Pi 2 used as little as 1% CPU), and it explicitly supports the Pi Zero.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.