3.3V SPI device with a 5v ATMEGA328?

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
balloon-pilot
 
Posts: 6
Joined: Thu Feb 16, 2012 9:17 am

3.3V SPI device with a 5v ATMEGA328?

Post by balloon-pilot »

Hi,
Anybody know the best way to interface a 3.3V SPI device to a 5V Arduino (actually just the Atmel 328 chip)? The SPI device I have is a Hope RFM12 wireless transceiver (http://www.hoperf.com/upload/rf/RFM12B.pdf).
Powering the RFM12 is no problem but the SPI data lines will be at different levels.
I just ordered an LCD from Limor that comes with a 4050 chip to do the voltage conversion and I'm wondering if this chip would work in my case (or maybe there's something simpler?)

thanks in advance,
Phil

mwilson
 
Posts: 46
Joined: Sun Oct 23, 2011 11:17 am

Re: 3.3V SPI device with a 5v ATMEGA328?

Post by mwilson »

I haven't used this circuit myself, but it seems to have a good pedigree. It's said to be bidirectional and just uses a MOSFET and two resistors.

http://www.rocketnumbernine.com/2009/04 ... -converter

The schematic from that page is

Image

User avatar
balloon-pilot
 
Posts: 6
Joined: Thu Feb 16, 2012 9:17 am

Re: 3.3V SPI device with a 5v ATMEGA328?

Post by balloon-pilot »

Excellent website, thanks for the link. From what I read, the spi output lines from the transceiver will interface clean to the atmel (will be above .6V, and the spI input lines might just need a divider to drop the atmel's 5v down to 3.3. I'll wire it up and see what happens (success or smoke).

User avatar
Franklin97355
 
Posts: 23911
Joined: Mon Apr 21, 2008 2:33 pm

Re: 3.3V SPI device with a 5v ATMEGA328?

Post by Franklin97355 »


User avatar
philba
 
Posts: 387
Joined: Mon Dec 19, 2011 6:59 pm

Re: 3.3V SPI device with a 5v ATMEGA328?

Post by philba »

Lots of good ideas here.

I'm in the process of moving to 3.3v only. I'm using teensy 2 with the regulator in a couple of projects and like it a lot. Cost effective, small, breadboard friendly. There are only a few cases where I need more that 3.3V and I'd rather deal with them than the other way around. Feeding a 5V device 3.3V doesn't fry it.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”