-
Notifications
You must be signed in to change notification settings - Fork 0
/
acc_elec.py
39 lines (28 loc) · 955 Bytes
/
acc_elec.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# MEMS accelerometer electrical domain simulation
# @ruiesteves
# Imports
import acc_disp
# Constants
e0 = 8.85e-12 # Permitivity of free space
er = 1 # Relative permitivity of dielectric, in this case air
small_gap = 22*scale # Distance between electrodes and proof mass
# Functions
def main(suspension_beam_width,proof_mass_length):
disp = acc_disp.disp(suspension_beam_width,proof_mass_length)
A = (proof_mass_length)**2
def top_capacitance():
C = (e0*er*A)/(small_gap + disp)
return C
def bot_capacitance():
C = (e0*er*A)/(small_gap - disp)
return C
def capacitance_total():
c_total = bot_capacitance() - top_capacitance()
print(c_total*1e15,"fF")
return c_total
def c2v():
v = 2 * capacitance_total() * 2.5 * (1/300e-15)
print("Output voltage:",v*1e3,"mV")
return v
voltage = c2v()
return voltage