Hello, everyone!
For some reason we require to connect a Lego Accelerometer and a Gyroscope to a PC.
However, just plugging the cord into the according port doesn't show good results.
So, the question is, is it by any means possible to work with these sensors omitting the brick? (i.e. somehow get correct data from the device)
Thanks in advance. It's quite urgent.
Kirill.
Use Sensors With a PC Omitting the NXT Brick
Re: Use Sensors With a PC Omitting the NXT Brick
Hello ardathair
1 - The NXT brick has to be programmed to get the DATA from the sensors, as they have to be addressed by I2C.
2 - The NXT can send the DATA flow to a PC via USB or Bluetooth, but once again, you have to program this behavior.
3 - The program receiving the DATA has to be able to address and connect the NXT Brick (USB or BT), you have to embed this behavior into you program.
But, lot of resources already exist to show you how build the steps of this project.
One advantage to have the NXT Brick, is that if you want to build a mobile, you have the motor stuff already available, another advantage is that you can do some filtering and computing, to ensure usable DATA directly send to your PC.
One drawback, is that you have to "learn" NXC (easy if you already know standard "C"), or JAVA to program the NXT Brick.
One advantage to directly connect the sensors, is to short-circuit the programming issue of the Brick, BUT, no motors, and no filtering (you will have to program filtering directly into your PC program).
One drawback, you have to buy the converter, and deal with programming the driver access and sensors addressing.
Hope this help
Should i understand you had plug into the sensor ports an accelerometer and a gyroscope, and expected that the data came "magically" into the USB cord, to your PC?For some reason we require to connect a Lego Accelerometer and a Gyroscope to a PC. However, just plugging the cord into the according port doesn't show good results.
1 - The NXT brick has to be programmed to get the DATA from the sensors, as they have to be addressed by I2C.
2 - The NXT can send the DATA flow to a PC via USB or Bluetooth, but once again, you have to program this behavior.
3 - The program receiving the DATA has to be able to address and connect the NXT Brick (USB or BT), you have to embed this behavior into you program.
But, lot of resources already exist to show you how build the steps of this project.
However, you can buy an USB-I2C converter like this one http://www.robot-electronics.co.uk/htm/usb_i2c_tech.htm, and address the I2C bus, to get the DATA directly from the sensors.So, the question is, is it by any means possible to work with these sensors omitting the brick? (i.e. somehow get correct data from the device)
One advantage to have the NXT Brick, is that if you want to build a mobile, you have the motor stuff already available, another advantage is that you can do some filtering and computing, to ensure usable DATA directly send to your PC.
One drawback, is that you have to "learn" NXC (easy if you already know standard "C"), or JAVA to program the NXT Brick.
One advantage to directly connect the sensors, is to short-circuit the programming issue of the Brick, BUT, no motors, and no filtering (you will have to program filtering directly into your PC program).
One drawback, you have to buy the converter, and deal with programming the driver access and sensors addressing.
Hope this help
pbenco.wordpress.com/
-
- Posts: 1818
- Joined: 02 Oct 2010, 02:19
- Location: Michigan USA
- Contact:
Re: Use Sensors With a PC Omitting the NXT Brick
Also note that the HT Gyro is an analog sensor, not I2C. You would need an ADC to read it.
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: Use Sensors With a PC Omitting the NXT Brick
pbenco, mattallen37, thanks for the quick (and informative!) replies. They're gonna help, I guess!
To clear it all up I'll say what.
We use an embedded computer (of PC-104 format if it's interesting) to do all the thinking. It controls all drives (which we have got enough of) via our special controller. In fact we don't even have the NXT brick. And we want to make a navigation system based on the accelerometers.
So, the only place we can connect them to is the computer.
As I understand now from your words, there exists an I2C-to-USB converter, but is there maybe a ready-to-use library, a driver to get data from the devices?
Let's stop on the accelerometers for now, leaving the analogue Gyros aside.
To clear it all up I'll say what.
We use an embedded computer (of PC-104 format if it's interesting) to do all the thinking. It controls all drives (which we have got enough of) via our special controller. In fact we don't even have the NXT brick. And we want to make a navigation system based on the accelerometers.
So, the only place we can connect them to is the computer.
As I understand now from your words, there exists an I2C-to-USB converter, but is there maybe a ready-to-use library, a driver to get data from the devices?
Let's stop on the accelerometers for now, leaving the analogue Gyros aside.
Re: Use Sensors With a PC Omitting the NXT Brick
Hello mattallen37
Hello ardathair
Your problem now is that you are not at the right place, you should be more precisely advised by PC104/general robotics forum.
BUTt, if you are able to dig into your PC104-board documentation, you have to identify an available I2C bus, and an ADC input. It's generally provided through generic I/O connector. And, with the OS you selected, RTOS, Linux, WinCE, TinyOS, whatsoever... You will have to enable the driver/support, and program your behaviour.
To easily connect LEGO sensors to non LEGO boards, read : http://philohome.com/nxtplug/nxtplug.htm, and http://philohome.com/crimp/crimp.htm.
Or cut a long cable into 2, and use both part to connect your 2 sensors.
Oops, you're right, shame on me! sorry...Also note that the HT Gyro is an analog sensor, not I2C. You would need an ADC to read it.
Hello ardathair
Your problem now is that you are not at the right place, you should be more precisely advised by PC104/general robotics forum.
BUTt, if you are able to dig into your PC104-board documentation, you have to identify an available I2C bus, and an ADC input. It's generally provided through generic I/O connector. And, with the OS you selected, RTOS, Linux, WinCE, TinyOS, whatsoever... You will have to enable the driver/support, and program your behaviour.
To easily connect LEGO sensors to non LEGO boards, read : http://philohome.com/nxtplug/nxtplug.htm, and http://philohome.com/crimp/crimp.htm.
Or cut a long cable into 2, and use both part to connect your 2 sensors.
pbenco.wordpress.com/
Re: Use Sensors With a PC Omitting the NXT Brick
Dear ardathair
Hope i was not too "punchy", disgusting you to ask help here.
Did you get some progress in your project? It will be great to hear from you, and have some pictures of LEGO sensors used into non Lego environment...
Hope i was not too "punchy", disgusting you to ask help here.
Did you get some progress in your project? It will be great to hear from you, and have some pictures of LEGO sensors used into non Lego environment...
pbenco.wordpress.com/
Re: Use Sensors With a PC Omitting the NXT Brick
pbenco, it'a alright. I just had little chance to reply this week. Thanks for the help! The project is moving on, I'll post smth when we get real progress.
Who is online
Users browsing this forum: No registered users and 1 guest