• Well there's yer problem

    Paul03/05/2022 at 20:30 0 comments

    Good news! I got an oscilloscope! The core problem? The "750 KHz" clock was going at 230 KHz. Nice to finally know. No wonder nothing was going right.

  • The thing itself

    Paul01/17/2022 at 06:36 0 comments

    Well, I missed the 555 contest cutoff. Darn. But here's my project anyway: A 555-based NeoPixel controller.

    The Rube Goldberg 555 NeoPixel Controller

    I wanted to create something marginally useful: a manual way to set the color for a single RGB NeoPixel. Maybe you could use it to test LEDs for duds. Maybe you could just use it. But I also decided that the 555 would be the only IC in the project. No logic gates, no crystals, no microcontroller. 

    You see, the meme here is that you could use a 555 in place of a microcontroller in many projects. So how can I create the most idiotic and complicated 555 device to do what any micro could do trivially?

    This project rapidly exploded in size and complexity once I actually started to implement it. But I learned a lot about the 555 on the way.

    My controller needed three parts besides the NeoPixel itself, and I wanted to add a fourth. They are:

    1. A 24-bit shift register, to hold an RGB triplet
    2. A clock source
    3. A clock/data to pulse encoder output stage
    4. An exotic memory, as a bonus

    Like many, I was inspired by Peter Monta's Digital logic using 555 chips. I had recently played with assembling complex logic from NAND gates and thought I could build up with the 555 similarly. And in theory, sure! But in my naivete, I thought this could be done fairly trivially.

    Let's go down the rabbit hole.

    24-bit shift register made of 555s

    Early in the project, I knew I would be making use of KiCAD 6's nested schematics to simplify laying this out into something manageable. It makes it easy to wrangle clusters of 555s.

    With hierarchical sheets, I could arrange and copy abstract blocks extremely easily in the schematic stage, speeding up the whole thing quite a bit.

    For example, this whole block (which doesn't even need the resistors, really) can be turned into this:

    So I just implemented pmonta's D flip flop once... (I do not win the schematic artistry award)

    And then duplicated it 24 times.

    This is already very silly. You see the problem already, of course. That's 11 555s per flip flop, times 24 flip flops. That's 264 555s.

    The PCB for this would be the size of an ATX motherboard if I actually laid it out.

    And the memory density! DRAM has a component density of 1 transistor and 1 capacitor per bit. This is 11 555 timers per bit. Awful. I love it. But I can't build it out of 555s - it would cost hundreds of dollars. Maybe during my mid-life crisis, but not now.


    One thing I did throughout this project was simulate the logic at the falstad.com Circuit Simulator Applet. This was critical, because pmonta's 555 digital logic writeup glossed over some details that I missed because I don't have his expertise. Specifically, I didn't understand 1) that there was 2-phase clocking and 2) why it was needed until I simulated the circuit and it behaved like a transparent latch.

    My solution was (over)simple: I inserted a 555 NOT gate to invert the clock signal, giving a quasi-two-phase clocking to the two latches that made up the flip-flop.

    One thing I did throughout this project was simulate the logic at the falstad.com Circuit Simulator Applet.

    The Clock Source

    This felt easy: I would do a slight variation on Ben Eater's clock module for his 8-bit breadboard CPU. This uses the 555 in its three basic modes - monostable, bistable, and astable - to select between a once-per-button-press clock pulse and a repeating clock source.


    I implemented this basically as is, with a handful of changes:

    • The astable clock frequency was fixed at "somewhere around 800 KHz" - in design, about 750 KHz, in practice, maybe 720? We'll come back to that.
    • The HLT line to stop the clock was omitted
    • The 74LS04 was replaced with a 555 NOT gate.
    • The Reset pin for the astable 555 was brought out to a debounced button so I could "fire" the NeoPixel data dramatically.

    The pulse encoder - NeoPixel output stage

    NeoPixels are surprisingly...

    Read more »