Custom I2C sensor problem
Re: Custom I2C sensor problem
I've been quite interested to see what the outcome of this thread will be! But meanwhile, I do have one comment. If your in need of an oscilloscope, you might try a software 'scope. While they aren't exactly fast or terribly accurate, they might work for slower baud rates. Check out this post on LMR, it mentions software for both Linux and Windows. You'll need to put together a bit of additional hardware to protect your sound card but it shouldn't be too hard .
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
Re: Custom I2C sensor problem
These might also be a nice alternative:
http://www.gabotronics.com/development- ... otolab.htm
http://www.watterott.com/index.php?page ... &info=1531
I own neither, but the first one looks pretty darn handy.
- Xander
http://www.gabotronics.com/development- ... otolab.htm
http://www.watterott.com/index.php?page ... &info=1531
I own neither, but the first one looks pretty darn handy.
- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
Re: Custom I2C sensor problem
The SDA shows 2.01V, the SCL has 0.97V using 47K pull ups.gloomyandy wrote:Aswin quick question. What voltage are the clock and data lines at if you have the IMU powered up, with the pull-ups connected but with neither the NXT or the bus pirate connected to them?
Andy
I know that, but it is 3.3V tolerant and I use it with 3.3V to rule out other errors like in the power supply, cabling etc.mattallen37 wrote:I looked at the blinkM datasheet, and it looks like it is supposed to be 5v, not 3.3v.
mattallen37 wrote:Anyhow, I didn't see VIL for it, but if you are using 47k up to 3.3v for the blinkM, and it works, VIL must be at least 0.3v (vs. 0.1 for the IMU)
It seems that you calculate the VIL from the pull up value. How do you do that?
Well, by now the world knows how good I am with a bit of additional hardware but I'll give it a try.nxtreme wrote:IIf your in need of an oscilloscope, you might try a software 'scope. While they aren't exactly fast or terribly accurate, they might work for slower baud rates. Check out this post on LMR, it mentions software for both Linux and Windows. You'll need to put together a bit of additional hardware to protect your sound card but it shouldn't be too hard .
My blog: nxttime.wordpress.com
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Re: Custom I2C sensor problem
Hmm 0.97 sounds a little low for a line that should really be an input in that state. I suspect that the NXT may end up seeing that as logic level 0 and may refuse to even begin to try and drive it with i2c. How do those voltages compare to having the blinkM in the circuit (on its own with no NXT connected but running from 3.3v)?
Andy
Andy
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Custom I2C sensor problem
Well, I am not really doing that. If it works using 47k pullups to 3.3v, then I use the voltage divider equation to figure out the lowest voltage that it is getting, and since it functions at that voltage, I can assume that VIL is at least that voltage. In this case, using a 47k pullup to 3.3v, and having a 4k7 resistor to LOW, the voltage between them (the IO line) is at 0.33 volts. since it works at that, it is obvious that VIL must be >= 0.33 volts.aswin0 wrote:It seems that you calculate the VIL from the pull up value. How do you do that?
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Custom I2C sensor problem
The reason that it will not work connected to the NXT without a mediator, is that in order to reach VIL of 0.1v, the pullups must be about 150k, but in order to pull the lines high enough, they probably need to be more like 33k (or even stronger). The only way I can see to fix this, is to use a mediator that either lets the pins truly float (meaning that any resistor will pull it up to close to 3.3v), or has a higher VIL. What you need, is some type of buffer. The level shifter should (I think) be able to do what you need, but I am not sure.
Why would a company EVER make an IC with VIL as low as 0.1 volts? That is totally CRAZY.
Another option you could try, is to solder over the protection resistors in your NXT. However, that could be risky.
Why would a company EVER make an IC with VIL as low as 0.1 volts? That is totally CRAZY.
Another option you could try, is to solder over the protection resistors in your NXT. However, that could be risky.
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
Re: Custom I2C sensor problem
SDA=1.61V CLS=0.97Vgloomyandy wrote:Hmm 0.97 sounds a little low for a line that should really be an input in that state. I suspect that the NXT may end up seeing that as logic level 0 and may refuse to even begin to try and drive it with i2c. How do those voltages compare to having the blinkM in the circuit (on its own with no NXT connected but running from 3.3v)?
Andy
My blog: nxttime.wordpress.com
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Re: Custom I2C sensor problem
Matt there is no 4.7K resistor to LOW? There is a current limiting 4.7K resistor in the input line and a 1M resistor to ground then a couple of clamp diodes:
So the the input voltage should actually be 3.3v*(1000/(4.7+47+1000)) = 3.1v with a 47K pullup.
But looking as aswins voltage readings on the clock line the voltage is going to be 0.97*(1000/(4.7+47+1000)) = 0.92v
which seems low to me.
Aswin the figures for the blinkM are they with a pullup in place? If so what value?
So the the input voltage should actually be 3.3v*(1000/(4.7+47+1000)) = 3.1v with a 47K pullup.
But looking as aswins voltage readings on the clock line the voltage is going to be 0.97*(1000/(4.7+47+1000)) = 0.92v
which seems low to me.
Aswin the figures for the blinkM are they with a pullup in place? If so what value?
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Custom I2C sensor problem
I know, but when the NXT pulls the pin to LOW, it is as if the 4k7 resistor was a pulldown resistor to the IO line at the port.gloomyandy wrote:Matt there is no 4.7K resistor to LOW? There is a current limiting 4.7K resistor in the input line and a 1M resistor to ground then a couple of clamp diodes:...
Matt
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
http://mattallen37.wordpress.com/
I'm all for gun control... that's why I use both hands when shooting
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Re: Custom I2C sensor problem
So you are suggesting that the problem is that the IMU is failing to recognize a logic 0 from the NXT? What makes you think the VIL for those chips is as low as 0.1V. A more normal value would be 0.8v (as used by the AT91 in the NXT).
Aswin an easy way to test this theory is to set things up with your bus pirate with a 47K pullup and place a 4.7K resistor in line with the output of the bus pirate (in effect making the bus pirate have the same interface as the NXT). If the bus pirate can still talk to the IMU then the NXT should be able to as well... So the connections would be bus pirate -> 4.7K -> IMU + 47K pullup.
Andy
PS Are you having fun yet...
Aswin an easy way to test this theory is to set things up with your bus pirate with a 47K pullup and place a 4.7K resistor in line with the output of the bus pirate (in effect making the bus pirate have the same interface as the NXT). If the bus pirate can still talk to the IMU then the NXT should be able to as well... So the connections would be bus pirate -> 4.7K -> IMU + 47K pullup.
Andy
PS Are you having fun yet...
Who is online
Users browsing this forum: Majestic-12 [Bot] and 1 guest