top of page
Electronics - Self Balancing Segway
The Module

The aim of this module is to demonstrate your understanding of signal processing; system analysis and design; feedback control; and real-time embedded system.

The Task

Students will work in groups of four to design and build the embedded program for the mini Segway to achieve the final goal of self-balancing and dancing.


This segway will have to complete four different tasks:


1. Control the segway with stabilizers using your mobile phone to connect the PyBench via Bluetooth. 

2. Detect beats from a song and flash LEDs to those beats. 

3. Analyse two songs in Matlab, create simple dance routines, and write a Python program to control the Segway with stabilizer so that it moves to music;


4. Program the Segway to dance to live music while balancing on two-wheels.

Task 1Using the software called BlueFruit, we connected the Pybench using Bluetooth and managed to control the segway . 

Task 2 & 3 - For this task, we made the robot detect 3 or 4 consecutive beats, and for each sequence, change its dance routine. The Segway at this point still had stabilizers to balance itself

Task 4 - For this task, the Segway managed to self-balance without any stabilizers. It balanced by PID control which we wrote in python.



bottom of page