This project was developed for the Disney Alladin broadway-style musical production by Bookmyshow held at the National Center for Performing Arts (NCPA) in Mumbai and the Jawaharlal Nehru Stadium in Delhi, India.
Developed at Nestwell Technologies.
Notice the carpet in action at 0:56 seconds!
My role in the team at Nestwell Technologies assigned to the Magic Carpet was to design the software to control the carpet and the tilt correction control system that speaks to the Modbus Control system that controls the acceleration and deceleration as well as velocity of the motors.
Carpet:
Mechanics: The magic carpet in the show was a rectangular wooden platform held up by four steels wires at the rectangle vertices. The steel wires are connected to the a metal frame that is connected to a rotary induction motor(Yaw control). The metal frame is then connected to two more wires connected to two inching chain cable motors that independently hoist up and down the carpet (Z-axis, Hoist up, Hoist down). The whole system is then connected to a 1-D Gantry frame (X-axis).
Electronics: The Electronics was mainly VFD's that controlled the motors and an HMI panel that was connected to a modbus. This was the modbus that the Ubuntu computer which contained the software to communicate with the modbus.
Software:
Front End: Designed by Selina Vaz.
Back end and algorithms: Designed by Siddhant Betrabet.
Hardware: Thinkpad Laptop Intel Core i5 7200U/8GB/1TB HDD , Raspberry Pi 3 , MPU6050 IMU , USB - Joystick , Quantum USB 2.0 Interface Gamepad (Joystick )
Operating System: Ubuntu/Debian , Raspbian.
Languages used: Python, Node-Red , HTML , JavaScript.
Open loop Carpet movement control : The basic control of the carpet was a joystick that controlled the Magic Carpet was a Python program. The joystick program would write to the modbus registers for controlling the carpet over Modbus-TCP. There was a flag in the program to save the output of the joystick as well as the time stamp to a text file while simultaneously writing to modbus. (For e.g if one tilted the analog joystick upwards, the python program would write a value of "1" to the appropriate modbus register). This was to record the amount of time the carpet would move in a particular direction, whch would be recorded in a file. A separate program would then read the text file line by line and compute the time the carpet would move in a given direction. With the help of a web based front end editor one could then "choreograph" the carpets movements and the "play" the files real time as a Playlist. The programs for the joystick and the recording software playlist was written in Python and the Backend for the webpage was designed in Node-Red which also ran and monitored the python programs as child processes.
The output of the files looked like this:
1522410029685|26,
1522410029735|10,
1522410031515|5,
1522410039223|12,
1522410040183|9,
1522410040283|4,
1522410050117|9,
Where the timestamps on the left represented the time of the movement and the numbers on the right represented direction movements (Yaw, Z-axis, X-axis) and speed changes for the Yaw and the X-axis speeds. The playlist program separates the values into arrays and then computes the difference between the timestamps and sends the signals out while waiting till its time to send the next signal to the modbus.
Closed loop Carpet tilt problem control : The problem with the two motors controlling the yaw axis was that they wouldnt move at exactly the same speed. This would induce a tilt between the two sides of the carpet and would be noticeable to the audience and give problems to the yaw motor rotation beyond a certain angle. The solution was to put a Raspberry pi 3 with a Mpu6050 IMU attached to the platform that would tilt. The program would send out these values over wifi to the modbus and change the speeds of the two motors to correct the angle tilt. The change in speeds was a step programmed, which meant the angle tilt would determine the speed difference. The python program would read the values of the i2C bus from the IMU and send the values over TCP to the Modbus Control if the carpet tilted beyond 5 Degrees.
Network : The network of the system was a Wifi router and and ethernet switches which connected the modbus to the laptop and the IMU.
Below is a snippet from the final Implementation replaying all the choreographed files as well as the tilt correction in action (May not be noticeable as the correction kicked in pretty fast.)
Playlist Front end
Node Red Back End
Dashboard Front End