Ks0192 keyestudio 4WD Bluetooth Multi-functional Car: Difference between revisions
Keyestudio (talk | contribs) |
Keyestudio (talk | contribs) No edit summary |
||
Line 356: | Line 356: | ||
} | } | ||
</pre> | </pre> | ||
===Project 3: Digital IR Receiver Module=== | |||
<br>[[File:19236.png|500px|frameless|thumb]]<br> | |||
'''Introduction:''' | |||
IR is widely used in remote control. With this IR receiver, Arduino project is able to receive command from any IR remoter controller if you have the right decoder. Well, it will be also easy to make your own IR controller using IR transmitter. | |||
'''Specification:''' | |||
Power Supply: 5V<br> | |||
Interface: Digital<br> | |||
Modulate Frequency: 38Khz<br> | |||
Module Interface Socket: JST PH2.0<br> | |||
NOTE: In the sample code below Digital pin 11 is in use, you may either change your wiring or change the sample code to match. | |||
'''Connection Diagram:''' | |||
<br>[[File:19237.png|500px|frameless|thumb]]<br> | |||
'''Sample Code:''' | |||
<pre> | |||
#include <IRremote.h> | |||
int RECV_PIN = 11; | |||
IRrecv irrecv(RECV_PIN); | |||
decode_results results; | |||
void setup() | |||
{ | |||
Serial.begin(9600); | |||
irrecv.enableIRIn(); // Start the receiver | |||
} | |||
void loop() { | |||
if (irrecv.decode(&results)) { | |||
Serial.println(results.value, HEX); | |||
irrecv.resume(); // Receive the next value | |||
} | |||
} | |||
</pre> | |||
IR Remote Library includes some sample codes for sending and receiving. | |||
[https://github.com/shirriff/Arduino-IRremote https://github.com/shirriff/Arduino-IRremote] |
Revision as of 09:50, 24 September 2016
keyestudio 4WD Bluetooth Multi-functional Car
Introduction
keyestudio 4WD Bluetooth Multi-functional Car is a learning application development system based on microcontroller and with ATmega-328 as core. It has functions of line tracking, obstacle avoidance, IR remote control , Bluetooth remote control and detecting distance. This kit contains plenty of interesting programs and can extend an external circuit module to increase more functions of this car. The kit aims to disengage users from boring theories and obtain capacity of system development when they are learning Arduino.
Parameters
1.Motor: Voltage: 6-9V Reduction Ratio: 1:48
2.Choosing L298N driver module as control motor, separated from microcontrollor
3.Three line tracking modules, having higher precision when detecting white and black lines,able to realize anti-falling
4.IR remote control module making up a remote control system of the car
5.Using ultrasonic module to realize obstacle avoidance
6.Pairing mobile phone Bluetooth with Bluetooth remote control module to control the car
7.Able to connect with external voltage at 7~12V,and equip with various sensors to complete different functions as much as possible
Component List
Project List
Project 1:Line Tracking Sensor
Project 2:Ultrasonic Sensor
Project 3: Digital IR Receiver Module
Project 4: Servo Motor
Project 5: Bluetooth Module
Project 6: L298N Motor Driver
Project 7: I2C 1602 LCD
Project 8:Line Tracking of Smart Car
Project 9:Obstacle Avoidance of Smart Car
Project 10:IR Remote Control of Smart Car
Project 11:Distance Detecting of Smart Car
Project 12:Bluetooth Remote Control of Smart Car
Project 13:5 in 1 Muilti-functional Car
Address of Assembly Video
http://www.keyestudio.com/wp/2016/09/ks0192
Address of Demonstration Video
Project Details
Project 1:Line Tracking Sensor
Introduction:
This Line Tracking Sensor can detect white lines in black and black lines in white. The single line-tracking signal provides a stable output signal TTL for a more accurate and more stable line. Multi-channel option can be easily achieved by installing required line-tracking robot sensors.
Specification:
Power Supply: +5V
Operating Current: <10mA
Operating Temperature Range: 0°C ~ + 50°C
Output Interface: 3-wire interface (1 - signal, 2 - power, 3 - power supply negative)
Output Level: TTL level
Connection Diagram:
Sample Code:
const int sensorPin = 3; // the number of the sensor pin const int ledPin = 13; // the number of the LED pin int sensorState = 0; // variable for reading the sensor status void setup() { pinMode(ledPin, OUTPUT); pinMode(sensorPin, INPUT); } void loop(){ // read the state of the sensor value: sensorState = digitalRead(sensorPin); // if the sensorState is HIGH: if (sensorState == HIGH) { digitalWrite(ledPin, HIGH); } else {digitalWrite(ledPin, LOW); }}
Project 2: Ultrasonic Sensor
Introduction:
The HC-SR04 Ultrasonic Sensor is a very affordable proximity/distance sensor that has been used mainly for object avoidance in various robotics projects. It essentially gives your Arduino eyes / spacial awareness and can prevent your robot from crashing or falling off a table. It has also been used in turret applications, water level sensing, and even as a parking sensor. This simple project will use the HC-SR04 sensor with an Arduino and a Processing sketch to provide a neat little interactive display on your computer screen.
Specification:
Working Voltage: DC 5V
Working Current: 15mA
Working Frequency: 40Hz
Max Range: 4m
Min Range: 2cm
Measuring Angle: 15 degree
Trigger Input Signal: 10µS TTL pulse
Echo Output Signal Input TTL lever signal and the range in proportion
Size: 46*20.4mm
Weight: 9g
Connection Diagram:
Sample Code:
VCC to arduino 5v
GND to arduino GND
Echo to Arduino pin 7
Trig to Arduino pin 8
#define echoPin 7 // Echo Pin #define trigPin 8 // Trigger Pin #define LEDPin 13 // Onboard LED int maximumRange = 200; // Maximum range needed int minimumRange = 0; // Minimum range needed long duration, distance; // Duration used to calculate distance void setup() { Serial.begin (9600); pinMode(trigPin, OUTPUT); pinMode(echoPin, INPUT); pinMode(LEDPin, OUTPUT); // Use LED indicator (if required) } void loop() { /* The following trigPin/echoPin cycle is used to determine the distance of the nearest object by bouncing soundwaves off of it. */ digitalWrite(trigPin, LOW); delayMicroseconds(2); digitalWrite(trigPin, HIGH); delayMicroseconds(10); digitalWrite(trigPin, LOW); duration = pulseIn(echoPin, HIGH); //Calculate the distance (in cm) based on the speed of sound. distance = duration/58.2; if (distance >= maximumRange || distance <= minimumRange){ /* Send a negative number to computer and Turn LED ON to indicate "out of range" */ Serial.println("-1"); digitalWrite(LEDPin, HIGH); } else { /* Send the distance to the computer using Serial protocol, and turn LED OFF to indicate successful reading. */ Serial.println(distance); digitalWrite(LEDPin, LOW); } //Delay 50ms before next reading. delay(50); }
Project 3: Digital IR Receiver Module
Introduction:
IR is widely used in remote control. With this IR receiver, Arduino project is able to receive command from any IR remoter controller if you have the right decoder. Well, it will be also easy to make your own IR controller using IR transmitter.
Specification:
Power Supply: 5V
Interface: Digital
Modulate Frequency: 38Khz
Module Interface Socket: JST PH2.0
NOTE: In the sample code below Digital pin 11 is in use, you may either change your wiring or change the sample code to match.
Connection Diagram:
Sample Code:
#include <IRremote.h> int RECV_PIN = 11; IRrecv irrecv(RECV_PIN); decode_results results; void setup() { Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver } void loop() { if (irrecv.decode(&results)) { Serial.println(results.value, HEX); irrecv.resume(); // Receive the next value } }
IR Remote Library includes some sample codes for sending and receiving.