Using multiple I²C devices on one port
-
- Posts: 7
- Joined: 19 Feb 2011, 15:56
- Location: Germany
Using multiple I²C devices on one port
Hi,
as I ran out of ports on one of my prjojects und i dont have the money to buy a second NXT I was thinking of just connecting them to one port.
Is this possible?
i was espicially worrying about the power supply and wondering if I could just unse batterys for this purpose
Julian
as I ran out of ports on one of my prjojects und i dont have the money to buy a second NXT I was thinking of just connecting them to one port.
Is this possible?
i was espicially worrying about the power supply and wondering if I could just unse batterys for this purpose
Julian
Julian
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Using multiple I²C devices on one port
If they have different addresses, then yes, but most of the HT I2C sensors are the same as the ultrasonic sensor (0x02). Each one MUST have a different address. Most of the I2C mindsensors products have a default address of 0x02 as well, but you can change it (unlike the HT and lego sensors). If they do have different addresses, then the cheap Port Splitter that nxtreme mentioned will work, but If they don't have different addresses, then you need to use the HiTechnic Sensor Multiplexer that nxtreme also mentioned.madscripter wrote:Hi,
as I ran out of ports on one of my prjojects und i dont have the money to buy a second NXT I was thinking of just connecting them to one port.
Is this possible?
i was espicially worrying about the power supply and wondering if I could just unse batterys for this purpose
Julian
Unless I was really tight on space, I don't think I would buy the HT sensor multiplexer. It costs almost as much as you can get an NXT for, and an extra NXT would also be able to run another 3 motors, and be "smart" (do some of the processing).
As far as power, it depends on the sensors you are using. The NXT can supply about 180ma (4.3-4.7v), but it is shared by all four sensor ports, as well as the motor ports (to power the encoders). As long as you don't pull too much, it should be fine without an extra supply.
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: 7
- Joined: 19 Feb 2011, 15:56
- Location: Germany
Re: Using multiple I²C devices on one port
first of all:
thank you for this fast and great support
this is a great forum
i wanted to use a HT IR seeker V2 which luckily has the adress 0x10 and a HT compass sensor (with standart adress)
and i dont think they need too much power as this is the only port I am using with more than one I²C device.
I have now ordered chaep splitter and will try it when it arrives.
Julian
thank you for this fast and great support
this is a great forum
i wanted to use a HT IR seeker V2 which luckily has the adress 0x10 and a HT compass sensor (with standart adress)
and i dont think they need too much power as this is the only port I am using with more than one I²C device.
I have now ordered chaep splitter and will try it when it arrives.
Julian
Julian
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Using multiple I²C devices on one port
Sounds good. Yes, fortunately, HT gave one of their sensors a different address.
Just one thing, the 180ma supply needs to be shared among all ports. For example, if you have a 150ma load on one port, and a 20ma load on another, there is only 10ma left for all 5 other ports to use. This power "limitation" is not something you really need to worry about much, as most sensors only use a few ma each.
BTW, what other sensors are you using, and what is this robot for?
Just one thing, the 180ma supply needs to be shared among all ports. For example, if you have a 150ma load on one port, and a 20ma load on another, there is only 10ma left for all 5 other ports to use. This power "limitation" is not something you really need to worry about much, as most sensors only use a few ma each.
BTW, what other sensors are you using, and what is this robot for?
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: Using multiple I²C devices on one port
The HT sensors cannot have their pull-ups disabled, which may or may not give you issues. You will end up with 2 pull-ups on each line when only one is allowed. You're effectively halving your pull-up resistance.
- 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)
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Using multiple I²C devices on one port
You do have a point Xander, but I have used 10k pullups with no issues, so 41k should be okay. I have also seen three mindsensors' I2C devices all on one bus with no errors (each obviously had 82k pullups). The worst that could happen, is the sensor(s) won't see an NXT signal (low) causing it to just not work.
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: 7
- Joined: 19 Feb 2011, 15:56
- Location: Germany
Re: Using multiple I²C devices on one port
i am trying to build a soccer bot for the robocup
On S1 I have IRSeeker and compass
S2: is an USsensor (to notice if a wal is reached)
S3 is a colorsensor combined with a laserpointer to find out if the ball is directly in front of the robot
S4 will be used as a motor control for the backspinn (could look a bit like this http://www.youtube.com/watch?v=VtBDwqBpyhs)
(though i am having problems with that one)
I am using 2 motor ports as nomal wheels and one as a kicker
the problem is that everything has to fit on a circle with the diameter 22cm and can only be 22cm high(rules)
On S1 I have IRSeeker and compass
S2: is an USsensor (to notice if a wal is reached)
S3 is a colorsensor combined with a laserpointer to find out if the ball is directly in front of the robot
S4 will be used as a motor control for the backspinn (could look a bit like this http://www.youtube.com/watch?v=VtBDwqBpyhs)
(though i am having problems with that one)
I am using 2 motor ports as nomal wheels and one as a kicker
the problem is that everything has to fit on a circle with the diameter 22cm and can only be 22cm high(rules)
Julian
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Using multiple I²C devices on one port
IC. Thanks for explaining it, it sounds interesting.
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: No registered users and 2 guests