Add a new, exclusive simulation model for the GY-521 breakout board based on the MPU6050L (low-power 6-axis MEMS IMU) to the ISIS Proteus library. This model supports I²C communication, accelerometer & gyroscope data output, and includes visual representation for schematic design and simulation.
The UPD Exclusive model shines with interrupt simulation.
The exclusive UPD model is distributed through:
Note: Ensure you download the UPD (not just HEX‑based) version for full dynamic simulation. isis proteus model library gy 521 mpu6050l upd exclusive
# mpu6050l_sim_input.txt
# time(ms) ax(g) ay(g) az(g) gx(dps) gy(dps) gz(dps)
0 0.00 0.00 1.00 0.00 0.00 0.00
500 0.25 0.00 0.97 30.00 0.00 0.00
1000 0.00 0.00 1.00 0.00 0.00 0.00
Fix: Check that pull-up resistors (4.7k) are present on SDA and SCL in your schematic. The UPD model often includes them internally, but some versions require external.
This code reads accelerometer & gyro data from a real MPU6050 (works also in Proteus if model supports register reads).
#include <Wire.h> #include <MPU6050.h> // Install via Library Manager (by Electronic Cats)MPU6050 mpu;
void setup() Serial.begin(115200); Wire.begin(); if (!mpu.begin()) Serial.println("MPU6050 not found"); while (1); mpu.setAccelerometerRange(MPU6050_RANGE_2_G); mpu.setGyroRange(MPU6050_RANGE_250_DEG);
void loop() sensors_event_t a, g, temp; mpu.getEvent(&a, &g, &temp);
Serial.print("Accel X: "); Serial.print(a.acceleration.x); Serial.print(" Y: "); Serial.print(a.acceleration.y); Serial.print(" Z: "); Serial.print(a.acceleration.z); Serial.print("Add a new, exclusive simulation model for the
For Proteus simulation – If your model does not support the MPU6050 library, write direct I²C read:
#include <Wire.h> #define MPU_ADDR 0x68void setup() Serial.begin(115200); Wire.begin(); Wire.beginTransmission(MPU_ADDR); Wire.write(0x6B); // PWR_MGMT_1 register Wire.write(0x00); // wake up Wire.endTransmission(); The UPD Exclusive model shines with interrupt simulation
void loop() Wire.beginTransmission(MPU_ADDR); Wire.write(0x3B); // ACCEL_XOUT_H Wire.endTransmission(false); Wire.requestFrom(MPU_ADDR, 14, true); // Read 6 accelerometer + 6 gyro bytes int16_t ax = Wire.read() << 8