One of the challenges I’m pretty sure to run into setting up the Wall of Awesome is interfacing 3.3V to 5V logic. The Raspberry Pi runs on 3.3V, and the LED strips need 5V signaling.

So I did a bit of googling about this, and I found a cute little circuit online.

img_0292

This is a simple little circuit should do a decent job of level translation — so the theory goes. The operation goes like this:

  • When the input (on the left) is low current flows through the transistor from the base to emitter, which in turn allows a greater current to flow from collector to emitter amplified by the beta of the transistor. This, in turn, will cause a voltage drop across the collector resistor pulling the output low.
  • When the input is high current stops flowing from the base to emitter, which stops the current flowing from collector to the emitter. This allows the output to get pulled high through the resistor.

I prototyped this up on a breadboard.

img_0293

(I love having enough of a parts bin just to pull crap out of the bin and prototype something up!)

This worked. Kind of.

tek00001

The yellow trace is the input; the cyan is output.

The problem is that when I’m feeding in the square wave, there’s a 0.5µs delay until the 5V output goes all the way up to 5V.

These are the problems I enjoy. The reason my resistor values are so low is I was trying the experiment to see how that would change things. It seemed to speed things up a bit, but it remained. Some looking at Wikipedia I found talk of the turn on, turn off delay. It seems endemic to BJTs in general.

So from here I have some options, which I’ll go over tomorrow.