Member #333036

Member Since: June 21, 2012

Country: United States

  • I just used this in a project to connect up a 3.3v magnetometer and a 3.3v accelerometer over I2C/TWI to a 5v Arduino Leonardo (Also worked with an Uno). The two I2C wires on the arduino connect to the "TXO" lines, HV connected to 5v, LV connected to 3.3v, both GND wires grounded, and the two "TXI" pins connected to the magnetometer and accelerometer being sure to match SDA and SCL lines, and I used a 4.7k pull up resistor on each line. Very simple circuit, and works PERFECTLY! No need to connect anything to RXO or RXI pins.

  • Taking a look at the datasheets, here is what I see as the major differences: 1) The pin out is reversed, so if you replace the P2N2222A with the 3904 you'll want to have it face the other way. 2) Collector current on the 2222 is 600mA, 3904 is 200mA. For my usage, I wanted to make sure I can switch the 5v relays that come with the inventor's kit and that are sold here on Sparkfun, and these do the trick just fine. :)

  • The datasheet doesn't say which pin goes to what, so here you go: The side with 3 pins is the rotary encoder output - central pin looks to be common. The easiest way to use this with an arduino is to connect common to ground, and then use the Arduino inputs in pull-up mode.

    The LEDs and central button are interfaced using the side with 5 pins. With the shaft facing away from you, looking at the bottom of the device, with the 5-pin side on the top and 3-pin side on the bottom, the pins are: Common (+5v), Blue, Button, Green, Red. Pressing the shaft button shorts the +5v common and the center pin. There are no internal resistors, so be sure to use one on each of the 3 LED pins. Use a 120ohm (or higher) resistor on the red, and a 68ohm (or higher) resistor on the other two, if you're using 5v.

No public wish lists :(