Project #12: Robotics – Vibration – Mk29

——

#DonLucElectronics #DonLuc #Vibration #Arduino #EEPROM #Display #Elecrow #Project #Patreon #Electronics #Microcontrollers #IoT #Fritzing #Programming #Consultant

——

Vibration

——

Vibration

——

Vibration

——

Crowtail – Vibration Sensor 2.0

The Crowtail- Vibration Sensor is Used to trigger the effect of various vibration with normally closed type vibration sensor SW – 420. It is widely used to reported the theft alarm, intelligent car, earthquake alarm, motorcycle alarm, etc. This module is compared with the normally open type vibration sensor module, vibration trigger for longer periods of time, can drive the relay module.

  • 1. The product is not vibration, vibration switch is closed on state, output output low level, the green light is lit;
  • 2. When product vibration, the vibration switch instantaneous disconnection, output, output level green light is not bright;
  • 3. The output can be attached directly to the single chip microcomputer, through single chip microcomputer to detect the high and low level, thus to detect if there is a vibration environment, report to the police;

DL2505Mk01

1 x Crowduino Uno – SD
1 x Crowtail – Base Shield
1 x Crowtail – I2C LCD
1 x Crowtail – Vibration Sensor 2.0
1 x Crowtail – Buzzer 2.0
1 x Crowtail – LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable

Crowduino Uno – SD

SCL – A5
SDA – A4
BUZ – 4
VIB – 5
LED – 6
VIN – +5V
GND – GND

DL2505Mk01p

DL2505Mk01p.ino

/****** Don Luc Electronics © ******
Software Version Information
Project #12: Robotics - Vibration - Mk29
DL2505Mk01p.ino
DL2505Mk01
1 x Crowduino Uno - SD
1 x Crowtail - Base Shield
1 x Crowtail - I2C LCD
1 x Crowtail - Vibration Sensor 2.0
1 x Crowtail - Buzzer 2.0
1 x Crowtail - LED(Green)
1 x USB Battery Pack
1 x USB Mini-B Cable
*/

// Include the Library Code
// EEPROM library to read and write EEPROM with unique ID for unit
#include <EEPROM.h>
// Wire
#include <Wire.h>
// Liquid Crystal
#include "LiquidCrystal.h"

// Vibration
int iVibrationPin = 5;
int iVibrationState = 0;
String ZZ = "";

// Buzzer
int iBuzzer =  4;

// Liquid Crystal
// Connect via i2c
LiquidCrystal lcd(0);

// LED Green
int iLEDGreen = 6;

// EEPROM Unique ID Information
String uid = "";

// Software Version Information
String sver = "12-29";

void loop() {

  // isVibration
  isVibration();

  // Display Vibration
  isDisplayVibration();

  // Delay
  delay( 50 );

}

getDisplay.ino

// getDisplay
// Crowbits - OLED 128X64 UID
// Display UID
void isDisplayUID(){

  // Set up the LCD's number of rows and columns: 
  lcd.begin(16, 2);
  // Print a message to the LCD.
  // Cursor
  lcd.setCursor(0, 0);
  lcd.print("Don Luc Electron");
  // Cursor
  lcd.setCursor(0, 1);
  // Print a message to the LCD.
  lcd.print( sver );

}
// Display Vibration
void isDisplayVibration(){

  // Clear
  lcd.clear();
  // Set the cursor to column 0, line 0
  lcd.setCursor(0, 0);
  lcd.print( "Vibration" );
  // Set the cursor to column 0, line 1
  lcd.setCursor(0, 1);
  lcd.print( ZZ );

}

getEEPROM.ino

// EEPROM
// isUID EEPROM Unique ID
void isUID() {
  
  // Is Unit ID
  uid = "";
  for (int x = 0; x < 7; x++)
  {
    uid = uid + char(EEPROM.read(x));
  }
  
}

getVibration.ino

// Vibration
// isVibration
void isVibration(){

  // Vibration
  iVibrationState = digitalRead(iVibrationPin);
  // Check if the vibration sensor is vibrating.
  // If it is, the vibrationState is LOW:
  if (iVibrationState == LOW) {     
       
    // Turn LED on:
    // LED Green
    digitalWrite(iLEDGreen, HIGH);  
    // Buzzer On
    digitalWrite(iBuzzer, HIGH);
    // High
    ZZ = "High";
    
  } else {
    
    // Turn LED off:
    digitalWrite(iLEDGreen, LOW);
    // Buzzer Off
    digitalWrite(iBuzzer, LOW); 
    // Low
    ZZ = "Low";
      
  }

}

setup.ino

// Setup
void setup()
{
 
  // Delay
  delay(100);
  
  // isUID EEPROM Unique ID
  isUID();
  
  // Delay
  delay(100);

  // Initialize the LED Green
  pinMode(iLEDGreen, OUTPUT);
  // LED Green
  digitalWrite(iLEDGreen, LOW);

  // Delay
  delay(100);

  // Vibration 
  pinMode(iVibrationPin, INPUT);
  
  // Buzzer
  pinMode(iBuzzer, OUTPUT);
  // Buzzer Off
  digitalWrite(iBuzzer, LOW);
  // Low
  ZZ = "Low";

  // Delay
  delay( 100 );

  // Display UID
  isDisplayUID();
  
  // Delay 5 Second
  delay( 5000 );

}

——

People can contact us: https://www.donluc.com/?page_id=1927

Electronics, IoT, Teacher, Instructor, R&D and Consulting

  • Programming Language
  • Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc…)
  • IoT
  • Wireless (Radio Frequency, Bluetooth, WiFi, Etc…)
  • Robotics
  • Automation
  • Camera and Video Capture Receiver Stationary, Wheel/Tank and Underwater Vehicle
  • Unmanned Vehicles Terrestrial and Marine
  • Machine Learning
  • Artificial Intelligence (AI)
  • RTOS
  • Sensors, eHealth Sensors, Biosensor, and Biometric
  • Research & Development (R & D)
  • Consulting

Follow Us

Luc Paquin – Curriculum Vitae – 2024
https://www.donluc.com/luc/

Web: https://www.donluc.com/
Facebook: https://www.facebook.com/neosteam.labs.9/
YouTube: https://www.youtube.com/@thesass2063
Twitter: https://twitter.com/labs_steam
Pinterest: https://www.pinterest.com/NeoSteamLabs/
Instagram: https://www.instagram.com/neosteamlabs/
Patreon: https://patreon.com/DonLucElectronics59
DFRobot: https://learn.dfrobot.com/user-10186.html
Hackster.io: https://www.hackster.io/neosteam-labs
Elecrow: https://www.elecrow.com/share/sharepj/center/no/760816d385ebb1edc0732fd873bfbf13
TikTok: https://www.tiktok.com/@luc.paquin8
Twitch: https://www.twitch.tv/lucpaquin
Hackster: https://www.hackster.io/luc-paquin
LinkedIn: https://www.linkedin.com/in/jlucpaquin/

Don Luc

Leave a Comment