Skip to content

11/12. Mechanical Design & Machine Design

This week we are building a machine over the period of two weeks. As it is just John and I the machine is a part of the final project which I can then improve on. alt text

Design Files

Tasks

As I am just a solo student the majority of the project is beinging completed individually. You can see my work on my individual page. My tasks are:

  • 3D model internal gears than will reduce the motor output by a ratio of 1:5.
  • One small gear attached to the shaft of the motor, the other around a drum.
  • A drum will run through the center of the machine and have a threaded end which a nut can be attached to
  • A knitting needel needs to be held centralling in the drum using a collet and nut system
  • The drum needs to sit in bearings so the walls of the machine need pressfit bearing holders
  • The walls need to fit into a aluminium extrusion frame which will give it structure
  • The motor needs to be pressfit into the a holder which will support it

My instructor John will aid me in setting up the esc and creating working code

During Output Devices Week we looked at using a arduino with a servo and making a stepper driver board.

We found out that the stepper driver would not be fast enough for our use case so we decided to use a ESC (Motor Speed Controller) and a brushless DC motor instead. The ESC means we can use the arduinos servo library and example code to control the motor. alt text

Walking/Grand Wheel Spinning

Whilst researching for my final project I discovered that there is a alternate design for the spinning wheel called the grand wheel. This is a simpler design but involves more movement by the spinner. alt text I considered this as a possible simplified version of the final project as as it esentially represents a module a full espinner. This week allowed me to make a machine which worked in a similar was to these walking wheels.

In spinning you have a way to make a twist and a way to roll on the thread once it is formed. The twist is formed by the thread falling on the needle lots of times whilst the spinner allows it to form more from the carded wool.

This essentially means a spinning spike that can be speed controlled and can spin in both directions. alt text

Credit to girlsownstore for the photos

Parts List

3D printed parts

The process of creating the 3D printed parts can be found here.

It took multiple iterations to get the correct fit and the features desired. alt text

Collet system

One of the main design features was creating a collet system to hold the knitting needle centrally and securly within the drum.

We ended up designing a collet which slid into a taper inside the drum which made it close up. Then a nut would secure it in place to the drum.

alt text

The in the first draft the collet could slide in fully however this ment it was difficult to tighten, therefore in the final draft the taper was made so the collet could not fit in entirely whilst still keeping the same angle on the taper.

alt text

Making it Move

Set Running Mode

To begin with we need to set the running mode of the ESC. This is one of the programmable items. By default its set to Forward/Reverse/Break, however we do not need a break so we will chnage this to Forward/Reverse, option 3. This option includes a neutral zone. The other programmable items can be left as default.

You can see the current settings by counting the number of LED flashes and depending on the amount you can cycle through options. 1. Turn off the ESC 2. Hold down the ‘Set’ button, turn on the ESC 3. Release set key when LED flashes green once 4. The LED should be flashing red, the number of flashes represent the option it is currently set to - One red flash = Forward with Break - Two red flash = Forward / Reverse with Break - Three red flash = Forward / Reverse 5. Press the set button until it is flashing red three times 6. To finish programming switch the ESC off and on

Calibrate the Throttle

We now need to calibrate the throttle range of the ESC. This is setting roughly the maximum throttle to the maximum of the potentiometer and setting the maximum of the reverse to the minimum of the potentiometer.

  1. Turn off the ESC
  2. Hold down the ‘Set’ button, turn on the ESC
  3. Release the set button the moment it flashes red (you have a 3 second window)
  4. Slide the potentiometer to the neutral position and press the set button, green LED flash and a beep
  5. Slide to the end point of the forward direction, two green LED flash and two beeps
  6. Slide to the end point of the backwards direction, two green LED flash and three beeps

The motor should now be set up.

You can see the change in speed by measuring the frequency.

Normal Running Status

When first turned on the motor will beep to indicate how many batteries it thinks are connected. In our case we are using 11-12v so it thinks 3 cells are connected as the standard LiPo cell is 3.7v. So it beeps 3 times.

  • No LED on - In neutral
  • Red LED on - Car is moving forward/backwards
  • Red and Green - Maximum throttle forward/backward

alt text

Code

We used the arduinos example code for the Servo Mood Indicator in their project book as our base. alt text

#include <Servo.h>

Servo myServo;  // create a servo object

int const potPin = A0;  // analog pin used to connect the potentiometer
int potVal;             // variable to read the value from the analog pin
int angle;              // variable to hold the angle for the servo motor

void setup() {
myServo.attach(9);   // attaches the servo on pin 9 to the servo object
Serial.begin(9600);  // open a serial connection to your computer
}

void loop() {
potVal = analogRead(potPin);  // read the value of the potentiometer
// print out the value to the Serial Monitor
Serial.print("potVal: ");
Serial.print(potVal);

// scale the numbers from the pot
angle = map(potVal, 0, 1023, 0, 179);

// print out the angle for the servo motor
Serial.print(", angle: ");
Serial.println(angle);

// set the servo position
myServo.write(angle);

// wait for the servo to get there
delay(15);
}

This allows the potentiometer to control the full range of speed from the motor, however we only need to use a small range of this motors speed, we will limit this using the map function in the code.

This code outputs to the serial moniter the value the ADC (Analogue to Digital Converter) is reading. It measures the voltage then converts the analogue values to 10 bits (0-1023) digital value.

angle = map(potVal, 0, 1023, 0, 179);

This line then maps the digital reading to the angle on the potentiometer so it is easy to control. e.g. move to 75 degrees

However, we do not want to use the full range and because we are using a motor the we need to try different angles and find what we think is a new suitable max value. We then remap to just this range which allows us to make use of the full potentiometer.

Using the serial moniter output we decided 75 degrees is a good forward maximum, 95 degrees is within the neural deadzone and 105 degrees is the backwards maximum.

angle = map(potVal, 0, 1023, 75, 105);

These values were about perfect. When trying it out I was using it at quite a slow speed, but this would increase with experience and having a wireless controller.

alt textalt text

Planned Improvements

There are a few points we’d like to fix in the future.

Belt vs Cogs

The 3D printed cogs worked decently well and could run at quite a high speed, however they are noisey and they push themselves away from each other so sometimes when it is running slow they dont run smoothly.

Belts will likly run quieter but would need some adjustability in their mounting to ensure they are tight.

Proper Enclosure

We just build the frame out of 10mm extrusion as we wanted to be able to adjust features and it lows for easy replacement of singular walls. However, as this stands this wouldnt be a good look for a final project. The seperate walls also cause some issues as they are not perfectly joined together, causing things to rattle creating more noise.

Seeed XIAO ESP32C3 instead of Arduino Uno

The arduino is quite large and there are a lot of features we are not using. We can do the same at a smaller scale with a custom board with a XIAO.

We particularly want to use the Seeed XIAO ESP32C3 so that we can have a wireless controller and set up networking between the two.

Power Supply

We did not have an appropriate power supply in stock so we used the benchtop power supply. This should be quite a easy fix for the final project.

Aditional bearing

Could help support the motor by embedding a small bearing in the back wall and adding a extension from the small sog into it. This will ensure the small motor runs true and isnt pushed out of position by the large gear.

Over Engineered Pencil Sharpener?

alt text