Logic Level Converter
Moderators: adafruit_support_bill, adafruit

Logic Level Converter

by rahatmaini on Sat Feb 23, 2013 6:48 pm

I am using the Nunchucky and the 4 bit i2c safe Logic Level Converter together. I must have checked the wiring 10 times, and I am almost 100% sure that neither of the products are defective. When I use the Nunchucky with the Arduino alone, there is no problem but I want to use the Converter to make sure my nunchuck is safe from 5v logic. So I followed this forum: viewtopic.php?f=22&t=35717&p=176699#p176699. Did everything according to that. But with the logic level converter, it does not work at all!

Please Please Please help Adafruit! Am I using the logic level converter wrong? :cry:

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm

Re: Logic Level Converter

by adafruit_support_mike on Sat Feb 23, 2013 10:03 pm

Do you have a picture or diagram for your circuit? That will help us spot errors that might be getting past you.

Personally, I have more d'oh! moments than I want to admit, not because I don't know something, but because what I think I know is wrong.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10218
Joined: Thu Feb 11, 2010 2:51 pm

Re: Logic Level Converter

by rahatmaini on Sat Feb 23, 2013 10:07 pm

Nunchucky.jpg
Nunchucky.jpg (158.48 KiB) Viewed 1107 times

I have followed this exactly. Note that if I just remove the logic converter and connect the Nunchucky regularly, it works fine. (But then again, it is a 3.3v logic device)

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm

Re: Logic Level Converter

by rahatmaini on Sat Feb 23, 2013 10:08 pm

An important thing to note actually is that I have not soldered the logic level converter to a header strip, I have just press fitted but made sure the pins stay in contact

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm

Re: Logic Level Converter

by rahatmaini on Sun Feb 24, 2013 4:35 pm

Any help Adafruit? You guys told me that this would work!

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm

Re: Logic Level Converter

by rahatmaini on Sun Feb 24, 2013 8:08 pm

I just soldered this and still no luck. Thanks for support :(

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm

Re: Logic Level Converter

by Arctic_Eddie on Sun Feb 24, 2013 8:11 pm

A clear photo of your setup will help.
Arctic_Eddie
 
Posts: 208
Joined: Tue Feb 28, 2012 6:01 pm
Location: St. Petersburg, FL

Re: Logic Level Converter

by rahatmaini on Sun Feb 24, 2013 8:41 pm

WP_000436.jpg
WP_000436.jpg (185.67 KiB) Viewed 1031 times
Please ask if connections are unclear

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm

Re: Logic Level Converter

by adafruit_support_mike on Mon Feb 25, 2013 12:08 am

That is some fun wiring, but the connections do seem to match the circuit diagram. ;-) The next step is to make sure the connections are actually working. Breadboards are notorious for being wonky.

Do you have a multimeter with a connectivity/diode-test function? If so, touch the probes to the PCB pads at both ends of each wire and you should get a beep if there's a good connection. If not, you can use an ohmmeter and look for resistances of zero ohms (or some low value) between points that are supposed to be connected. Also check the voltages between the VCC and GND pins of both breakout boards, just to be sure power is getting where it's supposed to.

Next, do a basic sanity test on the level-shifting circuits. Disconnect the lead to the 3.3v input, connect the 5v input to GND, and measure the voltage at the 3.3v input pin. It should be GND or something close to it. Disconnect the lead to the 5v input, connect the 3.3v input to GND, and check the 5v side. It should be GND again.

If your multimeter has a frequency counter, get the clock running and check for the right frequency on the B2, A2, and CLK pads on the breakouts.

If all else fails, try tightening up your wiring. I2C clocks run at 100kHz and 400kHz, long looped wires have inductance, and breadboards have a lot of stray capacitance. It's possible that parasitic effects are messing with the signals.

Do solder all your header pins to the breadboards.. you might not notice the effects of a pin making and breaking contact for a few milliseconds, but trust me, the I2C circuits will.

To dig deeper than that you'll need more than just a multimeter.. an oscilloscope or logic analyzer would be ideal, but they're both pricey. If you have a second Arduino, you can fake a logic analyzer by sampling input pins really fast, but that's an adventure we can discuss if you end up needing it.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10218
Joined: Thu Feb 11, 2010 2:51 pm

Re: Logic Level Converter

by adafruit_support_mike on Mon Feb 25, 2013 12:11 am

Ugh, I'm a bit slow tonight..

If you want a good-but-affordable piece of test gear, the Bus Pirate (http://www.adafruit.com/products/237) has built-in I2C sniffing features. It's a sweet little device, and only costs $30.
When you void a product warranty, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.
User avatar
adafruit_support_mike
 
Posts: 10218
Joined: Thu Feb 11, 2010 2:51 pm

Re: Logic Level Converter

by rahatmaini on Mon Feb 25, 2013 12:24 am

You sir, are amazing. Extremely helpful,now I understand why adafruit is so successful. Its because they have a community with people like you. Thank you. :D

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm

Re: Logic Level Converter

by Arctic_Eddie on Mon Feb 25, 2013 9:07 am

One thing that helps in diagnosing a wiring problem via a photo is to use particular wire colors. This of course assumes you have a good supply. Adafruit has a good combination of length and male/female connections. Here are some common usages but not absolute. Excess wire length also confuses the issue. Photos can be taken at about 60 degrees above the horizontal. Focus is important when wires plug into adjacent pins on a header or plugboard.

Red - 5V or higher

Black - ground

Orange - 3V3

Yellow - I2C clock ??? May be reversed with green

Green - I2C data ??? May be reversed with yellow

Blue - pulled down logic

White - pulled up logic
Arctic_Eddie
 
Posts: 208
Joined: Tue Feb 28, 2012 6:01 pm
Location: St. Petersburg, FL

Re: Logic Level Converter

by rahatmaini on Sat Mar 09, 2013 2:01 pm

Soldered both the Nunchucky and the Logic Level Converter. Checked all the connections by plugging in various LEDs and using the Arduino to control them using the holes of the breadboard. Everything is correctly arranged and I have used about 10 different sketches online. I am using an official Nunchuck from Nintendo. What is going on guys? Come on I bought a soldering iron from Adafruit just for this and none of this stuff works.

What do I do now? Adafruit does not even give refunds for this. The forums are so helpful yet the products are low quality. Come on guys. Please :(

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm

Re: Logic Level Converter

by adafruit_support_rick on Sat Mar 09, 2013 4:07 pm

The picture you posted - was that before or after you soldered the header pins? Because they don't look soldered in that photo...

adafruit_support_rick
 
Posts: 13061
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Logic Level Converter

by rahatmaini on Sat Mar 09, 2013 8:15 pm

That was looong time back. I recently ordered a soldering iron and soldered the pins. If you do not believe me, I can post pics of the soldered items if you want :)

rahatmaini
 
Posts: 165
Joined: Wed Aug 29, 2012 5:15 pm