แสดงบทความที่มีป้ายกำกับ method แสดงบทความทั้งหมด
แสดงบทความที่มีป้ายกำกับ method แสดงบทความทั้งหมด

วันอาทิตย์ที่ 12 กุมภาพันธ์ พ.ศ. 2560

Arduino Tracked Robot-IR Remote control




This instruction introduce how to make Arduino tracked robot control via general IR remote.

Materials and Tools
1.Track and wheel set.

2.Gear box - Individual drive-two motors















3.Tamiya Universal Perforated Plate Kit










4.Arduino UNO
5.Dupont wires 200mm.












6.VS1838B IR reciever.


7.Battery 6-7V.
8.IR remote (Can use any TV,VDO,Stereo,etc. remote)
9.L298N Dual H-Bridge motor drive module.
 


Tools

1. Screw driver.
2. Plier.
3. Screw , Bolt & Nut.

Parts assembly & Electrical Wiring

1.Assembly Track and wheel set as manual sheet.
2.Install Arduino UNO controller ,IR reciever , L298N motor drive module and battery on chassis.
3.Wiring
Arduino pins to IR reciever :
11 - IR reciever o/p signal
5V - IR reciever Vcc
GND - IR reciever ground
Arduino pins to L298N motor drive module :
10 - ENA
9 - IN1
8 - IN2
7 - IN3
6 - IN4
5 - ENB
 Connect Arduino GND pin and L298N motor drive module GND.
L298N motor drive module :
Connect power o/p to Motor A and B

Connect battery to Arduino controller and L298N drive module (can use battery up to 12V.)
Collect IR remote code
- Down load library zip file from Github ,import zip file into Arduino IDE. Open IR_Decode_sketch.ino and upload to UNO.
- Push remote buttons to IR receiver,serial monitor will show their HEX codes. 
Collect each IR remote button's hex code.We will use 9 buttons' hex codes for 9 function.



In this instruction ,IR remote code  :
Button 2 - Forward direction - hex code - FF18E7
Button 8 - Backward direction - hex code - FF4AB5      
Button 1 - Forward left direction - hex code - FF30CF     
Button 3 - Forward right direction - hex code - FF7A85
Button 6 - Rotating right direction - hex code - FF5AA5
Button 4 - Rotating left direction - hex code - FF10EF
Button 5 - Stop all direction - hex code - FF38C7
Button 7 - Backward left direction - hex code - FF42BD
Button 9 - Backward right direction - hex code - FF52AD



- Open IR_remote_L298N_V3.ino file put your own hex codes to the right functions in the sketch.
- Upload to UNO.
- Test the robot.
   If the installation,the IR code correct.It should run fine.

















วันพฤหัสบดีที่ 9 กุมภาพันธ์ พ.ศ. 2560

Arduino AvoidanceBot




Project description :
        Transforming cheap rc toy to be AvoidanceBOT Arduino control.
Materials and Tools
Materials
1. Arduino controller - Pro Mini 3.3V/5V
 

2. 2-LEDs (Different color)
3. 2-Resistor 1 kOhm. 1/4 watt.
4. Ultrasonic Distance Sensor Module (HC-SR04)


5. L298N dual motor drive module


6. Dupont wires.













7. PCB - DIY circuit board or prototype bread board.













8. Motor size 120













9. Motor size 180









10. Battery 5-9 V.
Tools
1. Soldering gun.
2. Soldering wire.
3. Soldering paste.
4. Screw driver.
5. Plier.
6. Hot glue gun.
7. Screw,Bolt & Nut.

Electronic devices installation & Wiring

Arduino Pro Mini pins to 
2 : Green LED
Arduino Pro Mini pins to Ultrasonic Distance Sensor Module
3 : Trigger pin
4 : Echo pin
Arduino Pro Mini pins to L298N module
5 : ENA
6 : IN1
7 : IN2
8 : ENB
9 : IN3
10 : IN4
L298N module to :
OutputA : Steering motor
OutputB : Driving motor
+12V : Battery positive pole
GND : Connect Battery negative pole and Mini controller GND pin together.
+5V : Mini controller Vcc pin
* Don't use too small wire gauge,nevertheless controller pin will always HIGH status.
* Soldering need skill and extra cleanliness to prevent small electrical touching points.
Code sketch installation 
Arduino sketch and Library :
1.Down load sketch file .ino and library zip file S05RF from Github.(This library file use with new ultrasonic sensor module HY-SRF05 but it can be applied to old model HC-SR04,they said it shall eliminate 0 noisy signal and better than older library(NewPing_v1.7).Add the library to your Arduino IDE.
2.Comply and upload .ino sketch to Arduino mini controller.(This sketch valid for Arduino UNO/Nano/Pro Mini 5V / 3.3V)
3.Open Arduino serial monitor to see output.
Observe ultrasonic sensor read distance value by varying different distance to detect.(This attached sketch read in centimeter unit.) If there are some 0 distance,it's normal.But If there are many continuous 0 distance,perhaps the ultrasonic sensor is defective.
4.Let's the robot test run by laying obstructive object around.Collect every problems for editing the sketch.
5.The speed of two motor can be adjusted to match the robot size,weight and battery power that you assembled by changing PWM value in command analogWrite(enableA, PWM) and analogWrite(enableB, PWM ); from 0 to 255.(in attached sketch is 150 for steering motor and 100 for driving motor)
To calibrate the robot speed,timing,appropriate distance zone and driving power is very difficult step.It needs time and experience to run the robot properly.
* Checking short circuit before connect power supply battery is necessary.