Tilda is a self-balancing two-wheel Lego robot with Raspberry Pi as I2C master. IMU used is an MPU-6050, plus a HMC5883L magnetometer for absolute direction. Motors are Lego 71427, driven by an SN754410 dual H-bridge, controlled by an Attiny861 I2C slave as PWM generator and for back-EMF and battery voltage measurement. Power is provided by a reused 2Ah 9.6V NiCd rechargeable battery pack.
The high pitch sound on the videos stems from the PWM signal modulated at 2000Hz in this version. I've now made some torque measurements (see here), according to which low speed torque is in fact better at higher frequencies, and have switched to a default of 16kHz.
The complete source code is available for your consideration at http://github.com/wangnick/tilda.