Professional Documents
Culture Documents
Lecture 5
KAIST ME
Sensors & Actuators II Fall 2018
(Remote Control)
LEARNING OBJECTIVES
ARDUINO SENSORS
HALL SENSOR
https://www.youtube.com/watch?v=Scpi91e1JKc
https://youtu.be/3vF9l3__l_k
GESTURE BASED CONTROL WITH IMU
https://youtu.be/rejZmqRrKMc
COLOR SENSOR
DEMONSTRATION
https://youtu.be/RHO3bPcbysM
COLOR SORTER
https://www.youtube.com/watch?v=g3i51hdfLaw
https://youtu.be/Ze_z15DlWdw
ARDUINO LINE TRACER
if((sensorValue[2] < sensorRef[2]) && (sensorValue[3] < sensorRef[3]))
{
analogWrite(LMOTOR,120); // GO forward
analogWrite(RMOTOR,120);
}
else if(sensorValue[0] < sensorRef[0]) // LOW at Left End Sensor
SKETCH CODE
{
analogWrite(LMOTOR,20); // Turn left
analogWrite(RMOTOR,120);
}
else if(sensorValue[5] < sensorRef[5]) // LOW at Right End Sensor
{
analogWrite(LMOTOR,120); // Turn right
const int sensor_pin[6] = {A0,A1,A2,A3,A4,A5}; analogWrite(RMOTOR,20);
const int ir_led = 10; //IR LED }
const int LMOTOR = 5; //For Left Motor else if(sensorValue[1] < sensorRef[1])
const int RMOTOR = 6; //For Right Motor {
const int sensorRef[6]={ 600,600,600,600,600,600}; analogWrite(LMOTOR,50);
int sensorValue[6]; analogWrite(RMOTOR,110);
}
void setup() else if(sensorValue[4] < sensorRef[4])
{ {
Serial.begin(9600); analogWrite(LMOTOR,110);
analogWrite(RMOTOR,50);
pinMode(LMOTOR,OUTPUT); }
pinMode(RMOTOR,OUTPUT); else if(sensorValue[2] < sensorRef[2])
pinMode(ir_led , OUTPUT); {
analogWrite(LMOTOR,0); analogWrite(LMOTOR,60);
analogWrite(RMOTOR,0); analogWrite(RMOTOR,100);
delay(1000); }
} else if(sensorValue[3] < sensorRef[3])
{
void loop() analogWrite(LMOTOR,100);
{ analogWrite(RMOTOR,60);
digitalWrite(ir_led,HIGH); }
delay(1); else
for(int i=0 ; i<6 ; i++) {
{ analogWrite(LMOTOR,0);
sensorValue[i] = analogRead(sensor_pin[i]); analogWrite(RMOTOR,0);
} }
digitalWrite(ir_led,LOW);
delay(30);
}
DEMONSTRATION
https://youtu.be/QBgfy6m5g0U
BLUETOOTH
Its name comes from ‘Harald Blåtand’
A Near Field Communication (NFC) Standard
Developed by Ericsson in 1994
Frequency : 2.4~2.485GHz
- ISM (Industrial, Scientific and Medical band)
2.4~2.48GHz, 5.725~5.875GHz, 24~24.25GHz, 61~61.5GHz, …
ex) WiFi, Bluetooth, RFID, wireless phone, ZigBee and etc.
POWER CLASS AND DISTANCE
BLUETOOH NETWORK
piconets
- Master/Slave Model
BLUETOOTH PROTOCOL STACK & PROFILE
https://youtu.be/kewza7RyKMQ
Smart phone
PREVIEW OF NEXT CLASS
We will learn basic machine learning
- background
- necessity
- application area
MID-TERM EXAM
When: 5~6:30 PM (October 16th, 2018)
Where: classroom
3 Problems
- 1 design problem
- 2 Concept Quizzes
DESIGN PROBLEM EXAMPLE
You are developing a mobile robot
vacuum cleaner. (A vacuum pump is
wall already installed in a robot.) There
are a 4-legged wooden table, a
glass vase and a charging station
dock in the room. A corner of the
room is lower with threshold for shoe
removal place. The robot should clean
wall the floor without collision to other
objects. After cleaning, the robot
should return to the station dock and
Charging station dock make exact ‘plug-in’ for charging.
1. Design your own mobile robot based on what you have learned in the classes. Describe what kinds
of actuators, sensors, electronic components and IO board connections will be used in your robot.
2. Describe your strategy for cleaning the room with a flow chart.
3. Describe ‘excellency’ of your robot.