(SKU:DFR0440) Vibration 微型振动模块

来自DFRobot Product Wiki
跳转至: 导航搜索
微型振动模块

目录

简介

你有没有好奇过手机是如何实现振动的?为什么有时候震感比较强,有时候震感又比较弱呢?Gravity系列最新振动模块,带你深入了解模块的振动原理,满足您的好奇之旅。 模块采用一个优质小型振动电机,整体只有硬币大小,边缘做了圆角处理,更小,更贴心。Gravity 3-Pin接口,即插即用,使用更加方便。让孩子们在探索发现的时候,更加专注知识本身,甩掉繁杂的接线。

产品参数

  • 工作电压:5v
  • 控制方式:高低电平/PWM信号
  • 尺寸:30*22 mm


引脚说明


引脚说明
引脚
标号 名称 功能描述
1 Signal 控制信号输入端
2 VCC 电源+
3 GND 电源-



使用教程

  1. 介绍振动电机的工作原理。
  2. 通过简单的例程和图片来直观的说明微型振动模块的控制方式(高电平工作低电平停止)
  3. 通过PWM信号,控制模块振动强度


准备

  • 硬件
    • UNO x1
    • Vibration 微型振动电机模块 x1
    • 杜邦线 若干
    • 数字大按钮模块DFR0029-Y X1
  • 软件


工作原理

振动模块采用振动电机作为激振源,振动电机是在转子轴一端安装一组可调偏心块,利用轴及偏心块高速旋转产生的离心力得到激振力。


通过开关控制振动模块

按键控制接线图



/***************************************************
* Vibration
* ****************************************************
*  This example shows that the module will shake /vibrate 5S when we press the button

  
* @author Dongzi(1185787528@qq.com)
* @version  V1.0
* @date  2016-5-26
* All above must be included in any redistribution
* ****************************************************/
const int buttonPin = 8;     // the number of the pushbutton pin
const int VibPin =  11;      // the number of the Vibration Module pin
int key=0;
void setup()
    {
     pinMode(VibPin,OUTPUT);    // Set the digital pin(11) as output
     pinMode(buttonPin, INPUT); // Set the digital pin(8) as input
    }

void loop() 
       {          
             key=digitalRead(buttonPin);      
              if(key==LOW)               
                    {  
                    digitalWrite(VibPin,HIGH);   //Turn on the  Vibration Module                
                      delay(5000);   //Waits for 5 seconds
                    digitalWrite(VibPin,LOW);  //Turn off the  Vibration Module
                     }
               else
               digitalWrite(VibPin,LOW); //Turn off the  Vibration Module
  // put your main code here, to run repeatedly:

       } 


结果:当8号脚的按键被按下 振动模块会工作5秒,停止,等待下一次按键

控制振动电机振幅

PWM控制接线图
//Arduino Sample Code for Vibration Module
//www.DFRobot.com
//Version 1.0

#define Vibration 3    //define driver pins

void setup()
{
  pinMode(Vibration,OUTPUT);
  Serial.begin(9600);    //Baudrate: 9600
}                          
void loop() 
{ 
  analogWrite(Vibration, 160);   //PWM
  delay(1000); 
  analogWrite(Vibration, 200);   //PWM
  delay(1000);     
  analogWrite(Vibration, 255);   //PWM
  delay(1000); 
}

结果:随着PWM数值的提升,振幅有所提升

常见问题

还没有客户对此产品有任何问题,欢迎通过qq或者论坛联系我们!


更多问题及有趣的应用,可以 访问论坛 进行查阅或发帖!


更多

原理图
元件布局图


DFshopping car1.png DFRobot商城购买链接
个人工具
名字空间

变换
操作
导航
工具箱