17. Machine design¶
This is second part of the week where we basically as a group project had to do following things
-
For the Group assignment: 1. Design a machine (mechanism + actuation + automation) 2. Build the mechanical parts and operate it manually. 3. Document the group project
-
For the Individual assignment we had to document our individual contribution.
Recap previous week¶
Please refer to Mechanical design week to check out details on what was done last week and also our group page for final documentation.
Last week i was able to achieve couple of tasks
- We were able to build MTM mechanical assembly
- Hector was delayed because of delays from external vendor on cutting alumunium
- We made good progress with X, Y plotter assembly
Key Focus for this week¶
- Work on automation
- Finish documentation
- Create final ~1 Min video for review
Getting Started¶
This weeks assignment was to automate the movement of motor and achieve desired positioning through mechanical system i.e we have to make it work.
So my role in this weeks assignment was to
-
a) work on the firmware and electronics with Jai for the machine.
-
b) create final video
-
c) Update group documentation
Electronics¶
So I started with understanding the working of stepper motors. Then I moved ahead towards its drivers. After this i learnt about interfacing both of these components with arduino and then finally learnt about RAMPS board.
Stepper Motor Working¶
First i learnt a bit about stepper motors and i found this tutorial quite useful.
Undersanding Actuation¶
After going through some pages over the internet i got to know that there are many ways to actuate a stepper motor like it can be actuated using ULN 2003a(Darlington pairs) IC or through L293D Motor driver IC or using A4988 Motor Driver. A lot of people have faced heating problems with ULN2003 and L293D do I first learnt about A4988 Driver IC as its not that expensive and was available in Lab . So here’s a video I refered for understanding and using A4988 driver IC with Arduino
For more detailed understanding Interfacing is as follows :
-
4 connections to the stepper motor, marked 1A, 1B and 2A, 2B. Connect the first coil to 1A and 1B and the second coil to 2A and 2B.
-
Logic Power and GND, Connect this to the GND and +5V of the Arduino
-
Dir sets the direction the stepper will move. I connected this to Pin 4 on the Arduino
-
Step will make the stepper step each time this pin goes form Low to High. I connected this to Pin 5 on the Arduino
-
Enable. When this pin is pulled low the board is enabled and the motor energised. When set high the board is disabled and the motor is de-energised. I connected this to Pin 6 on the Arduino
-
Sleep and Reset control the board, either sending it to sleep or resetting it. To use the board I tied these together which allows the board to run normally
-
Motor Power and GND. This needs to be a high voltage/current supply to run the motor. Note : Warning: Connecting or disconnecting a stepper motor while the driver is powered can destroy the driver. (More generally, rewiring anything while it is powered is asking for trouble.)
-
To prevent damage to the driver chip, it uses circuitry to limit the maximum current that can be used. This is set via the adjustable resistor on the board, in co-operation with some of the other components, the sense resistors (S1 and S2) and the resistor (R1). As different drivers may have different components (especially generic Chinese imports) its best to check these values before continuing.
-
VREF max = (TrimpotMaxR/(TrimpotMaXR+R1)) x VDD = (10,000 / (10,000 + 30,000)) * 5 = 1.25V
-
ITripMAX (effectively max motor current) = VREF / ( 8 x Sense_resistor) = 1.25 / ( 8 * 0.1 ) = 1.5625A
-
I started looking into GRBL and CNC shield as next step, Grbl is a free, open source, high performance software for controlling the motion of machines that move, that make things, or that make things move, and will run on a straight Arduino. If the maker movement was an industry, Grbl would be the industry standard.Most open source 3D printers have Grbl in their hearts. It has been adapted for use in hundreds of projects including laser cutters, automatic hand writers, hole drillers, graffiti painters and oddball drawing machines. Due to its performance, simplicity and frugal hardware requirements Grbl has grown into a little open source phenomenon.So i downloaded GRBL firmware and placed in Arduino libraries folder. The grblUpload.ino example file was uploaded in Arduino Uno. Below image shows the wiring done on the CNC shield. Before this wiring, the CNC shield was placed over Arduino Uno.
- For more details please refer the group page
Undersanding RAMPS Board¶
Ramps is a driver board designed for 3D printer, based on platform (firmware) Repap. It not only drivers four steppers so you can design many types of machines based on it, like CNC, and as a mature platform specially for 3D printer, it also driver extruder, fans, temperature sensors, SD card, etc.
It is designed to fit the entire electronics needed for a RepRap in one small package for low cost. RAMPS interfaces an Arduino Mega with its powerful platform and has plenty room for expansion. The modular design includes plug in stepper drivers and extruder control electronics on an Arduino Mega/Sainsmart MEGA shield for easy service, part replacement, upgrade-ability and expansion. Additionally, a number of Arduino expansion boards can be added to the system as long as the main RAMPS board is kept to the top of the stack.
Here is a Video you can refer to understand RAMPS Board
What I understood from RAMPS board is that its a complete PCB Setup for multiple motors and it can be mounted on Arduino MEGA or we can say its a shield for arduino MEGA with 5 stepper motor driver space and much more ( which can b required by a 3D printer).
Conclusion¶
Final docmentation is updated on group page so please refer the same for code and final demo of the machines.
- I used Arduino MEGA + CNC Shield + GRBL firmware for electronics to actuate the motors.
- I updated the overall documentation and created one minute video
- Our final machine is X,Y plotter. Please refer to our group page for final documentation.
Furthur Scopes¶
- For Machine that make machine instead of using arduino we can fabricate boards.
- Instead of using pre-made CNC shield and drivers we can fabricate our own drivers reducing the cost
- This xy plotter just converts the vector image in Inkscape to a plot. But the homing hasn’t been applied. Secondly, for xy plotter to make this mechanism work the bed size got reduced. This could be improved. The resolution of the steppers could be refined using the jumpers on the GRBL shield.
- Hector was not finished on time but we are looking forward to move away from just DIY mahines after fab lab and we will continue to develop it further. For now the mechanical assembly is working for the machine.