I added inline resistors when testing with the bus pirate. The bus pirate wouldn't work with these resistors. So the inline resistors seem to be a problem indeed and the level shifter isn't the solution.
I had only one option left. Soldering over the inline resistors in the NXT, and so I did.
Succes!!!!
The IMU works!
So, this is the proof, it were the inline resistors that prevented the NXT to talk to the IMU. It took me a month to find out. It is a pity though that I didn't find another solution, one that all might benefit from. I wonder why lego has placed these resistors there in the first place.
Now I will try to get rid of the level shifter all together, and then I will try to put the hardware in a lego sensor housing. In the mean time I will write a driver for the IMU.
I want to thank everybody for their help and moral support. Thanks!
Custom I2C sensor problem
Re: Custom I2C sensor problem
My blog: nxttime.wordpress.com
Re: Custom I2C sensor problem
Wow, so you had to modify your NXT to make this work? Sounds like a pretty desperate thing to do, I guess you *really* want that IMU working
- Xander
- 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
Now take care with that port! since regular I2C sensor are 5V powered, you might either fry NXT arm inputs that are only 3.3V tolerant, the protection diode of the port, or your sensor trying to drive current through this diode. I agree that most probably nothing bad will happen, but I'd nonetheless avoid that...aswin0 wrote:I had only one option left. Soldering over the inline resistors in the NXT, and so I did.
Did you try a bus repeater chip such as PCA9515A? (OK, I should re-read the complete thread since answer is probably there...)
Philo
Re: Custom I2C sensor problem
Now take care with that port! since regular I2C sensor are 5V powered, you might either fry NXT arm inputs that are only 3.3V tolerant, the protection diode of the port, or your sensor trying to drive current through this diode. I agree that most probably nothing bad will happen, but I'd nonetheless avoid that...aswin0 wrote:I had only one option left. Soldering over the inline resistors in the NXT, and so I did.
Did you try a bus repeater chip such as PCA9515A? (OK, I should re-read the complete thread since answer is probably there...)
Philo
-
- Posts: 323
- Joined: 29 Sep 2010, 05:03
Re: Custom I2C sensor problem
That's a pretty drastic solution! As others have said take care with using that port. If you short it out you may well fry the main cpu without that resistor... This question may be rather late, but which sensor port have you been using for all of these tests?
Re: Custom I2C sensor problem
I read in the datasheet that the IO pins are 5V tolerant. But I will be very carefull indeed.philoo wrote: Now take care with that port! since regular I2C sensor are 5V powered, you might either fry NXT arm inputs that are only 3.3V tolerant
I did try a level shifter, as far as I understand this is more ore less the same, but this didn't work. But if there is a bettor solution I would like to know. The repeater chip that you pointed out is not 5V tolerant.philoo wrote:Did you try a bus repeater chip such as PCA9515A? (OK, I should re-read the complete thread since answer is probably there...)
I used port 2 most of the times, but I tried others as well. I removed the resistors from port 3.gloomyandy wrote:This question may be rather late, but which sensor port have you been using for all of these tests?
BTW, what kind of pullups should I use now the inline resistors are gone?
My blog: nxttime.wordpress.com
Re: Custom I2C sensor problem
Yes it is 5V tolerant. If you power it from 3.3V it will work fine on NXT and will not fry your imu. But if you prefer there is also the PCA9517...I did try a level shifter, as far as I understand this is more ore less the same, but this didn't work. But if there is a bettor solution I would like to know. The repeater chip that you pointed out is not 5V tolerant.
Something like 2.2k would probably be fine.BTW, what kind of pullups should I use now the inline resistors are gone?
Philo
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Custom I2C sensor problem
Congratulations! I am glad you FINALLY got it to work! BTW, now that you are accessing the pins directly, and that the IMU it's self HAD 4k7 pullups, that is what I would use (maybe even 10K). If the NXT was using something more like the "standard" 100 or 400 kHz speed, then a lower value (like 2k2) would probably be better; however, I will not attempt to argue with Philo, I just think 2k2 is a bit strong.
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
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest