Skip to content
Snippets Groups Projects
Machine Design.md 7.71 KiB
Newer Older
Mitalee Parikh's avatar
Mitalee Parikh committed
#Machine Design
Mitalee Parikh's avatar
Mitalee Parikh committed
---

Mitalee Parikh's avatar
Mitalee Parikh committed
###Contents
Mitalee Parikh's avatar
Mitalee Parikh committed
1. Idea
2. Inputs and Outputs
3. Electronics Design and Production
4. CAD
5. Lasercutting
6. 3D printing
7. Assembly
8. Programming
9. Hero Shots
10. Design Files
11. References and Important Links
---

Mitalee Parikh's avatar
Mitalee Parikh committed
1. Idea
---
Mitalee Parikh's avatar
Mitalee Parikh committed
I tried to make a game for machine design - an electronic version of a marble
Mitalee Parikh's avatar
Mitalee Parikh committed
balancing game like this one.
Mitalee Parikh's avatar
Mitalee Parikh committed
![](./images/md/ref.jpg)   
Mitalee Parikh's avatar
Mitalee Parikh committed

2. Inputs and Outputs
---
It basically would need motors to rotate axes in two directions, and an input to help move the motors.

Mitalee Parikh's avatar
Mitalee Parikh committed
**Outputs:**  
Mitalee Parikh's avatar
md  
Mitalee Parikh committed
Two versions of servo are available - FS90 vs FS90R. FS90 offers closed-loop position control over a limited range. Alternatively, the FS90R is specifically designed to be a continuous-rotation micro servo that offers open-loop speed control. They have identical dimensions and use the same motor, but for my design I don't need continuous rotation, so I select the FS90 motor - [datasheet](https://www.pololu.com/file/0J1435/FS90-specs.pdf)  
![](./images/md/fs90.jpeg)  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
**Inputs:**  
Mitalee Parikh's avatar
md  
Mitalee Parikh committed
TO move the plate on X and Y axis - I basically need a potentiometer for each direction. So I choose to use a joystick because it offers X,Y control in a single module.  
![](./images/md/hw504.jpg)  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
**Bill of Materials:**  
2x FS90 servo motors    
1x HW504 joystick module    
Mitalee Parikh's avatar
Mitalee Parikh committed
And for the microcontroller board:  
Mitalee Parikh's avatar
Mitalee Parikh committed
1x LED 1206  
1x 499ohm resistor  
1x capacitor 1uF    
Mitalee Parikh's avatar
md  
Mitalee Parikh committed

3. Electronics Design and Production
Mitalee Parikh's avatar
Mitalee Parikh committed
---
The servo motor pinout suggests it needs a VCC, GND and one PWM pin.  
Mitalee Parikh's avatar
md  
Mitalee Parikh committed
![](./images/md/servo-pin.png)  

Mitalee Parikh's avatar
Mitalee Parikh committed
The joystick module uses a VCC, GND, an ADC Pin for X axis potentiometer and one for Y axis. It also has a switch in Z, but I will not use it for now.  
Mitalee Parikh's avatar
md  
Mitalee Parikh committed
![](./images/md/joystick-pins.png)  

Mitalee Parikh's avatar
Mitalee Parikh committed
So I need 4 i/o pins - 2 PWM  and 2 ADC.  
Mitalee Parikh's avatar
md  
Mitalee Parikh committed
Plus tx-rx, miso mosi to connect to ISP programmer. Needs 3 connections to VCC 5V and GND.
I added a capacitor between to vcc and gnd and an LED to indicate power.  
So I chose a ATtiny microcontroller with enough pins and flash memory to play around with the code and configuration.  
![](./images/md/mcu.png)  

Next I make the pcb in Eagle. I follow the design process described in [electronic design week](./Electronics Design.md) to make it. Here are the schematic and and the pcbnew of the board.  
![](./images/md/scheme.jpg)  
![](./images/md/pcbnew.jpg)  

Here are the traces and outline of the board:  
![](./images/md/traces.png)  
![](./images/md/outline.png)  

I followed the workflow described in [Electronics Production week](./Electronics Production.md) to fabricate the board, solder components.  
![](./images/md/mods.jpg)  

Cutting:  
![](./images/md/cutting.jpg)  

After soldering components, I plugged it in using a FabISP to test it. The power LED came on and I ran an avrdude to confirm that it is detected on my computer.  
![](./images/md/power.jpg)  

4. CAD
Mitalee Parikh's avatar
Mitalee Parikh committed
---
Mitalee Parikh's avatar
md  
Mitalee Parikh committed
Next, I made a quick sketch to understand the movement required for the 2 axes.  
![](./images/md/movement.png)  

And then started modelling it in 3D in Rhino.  
Mitalee Parikh's avatar
Mitalee Parikh committed
![](./images/md/rhino.jpg)  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
I make this model according to the 3mm acrylic available in the lab.
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
5. Lasercutting
---
The Universal laser in Fablab SP (makerspace) had a kerf of 0.1mm on testing. So I offset this and prep a cutting dxf that
I open in the laser computer to cut.  
Mitalee Parikh's avatar
Mitalee Parikh committed
I checked if the servo motor fixes properly in it's slot to check dimensions.    
Mitalee Parikh's avatar
Mitalee Parikh committed
![](./images/md/lasercut.jpg)  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
I follow the workflow described in Computer controlled cutting week, and the process is very smooth.  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
6. 3D printing  
Mitalee Parikh's avatar
Mitalee Parikh committed
---
Mitalee Parikh's avatar
Mitalee Parikh committed
The joints between the acrylic and the motors, and the opposing pivot joints I decide to 3D print. This offers me quick and customisable option to afix these.  
![](./images/md/joints.jpg)  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
Here are the four different joints:  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
Inside pivot joint:   
Mitalee Parikh's avatar
Mitalee Parikh committed
<div class="sketchfab-embed-wrapper"> <iframe title="Joint1" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share src="https://sketchfab.com/models/dad8be6cf0254fa485700e7337a80d37/embed"> </iframe> <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">
</div>
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
Inside servo joint:  
Mitalee Parikh's avatar
Mitalee Parikh committed
<div class="sketchfab-embed-wrapper"> <iframe title="Joint2" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share src="https://sketchfab.com/models/2c9472bf6901407c93f77aa6aa44317d/embed"> </iframe> <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">
</div>
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
Outside servo joint:  
Mitalee Parikh's avatar
Mitalee Parikh committed
<div class="sketchfab-embed-wrapper"> <iframe title="Joint3" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share src="https://sketchfab.com/models/5f80eaf9de6b4602b8b88cdaeaf91e72/embed"> </iframe> <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">
</div>
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
Outside pivot joint:  
Mitalee Parikh's avatar
Mitalee Parikh committed
<div class="sketchfab-embed-wrapper"> <iframe title="Joint4" frameborder="0" allowfullscreen mozallowfullscreen="true" webkitallowfullscreen="true" allow="autoplay; fullscreen; xr-spatial-tracking" xr-spatial-tracking execution-while-out-of-viewport execution-while-not-rendered web-share src="https://sketchfab.com/models/d33ca471020f4ed2bd0d458fb0ce2878/embed"> </iframe> <p style="font-size: 13px; font-weight: normal; margin: 5px; color: #4A4A4A;">
</div>  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
I used the tolerances of the 3D printer in FabLab SP for this. These settings are represented on the [3D printing and scanning documentation page](./3D Scanning and Printing.md). I followed the design rules and settings indicated there.  
I have attached the 3D cad files and the gcode for these at the bottom of the page.   
![](./images/md/print.jpg)    

Mitalee Parikh's avatar
Mitalee Parikh committed
7. Assembly
---
Mitalee Parikh's avatar
Mitalee Parikh committed
After getting all parts ready - acrylic body, 3D printed joints and the fabricated PCB it is time to assemble everything together. This is how it is now.  
![](./images/md/wip.jpg)   
Mitalee Parikh's avatar
Mitalee Parikh committed

I realize that because of the horizontal position of the servo motors, the axis is not symmetrical. This will cause problems in the movement of the game. To solve this I redesign the 3D printed joints to be assymetrical as well, but in the opposite direction. This makes it even again.  

8. Programming
---
Next I start to program the PCB. I do this in steps.

Mitalee Parikh's avatar
Mitalee Parikh committed
test all
![](./images/md/test.JPG)  
Mitalee Parikh's avatar
Mitalee Parikh committed

Mitalee Parikh's avatar
Mitalee Parikh committed
servos not working

Led + servos?? CHECK THIS
![](./images/md/led-servo.JPG)  

test all pins on board - led test
![](./images/md/pin-check.JPG)  

test joystick serial - working
![](./images/md/joystick-serial.JPG)  

check all connection \
check schematic
check programming - blink - servo
multimeter

Steven - change board manager

!! working

but dancing

run the joystick woth arduino uno try to map neutral position

figure out x doesnt match y
change it
![](./images/md/steady.JPG)  

reprogram to match new netral

all working.

put it all together.
Mitalee Parikh's avatar
Mitalee Parikh committed

9. Hero Shots
---
![](fina)

If I had to redo the assignment I would use motors that can be controlled with better precision and smoother movement.  
I would use the motors vertically instead to make it symmetrical. I would also make a fixed space for the joystick instead of keeping it hanging on the wires.  
Mitalee Parikh's avatar
Mitalee Parikh committed

10. Design Files
---
Mitalee Parikh's avatar
Mitalee Parikh committed
[Joystick with serial monitor](https://create.arduino.cc/projecthub/MisterBotBreak/how-to-use-a-joystick-with-serial-monitor-1f04f0)  
[Machine code]()  
[PCB traces nc code](./images/md/traces.0.4.nc)  
[PCB outline nc code](./images/md/outline.0.8.nc)  
[All 3D printed joints - stl + gcode](docs/images/md/joints.zip)