In the previous post, I wrote that I didn’t manage to get the Direct Commands working that open and read a mailbox. And that I managed to get the workaround working to send data from the EV3 to the PC application. In this part I will tell you more about the other route that I found.
As mentioned in the first part of this article, it is possible to send data from the EV3 to the PC application. In this part, I describe how I try to learn the syntax of Direct Command programming. Continue reading
In our project, we use 4 NXT and 5 EV3 bricks. Two of the EV3’s will be connected in daisy chain mode, so we need a grand total of eight connections to the PC application. In our version of 2013, we noticed that more Bluetooth connections results in less reliability. Because of that, our hardware architecture is now based on the NXT bricks to connect to the PC via Bluetooth and the EV3 bricks via WiFi. As mentioned in the previous article, the communication will be done by sending messages back and forth using the mailbox mechanism. By this means, we can create intelligent ‘hardware pieces’, that can handle complex instructions. For example, by sending the string “Uncouple” to a train, the responsible NXT brick will independently handle this instruction and controls the needed actions to uncouple the wagon from the train. The string is read by the Read Message Block, both available in the NXT and EV3 programming environment.
The PC application is responsible for connecting the various hardware parts (delivery station, PUI receiver, crane, etc) and the overall intelligence between these parts. This architecture makes it easy to test the several parts (see also the previous article about the test program) independently and gives more flexibility.
The Bluetooth communication was already implemented both for the NXT and the EV3. All we need is an extension that the EV3 can also communicate over the WiFi connection. That doesn’t sound to difficult. In this article you can read about the ugly truth. Continue reading
The PC application will connect to the NXT and EV3 bricks by Bluetooth (for the EV3, we are investigating if we can write a block for sending messages over a WiFi connection, but that isn’t easy).
In the previous post, I mentioned already that the Candy Crane does ‘in principal’ what it has to do, but the movements were not smooth enough and the accuracy was also a problem. In the last weeks, I have improved the movement and positioning. Below you find the final version:
And the LDD version:
This final version of the Candy Crane is controlled by two EV3 bricks:
1. Brick 1 (in the right tower) controls the movement of the complete crane:
- Two touch sensors are used for the positioning.
- Due to the weight (~1.5 kg), I have to use two M-motors (which are mechanically connected) to move the crane. One motor didn’t had enough torque. Another problem was the force on the axles when I used one motor. The motor movement had to go ‘all the way’ to the other tower. I was afraid that the axles would break due to the weight they had to move.
2. Brick 2 (in the hoist) controls the movement of the hoist and the grabber:
- Y-movement of the hoist. The hoist is moved by an M-motor, the positioning is done by a color sensor.
- Z-movement of the grabber. The grabber is also moved by an M-motor, the positioning is also done by a color sensor.
- The grabber is controlled by a third M-motor.
The two bricks are connected by a flexible USB cable (Belkin) in Daisy Chain modus. This means that the two bricks are seen as one large brick. Both EV3’s are running on a rechargeable battery (all the motor movements consume lots of energy).
In the previous post, you have seen that the candy will be delivered by a mechanism that flips the whole wagon. But how are the wagons refilled? This is done by the Candy Crane:
The crane picks up the candy from the grey area in the middle and moves it to the empty colored wagon. The candy will be in the same colors as the four wagons (yellow = lemon flavor, green = apple flavor, red = strawberry flavor, blue = blueberry flavor). I wrote a demo EV3 program to check if the crane operates conform expectations. In principal: it does. But the sensors are not always working and the up/down movement is not controlled by a sensor. The brick has to move it up all the way to know the position. So, it is not ready yet. It has to be made more reliable for Lego World.
You can watch the video at Youtube:
The train has to deliver the candy (or whatever) to the visitor. We are aiming at a delivery mechanism with a huge “WOW” factor. This is the proof of concept to tilt the complete wagon (made in Lego Digital Designer).
You can find an animated gif at Youtube: