J-Fall stand: The Internet of (Lego) Trains

It has been a while since my last update on our project with Lego trains, Raspberry Pi’s which is build with Scala and Akka. In the meantime we added some new cool features. In this post I will show those features briefly. If you happen to be at the J-Fall or Devoxx Antwerp conference please stop by our company (Info Support) booth. In the booth we will display our project and you can talk to the people who worked on the project. We will also demonstrate the setup in our session at Devoxx Antwerp, please come and visit our session.

Ferris wheel

We added a Lego ferris wheel which we can also control from our application. It works the same way as the Lego trains. We use a Raspberry Pi with a infrared transmitter to send speed commands to the Lego infrared receiver. It has 7 speeds forward, 7 speeds backward and it can stop. The big difference to the trains is that no train engine is used but another Lego Power Functions motor.

DSC_0105

WALL-E

We also started to use WALL-E which is now an official Lego set. It again uses the same infrared controls as the trains and the ferris wheels. Wall-E is driven by two motors who are of the same type as the motor we used for the ferris wheel. The standard edition of WALL-E does not contain any electronics. If you want WALL-E to move, please have a look at this link .

DSC_0110

Particle Photon’s with leds

We bought a couple of Particle Photon’s. These mini computers look a bit like Arduino and use the same programming language. The big advantage of the Photon’s is the onboard WIFI chip and the integration to the cloud. It’s really easy to connect the Photon to the cloud and send commands through Particle’s cloud to your Photon. We used one Photon to control a led ring with 24 leds. Another Photon was used to control a led string of 2 meters with 120 leds. All the leds can be controlled individually. We display the speed of the ferris wheel on the led ring and the speed of the trains on the led strip.leds

The following pictures show (a bit vague) three red leds moving clockwise. That means that the ferris wheel is going forward (clockwise) with a speed of three.

DSC_0648

DSC_0649

New autopilot feature

We added new autopilot functionality. Based on the location of the blue train with the RFID reader we can send commands to the white train or the ferris wheel. In the example below the white train will go backward with a speed of 4 if the blue train is at the bicycle location. The white train will go forward with a speed of three if the blue train is at the crossing etcetera.Autopilot location based cropped

Overview

A part of the setup is clearly visible in the picture below. Only the track switches and leds are missing. We will make sure to bring those to J-Fall and Devoxx as well.P1120154