simple gyroscope(MPU6050) with digital low pass filter
from left to right: Arrow, Bubble, Line
- MCU(Esp12(esp8266))
- Gyro module(MPU6050)
- OLED(SSD1306, I2C)
ESP12 PIN | GPIO# | Description |
---|---|---|
D1 | 5 | SCL |
D2 | 4 | SDA |
D3 | 0 | Calibration trigger Button |
D5 | 14 | LowPass Filter Switch |
D7 | 13 | Display Mode switch button |
- Arduino
I2cdev
, ThingPulse OLED SSD1306
all have been backup in library_backup directory.
y += beta * (x - y);
Source: Low pass filter algorithm origin
It can be converted to an algebraic relation between the samples of the filter output sequence ๐ฆ[๐] and the filter input ๐ฅ[๐] as:
๐ฆ[๐+1]โ(1โb)๐ฆ[๐]=b๐ฅ[๐]
which is also equivalent to๐ฆ[๐]โ(1โb)๐ฆ[๐โ1]=b๐ฅ[๐โ1]
Update: Sep.28, 2018