Autonomous Quad Drive Omni-Bot fitted is with 4x Rotacasters Omni-wheels & uses 4x Ultrasonic Sensors for navigation.
About this creation
This Autonomous Quad Drive Omni-Bot fitted is with Rotacasters Omni-wheels and uses 4x Ultrasonic Sensors to aid in navigation. It's based on my previous Quad-Drive Rotacaster Omni-Bot with the addition of the Ultrasonic Sensors. The main challenge is to use all 4 Ultrasonic Sensors without them interfering with each other, resulting in non-valid measurement readings for distance values to objects.
Close-up of the Autonomous Quad Drive Omni-Bot.
Lego NXT Autonomous Quad Rotacaster Omni-Bot in Action!
If you wish to use Multiple Ultrasonic Sensors on your NXT Robot, you need to program them so only ONE Sensor is taking a measurement at any given time. As mentioned above, if you have all the Ultrasonic Sensors on at once they interfere with each other and give incorrect readings. To get around this you need to take advantage of the Sensors Mode 3: Event Capture Mode. Refer to the Lego Mindstorms NXT Hardware Developer Kit, Appendix 7: LEGO MINDSTORMS NXT Ultrasonic Sensor I2C communication protocol.pdffor details and if using NQC to program, consult the NXC API for using I2C Command & Control
To use the Ultrasonic Sensor's "Mode 3" with NXC, you need to use I2CWrite(PORTnumber, 0×41, 0×03) to turn on and initialise the sensor. You can the then use SensorUS(PORTnumber) to read the distance to object. To turn the Sensor Off again, you need to use I2CWrite(PORTnumber, 0×41, 0×00). You need to repeat these commands for each Ultrasonic Sensor you are using. It pays to initialise all your Ultrasonic Sensors to the Off state when the program starts.
Visit my website for some very quick & dirty, NXC Code Listing to get you started working with 4x Ultrasonic Sensors: