Mechanical Design, Machine Design¶
Mechanical Design (part 1 of 2)
Group assignment:
- Design a machine that includes mechanism + actuation + automation + application
- Build the mechanical parts and operate it manually
- Document the group project
Individual assignment:
- Document your individual contribution
Machine Design (part 2 of 2)
Group assignment:
- Actuate and automate your machine
- Document the group project
Individual assignment:
- Document your individual contribution
Learning outcomes
- Work and communicate effectively as a team
- Design, plan and build a machine
- Analyse and solve technical problems
- Recognise opportunities for improvements in the design
Have you answered these questions?
- Documented the machine building process to the group page
- Documented your individual contribution to this project on your own website
- Linked to the group page from your individual page as well as from group page to your individual pages
- Shown how your team planned, allocated tasks and executed the project (Group page)
- Described problems and how the team solved them (Group page)
- Listed possible improvements for this project (Group page)
- Included your design files (Group page)
- You need to present your machine globally and/or include a 1 min video (1920x1080 HTML5 MP4) + slide (1920x1080 PNG) (Group page)
Time Management¶
You can access my timetable here.
Group Assignment¶
Individual Assignment¶
Here, I will be documenting my individual contributions to the group assignment😱
Controlling the Stepper Motor¶
I was tasked with learning how to control a stepper motor. You can also follow along with me to learn how to control one yourself.
Components specification¶
I will be using the following components.
- Nema 17 stepper motor
- LRS-350-24 transformer
- TinyG v8
- Power source
- Switch
- IEC-320 C-14 AC Power Entry Module
Stepper motor
A stepper motor is basically an electric motor whose shaft spins by executing steps, or by moving by a predetermined number of degrees, unlike a brushless DC motor which rotates continously. This function, which is made possible by the internal design of the motor, eliminates the need for a sensor by enabling one to determine the precise angular position of the shaft by counting the number of steps taken. It is also suitable for a variety of applications because of this property.
I went through the website below to understand more about it.
TinyG
The TinyG project is a high performance, USB based CNC 6-axis controller that supports XYZ linear and ABC rotary axes with 4 motor outputs. It is designed for small CNC applications and other applications that require highly controllable motion control. TinyG is meant to be a complete embedded solution for small or medium motor control. -Website
We will basically be using the TinyG to control multiple stepper motors using G-code.
UGS(Universal G-code Sender)
This is the application we will be using to send G-code to TinyG.
Click on this link to download UGS.
This will take you to a page with various download options. Click on the one with your operating system.
This should download a .zip file which you will extract. Click on ‘extract all’.
You can open the selected file to open the appplication.
Yay!
LRS-350-24 transformer
The Mean Well LRS-350-24 is an AC to DC switching power supply that delivers 350.4W of power at 24V DC with a current rating of 14.6A.
How does it work?
The LRS-350-24 receives AC from a wall outlet which is converted into DC through a process called rectification. Capacitors are used to smooth out the DC voltage to reduce fluctuations. To control the amount of output delivered, a very high speed switch is turned on and off continuously. A feedback loop monitors the output voltage and adjusts the switching to maintain a stable 24V DC output. There is also a built-in fan to prevent overheating.
Here is a link to its datasheet so that you can get a better understanding of it:
IEC-320 C-14 AC Power Entry Module
This power entry module is the mains AC input port. It is what we use to connect the transformer to the AC supply from the wall outlet. It has three pins:
L (Line/Live) – usually brown or black
N (Neutral) – usually blue or white
Ground (Earth) – usually green/yellow
This is the specification of the wires in our power entry module. It will differ from the adaptor you are using to connect it with the wall socket so make sure to confirm it first.
For reference, this is what the connector looks like:
Connecting the Components¶
This is a table showing the different power sources required for different stepper motors. As we are using the Nema 17 motor driver, we would be needing a 24V power supply.
To start connecting the motor to TinyG, I found a really nice table which shows the coil pairs of the motor’s wires from Ngawang Pemo’s documentation.
This is the connection we made between the Nema 17 stepper motor and the TinyG.
This is the pinout of LRS-350-24.
Connect V+ and V- to the ground and VCC of the Tiny G.
Connect the wires labled GND, L, and N to the gound, line, and neutral wire of the power entry module which will then be connected to the wall socket for the AC supply.
For reference, this is how the components should be connected. I got it from Ngawang Pemo’s documentation. Thank You ashim!
Yay! I connected it!
Programing¶
After connecting all the components and connecting the tinyG to your computer via a USB, open UGS.
Tap on ‘port’ and select your port. Set the baud rate to 115200.
Mistakee!
Make sure to select ‘TinyG’ as your firmware!! I actually forgot to do this at first which made none of my code work, so I ended up wasting a lot of time because of thatðŸ˜ðŸ˜
Fortunately, Yangtshel was there to help me out!! I am sooo grateful to him!!
After you are done with that, make sure to connect it by pressing the icon indicated in the above picture.
This is the code I used generated from ChatGPT with the prompt:
give me a code so that I can make a stepper motor turn using universal g-code sender
G21 ; Set units to millimeters
G90 ; Use absolute positioning
$H ; Home all axes
G1 X10 F200 ; Move 10mm along the X-axis at 200 mm/min
G1 X-10 F200 ; Move back to the starting point at the same speed
Here are the results:
2 motors¶
The second stepper motor that I will attempt to control is a bigger one for the base, which is the Nema 23. The Nema 23 in our lab has 6 pins instead of 4. The other 2 pins are for other purposes(that we don’t have to know right now).
To find out the coil pairs, we can use the connectivity option of a multimeter. When you connect 2 pins and it beeps, you can confirm that it is a pair.
After figuring out the coil pair of your motor, connect it to your TinyG, on the Y-axis.
Open UGS, connect it, and run the code below:
G21 ; Set units to millimeters
G90 ; Use absolute positioning
$H ; Home all axes (only if homing is set up)
G1 X10 Y10 F200 ; Move 10mm on both X and Y axes
G1 X0 Y0 F200 ; Return to the starting point
G1 X-10 Y-10 F200 ; Move -10mm diagonally
G1 X0 Y0 F200 ; Return to center
Here are the results:
This is when we tried it with a gear.
Designing and Fabricating¶
Base support¶
I was tasked with desiging and 3D printing the base support for the base gear.
Mistake
This is the 1st design which failed because I did not consider the slots for the screws and I mixed up the motors which messed up the diameters of my design so yea. However, I took a picture of it and indicated what each part does. It follows the same concept.
Now, let us make it again one more time. Before anything, I decided to sketch it out so that I get a clearer idea of what I will be designing(and also because I am not very confident in my designing skills).
Now, let’s design.
Now import the design in Prusa Slicer.
Scale it up to the required dimensions.
Yay! Finally it is done. It took 8 hours but it felt more like 6-7 hours.
Now, let me attach the bearing and the gear to the stand.
Let’s try spinning it.
Success!!!🤯
CNC machine¶
I had also fabricated the base of the whole project.
Thank you!
The template for this website was provided by Mr. Anith Ghalley and used with his permission