Date: 03/05/2013
Duration of activity: 10:00-18:00 --> 8 hours
Group members participating: Ole Rasmussen and Kasper Føns
The first requirement is a result of the time constraints on the project. As mentioned in the project overview section we only have 6 weeks to build the system. Thus, we decided to limit the scope of the system to only sorting two types of Lego pieces. The specific types of Lego pieces are chosen based on a reasonable belief that we can sort these pieces. Axles and beams, being as universal and known as they are, seems like some of the easier pieces to sort.
The second requirement may seem awkward. Why build an extensible system when it will only be sorting two types of Lego pieces? The reason is independent developability. By architecting the system so that it is easy to add new sorting functionality we are, by the definition of extensibility, also making the system independent developable. A result we are able to develop the different components of the system in parallel and integrate them later.
The last requirement enforces certain restrictions on the system architecture. Specifically we want the system to be deployable and usable in scenarios where there are not any PC's around. One does not want to connect and configure a PC just to sort a few Lego pieces. This requirement also has an impact on the design of the system. For example, it is practically impossible to use processing-intensive technologies like image analysis and recognition in a decentralized system - NXTs alone just are not capable of holding or processing the amount of data required. Therefore, to incorporate such technologies one or more PCs are usually included as the data processor(s) as is done in e.g. [4] and [5].
Duration of activity: 10:00-18:00 --> 8 hours
Group members participating: Ole Rasmussen and Kasper Føns
1. Goal
The goal of this activity is to write a blog post (this one) that will describe the idea behind our end course project. The aim is to establish a foundation for understanding the rest of our project work.
2. Plan
This lab report contains the following sections:
- Project overview
- Project description
- System architecture
- Challenges
- Related work
In the project overview, we will describe the form of the course (and project). The project description contains an introduction to and description of the requirements for the concrete project we will be working on. In the architecture section, we will describe the high-level architecture of our proposed system. The challenges section describes the areas we believe may be troublesome. In the related work section, we describe existing work that is related to ours. This may be useful for use as reference or inspiration in the project.
3. Project overview
The work that is being reported on here and in the following blog posts is the result of an end course project carried out in the 10 ECTS semester course Embedded Systems - Embodied Agents at Aarhus University.
The course description [1] mentions that the prerequisite for examination participation is a project. According to the course homepage [2, 3] this self-chosen project is to be carried out at the end of the course, and lab reports should be written for each activity carried out. What you are currently reading is the first of several lab reports for our project.
Our concrete project is carried out in the last quarter of the course. In practice this is the period spanning the interval 03/05/2013 - 27/06/2013. While 27/06/2013 is the deadline for hand-in of the report (blog posts), the physical Lego system must be finished at 13/06/2013 where it is to be presented to the lecturer. This means we have the first 6 weeks for designing, building and coding the system while the last two weeks are used for writing and polishing the lab reports.
4. Project description
The project we have chosen is a Lego sorting system. We have defined the following requirements for the system:
- It should sort at least two types of Lego pieces: axles and beams (see Figure 1).
- It should be easily extensible.
- It should be completely decentralized, only running on NXT bricks with no PCs involved.
![]() |
| Figure 1: The two types of Lego pieces that our system should be able to sort. Axles (left) and beams (right). |
The second requirement may seem awkward. Why build an extensible system when it will only be sorting two types of Lego pieces? The reason is independent developability. By architecting the system so that it is easy to add new sorting functionality we are, by the definition of extensibility, also making the system independent developable. A result we are able to develop the different components of the system in parallel and integrate them later.
The last requirement enforces certain restrictions on the system architecture. Specifically we want the system to be deployable and usable in scenarios where there are not any PC's around. One does not want to connect and configure a PC just to sort a few Lego pieces. This requirement also has an impact on the design of the system. For example, it is practically impossible to use processing-intensive technologies like image analysis and recognition in a decentralized system - NXTs alone just are not capable of holding or processing the amount of data required. Therefore, to incorporate such technologies one or more PCs are usually included as the data processor(s) as is done in e.g. [4] and [5].
5. System architecture
We imagine the sorting system will consist of three modules: a feeder, a number of sorters and a distributor (see Figure 2). The feeder takes any (supported) Lego pieces and feeds (distributes) them to the correct sorter. The sorter takes Lego pieces of a specific type (axles, beams, pins etc.) and will be able to tell the difference between these pieces. The distributor will place the pieces in their respective buckets depending on the information it gets from the sorters.
![]() |
| Figure 2: The envisioned architecture of the Lego sorter consists of three modules; a feeder, a distributor and a number of sorters. |
5.1 Hardware
Due to the extensibility requirement for the system it will probably be the easiest to have a separate NXT for each (sub)module. Thus, one NXT is required for the distributor and each sorter must have its own NXT. Bearing the project scope in mind this brings the minimum number of NXTs needed to four. Additionally there will also be one or more NXTs needed to control the transportation mechanism between the modules.
With regards to sensors and actuators what is needed is entirely dependent on the specific implementation of each module. For example, a beam sorter module may use a motor to transport the beams past a light sensor that counts the number of holes. Generally, we imagine that each sorter will need at least one motor and one sensor. The distributor module may need several due to its complexity.
6. Challenges
We believe there are challenges both in the physical design, construction and coding of the system. Due to its complexity, it requires a substantial effort to design and build a system that will not only work but also be fast enough to be useful (i.e. sorting one axle per minute is useless). It also requires lots of time and skill to build a complete and working sorting system since it consists of many of different parts that must be interconnected.
7. Related work
In the world of Lego constructions there is one person who everyone talks about; akiyuki [6]. This guy has built some of the most advanced Lego machines in the world, including the infamous great ball contraption [7]. His repertoire includes two Lego sorting machines; the axle sorter [8] and the vision guided brick sorter [9].
Akiyuki's axle sorter runs on a single motor and sorts Lego axles using only mechanics. No sensors or PC's are involved. We imagine we will use his machine for inspiration in building our own, especially with regards to the "feeder" part which has the responsibility of feeding the sorting mechanism with a single Lego piece at a time.
The vision-guided sorter is in a whole other league. Apart from being very slow, it also requires an external PC and web camera to run the image recognition. This is very different from our system, but we mention it here anyway since it's a fine example of what a system much more advanced than ours runs and looks like.
8. Next lab
In the next lab we will start the project by doing preliminary investigations on the design and architecture of our system. We will do this by building prototypes of parts of the system to gauge the effort and time required. Hopefully we will gain insight into the challenges that lie ahead and can use this knowledge in the weeks to come.9. References
[1] “Embedded Systems - Embodied Agents, Digital Control in a Physical World (Q1+2) - Search Course,” AU Course Catalogue. [Online]. Available: http://kursuskatalog.au.dk/en/coursecatalog/Course/show/26923/. [Accessed: 04-Jun-2013]
[2] “Embedded Systems - Embodied Agents, End Course Project.” [Online]. Available: http://legolab.cs.au.dk/DigitalControl.dir/NXT/Lesson11.dir/Lesson.html. [Accessed: 04-Jun-2013]
[3] “Embedded Systems - Embodied Agents (DigitalControl) 2013 - End Course Project.” [Online]. Available: https://services.brics.dk/java/courseadmin/DigitalControl/pages/End+Course+Project. [Accessed: 04-Jun-2013]
[4] T.-H. Lee, “Real-Time Face Detection and Recognition on LEGO Mindstorms NXT Robot,” in Advances in Biometrics, vol. 4642, S.-W. Lee and S. Li, Eds. Springer Berlin Heidelberg, 2007, pp. 1006–1015
[5] A. C. Parietti Filho and M. B. R. Vallim, “Recognition and Separation of Objects on a Lego Mindstorms NXT Conveyor Belt Using Log-Polar Transform and Artificial Neural Networks,” in Robotics Symposium and Latin American Robotics Symposium (SBR-LARS), 2012 Brazilian, 2012, pp. 290–295.
[6] “LEGO TECHNIC - Akiyuki blog,” 17-Jun-2013. [Online]. Available: http://legokarakuri.blog91.fc2.com/. [Accessed: 17-Jun-2013]
[7] “LEGO Great Ball Contraption (GBC) Layout 2012.9 - YouTube,” 17-Jun-2013. [Online]. Available: http://www.youtube.com/watch?feature=player_embedded&v=sUtS52lqL5w. [Accessed: 17-Jun-2013]
[8] “LEGO Axle Sorter AS-L40A - YouTube.” [Online]. Available: http://www.youtube.com/watch?v=fM9qGZCc4DY. [Accessed: 17-Jun-2013]
[9] “LEGO Mindstorms NXT Vision Guided Brick Sorter ver1 - YouTube.” [Online]. Available: http://www.youtube.com/watch?v=6lZ9rSZwDzE. [Accessed: 17-Jun-2013]








































