Strong Wind Indicator

From Microduino Wiki
Revision as of 04:03, 9 October 2016 by Fengfeng (talk)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Outline

Anywhere colorled-mic.jpg

Let's make a strong wind indicator, which can change color according to the strength of the wind.


Suitable kits: mCookie302, IBC

Module Bill

Module

Module Number Function
mCookie-Core 1 Core board
Battery box 1 Program download and power supply
mCookie-Hub 1 Sensor adapter plate
Sound sensor 1 Detect the strength of the sound
ColorLED 1 Color LED

Other Equipment

  • USB cable*1
  • Sensor cable*2
  • Sensor shell*1
  • Lego or other fixation structure
Anywhere colorled-mic-module.jpg

Module Setup

Learn about the New Sensors

Mic Sensor
Sensor-Mic can convert the volume of external sound into the strength of electric signal. The bigger the external sound is, the stronger the electric signal is.

Setup

Anywhere colorled-mic-step.jpg
  • Assemble the modules and sensors:
    • Stick the red core module, battery base and green extension module together;
    • Connect the color LED wire to pin 6/7 of Hub;
    • Connect the Mic sensor to pin 4/5 of Hub;
    • Insert one end of USB cable into the battery base, and connect the other to computer;

Programming

Required Program Blocks

Programming Thought

If the Mic sensor has detected the sound, the color LED changes into red, representing dangerous; if the Mic sensor hasn't detected sound, the color LED changes green, representing safe.

Mixly-ctrl-colorled-mic.jpg

Programming

If there is sound detected, the color LED changes into red, otherwise, it changes into green.
ColorLED prepare, set the color number to 1, and the control pin to 6;
Drag the "if-else" program block, and set the condition of "if" to that the Mic sensor has sound, in this way, LED 1 changes into red, "else", it changes into green.

Mixly-ctrl-colorled-mic-code.jpg

Test the result
After upload, if you "blow" or "cry" to the microphone, the color LED will change into red; under static state, the microphone can't detect sound, the color LED will change into green.

Anywhere colorled-mic.jpg

Technical Specification

  • Product number of Mic sensor: MSDI11
  • Analog sensor.
  • For details, please refer to Sensor-MIC

Related Cases

FAQ

  • Q: Is the Mic sensor a digital signal sensor? Can it only be connected to digital port?
  • A: The Mic sensor is analog sensor, and it can convert the strength of the sound into that of the electric signal of which the range is 0-5V. If connected t digital port and the converted voltage is larger than 2.5V(strong sound), the range is 1(true), otherwise(weak sound), it is 0(false).