Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

bimalka98/Automated-Safety-Stand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automated-Safety-Stand

Automated safety stand for motor bikes

Target Microcontroller Unit: ATmega328P

The high-performance Microchip picoPower® 8-bit AVR® RISC-based microcontroller combines 32 KB ISP Flash memory with read-while-write capabilities, 1024B EEPROM, 2 KB SRAM, 23 general purpose I/O lines, 32 general purpose working registers, three flexible timer/counters with compare modes, internal and external interrupts, serial programmable USART, a byte-oriented Two-Wire serial interface, SPI serial port, a 6-channel 10-bit A/D converter (8-channels in TQFP and QFN/MLF packages), programmable watchdog timer with internal oscillator, and five software selectable power saving modes. The device operates between 1.8-5.5 volts.By executing powerful instructions in a single clock cycle, the device achieves throughputs approaching one MIPS per MHz, balancing power consumption and processing speed.

External intrrupts to identify the moment of switch on: 11.1 Interrupt Vectors in ATmega328P Datasheet

2 0x002     INT0 External interrupt request 0 - PD2
3 0x0004    INT1 External interrupt request 1 - PD3

References

  1. ATmega Interface
  2. MPU6050 (Gyroscope + Accelerometer + Temperature) interface with AVR ATmega16
  3. The MPU6050 Explained
  4. Add multiple files and folders to existing project in Atmel Studio6

Arduino Project (Chosen)

Due to lack of complete code reference for MPU6050 to use with ATmega328P

  1. Build a Digital Level with MPU-6050 and Arduino
  2. Arduino Uno to ATmega328 - Shrinking your Arduino Projects
  3. Build an Electronic Level with MPU-6050 and Arduino
  4. MPU-6050 6-axis accelerometer/gyroscope - I2Cdevlib documatation
  5. jrowberg/i2cdevlib
  6. MPU6050 Class Reference