Persistent nagging problem — shifting logic levels between devices that are fabbed with different technologies so their voltages end up being different. Digital circuits “trigger” based on voltage levels — a logic 1 or high signal is relative to the electrical specifications of the device and the fabrication process of the silicon. (A techie diagram is available here.) It’s not a new problem, but one I seem to be coming across more and more as I use the Arduino to do quick sketches of project ideas, or to stand-in for a more embedded solution that might use another of the Atmel 8-bit devices later on when the design and details are more refined.
I’ve tried a bunch of things, including the kind of canonical reference circuit from Philips that uses the BSN20 MOSFET. Sparkfun has a neat little breakout board using a MOSFET, the BSS138. Same principle, built out for you by the fine folk at Sparkfun.
While poking around some more what cause of this PSX project where I have an Arduino trying to talk to a Parallax Propeller, I found reference to a single-chip solution from TI that’s called a PCA9306, which is that small guy up in the photos above. (Just a hair smaller than an 8-pin SSOP package, which means that it was too small to fit on this SSOP break-out — the pins don’t reach the copper, so I had Igor do some hand work to get that to take hold.
Looks like it works fine. It only requires four pull-up resistors to manage current sink, and a current limiting resistor for the enable input, as well as the usual power decoupling capacitor. I did a quickie test, not quite using the right values for the pull-ups, so with that allowance, I pretty much got the bidirectional level translation I’ll need to allow a 5 volt Arduino talk to the 3.3v Propeller.
Here it is. Top trace is the SCl from the Arduino, bottom is 3.5v going into the Propeller. The 3.5v is a bit high, mostly because of the wrong values for the pull-ups on that side, and the fact that the Propeller is basically inert and not sourcing current across the resistor voltage drop. (I didn’t load my code onto the Propeller for this quick test.)