MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers...

22
MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS A SLAVE I/O TO AN EPICS CONTROL SYSTEM Adam Hjort & Måns Holmberg Supervisor: Volker Ziemann & Konrad Gajewski

Transcript of MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers...

Page 1: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS A SLAVE I/O TO AN EPICS CONTROL SYSTEM Adam Hjort & Måns HolmbergSupervisor: Volker Ziemann & Konrad Gajewski

Page 2: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

GOALS OF THE PROJECT

Arduino Slave

Connect accelerometers

Serial communication

Protocol design

Matlab analysis of data

Transfer function

EPICS integration

Page 3: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

HARDWARE

Page 4: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

ARDUINO SLAVE

Arduino UNO

8-bit microcontroller

ATmega328

2 kb SRAM memory 8-bit microcontroller

Sampling frequency of 1 kHz

Custom made serial protocol for easy implementation

Page 5: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

ADXL335 - ACCELEROMETER

3 axis analog accelerometer

± 3 g

25-1600 Hz sampling rate

Low cost (~15$)

Page 6: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

• Adin 26W vibration speaker

• Bluetooth

TONE GENERATOR

Page 7: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

SOFTWARE

Page 8: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

ARDUINO PROGRAMING

User Friendly

Based on C/C++

setup() and loop()

Page 9: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

ARDUINO INTERRUPTS

MsTimer2

Triggered by timer overflows

1 ms resolution

1 Khz sampling

Page 10: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

MATLAB ANALYSISGUI for easy testing

Page 11: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

ACCELEROMETER RESPONSE TEST

Linear chirp 100-250 Hz

Linear response

Visible harmonics due to table

Page 12: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

EPICS INTEGRATIONImplement protocol in EPICS database-file.

Page 13: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

EPICS

Arduino

Acc 2Acc I

Seriell adapterRS232

SwitchIP

IOC

CAUSER

Page 14: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

EPICS

IOCDatabase

Protocolget_analog

User Inputcaget STRDEV:A0

User outputSTRDEV:A0

496

RecordsSTRDEV:A0

AI record

Out: A01?In: A01 %d

Page 15: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

EPICS

Arduino

Acc 2Acc I

Seriell adapterRS232

SwitchIP

IOC

CAUSER

Page 16: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

ELECTRONIC SCHEMATICMAX232 IC to connect to serial switch

Page 17: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

FOR FUTURE STUDENT TO DO

GUI

Wireless

Page 18: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS
Page 19: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

VACUUM PUMP

30 minutes of sampling

Accelerometer 1 on pump

Accelerometer 2 on floor

FFT

Corelate

Page 20: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

TRANSFER FUNCTION

Page 21: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS
Page 22: MEASURING MECHANICAL VIBRATIONS USING AN ARDUINO AS … · Arduino Slave Connect accelerometers Serial communication Protocol design Matlab analysis of data Transfer function EPICS

QUESTIONS?