Ks0111 keyestudio EASY plug Collision Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
==EASY plug Collision Sensor==
[[image:ks0111图.jpg|thumb|600px|right|Keyestudio EASY plug Crash Sensor]]
<br>[[File:ks0111-1.png|500px|frameless|thumb]]<br>


==Introduction==
==Introduction==
Collision sensor, also known as electronic switch, is a digital on-off input module necessary for elementary electronic learning. By programming, it can realize control over light, sound device, key choice function of LCD display etc. Using 3P sensor cable to connect it to sensor shield, it can be installed to 4WD AL alloy mobile robot platform to realize collision detection function. It is both convenient and effecient.<br>
Crash sensor, also known as snap-action switch, is an electric switch that is actuated by very little physical force.  <br>
Note:<br>
It is a digital on-off input module necessary for elementary electronic.<br>
You can make a collision flasher using collision module and built-in LED on interface 13. Connect the collision senser to pin 3, when the collision sensor senses a collision signal, the LEDs on mainboard and module will light up simultaneously.<br>
By programming, it can be used for the light, sound device, key function of LCD display, 3D Printer position feedback, or other devices. <br>
Note: this module needs to be used together with EASY plug control board.<br>
This sensor needs to 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>


==Specification==
==Specification==
* Interface: Easy plug
* Connector: Easy plug
* If collision happens upfront of where collision module is installed, module outputs low level signal; no collision, outputs high level signal.
* Onboard status indicator LED
* Module reserves M3 mounting hole, convenient for fixation on a car.
* M3 mounting hole, convenient for fixation on other devices.
* With switch indicator light, if there is collision, light is on; no collision, light is out.
* If collision happened, outputs LOW level signal; no collision, outputs HIGH level signal.  
* Size: 39 * 20mm
<br>
* Weight: 7g


==Technical Details==
* Dimensions: 44mm*20mm*18mm
* Weight: 5.5g


==Connection Diagram ==
<br>
<br>[[File:ks0111-2.png|500px|frameless|thumb]]<br>
==Connect It Up ==
Connect the EASY Plug Crash sensor and LED module to control board using RJ11 cable. <br>
<br>[[File:Led碰撞.png|500px|frameless|thumb]]<br>


<br>


==Sample Code==
==Upload the Code==
<pre>
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
int Led=13;// set pin for LED
<br>[[File:ks0397 6.1.png|500px|frameless|thumb]]<br>
int Shock=9// set pin for collision sensor
 
;int val;// set digital variable val
<br>
void setup()
==What You Should See==
{
<br>[[File:ks0397 6-1.png|500px|frameless|thumb]]<br>
pinMode(Led,OUTPUT);// set pin LED as output
<br>
pinMode(Shock,INPUT);// set collision sensor as input
When an object crashes the metal switch of the sensor, the LED is turned off. If no crash happened, LED is turned on.
}
<br>[[File:ks0397 6-3.png|500px|frameless|thumb]]<br>
void loop()
<br>[[File:ks0397 6-4.png|500px|frameless|thumb]]<br>
{
<br>
val=digitalRead(Shock);// read value on pin 9 and assign it to val
You should be able to see the value printing on the monitor.
if(val==HIGH)// when collision sensor detects a signal, LED turns on.
<br>[[File:ks0397 6-2.png|500px|frameless|thumb]]<br>
{
 
digitalWrite(Led,LOW);
 
} else
<br>
{
==Extension Experiment ==
digitalWrite(Led,HIGH);
 
}
<span style="color: brown"> <big>'''Switch Controlling Relay'''</big></span><br>
}
 
</pre>
'''Hookup Guide'''<br>
Connect the EASY Plug Crash sensor and relay module to control board using an RJ11 cable.
<br>[[File:继电器碰撞.jpg|500px|frameless|thumb]]<br>
<br>
 
'''Upload the Code'''<br>
Below is an example code.
<br>[[File:ks0397 6.2.png|500px|frameless|thumb]]<br>
 
<br>
'''What You Should See'''<br>
<br>[[File:ks0397 6-5.png|500px|frameless|thumb]]<br>
<br>
If crash the limit switch, the LED on the relay module is turned on.  
<br>[[File:ks0397 6-6.png|500px|frameless|thumb]]<br>
 
<br>
<span style="color: red">'''Troubleshooting:'''</span>
* '''Program Not Uploading?'''<br>
This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port. <br>
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.
 
<br>
 
<br>


==Resources ==
==Resources ==


'''PDF'''
https://fs.keyestudio.com/KS0111


https://drive.google.com/open?id=1z2R4aw7hkG3j4QieizAMB7aTZiNrDL1x
<br>


==Buy from ==
==Buy from ==
'''Official Website'''
*[https://www.keyestudio.com/keyestudio-rj11-easy-plug-collision-crash-sensor-module-for-arduino-steam-p0092.html '''Official Website''' ]
 
*[https://www.aliexpress.com/store/product/2016-New-Keyestudio-EASY-plug-Collision-Crash-Sensor-Module-for-Arduino/1452162_32643659215.html?spm=2114.12010612.8148356.26.4f5f484elrtsGa  Shop on aliexpress ]


http://www.keyestudio.com/keyestudio-easy-plug-collision-crash-sensor-module-for-arduino.html


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

Latest revision as of 16:08, 7 January 2021

Keyestudio EASY plug Crash Sensor

Introduction

Crash sensor, also known as snap-action switch, is an electric switch that is actuated by very little physical force.
It is a digital on-off input module necessary for elementary electronic.
By programming, it can be used for the light, sound device, key function of LCD display, 3D Printer position feedback, or other devices.
This sensor needs to 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
  • Onboard status indicator LED
  • M3 mounting hole, convenient for fixation on other devices.
  • If collision happened, outputs LOW level signal; no collision, outputs HIGH level signal.


Technical Details

  • Dimensions: 44mm*20mm*18mm
  • Weight: 5.5g


Connect It Up

Connect the EASY Plug Crash sensor and LED module to control board using RJ11 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


thumb

When an object crashes the metal switch of the sensor, the LED is turned off. If no crash happened, LED is turned on.
thumb

thumb

You should be able to see the value printing on the monitor.
thumb



Extension Experiment

Switch Controlling Relay

Hookup Guide
Connect the EASY Plug Crash sensor and relay module to control board using an RJ11 cable.
thumb

Upload the Code
Below is an example code.
thumb


What You Should See

thumb

If crash the limit switch, the LED on the relay module is turned on.
thumb


Troubleshooting:

  • Program Not Uploading?

This happens sometimes, the most likely case is a confused Board and serial port, you should firstly select your proper board and port.
If it doesn’t, make sure you have assembled the circuit correctly and verified and uploaded the code to your board.



Resources

https://fs.keyestudio.com/KS0111


Buy from