Saturday, February 3, 2007

What the “Wait For Ultrasonic And Touch Sensor” brick does

The sensor will wait until either the Ultrasonic sensor has detected the selected range, or until the touch sensor is pushed. It will return the value 1 if the Ultrasonic sensor has detected the selected range, it will return the value 2 if the touch sensor was pushed, and it will return 3 if both events happened together.

Configuring the brick

  • You need to provide the ports to which the touch sensor and the ultrasonic sensor are connected.
  • For the ultrasonic connector, you must also specify the trigger point. This is the distance that the ultrasonic sensor is responding to.
  • If you want the ultrasonic to trigger when it comes too close to an obstacle, check the "Trigger If Closer Than Trigger Point" box. When this box is unchecked, the ultrasonic sensor will fire when there is no obstacle between the robot and the trigger point distance.

Sample Application

In this sample application, the robot has an ultrasonic sensor at the front, and a bumper at the back.



This application will drive forward until the ultrasonic sensor detects an obstacle closer than 30 cm. When that happens, it will drive backward and turn until the obstacle is further than 50 cm, or until it bumps into something with the rear bumper. Then it will start to drive forward again.

With this simple program, the robot can navigate the room and avoid obstacles and walls.

Sample Application 2

In this second sample application, we'll make things a little bit more complicated. This time, the bumper and the ultrasonic sensor are both at the front of the robot. When the bumper is pushed, then some obstacle did not get properly detected by the ultrasonic sensor.

We want the robot to drive forward. When the ultrasonic sensor sees an object, then it should simply turn a number of degrees to avoid the obstacle. But if something hits the bumper, it may be blocking the robot. The robot may not be able to turn. Therefore, the robot should first drive backward, and then turn. Here's the program that does this:

sample program 2


Here's the setting of the switch (if-then) statement:

switch settings


Notice that I have set the second option as the default option. That means that if both the ultrasonic and touch sensor fire at the same time, then we will respond to the bumper and ignore the ultrasonic sensor.

Wednesday, January 10, 2007

Introduction to rotary motion


Introduction to flat pulleys:

Rotary motion is the most common type of motion for a shaft or an axle. One way in which an engineer uses rotary motion is by transmitting it from one shaft to another when the shafts are parallel. This can be done by using pulleys and belts. A pulley is a wheel which may or may not have a grooved rim.
The figure below shows a stacked vee pulleys and vee belts often used in car engines.




The main function of pulleys and belt systems are to transmit motion and torque from an engine to a machine. Various types of pulleys and belts are used on different machines. Machines used in the home, such as sewing machines, washing machines, spin dryers and vacuum cleaners. The picture below shows a flat belt and flat pulley used to transmit motion from an old heat engine.













From flat pulleys to toothed pulleys



In machines where a positive drive is essential and no slip between belt and pulleys can be accepted, a toothed belt and pulley is used. Toothed belts are mainly used for timing mechanisms, where quiet, positive (no slip) drive is required. The figure below shows a toothed belt and toothed pulleys used to drive a camshaft in a motor car engine.




Toothed belt and toothed pulleys













The gear wheel



The gear wheel is a basic mechanism. Its purpose is to transmit rotary motion and force. A gear is a wheel with accurately machined teeth round its edge. A shaft passes through its center and the gear may be geared to the shaft. Gears are used in groups of two or more. A group of gears is called a gear train. The gears in a train are arranged so that their teeth closely interlock or mesh. The teeth on meshing gears are the same size so that they are of equal strength. Also, the spacing of the teeth is the same on each gear. An example of a gear train is shown below.



Single gear gear train








Rotation direction


When two spur gears of different sizes mesh together, the larger gear is called a wheel, and the smaller gear is called a pinion. In a simple gear train of two spur gears, the input motion and force are applied to the driver gear. The output motion and force are transmitted by the driven gear. The driver gear rotates the driven gear without slipping.
The wheel or the pinion can be the driver gear. It depends on the exact function the designer wishes the mechanism to fulfill. When two spur gears are meshed the gears rotate in opposite directions, as shown in the figure below.



Wheel and pinion

Monday, January 8, 2007

Pulley Basics
Official Pulley Inspector

The Summerlift Cable lift models permit cabinet builders to take advantage of cables & pulleys & strategic leverage to accomplish load lifts. This provides the cabinet maker with maximum design latitude.

WHAT IS A PULLEY?
A pulley is a simple machine made with a rope, belt or chain wrapped around a wheel. The pulley is usually used to lift a
heavy object (load).

WHAT DOES A PULLEY DO?
A pulley changes the direction of the force, making it easier to lift things

ARE ALL PULLEYS THE SAME?
No, they are not. There are three types of pulleys:

*A FIXED PULLEY
*A MOVABLE PULLEY and
*A COMBINED PULLEY

A single pulley changes the direction of the lifting force. For example, if you are lifting a heavy object with a single pulley anchored to the ceiling, you can pull down on the rope to lift the object instead of pushing up. The same amount of effort is needed as without a pulley, but it feels easier because you are pulling down.


A fixed pulley is the only pulley that when used individually, uses more effort than the load to lift
the load from the ground.

The fixed pulley when attached to an unmovable object e.g. a ceiling or wall, acts as a first class lever with the fulcrum being located at the axis but with a minor change, the bar becomes a rope.

The advantage of the fixed pulley is that you do not have to pull or push the pulley up and down.

The disadvantage is that you have to apply more effort than the load



A movable pulley is a pulley that moves with the load.

The movable pulley allows the effort to be less than the weight of the load. The movable pulley also acts as a second class lever. The load is between the fulcrum and the effort.

The main advantage of a movable pulley is that you use less effort to pull the load.

The main disadvantage of a movable pulley is that you have to pull or push the pulley up or down.

If you add a second pulley, the amount of effort to lift the heavy object is much less .

For example, to lift a box weighing 150 N, one would need to exert 150 N of force without the help of pulleys.

However, by using just two pulleys, the person would only need to use 50 N of force.

A combined pulley makes life easier as the effort needed to lift the load is less than half the weight of the load.

The main advantage of this pulley is that the amount of effort is less than half of the load.

The main disadvantage is it travels a very long distance.

BASIC PULLEY PHYSICS

This figure shows a single pulley with a weight on one end of the rope. The other end is held by a person who must apply a force to keep the weight hanging in the air (in equilibrium).

There is a force (tension) on the rope that is equal to the weight of the object. This force or tension is the same all along the rope. In order for the weight and pulley (the system) to remain in equilibrium, the person holding the end of the rope must pull
down with a force that is equal in magnitude to the tension in the rope. For this pulley system, the force is equal to the weight, as shown in the picture. The mechanical advantage of this system is 1!

In the second figure, the pulley is moveable. As the rope is pulled up, it can also move up. The weight is attached to this moveable pulley. Now the weight is supported by both the rope end attached to the upper bar and the end held by the person! Each side of the rope is supporting the weight, so each side carries only half the weight (2 upward tensions are equal and opposite to the downward weight, so each tension is equal to 1/2 the weight). So the force needed to hold up the pulley in this example is 1/2 the weight! The mechanical advantage of this system is 2; it is the weight (output force) divided by 1/2 the weight (input force).
Each figure below shows different possible pulley combinations with both fixed and moveable pulleys. The mechanical advantage of each system is easy to determine. Count the number of rope/cable segments on each side of the pulleys, including the free end. If the free end is to be pulled down, subtract 1 from this number. This number is the mechanical advantage of the system! To compute the amount of force necessary to hold the weight in equilibrium, divide the weight by the mechanical advantage!
Here there are 3 sections
of rope. Since the applied force is downward, we subtract 1 for a mechanical advantage of 2. It will take aforce equal to 1/2 the weight to hold the weight steady.
This figure has the same two pulleys, but the rope is applied differently and it is pulled upwards. The mechanical advantage is 3, and the force to hold the weight in equilibrium is 1/3 the weight.


When designing the system you will utilize to raise and lower a TV, etc., think about the load you plan to lift.

1. How heavy is it?

2. Can pulley positions be placed to take advantage of leverage?

Particularly important to remember is that both sides of your platform MUST be raised with identical pulley layouts.

If this isn't done, one side will move faster than the other --



Saturday, November 18, 2006

Using NXT Ultrasonic Sesnor for Obstacle Race IROC

IROC using NXT Ultrasonic Sensor
Wait for Ultrasonic Sensor

What the “Wait For Ultrasonic And Touch Sensor” brick does
The sensor will wait until either the Ultrasonic sensor has detected the selected range.
It will return the value 1 if the Ultrasonic sensor has detected the selected range, it will return the value 2.

Configuring the brick

Example on the use of Ultrasonic Sensor for IRO competition
Robot will travel forward until it sensors an obstacle less than 5 inches distance, it reverses and turn left and forward again. It
keeps on a loop until it paases through the obstacle.
The Program to do is as follows:

Ultrasonic Sensor is configured to perform as follows



Wednesday, November 15, 2006

My First NXT Construction with Light Sensor

My First NXT Construction
and
My NXT Sets include the following







Simple Construction Steps













Third wheel assembly










Video in Action
Simple NXT Line Follower Video Clip


Finished NXT Robot








Bottom View



Simple logic to trace a simple curve black line








Free Blog Content