web analytics

Sensor Archive

0

DFRobot Tilt Sensor

Introduction

DFRobot Tilt Sensor

The DFRobot Tilt Sensor is a digital mercury-based tilt switch that is either closed, disconnected or open. The module is based on the number of mercury switches. The mercury flows to the low-lying and could therefore be used as a simple tilt sensor. The dedicated sensor expansion boards with the Arduino, in combination, can achieve very interesting and an interactive work.

Note: Mercury is a toxic substance, please be careful to avoid breaking the glass case.

Specification

  • Digital mercury-based tilt switch
  • Can be used as a simple tilt sensor

 

Pin Definition

Touch Sensor module pin definition :

  1. Input
  2. Power
  3. GND

digital input module

Connection Diagram

Digital module connection diagram

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
int ledPin = 13; // Connect LED to pin 13
int switcher = 3; // Connect Tilt sensor to Pin3
void setup()
{
pinMode(ledPin, OUTPUT); // Set digital pin 13 to output mode
pinMode(switcher, INPUT); // Set digital pin 3 to input mode
}
void loop()
{
if(digitalRead(switcher)==HIGH) //Read sensor value
{
digitalWrite(ledPin, HIGH); // Turn on LED when the sensor is tilted
}
else
{
digitalWrite(ledPin, LOW); // Turn off LED when the sensor is not triggered
}
}

Go Shopping Kedai Robot – DFRobot Tilt Sensor

 

Kata kunci untuk artikel ini:

1

DFRobot LM35 Linear Temperature Sensor

Introduction

LM35 Analog Linear Temperature Sensor

DFRobot LM35 Linear Temperature Sensor

The DFRobot LM35 Linear Temperature Sensor is based on the semiconductor LM35 temperature sensor. The DFRobot LM35 Linear Temperature Sensor can be used to detect ambient air temperature. This sensor is produced by National Semiconductor Corporation and offers a functional range between -40 degree Celsius to 150 degree Celsius. Sensitivity is 10mV per degree Celsius. The output voltage is proportional to the temperature.
It is commonly used as a temperature measurement sensors. It includes thermocouples, platinum resistance, thermal resistance and temperature semiconductor chips, which commonly used in high temperature measurement thermocouples. Platinum resistance temperature used in the measurement of 800 degrees Celsius, while the thermal resistance and semiconductor temperature sensor suitable for measuring the temperature of 100-200 degrees or below, in which the application of a simple semiconductor temperature sensor has good linearity and high sensitivity. The LM35 linear temperature sensor and sensor-specific expansion of Arduino board, in combination, can be very easy to achieve.

Specification

  • Based on the semiconductor LM35 temperature sensor
  • Can be used to detect ambient air temperature
  • Sensitivity: 10mV per degree Celcius
  • Functional range: -40 degree Celsius to 150 degree Celsius

Pin Definition

The definition of gray-scale sensor pin is

  1. Signal Output
  2. GND
  3. Power

Analog Sensor Pin Definition

Connection Diagram

Analog sensor connection diagram

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
void setup()
{
Serial.begin(9600);//Set Baud Rate to 9600 bps
}
void loop()
{
int val;
int dat;
val=analogRead(0);//Connect LM35 on Analog 0
dat=(500*val)>>10;
Serial.print("Tep:"); //Display the temperature on Serial monitor
Serial.print(dat);
Serial.println("C");
delay(500);
}

Documents

Go Shopping Kedai Robot – DFRobot LM35 Linear Temperature Sensor

 

 

 

Kata kunci untuk artikel ini:

0

URM37 V3.2 Ultrasonic Sensor

Introduction

URM37 V3.2 Ultrasonic Sensor Manual – Rev 2.2

URM37 V3.2 Ultrasonic Sensor uses an industrial level AVR processor as the main processing unit. It comes with a temperature correction which is very unique in its class.

Specification

  • Power: +5V
  • Current: <20mA
  • Working temperature: -10??+70?
  • Detecting range: 4cm-5m
  • Resolution: 1cm
  • Interface: RS232 (TTL), PWM
  • Servo control: One servo control output
  • Operating Mode: Serial (PWM) passive control mode; Autonomous Mode; On/OFF Mode
  • Temperature sensor: 12 bits reading from serial port
  • Size: 22mm × 51 mm
  • Weight: 30g

URM37 V3.2 Beam Width

 

URM37 V3.2 Pin Definition

 

  1. +VCC – +5V Power
  2. GND – Ground
  3. RST – Reset
  4. PWM – PWM Output 0?25000US?Every 50US represent 1cm
  5. MOTO – Servo control signal output
  6. COMP/TRIG
  • COMP – On/OFF mode, when the detecting distance is smaller than a pre-set value, this pin pulls low.
  • TRIG – PWM or RS232 trigger pin
  1. PWR_ON – Enable pin, enable the sensor when high
  2. RXD – RS232,TTL communication
  3. TXD – RS232,TTL communication

Working Mode Selection

The working mode can be changed by writing 0×00, 0×01 or 0×02 to EEPROM through serial port.

Mode 1: Serial passive control mode

Under this mode, the sensor is always waiting for command from serial port. Every time it receives a command, it will return the distance and wait for the next command. The degree in the command will be used to control a servo motor to rotate corresponding degree. Please note that this mode is always on. It can not be switch on or off.

Jumper setting for RS232 and TTL output

The selection of RS232 or TTL output level is switched by changing three jumpers (J1, J2, J3). A diagram below illustrates the setting:

RS232 Mode

TTL Mode

Warning: Do not connect to TTL MCU when the output mode is set to RS232, doing so will permanently damage the unit.

This feature is only available for Rev2 and after. If there are no jumpers on the back of the sensor, the sensor is Rev1 and hence not supporting this feature.

Mode 2: Autonomous trigger mode

Under this mode, the sensor will make a sensor reading every 25ms and compare the reading with a threshold (pre-set, user is able to define this value by writing EEPROM), if the reading is equal or smaller than the threshold, pin COMP/TRIG will have low output. In the meantime, pin PWM will output the distance reading, every 50us low level stands for 1cm, by counting the number of these pulses, the distance can be calculated. This mode can be simply used as an ON/OFF switch.

Mode 3: PWM passive control mode

Under this mode, a low pull on pin COMP/TRIG will trigger a sensor reading. The width of the pulse is proportional to the servo rotating degree. After a successful sensor reading, Pin PWM will output pulses, every 50us represents 1cm. If the reading is invalid, a 50000us pulse will be returned.

Serial control protocol

Serial setting?Port rate: 9600; Parity: none; Stop bit: 1

Command: Control command consists of four bits, command+data0+data1+sum. Sum=Low 8 bit of the sum of command+data0+data1.

Command Format Function Description
0×11?NC?NC?Sum (Sample: 0×11 0×00 0×00 0×11) Enable 16 bit temperature reading Reading the temperature, the return data format will be:0×11+High(temperature)+Low(temperature)+SUM 

If the temperature is above 0, the first four bits of High will be all 0. If the temperature is below 0, the first four bits of High will be all 1.

The last 4 bits of High together with the Low bits stands for 12bits temperature. The resolution is 0.1. When the reading is invalid, it returns 0×11+0xFF+0xFF+SUM

0×22?Degree?NC?SUM (Sample: 0×22 0×00 0×00 0×22 ) Enable 16 bit distance reading The degree in the command is used to control a servo motor to rotate corresponding degree. 

Degree: 0-46 stands for 0-270 degrees, for example, 3 stands for 18 degrees.

Return data format will be: 0×22?High(distance)?Low(distance)+SUM. When the reading is invalid, it returns 0×22+0xFF+0xFF+SUM

0×33?Add?NC?SUM Enable internal EEPROM reading Return data will be 0×33?Add?Data?SUM.
0×44?Add?Data?SUM (Sample: 0×44 0×02 0xbb 0×01) Enable PWM mode Enable internal EEPROM writing Written data can only from 0-255.Address 0×00-0×02 is used to configure the mode. 0×00 – threshold distance (Low) 0×01 – threshold distance (High) 0×02 – Operation Mode (0xaa for autonomous mode) (0xbb for PWM passive control mode) 

The return data format will be: 0×44?Add?Data?SUM

Note:NC stands for any data?SUM stands for sum, Add stands for address.

1? PWN_ON must be set to High to enable sensor.

Examples: Function to calculate the temperature:

1
2
3
4
5
6
7
8
IF(HightByte>=0xF0)
{
Temperature= ((HightByte-0xF0)*256-LowByte)/10
}
Else
{
Temperature= ((HightByte)*256-LowByte)/10
}

Servo control command reference table:

DEC 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
HEX 0 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
Degree 0 6 12 18 24 29 35 41 47 53 59 65 70 76 82 88
DEC 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
HEX 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F
Degree 94 100 106 112 117 123 129 135 141 147 153 159 164 170 176 182
DEC 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
HEX 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E
Degree 188 194 200 206 211 217 223 229 235 241 247 252 258 264 270

Figure UMRV3.2 control a servo provides 270 degree scanning area

V3.2 Help Mate Download:
http://www.yerobot.com/products/manual/URM37V3.2helpmate.rar

Resources

 

Go Shopping Kedai Robot – URM37 V3.2 Ultrasonic Sensor Manual – Rev 2.2

Kata kunci untuk artikel ini:

0

Digital Push Buttom

Introduction

Digital Push Buttom

This is a big button which gives the first touch of the physical world. Simply plug to IO expansion board to finish your first taste of Arduino.

Features

  • Digital push button sensor
  • Easy to ‘plug and play’
  • Large button keypad and high-quality first-class hat

Pin Definition

Big button module pin definition :

  1. Input
  2. Power
  3. GND

Digital Input Module

Connecting Diagram

Digital module connection diagram

Sample Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
///Arduino Sample Code
///www.DFRobot.com
///Last modified on 16th September 2010
int ledPin = 13; // choose the pin for the LED
int inputPin = 3; // Connect sensor to input pin 3
void setup() {
pinMode(ledPin, OUTPUT); // declare LED as output
pinMode(inputPin, INPUT); // declare pushbutton as input
}
void loop(){
val = digitalRead(inputPin); // read input value
if (val == HIGH) { // check if the input is HIGH
digitalWrite(ledPin, LOW); // turn LED OFF
} else {
digitalWrite(ledPin, HIGH); // turn LED ON
}
}

 

image:nextredirectltr.pngGo Shopping Kedai Robot Digital Push Button

Kata kunci untuk artikel ini: