Introduction: HOW TO USE a VIBRATION SENSOR- VISUINO TUTORIAL WITH ARDUINO
In this tutorial we will use Vibration sensor, led, buzzer, resistor, Arduino Uno and Visuino to make a beep when vibration is detected.
Watch a demonstration video.
Step 1: What You Will Need
- Arduino UNO (can be any other Arduino)
- Breadboard (or breadboard shield)
- Red LED (or any other color)
- Pull-up resistor (50k ohm)
- Vibration sensor
- Visuino program: Download Visuino
Step 2: The Circuit
The connections are pretty easy, see the above image with the breadboard circuit schematic.
- Connect GND from Arduino to the breadboard
- Connect GND to Buzzer pin(-)
- Connect Arduino Digital pin(7) to Buzzer pin(+)
Connect Arduino Digital pin(13) to LED pin(+)
Connect LED pin(-) to GND
Connect Arduino pin(5V) to pull-up resistor
Connect vibration sensor (pin1) to pull-up resistor
Connect vibration sensor (pin2) to Arduino Analog pin (A0)
Step 3: Start Visuino, and Select the Arduino UNO Board Type
To start programming the Arduino, you will need to have the Arduino IDE installed from here: http://www.arduino.cc/.
Please be aware that there are some critical bugs in Arduino IDE 1.6.6. Make sure that you install 1.6.7 or higher, otherwise this Instructable will not work! If you have not done follow the steps in this Instructable to setup the Arduino IDE to program ESP 8266! The Visuino: https://www.visuino.com also needs to be installed. Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2
Step 4: Add and Connect Pulse Generator, Logic Gates,Repeat and LED Component
- Add Pulse Generator, set frequency to 1000 (it will auto change to 1E3)
- Add RepeatDigital component set count to 10
- Add Logic gate AND component
- Add LED component
Step 5: In Visuino: Connecting Components
- Connect RepeatDigital1 component pin[In] to Arduino Analog Out pin
- Connect RepeatDigital1 component pin[Out] to And1 component pin 
- Connect And1 component pin[out] to Arduino digital pin
- Connect PulseGenerator1 component pin[out] to And1 component pin
- Connect Led1 component pin[In] to And1 component pin[Out]
- Connect Led1 component pin[Out] to Arduino Digital pin
Step 6: Play
If you power the Arduino UNO module, the Buzzer will BEEP and LED will blink if you shake the vibration sensor.
Congratulations! You have completed your Vibration sensor project with Visuino. Also attached is the Visuino project, that I created for this Instructable. You can download and open it in Visuino: https://www.visuino.com