Ks0109 keyestudio EASY plug Analog Rotation Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[image:ks0109图.jpg|thumb|600px|right|Keyestudio White LED Module]]
[[image:ks0109图.jpg|thumb|600px|right|Keyestudio EASY plug Analog Rotation Sensor]]


==Introduction==
==Introduction==
The sensor is based on a potentiometer. A potentiometer is also known as a variable resistor. It is a perfect demonstration of a variable voltage divider circuit. Its voltage can be subdivided into 1023, easy to be connected to Arduino with our sensor shield. <br>
The sensor is based on a potentiometer. A potentiometer is also known as a variable resistor. It is a perfect demonstration of a variable voltage divider circuit. Its voltage can be subdivided into 1023, easy to be connected to Arduino with our sensor shield. <br>
Combined with other sensors, you are able to make interesting projects by reading the analog value from the IO port.<br>
Combined with other sensors, you are able to make interesting projects by reading the analog value from the IO port.<br>
<span style="color: red">'''Note: ''' </span> this module should be used together with EASY plug control board.<br>
This module should be used together with EASY plug control board.</span><br>
 
<span style=color:red> '''Special Note:''' <br>
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface. <br> If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module. </span><br>


<br>
<br>
==Specification==
==Specification==
* Connector: Easy plug
* Connector: Easy plug
Line 16: Line 20:
* Dimensions: 39mm*20mm*29mm
* Dimensions: 39mm*20mm*29mm
* Weight: 9.1g
* Weight: 9.1g
<br>
<br>
==Connect It Up ==
==Connect It Up ==
Connect the EASY Plug potentiometer sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Connect the EASY Plug potentiometer sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Line 24: Line 28:
<br>
<br>
==Upload the Code==
==Upload the Code==
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload.  
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<pre>
<br>[[File:ks0397 19.1.png|600px|frameless|thumb]]<br>
void setup()
{
Serial.begin(9600); //Set serial baud rate to 9600 bps
}
void loop()
{
int val;
val=analogRead(3);//Read rotation sensor value from analog 3
Serial.println(val,DEC);//Print the value to serial port
delay(100);
}
</pre>


<br>
<br>
==What You Should See==
==What You Should See==
After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value showed on the monitor.  
After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value is showed on the monitor. <br>
If rotate the potentiometer, the value will change within the range of 0-1023.
<br>[[File:ks0397 19-1.png|600px|frameless|thumb]]<br>
<br>[[File:ks0109 Result.gif|500px|frameless|thumb]]<br>
<br>
If rotate the potentiometer, the printed analog value will change within the range of 0-1023.  
<br>[[File:ks0397 19-2.png|600px|frameless|thumb]]<br>
 
 
<br>
==Extension Experiment==
 
<span style=color:brown><big>'''Controlling Light Brightness'''</big> </span><br>
 
Complete the above experiment, want to try a different experiment? <br>
Next, you will learn how to display the potentiometer value on the 1602 LCD screen and to control the brightness of LED using a potentiometer sensor. <br>
Let’s get started right now!
 
<br>
'''Hookup Guide'''<br>
Connect the EASY Plug potentiometer sensor, a red LED module and 1602 LCD module to control board using RJ11 cables.
<br>[[File:电位器LCD灯.jpg|600px|frameless|thumb]]<br>
 
<br>
'''Test Code'''<br>
Below is an example code.<br>
<br>[[File:ks0397 18.2.png|600px|frameless|thumb]]<br>
 
<br>
'''What You Should See'''<br>
After uploading the code, rotate the potentiometer knob, you can see the converted value by potentiometer within 0~255 on the 1602 LCD screen, controlling the brightness of LED module.
<br>[[File:ks0397 17-3.png|600px|frameless|thumb]]<br>


<br>
<br>
<span style="color: red">'''Little Knowledge:'''</span> <br>
* Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.
<br>[[File:ks0397 14-6.png|500px|frameless|thumb]]<br>
<br>
==Resources ==
==Resources ==
'''PDF'''<br>
 
https://drive.google.com/open?id=169UqNryrMv81-xdycY1BE3auMBY9RRCU
https://fs.keyestudio.com/KS0109


<br>
<br>


==Buy from ==
==Buy from ==
'''Official Website'''
*[https://www.keyestudio.com/keyestudio-rj11-easy-plug-analog-rotation-sensor-module-for-arduino-steam-p0093-p0093.html  '''Official Website''' ]
http://www.keyestudio.com/keyestudio-easy-plug-analog-rotation-sensor-module-for-arduino.html
 
*[https://www.aliexpress.com/store/product/2016-New-Keyestudio-EASY-plug-Analog-Rotation-Sensor-Module-for-Arduino/1452162_32643619528.html?spm=2114.12010612.8148356.65.24f04ba7fqaskB  Shop on aliexpress]




[[category:EASY Plug]]
[[category:EASY Plug]]

Latest revision as of 16:02, 7 January 2021

Keyestudio EASY plug Analog Rotation Sensor

Introduction

The sensor is based on a potentiometer. A potentiometer is also known as a variable resistor. It is a perfect demonstration of a variable voltage divider circuit. Its voltage can be subdivided into 1023, easy to be connected to Arduino with our sensor shield.
Combined with other sensors, you are able to make interesting projects by reading the analog value from the IO port.
This module should be used together with EASY plug control board.

Special Note:
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface.
If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module.


Specification

  • Connector: Easy plug
  • Supply Voltage: 3.3V to 5V
  • Sensor type: Analog


Technical Details

  • Dimensions: 39mm*20mm*29mm
  • Weight: 9.1g


Connect It Up

Connect the EASY Plug potentiometer sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See

After uploading the code, open the serial monitor and set the baud rate to 9600, you should see the analog value is showed on the monitor.

thumb

If rotate the potentiometer, the printed analog value will change within the range of 0-1023.
thumb



Extension Experiment

Controlling Light Brightness

Complete the above experiment, want to try a different experiment?
Next, you will learn how to display the potentiometer value on the 1602 LCD screen and to control the brightness of LED using a potentiometer sensor.
Let’s get started right now!


Hookup Guide
Connect the EASY Plug potentiometer sensor, a red LED module and 1602 LCD module to control board using RJ11 cables.
thumb


Test Code
Below is an example code.

thumb


What You Should See
After uploading the code, rotate the potentiometer knob, you can see the converted value by potentiometer within 0~255 on the 1602 LCD screen, controlling the brightness of LED module.
thumb


Little Knowledge:

  • Remember you can adjust the contrast by rotating a blue potentiometer on the LCD back if you can’t make out the words clearly.


thumb



Resources

https://fs.keyestudio.com/KS0109


Buy from