<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Lesson_28--Microduino_%26_Raindrop_Sensor</id>
		<title>Lesson 28--Microduino &amp; Raindrop Sensor - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Lesson_28--Microduino_%26_Raindrop_Sensor"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Lesson_28--Microduino_%26_Raindrop_Sensor&amp;action=history"/>
		<updated>2026-04-21T09:49:00Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Lesson_28--Microduino_%26_Raindrop_Sensor&amp;diff=4129&amp;oldid=prev</id>
		<title>Pkj：Created page with &quot;Microduino &amp; Raindrop Sensor   {| style=&quot;width: 800px;&quot; |- | ==Purpose== Let’s talk about raindrop sensor in this course and make some interesting applications with Microdui...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Lesson_28--Microduino_%26_Raindrop_Sensor&amp;diff=4129&amp;oldid=prev"/>
				<updated>2014-09-12T03:22:43Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;Microduino &amp;amp; Raindrop Sensor   {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Purpose== Let’s talk about raindrop sensor in this course and make some interesting applications with Microdui...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Microduino &amp;amp; Raindrop Sensor  &lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Purpose==&lt;br /&gt;
Let’s talk about raindrop sensor in this course and make some interesting applications with Microduino and the sensor.   &lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
Microduino-Core is the 8-bit single-chip development core board with Atmel ATmega328P as the core, which is an open and Arduino Uno compatible controller. &lt;br /&gt;
&lt;br /&gt;
*'''[[Microduino-USBTTL]]'''&lt;br /&gt;
Microduino-USBTTL is the program download module, capable of connecting with Microduino-Core or Microduino-Core+ and making the modules communicate with the computer. It uses MicUSB as the download interface, which is also the smallest part of Microduino.  Microduino is just as small as a quarter. Besides, the downlaod cable is just like the USB cable of most smart phones, easy to use.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Other Equipment&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Related hardware||Number||Function &lt;br /&gt;
|-&lt;br /&gt;
|Raindrop sensor||One||Raindrop sensor can output both high and low-level digital quantity as well as analog voltage. &lt;br /&gt;
|-&lt;br /&gt;
|LED||One|For indicating the electrical level of D2 port. &lt;br /&gt;
|-&lt;br /&gt;
| 510 Ω resistor||One||LED current-limiting  &lt;br /&gt;
|-&lt;br /&gt;
|USB cable ||One||For connecting Microduino modules and the computer. &lt;br /&gt;
|-&lt;br /&gt;
|Breadboard ||One ||All components gather here.&lt;br /&gt;
|-&lt;br /&gt;
|Jumper ||One box||Connector  &lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
===Raindrop sensor===&lt;br /&gt;
[[File: rainSensor.jpg|600px|center|thumb]]&lt;br /&gt;
When raindrop falls on the sensor, the digital quantity output port of the sensor can output low electrical level. The analog quantity output port can change output voltage according to the quantity of the rain. The more the raindrop gets, the lower the voltage is. When the sensor detects no water, the port will output high electrical level and the output voltage is Vcc(Supply voltage). There are two LED lights on PCB board, one is for power indicator and the other is for raindrop indicator. When the raindrop indicator goes on, it means the digital output of the module is low and Microduino can detect the electrical level and then handle it. Besides, you can also adjust sensitivity of the potentiometer. With different sensitivity, one or two raindrop can have the same effect. &lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
[[File: rainReal.jpg|600px|center|thumb]]&lt;br /&gt;
Microduino’s A0 port is connected with the analog output of the raindrop module, whose D2 port is connected to LED via a 510 Ω resistor. (LED’s cathode is connected to the ground.) &lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void  setup()&lt;br /&gt;
{&lt;br /&gt;
  pinMode(2,OUTPUT);&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
void loop()&lt;br /&gt;
{&lt;br /&gt;
  int value=analogRead(A0);&lt;br /&gt;
  Serial.println(value);&lt;br /&gt;
  if(value&amp;lt;800)//You  can change this value to fit for your app&lt;br /&gt;
    digitalWrite(2,HIGH);//Open the led&lt;br /&gt;
  else &lt;br /&gt;
    digitalWrite(2,LOW);//close&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
*Copy the program to Arduino IDE. &lt;br /&gt;
*Compile the program and choose the right board and the corresponding serial port.  &lt;br /&gt;
*Click Upload.  &lt;br /&gt;
*Watch the raindrop indicator on PCB board of the raindrop sensor, the red LED on the breadboard and the readings on the serial monitor of Arduino IDE under different circumstances(no raindrop, one drop and several drops )&lt;br /&gt;
*Adjust the sensitivity potentiometer on PCB board and watch again. &lt;br /&gt;
[[File: rainComOutput.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
We can utilize the electrical level change or analog quantity output of the raindrop sensor based on different requirements. Eg. we can control the change of Microduino’s PWM duty cycle as well as motor speed according to the change of the raindrop sensor’s analog port output voltage.&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	</feed>