I originally posted the theory behind the control software for my Segway back in January, over 11 months ago. As most of you expected at the time, I was indeed working on building my own Segway. I finished the darn thing back in May, and am finally getting around to uploading pictures and documentation of the project.
The first step of the mechanical aspect of the Segway was to weld a base plate which the rider stands on. I used a plate of 3/16" steel with reinforcements of 1/2" square tubing welded on the back. You can also see where I drilled and cut out holes for mounting the motors.
The next step was to weld brackets for the handlebars.
The handlebars are held to the base plate using four brackets.
Handlebars and motors mounted.
The wheelchair motors I used had 24v electronic brakes on them. For my application, I needed to disable the brakes.
I could have just applied 24v across the brake solenoid, but why waste the power? By taking out the bolts that hold the brake to the motor body, the entire brake was able to spin freely of the motor, effectively disabling them. This also meant that if I ever wanted to use the brakes in the future, all I have to do is put the bolts back in.
The wires to the brake also had to be cut to allow it to spin freely. I made sure to leave enough length to be able to easily solder them back together if I ever need to.
I'm using two 12v 17Ahr SLA batteries to power the motors and electronics (via a BEC), loaned to me by my local FIRST robotics team, team 3142.
The final step on the frame was to weld brackets to hold the batteries in place and hooks to mount the battery strap.
The brains of the project: an Arduino Uno running software based on the control theory, taking measurements from a 5DOF IMU and driving the motors. The LCD screen shows the current angle of the board.
The motor drivers I used: 2 Pololu 18v25 drivers. They will control up to 25 A continuously without a heatsink.
Testing the control electronics with a single small motor.
The completed electronics board ready to be mounted to the Segway for testing.
The control board mounted to the underside of the base plate (the IMU should be as close to the axis of rotation as possible) with all the high power wiring done.
The power wiring is connected to the batteries through a 30A circuit breaker which doubles as an on/off switch.
Here the segway is held perfectly level and raised off of the ground via 4x4 blocks for sensor calibration. Since the vehicle batteries must be powering the Arduino for the most accurate ADC readings, it's rasied off the ground to make sure it can't run away during testing. The laptop is connected to the board to calibrate the sensor values.
Last but not least - you need some way to steer the darn thing. Since I was running out of time, I simply used a potentiometer mounted to the top of the handlebars to control the differential steering.