Lego Mindstorms Robotics Project: Junction

by Михаил Матеев on January 17, 2011 · 0 comments

in Lego Mindstorms NXT, Robotics, Компютри

This is a Lego Mindstorms Robotics project called Junction.

It features Ultrasonic Sensor (far right of the photo) as train detector. When the train is detected the bars are lowered at 90 degrees, bi-tonal sound alarm is emitted by the brick, and Light Sensor is used as a warning light. After a preset time of delay  bars are raised back and sound and light stops afterwards. Simple cycle and parallel operations are introduced. (LEGO® MINDSTORMS® Sets used: LEGO MINDSTORMS NXT Education Base Set 9797 and LEGO Education Resource Set 9648.)

Contents:

1. Overview
2. Video and photos
3. Building instructions
4. Programming – screenshots and the program itself
5. Challenges


1. Overview// back to Contents

This is a Lego Mindstorms Robotics project called Junction.

It features Ultrasonic Sensor (far right of the photo) as train detector. When the train is detected the bars are lowered at 90 degrees, bi-tonal sound alarm is emitted by the brick, and Light Sensor is used as a warning light. After a preset time of delay  bars are raised back and sound and light stops afterwards. Simple cycle and parallel operations are introduced. (LEGO® MINDSTORMS® Sets used: LEGO MINDSTORMS NXT Education Base Set 9797 and LEGO Education Resource Set 9648.)


2. Video and photos// back to Contents

Video 1:

Video 2:

Initial state: The bars are lifted, it is safe to pass with the car. Warning light (light sensor) and sound alarm (from the brick) is off.

The train came. The cable is too short for the Ultrasonic sensor and the train is too fast. Therefore the bars are almost down – they are still going down.

The train just passed. The bars are down, the warning light is on, and the sound alarm is on.

The bars are lifting up. The warning light and the sound alarm are still active until the final raise of the bars.


3. Building instructions// back to Contents


3.1. Bar (repeat this step twice to build 2 bars)


3.2. Motor stand (repeat this step twice to build 2 pairs of motor stands)


3.3. Motor assembly (repeat twice to assemble 2 motors)


A motor with bar, on stands – final view.


3.4. Ultrasonic sensor assembly


3.5. Light Sensor assembly


3.6. Wiring: 2 x 35 cm cables and 2 x 50 cm cables


3.7. Additional chassis – not necessary for the project itself but it is visible on the photos. So, if you want to have Lego car,  you may follow these steps.


4. Programming – screenshots and the program itself// back to Contents


4.1. Ultrasonic Sensor

Ultrasonic Sensor settings


4.2. Motor section

Motors settings. (Very important: first use 3- or 5-hole beams to imitate the long bars. Otherwise you risk to break the equipment on the initial tests of the motors’ direction. Once you determine the direction and speed, it is safe to put the long bars from step 3.1. Initial state of the bars is up.)

Motors Wait block settings

Motors lift up bars settings


4.3. Light section



Light is on.

Wait block for Light Sensor

Light is off.


4.4. Sound warning section – realized by 2 tone sequence in 10 seconds cycle

Cycle condition – repeat until 10 seconds pass.

Tone block 1 – settings

Tone block 2 – settings


The program (in NXT-G graphical language) is available here: RBT file (zipped): http://MihailMateev.com/download/junction.zip


5. Challenges// back to Contents

– Right now the program is one pass of the train. Is it possible for you to make it to work for 5 passes or infinite number of passes?

– Right now the control  of the bars is automatic. Can you make it manual (using another sensor?) Can you make double control – automatic and manual?

– Right now the stands of sensors and motors are very simple. Can you make better stands?

{ 0 comments… add one now }

Leave a Comment

Previous post:

Next post: