top of page

Using my 3D printer and knowledge of control systems from university to produce a ball balancing robot for revision Purposes.

Project Contents

Click on an image to go to that chapter

* The Application Autodesk Fusion 360 (Personal) Was Used to create the shown CAD

Only A Crude Sketch

IMG_7385_edited.jpg

The purpose of this project was to be a practical way to implement and revise what I have learned this year about Control Systems, more specifically concerning PID.

The goal was to start from a very crude sketch of literally the first idea I had, of something that would push the boundaries of my skills in some form of PID based desk toy. And from the picture above a very crude sketch, it was.

In essence, my idea was some form os simple ball balancing system, but with a twist. In this case, the twist being some form of dual PID system where the main system for balancing the ball will have a nested system containing a similar motor controller system as the PID Stepper Servo project.

Initial Design Choices

IMG_7297.jpeg

The main principle, as described previously was to have one system which monitors the position of the ball, such as through distance, and another than manages the motor itself against disturbances such as changes of the gearbox's load from the object moved.

The object in question was chosen to be the promotional stress ball I received after completing my work experience at Leonardo. This was decided on the convenience of it being an appropriate size for the desk toy while also being light and soft for if it was to fall off.

In terms of sensing, a potentiometer a going to be used for the motor segment. Choosing a potentiometer was important as it was the sensing device I want to implement into the Pegasus 2 robot arm and I want to develop a system using one further rather than now changing to something different such as a Hall effect sensor or an encoder.

In regards to the ball itself, I had chosen an ultrasonic sensor. This was chosen as I didn't have a qIR sensor at hand and compared to the other optical-based sensors I have, this ultrasonic sensor seemed that it would be less prone to interference as being ultrasonic sound it shouldn't be affected by natural light from my window or though interference from the remote control, something that may be a common disturbance at my desk.

The downside to this is that many ultrasonic sensors not just have a maximum distance (in this case far greater than required by this use case) but also a minimum that can sometimes be as much as 4 cm before it can detect an object. Due to the scale of the system in question io knew the midpoint would be approximately 6cm and I could move the sensor back if required so I decided to test it before purchasing an alternative sensor.

I also wanted to use steering linkages from RC cars as I believed it to be a good option for the error detecting sensor for Pegasus 2, so having a similar yet different way to implement such component would pose as good research into there usage.

The Gearbox

IMG_7288.jpeg

In the design for the gearbox i aimed at producing a system where the motor connected to the input shaft would have its torque amplified by a factor of three to the output shaft.

 

In contrary to the experimental gearbox from the first gearbox project, the PID feedback potentiometer wouldhave a 1:1 relationship with he output shaft rather than the motor. Thos would;d mean there would be less of a physical sweep angle restriction by the potentiometer and ultimately it is the angle of the output shaft that is being measured, which in this use case i believed more important.

The gearing was achoved by having only two shafts each including  a gear producing a 3:1 ratio. The shafts extended both ends of the gearbox from the base to the cover with a small clearance for lubricant and printing imporfectiuons. Th reason for the shafts ectednign both sides was to price a more rigid system which would not become loose if the sensor or motor was removed.

 

The 1:1 ratio between the output shaft and potentiomeer was achieved by having the sensor connect through e shaft directly by an opening at one end. This was believed to be more reliable and more concise than adding additional gearing and would also aid as additional alignmtn fore the gear and sensor.

 

Both gears also had protrusions that would pass the cover, this was to aid to extra support and alignment under high stress. As well as this,  the input shaft was given a small arrow that would indicate its  position foe easy alignment, gearbox building and mainatnace and egenral diagnostics by checking no teath have visually jumped overtime.

The base was also designed to be the walls of the gearbox, which proved to be more rigid than the lid in the previous gearbox project, and would allow for a simple but right cover plate to be screwd ontop. have ign the cover as just a thick plate with no direct requirements for general structerl rigidity allowed for greater access opening to be produced int eh cover for means of inspection nd lubreication.

77B5A45E-3D47-4739-9D92-7AC9BDF5A998.jpg
IMG_7295.jpeg

The gearbox housing itself was easy to print and no additional supports were needed compared to when it was only a base in previous projects. The gears, however, they both required some additional support material of which in this case could not be avoided.

IMG_7315.jpeg
IMG_7320.jpeg

When producing the last gearbox I found that the different colour filaments needed slightly different settings in regards to temperature and rafts. For example, on the standard profile, I found that the red parts will not split from the rafts or support material and that the black filament seemed as the temperature was too high as it seemed to all be a melted lump around the sides.

After creating new custom profiles the new parts were produced with major improvements in quality, which can be seen by the vividity of the parts shown above.

The only issues that were found with the parts were the clearness of the indicator arrow on the inputs shaft, most likely due to it being too small to print accurately and some basic clearance issues that were cleaned up with needle files.

IMG_7345.jpeg

Once finished the gearbox was tested with the system of the previous gearbox and made a nice addition to that series. (The PID Gearbox series is still in progress hence why the story has not been released)

Printing The Body

IMG_7300.jpeg

The base was really easy to print, here is a picture of to standing up after the support material was removed.

The base design was originally designed to be low profile with what I presumed the minimum width needed. This did work very well but later in the project, I found that the rigidity of the wires and their natural path would cause them to try to push the device over. 

IMG_7310.jpeg

When printing the table, I designed it to be made through two halves, the first half where ts the actual platform the ball rolls inside and the bottom where it bolts to the sand and motor linkage. I chose to do this as it would result in less support material and faster printing, though it still took over 8 hours to print.

IMG_7307.jpeg

The gearbox seemed to add on with a quite snug fit and once the motor was added it seemed pretty stable. The top of the stand had to be filled down to all for better clearance with the table but apart from that, it was all coming together very fast.

4F54DEE0-EE79-4709-BDFC-52A7D55D5CA3.jpg

The ultrasonic sensor was added to the table and initially tested with a simple distance reading sketch. As hoped the device didn't read the walls of the balance table and worked pretty accurately. The tight fit f the sensor also allowed for no glue to be needed but enough freedom to be able to make small adjustments to staring distance.

The gears were added with little to no issues and grease was added to reduce friction with any meeting surfaces. The indicator for the input shaft made timing the gears effortless.

The RC car steering linkage seemed about a perfect size already but slight adjustments were made. It proved very useful and conformed any queries I had of it ready for implementing into the error checking system of the Pegasus 2 rot arm.

IMG_7351.jpeg

A new base platform labelled with "PID Revision Project" was added for better stability and as a place to mount the stepper driver board. A small piece was added at the end of the table as an end stop for the ball.

4F02A3B6-2059-4821-8D29-CAF8F96F5E4A.jpg
DB78296C-092F-4FFD-B216-60A9721A6592.jpg

Mechanically the system is now finished and sleeving was added to the cables for better protection and cable management.

Testing the system

IMG_7392.jpeg

The now completed system was now ready for programming and testing (More on that coming soon) and so far it both worlds and looks great!

Some improvements can be made in the turning as from he footage below, even tough it mostly works there is still a little overshoot and oscillations present in turns of adjusting the table. As well as this the potentiometer in the gearbox is slightly loose so a spacer is going to be made. Fixing the sensor will prevent it from occasionally moving slightly and overshooting when the device changes the direction too fast.

Only A Crude Sketch
Initial Design Choices
The Gearbox
Printing The Body
Testing the system

Project By Ryan Brown (CMOSS Founder)

February 4th 2021

bottom of page