We have made new plans for Lego World 2015 and partly with a new team. The group now consists of 9 programmers, including a specialist in Linux programming. Find out what he is doing in a Microsoft .NET expertise group…
Some of the things we have build for Lego World 2014 (like the Delivery Station and the Candy Crane) will be kept, but other things will completely be redesigned. This applies for both the Lego objects as for the software.
The basic idea remains unchanged: the visitor can choose a color (red, yellow, green or blue), one of the two trains will pick up the candy in the corresponding color and deliver it to the visitor.
In the paragraphs below, a short overview is given of the planned changes for 2015.
Redesign automatic switches
The current switch mechanism were designed for the NXT motors. Since the bluetooth connection is less reliable, we had to switch to EV3 bricks for the WiFi connection. The mechanism was still based on the NXT motors. Although this works fine with an EV3 brick, we will update the mechanism to EV3 motors as well. In the picture below, a modular mechanism is sketched which will be used for this update.
Candy Crane Supply Mechanism
The Candy Crane will be extended with a mechanism that can store the candies, sort them and put them on the crane pick-up position. The operator only needs to supply enough candy to the storage, from that point the candy crane will operate completely independent. This will be quite a challenge, since the candy has to placed in a specific up-right position.
Linux firmware update: bi-directional mailbox mechanism
As mentioned in the article “Sending data over WiFi between our PC application and the EV3”, it is not possible to use the mailbox mechanism in both directions when connected via WiFi. You can only send messages from the PC to the EV3 when using WiFi, the other way around just doesn’t work. We now use files and a hand-shaking protocol as a bypass. But… Sioux Embedded Systems is not only specialized in .NET software development, Linux is also one of our competences. So, why not update the Lego firmware since this is ‘just another Linux program’?
Tom Geelen, one of our Linux specialists, has joined our team and is trying to update the firmware with a bi-directional WiFi mechanism in the coming year. This will be quite a challenge, but that is the idea behind learning😉.
Daisy Chain WiFi mode
One of the interesting features, is the EV3 Daisy Chain mode. Up to four EV3’s can be connected and act like one EV3 that is able to control 16 motors and 16 sensors. But… it is not possible to use the Daisy Chain mode in combination with WiFi.
Since we are already trying to update the firmware for the mailbox mechanism, we will also try to get the Daisy Chain functionality running with a WiFi connection. We have several possibilities to implement this:
- Two bricks connected by cable, the master (1) is able to ‘access’ the WiFi dongle inserted at the slave (2)
- Two bricks connected by a cable, but a splitter is used at the master (1) to access both the slave (2) and the WiFi Dongle
- Two bricks connected by WiFi. The master (1) connects via WiFi to the Slave (2)
In the current PC application, the connections to the EV3 and NXT bricks (9 in total) are handled sequentially. If one of these connections fails (for example, we forgot to connect one of the bricks to the WiFi), you will have to start the complete sequence of the beginning. The same applies if one of the bricks hangs during the operation, you will have to boot this brick, then reset all the other bricks and start the PC application again. All together, this may take at least 10 minutes before the train is running (again). What we want to update for Lego World 2015, is to decrease the start up time in two ways:
- Remember the state of a brick. If one of the bricks fails (can be during start up or during operation), just restart this brick, the PC application ‘knows’ the last state of this brick and gets it back in this state and the operation can continue.
- Parallel start up. Not sequential anymore, but all together.
In the current version of the software, the overall software controller part handles all the different actions completely sequentially. It is a kind of hard-coded script, e.g.:
- Wait until pistol hits a colour
- Set switches to the correct colour
- Start the train running
- Wait until train is positioned at the Candy Crane
- Set the color indicator
- Wait until color indicator button is pushed
- Get the crane to the pick-up position
The advantage of this sequential script, is that is simple. But it has a huge drawback: it makes the performance of the layout very slow. A full run for one visitor may take up to 5 minutes. This is much too long! So, we are going to make the script more parallel. For example, when the train is going to the crane, the crane can already load the wagon. And while the first train is unloading its candy, the second train can be loaded by the crane. We want that there is always some kind of action on the layout.