5 volt picaxe to 3v module

russbow

Senior Member
I am hoping to interface a picaxe 18m2 ( at 5 volts ), to a HMC 5883L module ( at 3.3 volts ), using I2C for communication.
Are there any " gotcha's " to look out for, or must both device run off the same voltage.
If different supply voltages are OK, should I tie the I2C data and clock lines to the higher or lower voltage.
 

inglewoodpete

Senior Member
There was quite a thorough discussion on 3.3v to 5v interfacing in this thread.

westaust55 could probably provide quite a bit of help in this interfacing area but it's the middle of the night here. He'll surface in a few hourzzzz.
 

Hemi345

Senior Member
If you can solder surface mount, there are simple level translators for i2c that make this very easy, such as the PCA9306
 

westaust55

Moderator
as per my post in the thread IWP provided a link to, when just dealing with i2c comms, I use the single transistor scheme as per the Philisp/NXP i2c specification document found here:
http://www.cs.unc.edu/Research/stc/FAQs/Interfaces/I2C-BusSpec-V2.1.pdf.
See Figure 45 in section 18.1. Figure only attached here for ease of reference since I have ofter referred folks to the i2c specification.

I have always used 2N7000 (FET type) transistors for those required. Note that there are pull-up resistors on both sides of the transistors.
 

Attachments

PieM

Senior Member
I use Infrared Thermometer - MLX90614 3.3V on a 14M2 5V with data and clock lines tied to 3.3V by 4.7k
Scl and Sda are open collector and high level seem to be OK for Picaxe!
 

russbow

Senior Member
Thank you all for your comments. Pretty obvious really :eek:
Been so used to " 3 fresh AA cells ", never thought of running Picaxe from lower voltage. The serout to 5 volt display works fine too.

@Westy. Thanks for the bi-directional circuit. Duly added to the grimoir:)
 
Top