KTH Segway

While I worked on my own segway I got a request from my University (KTH) to create a vehicle that the students should be able to test their control system theories on. So I created an improved version based on my own segway.

My motto for this project was the same as for my own version

Highly optimized controller and power boards give you the freedom to implement more advanced model functions without the need  for workarounds.
It should also be sturdy and hard to break.

This is the result



Two KTH students using the vehicle.

20130709_111211 (Medium)


DSC01455 DSC01465







I used the same PCB board solution as in my homemade version.

DSC05214 (Medium)

A bit better shielding than in my home made version.

DSC05190 (Medium)

I used two 1.5 Hp motors with with almost no backlash in the gears.
I used encoders that give me 8000 pulses per wheel rotation.

DSC05115 (Medium)

Due to the motor power my motor drivers had to be able to handle the large current. The first step was to increase the copper area of the PCB power signal ways.

DSC05307 (Medium)DSC05337 (Medium)

DSC05364 (Medium)

I also changed the mosfets to IRFB3006PbF that can handle 195A continuous and 1080A pulsed. There are three mosfets for each branch in the H-bridge.
DSC05437 (Medium)



. Power distribution board. Handles how the system is powered on, before we had one power switch. Now the system is always on and checks if the segway is in use or should power down parts to conserve power. Or shut down in a safe manner to protect the battery’s or if there is any other problem. in off state the board consumes an average of ~255uA @33V,  this is made possible by using a super cap. So the regulators are only active during the charge of the super cap, after that the system is in sleep until the cap needs to be recharged. In afterthought I would have added a separate switch for the switch regulator IC’s, and cut the current consumption to about 50uA instead.




High power switch to control when the motors should be powered, and shut down on failure or to preserve power.
The boards in the picture is not fully assembled.


I made a new LCD unit
DSC05496 (Medium)
DSC05546 (Medium)

small demo video of the LCD touch function

The new LCD unit has touch a interface and a menu that can be used to adjust settings while driving.
It also displays the KTH logo at power up 🙂

I added better suited motor driver current sensors

DSC02942 (Medium)

The battery’s are charged and balanced by this unit.


The structure is almost the same as my home made version.
(New version uses LiFe battery’s instead of VRLA ones, and the new power distribution board is not in the structure picture)


Connections between each part of the system




I wrote C code that is easy for the students to follow and to start with. This way they can get started with the control theory quickly. This is to free them from having to spend several hours with the base part of the code that makes the rest of the machine work. I even included auto calibration on motor drivers so the students can recalibrate the drivers if they overwrite the values. I included a start-up function on each board so if the student by accident put the main board code in the motor board the code would stop and indicate that the wrong code has been loaded. There is a lot of small things like this to make the development as pain free as possible.

With the better sensors the logging result was a pleasure.
Kalman VS Comp



DSC05071 (Medium)

DSC05092 (Medium)

DSC05094 (Medium)


pictures of the segway

I will add more soon

DSC05579 (Medium)

I made a small time laps video, more like a test, there is one frame that keeps showing up.


Get every new post delivered to your Inbox

Join other followers: