Compare commits
112 Commits
2fb7818e20
...
main
Author | SHA1 | Date | |
---|---|---|---|
474050ff6d
|
|||
1b95f46544 | |||
a4b13fb71e
|
|||
d512ff1c73
|
|||
b7c38ddc89
|
|||
9d602fede7
|
|||
a21898048c
|
|||
5e3bdbe2f6
|
|||
1e90d6c8a9
|
|||
b6c9129fa5
|
|||
00b08276a2
|
|||
47bfb4ac20
|
|||
1055f83d3a
|
|||
a9cb29989d
|
|||
ce04f5dd57
|
|||
ef43740721
|
|||
b94dba3163
|
|||
816896537d
|
|||
ad7096bca2
|
|||
37618fe7eb
|
|||
8c16a0d537
|
|||
e203b294c5
|
|||
91e7c9701a
|
|||
9e12734c5f
|
|||
524465453a
|
|||
dec593c503
|
|||
56d55a6617
|
|||
15cec82789
|
|||
8185cd14e4
|
|||
e4a0ef25e1
|
|||
5f5e43e54e
|
|||
a24eb028a9
|
|||
996700bec9
|
|||
4369e246bd
|
|||
a42bfcc814
|
|||
3de79c2111
|
|||
da516f5160
|
|||
0489963eda
|
|||
8981e9b9c4
|
|||
dd35b48def
|
|||
0ceb20bcf1
|
|||
f266085c4e
|
|||
5b64235c97
|
|||
b3d42c30d9
|
|||
a84913e3f5
|
|||
557bad8387
|
|||
0f29002415
|
|||
11cd8df774
|
|||
a92f99dae8
|
|||
7f7955fc4f
|
|||
a4d8d95d74
|
|||
bec5809694
|
|||
4e51f23dca
|
|||
212cfd6e4c
|
|||
c58e7b2f94
|
|||
307c4f366d
|
|||
3b0d086ea0
|
|||
4b59dcaa8b
|
|||
55b75039bf
|
|||
cde7a3c7f9
|
|||
b0f8043db0
|
|||
6e748d46b2
|
|||
f2e94c592f
|
|||
f8785c4fd2
|
|||
56282d75af
|
|||
ed7af09a55
|
|||
917a47caf9
|
|||
57507d4c34
|
|||
d61c94880c
|
|||
9b694732bd
|
|||
160418816f
|
|||
d505de5ac1
|
|||
868fac25cf
|
|||
c90147635a
|
|||
c0c565a104
|
|||
fb21e1012f
|
|||
015149b341
|
|||
bc73ac4e09
|
|||
6357ba4fdb
|
|||
b262977263
|
|||
486774e0d6
|
|||
3eed68e1b3
|
|||
826ea4690f
|
|||
07466ce8a9
|
|||
9b1346f8f0
|
|||
6ec65bd5ec
|
|||
519d3e37f0
|
|||
5d580557ec
|
|||
bb4ba0ff66
|
|||
249a2f30d2
|
|||
a07f63de81
|
|||
f3580ea182
|
|||
572d86e60f
|
|||
7d9ad8cbf0
|
|||
7166aecc6f
|
|||
274c643b09
|
|||
5d4ec5ab36
|
|||
acb42fb8c6
|
|||
ebb8ad0350
|
|||
b2ff21cd12
|
|||
73d39c8744
|
|||
d0496e79d8
|
|||
485ca3ca66
|
|||
11bc9c6c0d
|
|||
044a898557
|
|||
ec195bbe66
|
|||
5a807f15ac
|
|||
96891f53ba
|
|||
5f109d2843
|
|||
0a4b93d33b
|
|||
e14699c5ef
|
|||
3880dc3c5c
|
11
blog/first_post.md
Executable file
11
blog/first_post.md
Executable file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
pub_date: Fri, 31 Jul 2020 19:52:52 +0100
|
||||
title: first post
|
||||
tags: []
|
||||
uuid: fd338dc9-ae5f-48f4-9fc6-e02e88ab4ce5
|
||||
---
|
||||
|
||||
# first post
|
||||
|
||||
this is my first post
|
182
blog/g27_pedals.md
Executable file
182
blog/g27_pedals.md
Executable file
@@ -0,0 +1,182 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
pub_date: Tue, 04 Aug 2020 15:20:13 +0100
|
||||
title: Repurposing Racing Wheel Pedals
|
||||
tags: [ g27, sim_racing ]
|
||||
uuid: 0f09200e-fd50-451b-aae1-1117a8a704db
|
||||
---
|
||||
|
||||
<h1>Repurposing Racing Wheel Pedals</h1>
|
||||
<p>I have a Logitech G27 I don't use much. I wondered if I could use it for anything else. I could. </p>
|
||||
|
||||
<h2> The Pinout of the Connector </h2>
|
||||
|
||||
<p>The first thing I had to do was figure out what each pin did on the DE-9 connector, and which
|
||||
ones I should care about.
|
||||
This was done easily after I took off the top plastic casing thing by poking the three 100k Ohm
|
||||
potentiometers and the connector in the right places at the right times:
|
||||
</p>
|
||||
|
||||
<style> #pinout_table tr td:first-child { text-align: right } </style>
|
||||
<img src="./images/repurposing-racing-wheel-pedals-g27-pinout.svg" class="centered" style="width: 10em;">
|
||||
<table id="pinout_table">
|
||||
<tr> <th>pin</th> <th>function</th></tr>
|
||||
<tr> <td>1,4</td> <td>ground</td></tr>
|
||||
<tr> <td>6</td> <td>clutch pedal</td></tr>
|
||||
<tr> <td>7</td> <td>brake pedal</td></tr>
|
||||
<tr> <td>8</td> <td>accelerator pedal</td></tr>
|
||||
<tr> <td>9</td> <td>voltage in</td></tr>
|
||||
</table>
|
||||
|
||||
<h2> Reading the Values of the Pots </h2>
|
||||
|
||||
I'm using an Arduino to read the pots and then do something with the values.
|
||||
I very dirtily wired pin 4 on the pedals to GND on a Arduino Uno, pin 9 to 5V, and
|
||||
pins 6,7,8 to A0, A1, and A2.
|
||||
I used a basic sketch to check that everything is good:
|
||||
|
||||
<details>
|
||||
<summary> Show/hide test_sketch.ino </summary>
|
||||
<pre><code> void setup() {
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
Serial.println(analogRead(A2));
|
||||
delay(20);
|
||||
}
|
||||
</code></pre>
|
||||
</details>
|
||||
|
||||
I noticed that the minimum and maximum values read by the Uno were quite far off 0 and 1024, like
|
||||
they should be, and voltage was being lost on the way to and from the potentiometers.
|
||||
Since the pedals have to be calibrated every time you plug them in, I assume this is normal and
|
||||
spat out this code:
|
||||
|
||||
<details>
|
||||
<summary> Show/hide sketch_aug02a.ino </summary>
|
||||
<pre><code>// sensor pins
|
||||
int sa = A0;
|
||||
int sb = A1;
|
||||
int sc = A2;
|
||||
|
||||
// minimum values detected by the sensors
|
||||
int mina = 1025;
|
||||
int minb = 1025;
|
||||
int minc = 1025;
|
||||
|
||||
// maximum values detected by the sensors
|
||||
int maxa = 512;
|
||||
int maxb = 512;
|
||||
int maxc = 512;
|
||||
|
||||
// raw values of the sensors
|
||||
int rva, rvb, rvc;
|
||||
|
||||
// calculated values of the sensors (between 0 and 1, this is the value sent to computer)
|
||||
float cva, cvb, cvc;
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
rva = analogRead(sa);
|
||||
rvb = analogRead(sb);
|
||||
rvc = analogRead(sc);
|
||||
|
||||
if (rva < mina) mina = rva;
|
||||
if (rvb < minb) minb = rvb;
|
||||
if (rvc < minc) minc = rvc;
|
||||
|
||||
if (rva > maxa) maxa = rva;
|
||||
if (rvb > maxb) maxb = rvb;
|
||||
if (rvc > maxc) maxc = rvc;
|
||||
|
||||
cva = (float)(rva-mina)/(float)(maxa-mina);
|
||||
cvb = (float)(rvb-minb)/(float)(maxb-minb);
|
||||
cvc = (float)(rvc-minc)/(float)(maxc-minc);
|
||||
|
||||
Serial.print('[');
|
||||
Serial.print(cva); Serial.print(',');
|
||||
Serial.print(cvb); Serial.print(',');
|
||||
Serial.print(cvc);
|
||||
Serial.print(']');
|
||||
Serial.println();
|
||||
delay(20);
|
||||
}
|
||||
</code></pre>
|
||||
</details>
|
||||
|
||||
<h2> Actually Making the Numbers Do Something </h2>
|
||||
|
||||
This is where you can make the pedals do fun things.
|
||||
I reworked another piece of code I wrote to do a similar thing to quickly create a script that
|
||||
reads the values sent by the Arduino, and then simulate pressing a key combination.
|
||||
The only thing I've done with this is set push-to-talk to ctrl-shift-alt-1.
|
||||
I don't know what else I could use this for, maybe temporarily muting particular things, like music.
|
||||
|
||||
<details>
|
||||
<summary> Show/hide pedalboard.py </summary>
|
||||
<pre><code> #!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
from enum import Enum
|
||||
|
||||
import keyboard
|
||||
import serial
|
||||
|
||||
class KeyState(Enum):
|
||||
UP = 0
|
||||
DOWN = 1
|
||||
|
||||
STATES = [KeyState.UP] * 3
|
||||
THRESHOLD = 0.8
|
||||
MACROS = ['ctrl+shift+alt+1', 'ctrl+shift+alt+2', 'ctrl+shift+alt+3']
|
||||
|
||||
def get_args():
|
||||
""" Get command line arguments """
|
||||
|
||||
import argparse
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('device')
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main(args):
|
||||
""" Entry point for script """
|
||||
while True:
|
||||
try:
|
||||
kb = serial.Serial(port=args.device, baudrate=9600)
|
||||
while True:
|
||||
handle(json.loads(kb.readline()))
|
||||
except serial.serialutil.SerialException as e:
|
||||
print(e)
|
||||
print("Failed to connect to device... trying again")
|
||||
time.sleep(1)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
return 0
|
||||
|
||||
def handle(data):
|
||||
global STATES
|
||||
|
||||
states = [KeyState.DOWN if value > THRESHOLD else KeyState.UP for value in data]
|
||||
r = [handle_state_change(i, states[i]) if states[i] != STATES[i] else None for i in range(len(STATES))]
|
||||
STATES = states
|
||||
return r
|
||||
|
||||
def handle_state_change(key, newstate):
|
||||
print(f"{key} {newstate}")
|
||||
return keyboard.press(MACROS[key]) if newstate == KeyState.DOWN else keyboard.release(MACROS[key])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
sys.exit(main(get_args()))
|
||||
except KeyboardInterrupt:
|
||||
sys.exit(0)
|
||||
</code></pre>
|
||||
</details>
|
226
blog/images/repurposing-racing-wheel-pedals-g27-pinout.svg
Normal file
226
blog/images/repurposing-racing-wheel-pedals-g27-pinout.svg
Normal file
@@ -0,0 +1,226 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.0"
|
||||
width="68.148842"
|
||||
height="34.400002"
|
||||
viewBox="-138.624 -137.291 68.14884 34.400003"
|
||||
id="Layer_1"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="repurposing-racing-wheel-pedals-g27-pinout.svg"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"><title
|
||||
id="title1416">DE-9 Connector with numbers</title><metadata
|
||||
id="metadata1308"><rdf:RDF><cc:Work
|
||||
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title>DE-9 Connector with numbers</dc:title><dc:date>2020-08-02</dc:date><dc:creator><cc:Agent><dc:title>alvierahman90</dc:title></cc:Agent></dc:creator><cc:license
|
||||
rdf:resource="" /><dc:contributor><cc:Agent><dc:title>Original drawing from Mobius (maybe): https://commons.wikimedia.org/wiki/File:DSubminiatures.svg</dc:title></cc:Agent></dc:contributor></cc:Work></rdf:RDF></metadata><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1722"
|
||||
inkscape:window-height="1060"
|
||||
id="namedview1306"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="10.44492"
|
||||
inkscape:cx="27.994898"
|
||||
inkscape:cy="11.731109"
|
||||
inkscape:window-x="1056"
|
||||
inkscape:window-y="1094"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="Layer_1" /><defs
|
||||
id="defs2584">
|
||||
|
||||
|
||||
|
||||
|
||||
</defs>
|
||||
|
||||
<g
|
||||
id="g1336"
|
||||
transform="rotate(180,-104.54958,-120.091)"
|
||||
style="stroke:#454545;stroke-opacity:1"><g
|
||||
transform="translate(-193.19312,-267.013)"
|
||||
id="g2241"
|
||||
style="stroke:#454545;stroke-opacity:1">
|
||||
<circle
|
||||
cx="66.588997"
|
||||
cy="141.351"
|
||||
r="2.2409999"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="circle2243" />
|
||||
<circle
|
||||
cx="77.617996"
|
||||
cy="141.351"
|
||||
r="2.2409999"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="circle2245" />
|
||||
<circle
|
||||
cx="88.643997"
|
||||
cy="141.351"
|
||||
r="2.2379999"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="circle2247" />
|
||||
<path
|
||||
d="m 99.668,139.11 c 1.238,0 2.242,1.004 2.242,2.241 0,1.237 -1.004,2.24 -2.242,2.24 -1.233,0 -2.237,-1.003 -2.237,-2.24 0,-1.237 1.004,-2.241 2.237,-2.241 z"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="path2249"
|
||||
inkscape:connector-curvature="0" />
|
||||
<circle
|
||||
cx="110.697"
|
||||
cy="141.351"
|
||||
r="2.2409999"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="circle2251" />
|
||||
<circle
|
||||
cx="72.102997"
|
||||
cy="152.491"
|
||||
r="2.2390001"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="circle2253" />
|
||||
<circle
|
||||
cx="83.130997"
|
||||
cy="152.491"
|
||||
r="2.2390001"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="circle2255" />
|
||||
<path
|
||||
d="m 94.156,150.252 c 1.237,0 2.238,1.003 2.238,2.237 0,1.237 -1.001,2.241 -2.238,2.241 -1.238,0 -2.242,-1.004 -2.242,-2.241 0,-1.234 1.004,-2.237 2.242,-2.237 z"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="path2257"
|
||||
inkscape:connector-curvature="0" />
|
||||
<circle
|
||||
cx="105.185"
|
||||
cy="152.491"
|
||||
r="2.2390001"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="circle2259" />
|
||||
</g><path
|
||||
d="m -129.54912,-136.791 c -5.609,0 -9.4,4.518 -8.425,10.042 l 2.354,13.309 c 0.976,5.525 6.366,10.049 11.975,10.049 h 38.191005 c 5.608,0 10.996,-4.523 11.975,-10.049 l 2.354,-13.309 c 0.975,-5.524 -2.813,-10.042 -8.425,-10.042 z"
|
||||
style="fill:none;stroke:#454545;stroke-opacity:1"
|
||||
id="path2261"
|
||||
inkscape:connector-curvature="0" /></g>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-123.37334"
|
||||
y="-129.7538"
|
||||
id="text1340"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338"
|
||||
x="-123.37334"
|
||||
y="-129.7538"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">1</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-112.29854"
|
||||
y="-129.7538"
|
||||
id="text1340-3"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338-7"
|
||||
x="-112.29854"
|
||||
y="-129.7538"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">2</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-101.2884"
|
||||
y="-129.7538"
|
||||
id="text1340-9"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338-8"
|
||||
x="-101.2884"
|
||||
y="-129.7538"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">3</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-90.565475"
|
||||
y="-129.7538"
|
||||
id="text1340-6"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338-70"
|
||||
x="-90.565475"
|
||||
y="-129.7538"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">4</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-129.24457"
|
||||
y="-105.27687"
|
||||
id="text1340-4"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338-84"
|
||||
x="-129.24457"
|
||||
y="-105.27687"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">5</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-117.9472"
|
||||
y="-105.27687"
|
||||
id="text1340-8"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338-1"
|
||||
x="-117.9472"
|
||||
y="-105.27687"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">6</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-106.88921"
|
||||
y="-105.27687"
|
||||
id="text1340-68"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338-5"
|
||||
x="-106.88921"
|
||||
y="-105.27687"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">7</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-94.538704"
|
||||
y="-105.27687"
|
||||
id="text1340-2"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338-19"
|
||||
x="-94.538704"
|
||||
y="-105.27687"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">8</tspan></text>
|
||||
<text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-weight:normal;font-size:6.98580647px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#454545;fill-opacity:1;stroke:none;stroke-width:0.17464516;stroke-opacity:1;"
|
||||
x="-83.91153"
|
||||
y="-105.27687"
|
||||
id="text1340-96"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1338-0"
|
||||
x="-83.91153"
|
||||
y="-105.27687"
|
||||
style="stroke-width:0.17464516;stroke:none;stroke-opacity:1;fill:#454545;fill-opacity:1;">9</tspan></text>
|
||||
</svg>
|
After Width: | Height: | Size: 8.6 KiB |
63
blog/lastfm_bookmarklets.md
Executable file
63
blog/lastfm_bookmarklets.md
Executable file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
pub_date: Mon, 18 Sep 2023 16:25:48 +0100
|
||||
title: last.fm bookmarklets
|
||||
tags: [ last.fm, scripts ]
|
||||
uuid: e54ebf58-4033-4dae-81db-91db344f1311
|
||||
---
|
||||
|
||||
# last.fm bookmarklets
|
||||
|
||||
last.fm doesn't let you see how many scrobbled you've made in one day particularly easily.
|
||||
Here is a bookmarklet to solve that.
|
||||
|
||||
<label for="days"> Number of days to view: </label>
|
||||
<input type="number" value="1" id="days" placeholder="Days"/><br><br>
|
||||
<label for="offset"> Offset (e.g. 0 to include today, 7 to look at last week): </label>
|
||||
<input type="number" value="0" id="offset" placeholder="Offset (Days)" /><br><br>
|
||||
<label for="username"> last.fm username </label>
|
||||
<input type="text" value="" id="username" placeholder="Username" /><br><br>
|
||||
<input type="button" id="button" value="Generate bookmarklet"><br>
|
||||
|
||||
<p><a style="display: none" href="" id="scriptLink">Bookmark this link</a></p>
|
||||
|
||||
When you press generate bookmarklet, the values `OFFSET`, `DAYS`, `USERNAME` will be
|
||||
subsituted and put into the link above.
|
||||
It's always best to inspect bookmarklets though.
|
||||
Inspect the page to view the script used to generate the bookmarklet.
|
||||
|
||||
<textarea cols="109" rows="15" readonly id="scriptText">
|
||||
javascript: (() => {
|
||||
const MILLESECONDS_PER_DAY = 1000 * 24 * 60 * 60;
|
||||
const OFFSET;
|
||||
const DAYS;
|
||||
const USERNAME;
|
||||
|
||||
const currentDate = new Date();
|
||||
const to = new Date(currentDate - (OFFSET * MILLESECONDS_PER_DAY));
|
||||
const from = new Date(to - ((DAYS-1) * MILLESECONDS_PER_DAY));
|
||||
const toDate = to.getFullYear() + "-" + (to.getMonth()+1) + "-" + to.getDate();
|
||||
const fromDate = from.getFullYear() + "-" + (from.getMonth()+1) + "-" + from.getDate();
|
||||
|
||||
document.location = "https://www.last.fm/user/" + USERNAME + "/library?from=" + fromDate + "&to=" + toDate;
|
||||
})();
|
||||
</textarea>
|
||||
|
||||
<script>
|
||||
document.getElementById("button").addEventListener("click", () => {
|
||||
scriptText = document.getElementById("scriptText").value;
|
||||
offset = document.getElementById("offset").value;
|
||||
days = document.getElementById("days").value;
|
||||
username = document.getElementById("username").value;
|
||||
|
||||
newscript = scriptText.replace(
|
||||
"OFFSET", "OFFSET = " + offset
|
||||
).replace(
|
||||
"DAYS", "DAYS = " + days
|
||||
).replace(
|
||||
"USERNAME", "USERNAME = '" + username + "'"
|
||||
);
|
||||
document.getElementById("scriptLink").href = newscript;
|
||||
document.getElementById("scriptLink").style = "";
|
||||
});
|
||||
</script>
|
13
blog/readme.md
Normal file
13
blog/readme.md
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
title: alv's blog
|
||||
author: Akbar Rahman
|
||||
pub_date: Fri, 31 Jul 2020 19:50:51 +0100
|
||||
blog: true
|
||||
tags: [ alvs_blog, blog ]
|
||||
uuid: 2d03893a-eb9b-4923-8024-a223ecbe72f7
|
||||
---
|
||||
|
||||
# alv's blog
|
||||
|
||||
this is my blog.
|
||||
i promise i will try to keep things posted here interesting.
|
57
computery_stuff/cadence_license_manager_null_parameter.md
Executable file
57
computery_stuff/cadence_license_manager_null_parameter.md
Executable file
@@ -0,0 +1,57 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: "Cadence License Manager Install - `java.lang.IllegalArgumentException: :locationICompSelected: Null parameter - InstallComponent ID`"
|
||||
tags: [ cadence, license_manager, flexlm, java, errors ]
|
||||
uuid: a5f46736-1ab8-4da1-8737-95de51c95d50
|
||||
---
|
||||
|
||||
# Error
|
||||
|
||||
```
|
||||
[root@host Downloads]# iscape/bin/iscape.sh -batch majorAction=InstallFromArchive archiveDirectory=$(realpath LCU04.30.000_lnx86.Base) installDirectory=$(realpath target)
|
||||
Initializing InstallScape using JVM at /home/alvi/Downloads/iscape.04.23-s012/runtime/LNX86/bin/java. This might take some time...
|
||||
|
||||
WARNING: The DISPLAY environment variable has not been set.
|
||||
InstallScape might not initialize.
|
||||
|
||||
|
||||
InstallScape Installer (Batch Mode) - 04.23.s12
|
||||
|
||||
:locationICompSelected: Null parameter - InstallComponent ID
|
||||
java.lang.IllegalArgumentException: :locationICompSelected: Null parameter - InstallComponent ID
|
||||
at com.khanpur.installerng.ArchiveLocationManager.locationICompSelected(ArchiveLocationManager.java:143)
|
||||
at com.khanpur.installerng.Installer.archiveLocationICompSelected(Installer.java:1156)
|
||||
at com.khanpur.installer.gui.batch.BatchInstallfromarchive.execute(BatchInstallfromarchive.java:86)
|
||||
at com.khanpur.installer.gui.batch.BatchView.initialize(BatchView.java:329)
|
||||
at com.khanpur.installer.gui.batch.BatchView.<init>(BatchView.java:90)
|
||||
at com.khanpur.installer.gui.InstallerUINoSplash.showBatch(InstallerUINoSplash.java:325)
|
||||
at com.khanpur.installer.gui.BatchCommand.execute(BatchCommand.java:78)
|
||||
at com.khanpur.util.TransactionCommand.execute(TransactionCommand.java:74)
|
||||
at com.khanpur.util.Commandline.runCommands(Commandline.java:223)
|
||||
at com.khanpur.installer.gui.InstallerUINoSplash.processCommandLine(InstallerUINoSplash.java:340)
|
||||
at com.khanpur.installer.gui.InstallerUINoSplash.main(InstallerUINoSplash.java:372)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
|
||||
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
|
||||
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
|
||||
at java.lang.reflect.Method.invoke(Unknown Source)
|
||||
at com.khanpur.installer.gui.InstallerUI.main(InstallerUI.java:123)
|
||||
Failed with InstallScape JVM.
|
||||
Now loading System JVM...
|
||||
iscape/bin/iscape.sh: line 222: java: command not found
|
||||
Error:
|
||||
/usr/bin/which: no java in (/usr/local/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin)
|
||||
Could not use JVM packaged with Installcape. The Java in your path did not work or could not find Java in your path. Ensure that Java 1.6 or later is in your PATH environment variable and restart InstallScape.
|
||||
```
|
||||
|
||||
# Cause
|
||||
|
||||
Using the wrong filepath.
|
||||
The Cadence archives have subfolders to split the software between multiple CDs (a relic of the
|
||||
past perhaps).
|
||||
The actual folder to use is the CDs.
|
||||
|
||||
# Solution
|
||||
|
||||
Use the folder that contains the `.sdx` files (in my case, add `/CDROM1` onto end of
|
||||
`archiveDirectory`).
|
81
computery_stuff/cloudwatch_event_rule_lambda_ansible.md
Executable file
81
computery_stuff/cloudwatch_event_rule_lambda_ansible.md
Executable file
@@ -0,0 +1,81 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: Eventbridge Rule (Cloudwatch Rule) Does Not Invoke Lambda When Configured Through Ansible
|
||||
tags:
|
||||
- ansible
|
||||
- aws
|
||||
- aws_eventbridge
|
||||
- aws_lambda
|
||||
- cloudwatch
|
||||
- eventbridge
|
||||
- lambda
|
||||
- permissions
|
||||
uuid: df3ca083-b6ae-4e35-bb1c-8b3978117c57
|
||||
---
|
||||
|
||||
# Eventbridge Rule (formerly Cloudwatch Rule) Does Not Invoke Lambda When Configured Through Ansible
|
||||
|
||||
## Problem
|
||||
|
||||
After creating an Eventbridge rule to run a Lambda function with the Ansible module
|
||||
[`amazon.aws.cloudwatchevent_rule`](https://docs.ansible.com/ansible/latest/collections/amazon/aws/cloudwatchevent_rule_module.html),
|
||||
the rule does not run Lambda function when it should:
|
||||
|
||||
```yaml
|
||||
- name: "Create lambda function"
|
||||
register: create_lambda
|
||||
amazon.aws.lambda:
|
||||
region: "{{ aws_ec2_region }}"
|
||||
description: "My Lambda function"
|
||||
name: "{{ lambda_name }}"
|
||||
role: "{{ iam_role.iam_role.arn }}"
|
||||
state: "present"
|
||||
timeout: 120
|
||||
vpc_security_group_ids: "{{ sec_group.group_id }}"
|
||||
vpc_subnet_ids: "{{ subnet_ids }}"
|
||||
image_uri: "{{ ecr.repository.repositoryUri }}:latest"
|
||||
- name: "Schedule my Lambda function"
|
||||
register: lambda_schedule_rule
|
||||
amazon.aws.cloudwatchevent_rule:
|
||||
name: "a_unique_rule_name"
|
||||
region: "{{ aws_ec2_region }}"
|
||||
schedule_expression: "rate(1 minute)"
|
||||
state: "present"
|
||||
targets:
|
||||
- arn: "{{ create_lambda.configuration.function_arn }}"
|
||||
id: "a_unique_id"
|
||||
input: "{{ eventbridge_rule_lambda_event_input }}"
|
||||
```
|
||||
|
||||
Even though creating a seemingly identical setup through the AWS console works fine.
|
||||
|
||||
## Cause
|
||||
|
||||
The Eventbridge rule is not allowed to invoke this Lambda, as it is not in the Lambda's policy.
|
||||
|
||||
## Solution
|
||||
|
||||
Use the
|
||||
[`amazon.aws.lambda_policy`](https://docs.ansible.com/ansible/latest/collections/amazon/aws/lambda_policy_module.html)
|
||||
module to allow the Eventbridge rule to invoke the Lambda.
|
||||
Note that, if specifying the Lambda function name to `function_name` (as opposed to the ARN of the
|
||||
Lambda function), you must specify `version` or otherwise the Lambda function still won't be run!
|
||||
|
||||
|
||||
```yaml
|
||||
- name: "Allow Eventbridge (Cloudwatch) Rules to invoke lambda"
|
||||
amazon.aws.lambda_policy:
|
||||
action: "lambda:InvokeFunction"
|
||||
function_name: "{{ lambda_name }}"
|
||||
state: "present"
|
||||
statement_id: "a_unique_statement_id"
|
||||
region: "{{ aws_ec2_region }}"
|
||||
principal: "events.amazonaws.com"
|
||||
source_arn: "{{ lambda_schedule_rule.rule.arn }}"
|
||||
version: "{{ create_lambda.configuration.version }}"
|
||||
```
|
||||
|
||||
|
||||
Solution found thanks to @david-kretch's answer to the same question at
|
||||
<https://stackoverflow.com/questions/45282939/cloudwatch-event-rule-creation-via-ansible-succeeds-but-not-invoked>.
|
12
computery_stuff/flask.md
Executable file
12
computery_stuff/flask.md
Executable file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: Flask
|
||||
tags: [ python, flask, programming, docker ]
|
||||
uuid: e513ed96-cb19-4d4c-9894-e337c54659e5
|
||||
---
|
||||
|
||||
# Examples
|
||||
|
||||
- [alv.cx-glass](https://git.alv.cx/alvierahman90/alv.cx-glass) --- a pretty minimal example, probably not very production ready but has example of how to use in Docker
|
||||
- <https://flask.palletsprojects.com/> --- official documentation for Flask
|
17
computery_stuff/jetson_nano.md
Executable file
17
computery_stuff/jetson_nano.md
Executable file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: Jetson Nano
|
||||
tags: [ nvidia, jetson, jetson_nano, droidcam ]
|
||||
uuid: f312451a-2cd4-468a-9eef-ca9859c7cd1e
|
||||
---
|
||||
|
||||
|
||||
# installing Droidcam
|
||||
|
||||
figured out with help from <https://hizzely.hashnode.dev/instalasi-droidcam-cli-di-jetson-nano> :pray:
|
||||
|
||||
0. build and install libjpeg-turbo version 2.1.2 from github (cmake, make, make install)
|
||||
0. build droidcam (2.1.3 confirmed working) from source (make) and install (./install-client) (may need to set `PKG_CONFIG_PATH` environment varible to whatever libjpeg turbo installed at (for me, `/opt/libjpeg-turbo/lib64/pkgconfig`))
|
||||
0. install v4l2loopback-dkms with apt
|
||||
0. run droidcam (you may need to set `LD_LIBRARY_PATH` environment variable to wherever libjpeg-turbo installed to (for me, `/opt/libjpeg-turbo/lib64`))
|
@@ -20,3 +20,47 @@ usermod -a -G group user
|
||||
```bash
|
||||
usermod -g group user
|
||||
```
|
||||
|
||||
# help i think my device shut down after deleting the current kernel and before installing the second (no entries in systemd-boot/grub/<bootloader>)
|
||||
|
||||
0. boot into a live usb of current disto
|
||||
1. mount the root partition to `/mnt` and the boot partition to the appropriate folder (check
|
||||
fstab which should be in `/mnt/etc/fstab`, if it says `/efi`, mount it to `/mnt/efi`)
|
||||
2. chroot into the mounted filesystem:
|
||||
|
||||
on arch based systems you can simply run:
|
||||
|
||||
```
|
||||
arch-chroot /mnt
|
||||
```
|
||||
|
||||
on non arch based systems[^1]:
|
||||
|
||||
```
|
||||
mount -t proc /proc /mnt/proc/
|
||||
mount -t sysfs /sys /mnt/ys/
|
||||
mount --rbind /dev /mnt/dev/
|
||||
# only if using uefi
|
||||
mount --rbind /sys/firmware/efi/efivars /mnt/sys/firmware/efi/efivars/
|
||||
# for internet access
|
||||
cp /etc/resolv.conf /mnt/etc/resolv.conf
|
||||
chroot /mnt /bin/bash
|
||||
```
|
||||
3. the system can now be force updated/kernel images can be generated
|
||||
|
||||
on arch based systems[^2]:
|
||||
|
||||
```
|
||||
# reinstall all current packages
|
||||
pacman -Qqen > /root/pkgs.txt # list all installed packages
|
||||
pacman -S $(< /root/pkgs.txt) # reinstall all installed packages
|
||||
rm /root/pkgs.txt # clean up
|
||||
|
||||
# reinstall dependencies (if there are issues)
|
||||
pacman -Qqdn > /root/deps.txt # list all installed dependencies
|
||||
pacman -S $(< /root/deps.txt) # reinstall all installed dependencies
|
||||
rm /root/deps.txt # clean up
|
||||
```
|
||||
|
||||
[^1]: https://wiki.archlinux.org/title/Chroot [wayback machine](https://web.archive.org/web/20240121115548/https://wiki.archlinux.org/title/Chroot)
|
||||
[^2]: https://bbs.archlinux.org/viewtopic.php?id=193174 [wayback machine](https://web.archive.org/web/20240129153400/https://bbs.archlinux.org/viewtopic.php?id=193174)
|
||||
|
14
computery_stuff/uo_nottingham.md
Executable file
14
computery_stuff/uo_nottingham.md
Executable file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: University of Nottingham
|
||||
tags: [ uni ]
|
||||
uuid: d1b03938-c5b4-48ad-a258-78f96880aa4b
|
||||
---
|
||||
|
||||
### Trying to log into Microsoft 365 sends me to a different organisation's login page
|
||||
|
||||
Try one of these links:
|
||||
|
||||
- <https://pls.cx/uon_email> (a redirect to the link below)
|
||||
- <https://outlook.office.com/owa/nottingham.ac.uk>
|
@@ -6,4 +6,6 @@ cd `dirname $0`
|
||||
git pull
|
||||
cd ..
|
||||
rm -rf notes.alv.cx/*
|
||||
notes2web.py -o notes.alv.cx notes
|
||||
cd /root/gronk
|
||||
git pull
|
||||
docker compose up --build
|
||||
|
10
readme.md
Normal file
10
readme.md
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: alv's notes
|
||||
base_url: https://notes.alv.cx
|
||||
---
|
||||
|
||||
# alv's notes
|
||||
|
||||
These are my personal notes. Correctness is not guaranteed.
|
||||
|
||||
Best viewed at [notes.alv.cx](https://notes.alv.cx).
|
12
styles.css
Normal file
12
styles.css
Normal file
@@ -0,0 +1,12 @@
|
||||
@import url("https://styles.alv.cx/fonts/comic-mono-font.css");
|
||||
@import url("https://styles.alv.cx/modules/dotgrid.css");
|
||||
@import url("https://styles.alv.cx/modules/alwaysdark.css");
|
||||
|
||||
:root {
|
||||
--dotgrid-size: 15em;
|
||||
--dotgrid-dot-size: 1px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Comic Mono', monospace;
|
||||
}
|
BIN
uni/mmme/2044_design_manufacture_and_project/MMME2044.apkg
Normal file
BIN
uni/mmme/2044_design_manufacture_and_project/MMME2044.apkg
Normal file
Binary file not shown.
102
uni/mmme/2044_design_manufacture_and_project/MMME2044.txt
Normal file
102
uni/mmme/2044_design_manufacture_and_project/MMME2044.txt
Normal file
@@ -0,0 +1,102 @@
|
||||
#separator:tab
|
||||
#html:false
|
||||
what are plain bearings - a suitable solid material fitted between shaft and support to reduce friction and wear - bearing may be dry rubbing bearing or lubricated
|
||||
what types of lubrication can be used for plain bearings - hydrodynamic - hydrostatic - solid-film - boundary layer
|
||||
what is hydrodynamic lubrication the shaft rotating in oil creates the oil pressure to lubricate the shaft
|
||||
what are ball and roller bearings the rotating load is converted to rolling contact of the balls or rollers
|
||||
what are the parts of a ball bearing
|
||||
what is the difference between a journal bearing and a thrust bearing - a journal bearing supports the shaft radially - a thurst bearing supports the shaft axially
|
||||
when would one use a plain rubbing bearing low load, low speed applications
|
||||
what is the pV factor and what is it the product of a measure of the bearing's ability to cope with frictional heat generation p- pressure V- speed at contact point
|
||||
what is the projected area of a radial sliding bearing the area of a journal when looking down from it:
|
||||
what is the thrust area of an axial bearing area of the bearing that isn't holey [$]\frac\pi4 \left(D^2-d^2\right)[/$]
|
||||
what is the wear volume of an axial sliding bearing the non holey area multiplied by the distance the bearing can wear down without issue [$]YA_\text{thrust} = Y\frac\pi4\left(D^2-d^2\right)[/$]
|
||||
what are the main properties of plain rubbing bearings (4) - usually made of polymers - moulded to final shape - dry lubricants added - reinforcements added
|
||||
what dry lubricants and reinforcements are added to plain rubbing bearings - PTFE lubricant added - glass fibre reinforement added
|
||||
what limits the pressure and speed a plain bearing can be operated at strength and temperature, respectively
|
||||
what differentiates oil lubricated porous bearings - manufactured from sintered metal powders - porous and impregnated
|
||||
how often does lubricant need to be replenished in porous bearings roughly 1000 hours
|
||||
list some of the lowest coefficient of friction bearing materials and their coefficient range - babbitt metal (0.005 to 0.1) - POM (0.05-0.15) - cast iron and lead bronze with grease (0.05 to 0.15)
|
||||
list the highest pV bearing materials - babbitt metal (2) - cast iron and lead bronze with grease (1) - porous bronze (1)
|
||||
what is the equation for wear factor, [$]K[/$] [$]K = \frac{W}{FVt}[/$] where $W$ is wear volume, $F$ is bearing load, $V$ is sliding velocity, and $t$ is elapsed time
|
||||
what is the main issue with hydrodynamic bearings surfaces touch at low speeds
|
||||
draw the curve of friction against speed
|
||||
describe the properties of boundary lubrication continuoous and extensive contactlubricant is smeared across surfacecoefficient of friction 0.05 to 0.2wear take place & limits life
|
||||
what are the properties of mixed lubrication higher surface speedsintermittent contact between surfacepartial hydrodynamic supportcoefficient of friction of 0.004 to 0.10very high local pressures can create elastic deformation of surfaces
|
||||
what is elastohydrodynamic lubrication fluid film lubrication where high local pressure create elastic deformation of surfaces
|
||||
what are the properties of hydrodynamic lubrication high speedsno contact between surfaces---no wearminimum film thickness of 8 to 20 micronsvery good surface finish and tolerances requiredcoefficient of friction between 0.002 to 0.01
|
||||
what is the Sommerfeld number a dimensionless number describing the relationship between a bearings dimensions, speeds, and fluid properties [$]S = \left( \frac R h\right)^2 \frac{\eta n}{P}[/$] where R is radius, h is clearance, [$]\eta[/$] is viscosity, n is angular speed, and P is bearing pressure
|
||||
what is the equation for clearance of a bearing [$]h = R_\text{bearing} - R_{shaft}[/$]
|
||||
what is petroff's equation and what is it used for [$]\mu = 2\pi^2 \frac{\eta n}{P}\frac{R}{h}[/$] used for lightly loaded bearings
|
||||
equation for hydrodynamic journal bearing capacity [$]F = S\eta V \left(\frac{R}{h}\right)^2[/$]
|
||||
equation for thrust capacity for hydrodynamic thrust bearing [$]F = 6\eta\left[ \frac{Ln(1+n)}{n^2} - \frac{2}{n(2+n)}\right]\frac{VL^2}{h_\text{min}^2}[/$] where [$]n = \frac{h_\text{max}}{h_\text{min}}-1[/$]
|
||||
what causes friction between components in relative motion real surfaces have asperities which stick out and make contact with the other facewhen sliding, asperities catch and must be deformed or brokenthe forces required to do so is friction
|
||||
what are the different rolling element types
|
||||
what are the types of ball bearings and what are their primary features
|
||||
what is the equation for static load carrying capacty [$]s_0 = \frac{C_0}{P_0}[/$] where s is the static safety factor, P, is the equivalent static bearing load, and C is the basic static load rating
|
||||
dynamic load carrying capacity [$]L_{10} = \left(\frac CP \right)^q[/$] where L10 is the basic life rating in millions of revolutions, C is the basic dynamic load rating, P is equivalent dynamic bearing load, q is exponent of life: 3 for balls10/3 for rollers
|
||||
what are the equations for equivalent dynamic load (4) constant magnitude and direction: P = F axial and radial load: [$]P = XF_r + YF_a[/$] (X and Y from manufacturers data)roller bearings: P = F_rfluctuating loads: [$]F_m = \sqrt[3]{\frac{F_1^3U_1 + \cdots}{U}}[/$]
|
||||
when would you have adjust life rating (5) low reliabilityhigh temperaturehigh vibrationrisk of water ingressrisk of corrosion
|
||||
why should a locating bearing be used in conjunction with a floating bearing ensures journal does not slide about axially (i think)
|
||||
what combinations of bearings can be used to support a shaft (5) 2 angular contact bearings - free sliding housing for axial adjustmentone ball + one roller - roller supports radial, ball supports axial and radial2 taper rollers - both support radial and axial, one bearing adjusted against other to required preload2 balls - radial and axial loads, one clamped axially on both races while other left free2 roller - accepts heavy radial load, some axial, each roller locates axially one in direction
|
||||
when should you slide fit the inner race with the shaft when the load rotates with the shaft
|
||||
what is the difference between bolts, screws, and studs bolts have an unthreaded core, and a matching nutscrews are threaded all the way and screw directly into a materialstuds do not have heads
|
||||
draw a lap joint and the forces they are designed to handle
|
||||
draw a butt joint and the forces they are designed to handle
|
||||
what is a rivet a non threaded fastener that is deformed around the parts to be joined
|
||||
what are the types of rivets (3) solidtubular - have a hole down the axisblind (pop rivets)
|
||||
what are the advantages of rivets (5) low costrapid assemblypermanentcan join dissimilar materialswide range of shapes and materials
|
||||
what are the disadvantages of rivits (3) slower than welding and adhesivespoor under tensile loadsjoints leak unless sealed
|
||||
draw a welded but joint and forces is designed to handle
|
||||
draw a welded lap joint and the forces it is designed to handle
|
||||
draw a double fillet t joint
|
||||
draw a fillet cornet joint
|
||||
why are bolts pre tensioned stops faces from separatingreduces fluctuating stresses experienced by bolt -> increases fatigue life
|
||||
what is the recommend preload for non permanent joints [$]F_i = 0.75A_s\sigma_p[/$]
|
||||
what is the rceommended preload for permanent joints [$]F_i = 0.9A_s\sigma_p[/$]
|
||||
what is the tensile area of a bolt [$]A_s = \frac{\pi}{16}(d_p+d_r)^2[/$]
|
||||
what is the pitch diameter of a bolt [$]d_p = d-0.6495p[/$]
|
||||
what is the minor diameter of a bolt [$]d_r = d-1.0825p[/$]
|
||||
what can proof strength be approximated to if unavailable [$]\sigma_p = 0.85\sigma_y[/$]
|
||||
"what does the marking ""MX.Y"" mean on a bolt" X - has tensile strength of X*100 MPa Y - has yield strength of Y*X*10 Mpa
|
||||
what is the bolt torque pre tension equation [$]T= KF_id[/$] where K is torque coefficient (around 0.2 for most cases), and d is nominal diameter
|
||||
how can the stiffness of a bolt be reduced (2) reduce cross sectional areaincrease length
|
||||
what stress reserve factor would you want for reliable materials under controlled conditions and known stresses 1.25 to 1.5
|
||||
what stress reserve factor would you want for average materials with known loads and stresses 2 to 2.5
|
||||
what reserve factor would you want for untried materials in average conditions 3 to 3.5
|
||||
what reserve factor would you want for well known materials in uncertain conditions 3 to 3.5
|
||||
what are the steps to select a bolt (6) consider permanent vs non permanent, define external load, number of bolts, and reserve factorestimate preload by assuming hard joint (K_c = 3K_b)choose suitable bolt size and determine preload by using table 5 of bs en iso 898-1:2009calculate stiffness of bolts and componentscalculate maximum allowable external loadcalculate reserve factor
|
||||
why is a pre tensioned bolted joint beneficial for cyclic loading pre tension raises mean stress which increases fatigue life
|
||||
what must be considered when using helical gears axial load generated
|
||||
what are the properties of spur gears between parallel shafts (4) cheap to manufacturenoisyfew number number of teeth in contact at any given timesensitive to alignment
|
||||
what are the properties of helical gears teeth cut at inclined angle to axis of rotationcontact between teeth more progressive and longercarries higher loadsquietercan be mounted at right anglesdouble helical gears (herringbone) can cancel out axial thrust for smoother power transmission at high speeds
|
||||
what is the pitch circle circle upon which all calculations are based
|
||||
what is circular pitch the distance between two identical points on adjacent teeth on a gear
|
||||
what is the module of a gear, m [$]m = \frac d N [/$] where d is pitch diameter, N is number of teeth
|
||||
what is tooth thickness and width of space [$]t = w = 0.5p[/$] where p is circular pitch
|
||||
what is the addendum radial distance between pitch circle and top land a = m
|
||||
what is the dedendum radial distance between pitch circle and bottom land b = 1.25 m
|
||||
what is the clearance c = 0.25m radial distance between bottom land of gear 1 and top land of gear 2
|
||||
what is the whole depth of a gear ht = addendum + dedendum = 2.25m
|
||||
what is the working depth of a gear hk = addendum + dedendum - clearance = 2m
|
||||
what are the conditions for proper meshing between gears module is samepressure angle is same
|
||||
what are the common pressure angles 20 degrees14.5 degrees
|
||||
what is the equation for centre distance betwen two gears [$]C = \frac m 2 (N_1 + N_2)[/$]
|
||||
what is the minimum number of teeth for standard gears of pressure angle 20 degrees 18
|
||||
what is a simple gear train each shaft only carries one gear
|
||||
what is a compound gear train a gear train where at least one shaft carries two or more gears
|
||||
what is a reverted train a compond train in which the input and shaft are colinear
|
||||
what is a planetary gear train has a sun gear, planet carrier, and one or more planet gears
|
||||
what differentiates planetary gear systems it has two degrees of freedomhas very high gear ratios
|
||||
what are the common forms of gear failure bending fatiguepittingmicropittingscuffing
|
||||
what is a lower pair joint joint with surface contact (pin in a hole)
|
||||
what is a higher pair joint a joint with point or line contact, such as a pin in a slot
|
||||
what is rectilinear translation points in the body move in parallel straight lines
|
||||
what is curvilinear motion points in the body move along idential curves so the link does not rotate with respect to the ground
|
||||
what is the equation for degrees of freedom of a mechanism (gruebler's) M = 3L - 2J - 3G
|
||||
what does it mean if a structure has negative degrees of freedom it's preloaded or overconstrained
|
||||
what is the grashof condition equation and what does it mean S + L < P + Q: it is a grashof linkage and at least one link can make a full revolutionS + L > P + Q: non grashof and no link capable of making full revolutionS + L = P + Q: special grashof - either double-cranks or crank rockers
|
||||
what is a limit/toggle test checks if linkage can reach all positions without encountering a limit of toggle positiontoggle positons may be determined by collinearity of two links
|
||||
what is transmission angle angle between output link and coupler
|
||||
what is the ideal transmission angle 90 degrees
|
||||
what is the minimum transmission angle 40 degrees
|
189
uni/mmme/2044_design_manufacture_and_project/bearings.md
Executable file
189
uni/mmme/2044_design_manufacture_and_project/bearings.md
Executable file
@@ -0,0 +1,189 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: MMME2044 // Bearings
|
||||
tags: [ bearings ]
|
||||
uuid: 94cac3fd-c352-4fdd-833d-6129cb484b8a
|
||||
lecture_slides: [ ./lecture_slides/Lecture 7 - Bearings 1 – Plain Hydrodynamic Bearings 1.pdf, ./lecture_slides/Lecture 11 - Bearings 2 - Rolling Element Bearings.pdf ]
|
||||
anki_deck_tags: [ bearings ]
|
||||
---
|
||||
|
||||
> I don't think I ever finished these notes.
|
||||
|
||||
# Errata
|
||||
|
||||
## Lecture Slides 2 (Lecture 11), slide 18
|
||||
|
||||
Static load carrying capacity equation is
|
||||
|
||||
$$S_0 = \frac{P_0}{C_0}$$
|
||||
|
||||
but should be:
|
||||
|
||||
$$S_0 = \frac{C_0}{P_0}$$
|
||||
|
||||
If the load applied to a bearing is half of its rated capacity,
|
||||
then you have a safety factor of 2.
|
||||
Therefore the equation in the slides must be incorrect.
|
||||
|
||||
# Types of Bearings
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
|
||||
### Plain Journal Bearings
|
||||
|
||||
</summary>
|
||||
|
||||
- used to support rotating shafts loaded in radial directions
|
||||
- consists of an insert fitted between the shaft and support
|
||||
- the insert may be an aluminium alloy, copper alloy, or other material
|
||||
- the insert provides lower friction and less wear than if just rotating in the support
|
||||
- the bearing may be dry rubbing or lubricated
|
||||
|
||||
#### Lubrication
|
||||
|
||||
- hydrodynamic---a shaft continuously in oil. the load is carried by pressure generated in the oil
|
||||
as a result of the rotation
|
||||
- hydrostatic---avoids excessive wear at start up by pumping oil into the load bearing area at a
|
||||
pressure that lifts the shaft
|
||||
- solid-firm---a coating of a solid material like graphite or molybdenum disulphide
|
||||
- boundary layer---a thin layer of lubricant which adheres to the surface of the bearing
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
|
||||
### Ball and Roller Bearings (Rolling Element Bearings)
|
||||
|
||||
</summary>
|
||||
|
||||
- main load is transferred from rotating shaft to its support by rolling contact from balls
|
||||
- a rolling element bearing consists of an inner race, outer race, rolling elements and a cage
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
|
||||
### Plain Rubbing Bearings (Dry Sliding)
|
||||
|
||||
</summary>
|
||||
|
||||
- does not use liquid lubrication
|
||||
- usually polymeric
|
||||
- dry lubricants added (e.g. PTFE)
|
||||
- reinforcements added (e.g. glass fibre)
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
|
||||
### Oil Lubricated Porous Bearings
|
||||
|
||||
</summary>
|
||||
|
||||
- manufactured from sintered metal powders
|
||||
- porous and oil impregnated
|
||||
- more porous is weaker but allows for high speeds
|
||||
- lubricant needs to replenished at regular intervals --- usually every 1000 hours of use
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>
|
||||
|
||||
### Hydrodynamic Bearings
|
||||
|
||||
</summary>
|
||||
|
||||
- pressure builds up in the lubricant as a response to the relative motion
|
||||
- both journal and thrust bearings may use this principle
|
||||
- surfaces touch and rub at very low speeds
|
||||
|
||||
|
||||
|
||||

|
||||
|
||||
</details>
|
||||
|
||||
|
||||
# fun graphs that may be useful for bearing selection
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
# $pV$ Factor
|
||||
|
||||
- a measure of the bearing's ability to cope with frictional heat generation
|
||||
- rapid wear occurs at $pV_\text{max}$
|
||||
- if the value is exceeded then overheating, melting, and excessive wear or seizure may follow
|
||||
- general operational range should be around $0.5pV_\text{max}$
|
||||
|
||||

|
||||
|
||||
- A - thermoplastics
|
||||
- B - PTFE
|
||||
- C - PTFE + fillers
|
||||
- D - porous bronze + PTF + lead
|
||||
- E - PTFE-glass weave + thermoset
|
||||
- F - reinforced thermoset + molybdenum disulphide
|
||||
- G - thermoset/carbon graphite + PTFE
|
||||
|
||||
## Radial Sliding Bearing
|
||||
|
||||
$$p = \frac{F_\text{radial}}{bD}$$
|
||||
|
||||
$$V = \omega\frac D2$$
|
||||
|
||||

|
||||
|
||||
|
||||
## Axial Sliding Bearing
|
||||
|
||||
$$p = \frac{4F_\text{axial}}{\pi(D^2-d^2)}$$
|
||||
|
||||
$$V = \omega\frac{D+d}{4}$$
|
||||
|
||||

|
||||
|
||||
## Plain Rubbing Bearings
|
||||
|
||||
- does not rely on liquid lubricaton
|
||||
- usually made of polymers and moulded to final shape
|
||||
- dry lubricants like ptfe are added
|
||||
- reinforcements like glass fibres can be added
|
||||
- pressure is limited by strength
|
||||
- speed is limited by temperature
|
||||
|
||||
## Oil Lubricated Porous Bearings
|
||||
|
||||
- manufactured from sintered metal powders
|
||||
- porous & oil impregnated
|
||||
- more porous bearings are weaker but can run at higher speeds
|
||||
- lubricant needs to be replenished at regular intervals
|
||||
|
||||
# Wear
|
||||
|
||||
$$K = \frac{W}{FVt}$$
|
||||
|
||||
where $K$ is wear factor (provided by manufacturer), $W$ is wear volume, $F$ is sliding velocity,
|
||||
$F$ is bearing load, and $t$ is elapsed time.
|
||||
|
||||
# Manufacture
|
||||
|
||||
- nominal diametral clearance is commonly 1 $\mu$m per mm
|
||||
- manufacturing tolerance
|
||||
|
||||
- close running fit (H8/f7)
|
||||
- free running (H9/d9)
|
||||
|
Binary file not shown.
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
After Width: | Height: | Size: 36 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
uni/mmme/2044_design_manufacture_and_project/lecture_slides/Lecture 3b Group DM PDR A Case Study from 3rd Year GDM.pdf
Executable file → Normal file
0
uni/mmme/2044_design_manufacture_and_project/lecture_slides/Lecture 3b Group DM PDR A Case Study from 3rd Year GDM.pdf
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
uni/mmme/2044_design_manufacture_and_project/lecture_slides/Lecture 9 Group Design and Make CDR Clinic_v1.2.pdf
Executable file → Normal file
0
uni/mmme/2044_design_manufacture_and_project/lecture_slides/Lecture 9 Group Design and Make CDR Clinic_v1.2.pdf
Executable file → Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
243
uni/mmme/2044_design_manufacture_and_project/pneumatics_and_hydraulics.md
Executable file
243
uni/mmme/2044_design_manufacture_and_project/pneumatics_and_hydraulics.md
Executable file
@@ -0,0 +1,243 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: MMME2044 // Pneumatics and Hydraulics
|
||||
tags: [ uni, mmme2044, pneumatics, hydraulics ]
|
||||
uuid: 9df953f9-13bc-40df-916a-dccaf9a338cf
|
||||
lecture_slides: [ ./lecture_slides/Lecture 4 Pneumatics and Hydraulics.pdf ]
|
||||
---
|
||||
|
||||
> I don't think I ever finished these notes.
|
||||
|
||||
# Actuation Systems
|
||||
|
||||
Actuation systems are the elements of control systems which are responsible for transforming the
|
||||
output of a control system (such as a microcontroller or microprocessor) into a controlling action
|
||||
on a machine or device.
|
||||
|
||||

|
||||
|
||||
# Typical Hydraulic Power System
|
||||
|
||||
The pump pumps oil from a sump through a [non return valve](#non-return-valve) and an
|
||||
[accumulator](#accumulator) to the system, from which it returns to the sump.
|
||||
|
||||

|
||||
|
||||
## Advantages and Disadvantages of Hydraulic Power Systems
|
||||
|
||||
Advantages:
|
||||
|
||||
- Able to generate extremely large forces from compact actuators
|
||||
- Easy to control speed
|
||||
- Easy to implement linear motion
|
||||
|
||||
Disadvantages:
|
||||
|
||||
- Large infrastructure (high pressure pump, tank, distribution lines)
|
||||
- Potential fluid leaks
|
||||
- Noisy operation
|
||||
- Vibration
|
||||
- Maintenance
|
||||
- Characteristics of fluids change with temperature and moisture
|
||||
|
||||
## Components of the System
|
||||
|
||||
### Hydraulic Pump
|
||||
|
||||
This provides the pressure and flow of the liquid in the system.
|
||||
|
||||
[More information about pumps](#types-of-pumps)
|
||||
|
||||
### Pressure Relief Valve
|
||||
|
||||
This is a safety system that safely let's out the fluid of a pressurised system if the pressure
|
||||
exceeds a specified safe pressure.
|
||||
|
||||
### Non-return Valve
|
||||
|
||||
### Accumulator
|
||||
|
||||
The accumulator is a container in which the oil is held under pressure against an external force.
|
||||
This smoothes out any short term fluctuations in the output oil pressure of the pump.
|
||||
|
||||

|
||||
|
||||
- oil pressure rises → gas bladder contracts → more volume for oil to occupy → pressure reduces
|
||||
- oil pressure reduces → gas bladder expands → less volume for oil to occupy → pressure increases
|
||||
|
||||
|
||||
# Types of Pumps
|
||||
|
||||
## Gear Pump
|
||||
|
||||
A gear pump uses the meshing of gears to pump fluid by displacement.
|
||||
They are one of the most common types of pumps for hydraulic fluid power applications.
|
||||
|
||||
They are also widely used in chemical installations to pump high viscosity fluids.
|
||||
|
||||

|
||||
|
||||
## Vane Pump
|
||||
|
||||
A rotary vane pump is a positive displacement pump that consists of vanes mounted to a rotor that
|
||||
rotates inside of a cavity.
|
||||
|
||||
In some cases these vanes have have variable length and/or be tensioned to maintain contact with
|
||||
the walls as the pump rotates.
|
||||
|
||||

|
||||
|
||||
## Radial Piston Pump
|
||||
|
||||
The working pistons extend in a radial direction symmetrically around the drive shaft to take in
|
||||
fluid and output it at the outlet port.
|
||||
|
||||

|
||||
|
||||
## Axial Piston Pump with Wash Plate
|
||||
|
||||
An axial piston pump is a positive displacement pump that has a number of pistons in a circular
|
||||
array within a cylinder block.
|
||||
It can be used as a stand-alone pump, a hydraulic motor or an automotive air conditioning
|
||||
compressor.
|
||||
|
||||

|
||||
|
||||
# Typical Pneumatic Power System
|
||||
|
||||

|
||||
|
||||
1. (Filter, Silencer) The air inlet to the compressor is likely to be filtered silenced to reduce
|
||||
the noise level.
|
||||
2. An electric motor drives the compressor
|
||||
3. The pressure relief valve protects the system against rising above a safe level
|
||||
4. (Cooler, Water Trap) Since the compressor increases the temperature of the air, there may be a
|
||||
cooling system and filter/water trap to cool the air and remove contaminants from the system.
|
||||
5. An air receiver increases the volume of air in the system, to smooth out short term pressure
|
||||
fluctuations
|
||||
|
||||
## Advantages and Disadvantages of a Pneumatic System
|
||||
|
||||
Advantages:
|
||||
|
||||
- Cheaper than electrical or hydraulic actuation
|
||||
- Non-flammable so can use in harsh environments
|
||||
- Simple to implement
|
||||
- Controllable
|
||||
|
||||
Disadvantages:
|
||||
|
||||
- Does not produce a "stiff" system
|
||||
- Requires a compressor, air conditioning, and control valves
|
||||
- Pressurised air can be dangerous
|
||||
|
||||
# Actuators
|
||||
|
||||
Actuators generate a Force or Moment.
|
||||
Both hydraulic and pneumatic actuators have the same principles, but differ in size.
|
||||
Cylinders are the principal actuators for pneumatics:
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Terminology
|
||||
|
||||

|
||||
|
||||
Supply to compressed air to one chamber requires exhaust from the other chamber.
|
||||
|
||||
#### Positive Stroke
|
||||
|
||||
Extends and pushes to + position.
|
||||
|
||||
#### Negative Stroke
|
||||
|
||||
Retracts to - position.
|
||||
|
||||
## Single Acting Linear Actuator
|
||||
|
||||
The control pressure is applied to one side of the piston.
|
||||
|
||||

|
||||
|
||||
When pressure is applied the piston moves along the cylinder.
|
||||
|
||||
When pressure is no long applied the piston reverts back to its initial position and the air is
|
||||
vented from the cylinder.
|
||||
|
||||
## Double Acting Linear Actuator
|
||||
|
||||
Double Acting Linear Actuators are used by applying pressure to one of two sides to move a rod in
|
||||
one of two directions.
|
||||
|
||||

|
||||
|
||||
## Rotary Actuator
|
||||
|
||||
These produce a rotary motion.
|
||||
|
||||
A linear cylinder can be used to produce rotary motion with angles less than 360 degrees with the
|
||||
correct linkages:
|
||||
|
||||

|
||||
|
||||
You can also have vane type semi rotary, where the difference in pressure causes rotation:
|
||||
|
||||

|
||||
|
||||
# Control Valves
|
||||
|
||||
Pneumatic and hydraulic systems use directional control valves to direct the flow of fluid through a
|
||||
system.
|
||||
|
||||
They may be activated to switch the fluid flow direction by means of mechanical, electrical, or
|
||||
fluid signal pressure.
|
||||
|
||||
## Valve Flow Symbols
|
||||
|
||||

|
||||
|
||||
## Valve Actuation Symbols
|
||||
|
||||

|
||||
|
||||
### Solenoid Operated Spool Valve
|
||||
|
||||

|
||||
|
||||
## Spool Directional Control Valve
|
||||
|
||||
Move horizontally within the valve body to control flow:
|
||||
|
||||

|
||||
|
||||
## Poppet Valve
|
||||
|
||||
This valve is normally closed.
|
||||
|
||||

|
||||
|
||||
## Pressure Control Valve
|
||||
|
||||

|
||||
|
||||
## Servo Valve
|
||||
|
||||
An electrohydraulic servo valve is an electrically operated valve that controls how hydraulic fluid
|
||||
is sent to an actuator.
|
||||
|
||||
Servo valves are often used to control powerful hydraulic cylinders with very small electrical
|
||||
signal.
|
||||
|
||||
Servo valves can provide precise control of position, velocity, pressure, and force with good post
|
||||
movement characteristics.
|
||||
|
||||

|
||||
|
||||
## Process Control Valve
|
||||
|
||||
Used to control the fluid flow rate.
|
||||
|
||||
A common form of pneuma
|
@@ -226,10 +226,10 @@ design.
|
||||
Simply multiply the maximum stresses and loads you expect by the safety factor, $n_s$, and assume
|
||||
that as your maximum stress and load.
|
||||
|
||||
$n_s$ | Operational conditions and use of materials
|
||||
----- | -------------------------------------------
|
||||
1.25-1.50 | Reliable materials under controlled conditions, known stresses with certainty
|
||||
1.50-2.00 | Well-known materials under reasonably constant environmental condition, known stresses
|
||||
2.00-2.50 | Average materials subjected to known loads and stresses and environment (LSE)
|
||||
2.50-3.00 | Lesser well-known materials under average conditions LSE
|
||||
3.00-3.40 | Untried materials under average conditions of stresses and environment, or well known materials under uncertain LSE
|
||||
| $n_s$ | Operational conditions and use of materials |
|
||||
|-----------|---------------------------------------------------------------------------------------------------------------------|
|
||||
| 1.25-1.50 | Reliable materials under controlled conditions, known stresses with certainty |
|
||||
| 1.50-2.00 | Well-known materials under reasonably constant environmental condition, known stresses |
|
||||
| 2.00-2.50 | Average materials subjected to known loads and stresses and environment (LSE) |
|
||||
| 2.50-3.00 | Lesser well-known materials under average conditions LSE |
|
||||
| 3.00-3.40 | Untried materials under average conditions of stresses and environment, or well known materials under uncertain LSE |
|
||||
|
199
uni/mmme/2045_materials_in_design/polymers.md
Executable file
199
uni/mmme/2045_materials_in_design/polymers.md
Executable file
@@ -0,0 +1,199 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: MMME2045 // Polymers (Block P)
|
||||
tags: [ uni, mmme2045, polymers ]
|
||||
uuid: 22ccabd9-2c10-454c-bf78-cf14c6f96b47
|
||||
lecture_slides: [ ./lectures_slides/MMME2045 UNUK BlockP Part 1.pptx, ./lectures_slides/MMME2045 UNUK BlockP Part 2.pptx, ./lectures_slides/MMME2045 UNUK BlockP Part 3.pptx, ./lectures_slides/MMME2045 UNUK BlockP Part 4.pptx, ./lectures_slides/MMME2045 UNUK BlockP Revision and Examples.pptx ]
|
||||
exercise_sheets: [ ./questions/Extra Polymer Questions PQ 5-8.pptx ]
|
||||
---
|
||||
|
||||
> I don't think I ever finished these notes.
|
||||
|
||||
# Introduction
|
||||
|
||||
- polymers make up a huge range of products in various fields like electricals, packaging,
|
||||
transport, and more
|
||||
- they tend to be light, corrosion resistant and low friction
|
||||
|
||||
# Case Study: Low Pressure Gas Distribution
|
||||
|
||||
- the UK currently depends on a lot of gas for its power (<http://www.gridwatch.templar.co.uk/>, <https://grid.iamkate.com/>)
|
||||
|
||||
national scale transmission:
|
||||
|
||||
- the National Transmission System (NTS), which is operated by the National Grid, has:
|
||||
|
||||
- 7600 km of large diameter steel pipelines (ranging from 63 mm to 1200 mm)
|
||||
- 20 compressor stations
|
||||
|
||||
- gas is transported from terminals to 120 offtake installations at 85 bar
|
||||
|
||||
- 8 regional domestic transmission systems
|
||||
- 40 large scale industrial consumers, like power stations, at 25 bar
|
||||
- 8 large scale storage sites (9 more planned)
|
||||
|
||||
regional distribution:
|
||||
|
||||
- 275000 km of small diameter pipes
|
||||
- pressure is reduced in stages before reaching residential consumers
|
||||
- volume of gas flowing in pipleline network acts as buffer storage, called linepack
|
||||
|
||||
## Low Pressure Gas Distribution Pipes
|
||||
|
||||
Scale | Pressure (bar)| Priority | Material(s) used
|
||||
--------------------- | ------------- | ------------------------ | ----------------
|
||||
national distribution | 85 | Max flow | high speed steel
|
||||
local distribution | 0.075 to 2 | \phantom | cast iron, PE
|
||||
inside house | < 0.07 | Safe and durable | copper, lead
|
||||
laboratory | < 0.07 | Flexible, easy to change | rubber, PVC
|
||||
|
||||
- cast iron used to be used for low pressure distribution until 50s
|
||||
- typically 12 foot sections connected by bell and spigot joints
|
||||
- sealed by jute fabric and cement or molten lead
|
||||
- leaks tend to develop in packing due to overhead traffic, freeze-thaw cycles, shifting soil, and
|
||||
shift to dryer natural gas
|
||||
- key problems with cast iron are
|
||||
|
||||
- corrosion
|
||||
- brittleness
|
||||
- leakage
|
||||
|
||||
- polymer replacements started in 70s and are ongoing
|
||||
- but methane leaks through PE
|
||||
|
||||
## Desirable Properties for Pipes
|
||||
|
||||
- chemical stability
|
||||
- toughness, high yield strength
|
||||
- stiffness
|
||||
- ease of joining
|
||||
- pressure requirements
|
||||
- low creep
|
||||
- high strength
|
||||
- minimal runaway crack growth
|
||||
- low cost
|
||||
|
||||
## Design against Creep
|
||||
|
||||
- radial stress tends to be negligble
|
||||
|
||||
$$\epsilon_\theta = \frac{pR}{tE}\left(1-\frac\nu2\right)$$
|
||||
|
||||
$$\epsilon_\theta = \sigma_\theta J(t)\left(1 - \frac\nu2\right)$$
|
||||
|
||||
### creep compliance:
|
||||
|
||||
$$J(t) = \frac{\epsilon(t)}{\sigma}$$
|
||||
|
||||
# Selection Criteria for Polymers
|
||||
|
||||
## Ductility Factor (Critical Crack Length, $a_c$)
|
||||
|
||||
$$M = \frac{K_{Ic}}{\sigma_y}$$
|
||||
|
||||
critical crack length is when the cracked structure will fail
|
||||
|
||||
$$a_c < \frac1\pi\left(\frac{K_{Ic}}{\sigma_y}\right)^2$$
|
||||
|
||||
where $a_c$ is critical crack length, $\sigma_y$ is yield strength, and $K_{Ic}$ is the plane strain
|
||||
fracture toughness
|
||||
|
||||
$$K_{Ic} = Y\sigma(\pi a)^{\frac12}$$
|
||||
|
||||
where $Y$ is the geometry factor (affected by shape of structure), $a$ is the length of the crack,
|
||||
and $\sigma$ is applied tensile stress
|
||||
|
||||
# Influence of the Material's Structure
|
||||
|
||||
## Polyethylene (PE)
|
||||
|
||||
- PE is the simplest polymer, with the chemical formula $(C_2H_4)_n$, where $n$ is a large number
|
||||
- PE is compact and tightly packed making it insensitive to solvents
|
||||
- PE has low polarity, making it a good conductor
|
||||
- above $T_g$ the C-C bonds can rotate freely allowing chains to form random coils of amorphous regions
|
||||
|
||||
### Types of PE
|
||||
|
||||
- low density (LDPE) --- density of 915 to 925 kg per cubic meter
|
||||
|
||||
- processed under high pressure (1 to 2 kbar) and high temps (100 to 300 C)
|
||||
- very branched molecules (low crystallinity (40 to 60%))
|
||||
- $T_m \approx 110$ C
|
||||
- $T_g \approx -120$ C
|
||||
- applications include films, bags, transparent parts, packaging, bubble wrap, flexible caps
|
||||
|
||||
- high density (HDPE) --- density of 945 to 960 kg per cubic meter
|
||||
|
||||
- processed with active catalyst at lower pressure (30 bar) and lower temperature (40 to 150 C)
|
||||
- long linear branched molecules (high crystallinity (85 to 95%))
|
||||
- applications include pipes pails, covers, chemical containers jars, tanks
|
||||
|
||||
- linear low density (LLDPE) --- same density as LDPE
|
||||
|
||||
- processed at lower temps than LDPE
|
||||
- mostly linear polymer with significant numbers of short branches
|
||||
- commonly made by copolymerisation of ethylene with short chains of alpha-olefins (e.g.
|
||||
1-butene, 1-hexene, 1-oxtene)
|
||||
- advantages include higher tensile strength, impact and puncture resistance than LDPE, lower
|
||||
thickness films can be blown with environmental stress cracking resistance
|
||||
- applications include packaging, bags, cable covering, toys, lids, buckets, containers, pipe
|
||||
|
||||
- medium density (MDPE) --- 926 to 940 kg per cubic metre
|
||||
|
||||
- processed by mechanically mixing LDPE and HDPE
|
||||
- has properties of a mix of the two
|
||||
- alternatively can be catalysed by catalysts such as chromium and silica
|
||||
- applications include water and gas pipes (high shock and drop resistance), sacks, shrink film,
|
||||
packaging film, carrier bags
|
||||
|
||||
- ulta high molecular weight (UHMWPE) --- density of 930 to 940 kg per cubic meter
|
||||
|
||||
- high molar mass of around 3 to 6 million
|
||||
- gives it high toughness but difficult to form crystal structure (45% crystallinity)
|
||||
- high molecular mass means the long molecules produce more intercrystalline links which
|
||||
increase yield stress through orientation hardening
|
||||
- improved abrasion and chemical resistance, resistance to impact, and cyclical failure
|
||||
- melt flow index is low and cannot be conventionally injection moulded, blow moulded, or
|
||||
extruded
|
||||
- had to be processed by compression moulding or machined
|
||||
- applications include bearing surfaces in biomedical implants, marine barriers, rods, pumps,
|
||||
bearings, gaskets
|
||||
|
||||
### Lamellae
|
||||
|
||||
- PE molecules can also assume a rod like shape and a more crystalline structure
|
||||
- PE contains large numbers of heterogenous nuclei (e.g. from catalyst residues)
|
||||
- on cooling from melt, lamellae crystals grow from edges of crystal plates so it expands to seveal
|
||||
micrometers while thickness is about 10 to 15 nanometres
|
||||
- lamellae form next to it at a slightly different angle and form a funny shape (p7 of
|
||||
[lecture notes](./lecture_notes/BLOCKP Lecture Notes 20-21.pdf)
|
||||
|
||||
## Semi and Non Crystalline Polymers
|
||||
|
||||
- semicrystalline---polymer crystals are always separated from each other by amorphous layers
|
||||
- non-crysalline (amorphous)---glassy polymers, like polystyrene, PMMA, and polycarbonate are known
|
||||
for transparency
|
||||
|
||||
elastomers or rubbers like polyisoprene or butyl rubber are often filled with particles to
|
||||
increase stiffness and reduce wear, making them opaque
|
||||
|
||||
|
||||
# Processing of Polymers
|
||||
|
||||
## Melt Flow Index (MFI)
|
||||
|
||||
MFI is the output in grams when 2.16 kg is used to extrude a polymer using these exact dimensions:
|
||||
|
||||

|
||||
|
||||
# Stuff
|
||||
|
||||
$$P = \text{shear stress} \times \text{shear strain}$$
|
||||
|
||||

|
||||
|
||||
$\Delta P$ is absolute pressure ?? i think (1:12:00 <https://echo360.org.uk/lesson/3c72949d-b5d0-4ffe-b068-9ff663cc4763/classroom#sortDirection=desc>)
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
---
|
||||
author: Akbar Rahman
|
||||
date: \today
|
||||
title: MMME2046 // Approximate Methods
|
||||
title: MMME2046 // Vibrations // Approximate Methods
|
||||
tags: [ vibrations, approximate_methods, rayleighs_method ]
|
||||
uuid: 7cd5b86f-74df-4ec6-b3c6-9204cf949093
|
||||
lecture_slides: [ ./lecture_slides/Vibrations - Approximate Methods.pdf ]
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
uni/mmme/2046_dynamics_and_control/exercise_sheets/ExSheet_1.pdf
Normal file
BIN
uni/mmme/2046_dynamics_and_control/exercise_sheets/ExSheet_1.pdf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
After Width: | Height: | Size: 40 KiB |
Binary file not shown.
After Width: | Height: | Size: 65 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user