NeoPill Is The NeoPixel Emulator You’ve Always Wanted

NeoPixels and other addressable LED strings are a technology that have made vibrant, glowing LED projects accessible to all. Of course, it’s nice to be able to simulate your new glowy project in software before you actually set up your LED strings in practice. [Randy Elwin]’s NeoPill simulator can help with that!

The NeoPill consists of an STM32F103 development board, into which one simply hooks up a NeoPixel data line. The microcontroller then decodes the data using a combination of its onboard timers and SPI hardware. This data is then passed to a PC over the onboard USB serial connection, where it’s decoded by a custom Python app. The app takes the data and displays the pixels on screen, so you can verify they operate as expected before you hook up a single real LED.

It’s a great tool, one that costs very little and yet does the job well. It can even be used with LEDs in circuit to verify if problems are related to the data output or the hardware itself. [Randy] demonstrates the software working with strings of up to 256 LEDs at once; we’d love to see how far it can be pushed before breaking. Code is available on Github for those keen to get their own NeoPill operational.

It’s not the only NeoPixel simulator out there, but it is the first one we’ve seen that can be used to debug actual signals from real hardware, and that’s an incredibly useful thing to have in your toolbelt. Video after the break.

16 thoughts on “NeoPill Is The NeoPixel Emulator You’ve Always Wanted

    1. Very handy, at least for those of us who got our hands on some blue pills before the current parts shortages. Gonna bookmark this one.

      Any overachievers want to extend this to dot star support too? ;-) That should map even easier onto SPI peripherals.

        1. Huge increase in demand, temporary supply chain issues due to Covid whose ramifications continue to cascade, and a number of issues, such as large fires, that have also caused supply chain issues. There might also be some “toilet paper” effect going on, where just-in-time supply chains are further stressed by mild hoarding. I’m still waiting for some actual studies to come out on that, though.

  1. Might as well call it a bluepill since that’s what it is. The chip code alone is only useful for people who can do this for themselves.

    In true neopixle fashion, the emitted light is slightly less precise than a monitor.

    Great project, however. I always appreciate work I don’t have to do alone.

      1. That’s why mentioning bluepill is important – it’s the cheapest and most easily available F103 hardware out there, a clone of the Maple Mini which itself had almost an arduino-level following.

        A port to a low-end arduino or the Pico would be more recognisable though.

      2. As I understand, the “chip code” means the chip order code, “STM32F103”. and “do it yourself” semms to mean to do a PCB oneself. What I can do, but not for 2$ like a bluepill costs.
        Nothing to do with the program code.

  2. Excellent project. I’ve often found myself wanting to test some ‘neopixel’ code without wanting to setup power supply, connections and everything. I’ll be trying this out next time.

  3. Can this thing also DRIVE neopixels? Can you use it as both a diagnostic tool and an interface / buffer between another device? So that it echoes the signal on an output pin that can actually drive the neopixel string?

  4. Another thing you might use this for is to capture the output of a driver, or of a chain of LEDs.

    I’ve occasionally had problems with transmission faults – collecting the data would make for an automatic comparison analysis.

    Or maybe to measure how many LEDs are in a string, by collecting the data at the trailing output end.

    1. One thing to add is that Sigrok and Pulseview have a decoder for these LED drivers as well. If you want a more ‘scope/logic analyzer type of experience, that might be the way to go. Assuming you have one of the little FX2 based probe boards.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.