Presentation is loading. Please wait.

Presentation is loading. Please wait.

NGT-503 : 2-in-1 Remote Bot Obstacle Avoiding Bot

Similar presentations


Presentation on theme: "NGT-503 : 2-in-1 Remote Bot Obstacle Avoiding Bot"— Presentation transcript:

1 NGT-503 : 2-in-1 Remote Bot Obstacle Avoiding Bot
Creative Innovation Series NGT-503 : 2-in-1 Remote Bot Obstacle Avoiding Bot

2 NGT-503 : 2-in-1 Remote Bot Objective: Description: Module List:
Using Arduino, Geared Motor, Ultrasonic Distance Sensor, and Universal Ball Bearing to create a obstacle avoiding robot. Description: An Arduino based obstacle avoiding bot is created with 2 Geared Motor, an Ultrasonic Distance Sensor, and an Universal Ball Bearing module. When the bot detects any object 20 cm in front of the Ultrasonic Distance Sensor, the bot moves back and rotates random side to avoid the obstacle before moving forward. Module List: 1. faya brickNano x 1 2. Geared Motor x 2 3. Ultrasonic Distance Sensor x 1 4. Universal Ball Bearing Module x 1

3 Hardware List faya brickNano Universal Ball Bearing Geared Motor
Ultrasonic Distance Sensor Bluetooth Module (not using here) micriUSB Cable Brick Set Brick Post Extra bricks Power Wire Set Signal Wire Set

4 1. faya brickNano Compatible to Arduino Nano
Includes 4 brick holes to connect to bricks. Includes 2 power heads to supply power to other faya modules Use microUSB interface

5 2. Universal Ball Bearing
Face up side Face down side Use Universal Ball Bearing Module to support other wheels and reduce moving friction.

6 3. Geared Motor Side A Side B Input analog signal (DC voltage) at SIG port to control motor speed. Input digital signal (HIGH) at DIR port to rotate motor counter-clockwisely. Input digital signal (LOW) at DIR port to rotate motor clockwisely. You can input signal at either side (A or B) of the module.

7 4. Ultrasonic Distance Sensor
Trig Pin Echo Pin distance to leave distance to return wall 3 steps to calculate distance (1) Sending 10us HIGH at Trig Pin (2) Detect HIGH TIME at ECHO pin (3) Distance (meater) = HIGH time × velocity of sound / 2 = HIGH time x (340M/S) / 2

8 6. micro USB cable Use micro USB cable to connect between faya brickNano and computer.

9 7. Brick Set Normal Type Plate Type 1x1 : 12 pcs 2x6 : 6 pcs
(at least) Plate Type 2x6 : 6 pcs 2x10 : 2 pcs 6x8 : 1 pcs 90 degree Type 1x1 : 10 pcs LEGO brick compatible Random color for each type A bigger normal type brick maybe replaced by smaller brick for example, a 2x4 brick maybe replaced by 2pcs of 2x2

10 8. Brick Post Use brick post to interface faya modules with bricks.
Brick post is stackable, as shown in above pictures.

11 9. Extra Bricks 6x8 : 1 pcs 2x6 : 2 pcs
Use extra bricks to create a stronger bot LEGO brick compatible Random color

12 10. Power Wire Type A : Connector-to-Pins
Type B : Connector-to-Connector Type B Type B Type A Power Wire is used to supply the power from one to another faya modules. Red Wire connects to Vcc and Black Wire connects to Gnd. Above example shows that the power from Arduino is delivered to DC motor via Type A wire and delivered to other two modules via Type B wires.

13 11. Signal Wires Signal Wire is used to connect signals between Arduino and faya module pins. The size of the signal wire is AWG22

14 Assembling This section introduce the assemble of bricks and faya modules

15 Assemble Brick Post (1) Assemble Brick Post at board corners of each module.

16 Assemble Brick Post (2) For Universal Ball Bearing Module, stack the brick post at another side.

17 Assemble Bot Body (1) Create a structure as shown above. Note that you need to use a 2x10 plate and four 90-degree bricks.

18 Assemble Bot Body (2) Put two 2x3 bricks on the top of body

19 Assemble Bot Body (3) Put another two 2x4 bricks on the top of the body.

20 Assemble Bot Body (4) Cover the body with a 2x10 plate and use four 90-degree, one 2x2, and one 2x4 bricks on the top of this plate.

21 Test Bot Body (5) With this Bot Body, you may connect two Geared Motor Modules to each side through 90-degree bricks. Please use a Geared Motor Module to make sure that it fits the Bot Body. When pass, remove the Geared Motor Module.

22 Assemble Bot Body (6) Use 1 2x3 plate at the front of the Bot Body, as shown above.

23 Assemble Bot Body (7) Put two 2x4 bricks on the top of the 2x3 plate.

24 Assemble Bot Body (8) Cover the two 2x4 bricks with another 2x3 plate.

25 Assemble Bot Body (9) Put two 2x6 plate on the brick post of Universal Ball Bearing Module.

26 Assemble Bot Body (10) + = Refer to the location in above picture, connect the Universal Ball Bearing Module to the Bot Body.

27 Assemble Wheels Connect two Geared Motor Modules to each side of the Bot Body.

28 Assemble Bot Body (11) Place a 6x8 brick plate on the top of the Bot Body. Please refer to the position shown above.

29 Assemble Bot Body (12) Put a 2x6 brick plate at the end of the Bot Body. Please refer to the position shown above.

30 Assemble Bot Body (13) Put a 2x3 brick next to two 90-degree bricks.

31 Assemble Bot Body (14) Cover the end of the body with a 2x6 brick plate.

32 Assemble Bot Body (15) Put a 2x6 and a 6x8 brick plate on the top of the Bot Body. See above for exact location.

33 Assemble Bot Body (16) Cover another 2x6 brick plate as shown in above location.

34 Assemble brickNano Assemble the brickNano at the top center of Bot Body.

35 Create a Room for Mobile Power (1)
Next few steps will show an example to create a room at the end of the Bot for Mobile Power. You may adjust the structure of the room based on the shape / size of your Mobile Power.

36 Create a Room for Mobile Power (2)
1st Floor

37 Create a Room for Mobile Power (3)
2nd Floor

38 Create a Room for Mobile Power (4)
3rd Floor

39 Create a Room for Mobile Power (5)
4th Floor

40 Create a Room for Mobile Power (6)
Complete

41 Assemble Ultrasonic Distance Sensor
Assemble the Ultrasonic Distance Sensor at the front of the Bot. Note that only two brick posts are required.

42 Bot Body Complete Photo after completing Bot Body

43 Wire Connection This section introduce the connections of power and signal wires

44 Power Wire Connection Type B Power Wire
Use one type B Power Wire to connect the power jack between brickNano and Ultrasonic Distance Sensor, as shown in above picture.

45 Power Wire Connection Use another type B Power Wire to connect the power jack between Ultrasonic Distance Sensor and LEFT Geared Motor Module, as shown in above picture.

46 Power Wire Connection Use another type B Power Wire to connect the power jack between brickNano and Right Geared Motor Module, as shown in above picture.

47 Power Wire Connection Arrange power wires to make it more neatly. You may hide power wires under modules as shown above.

48 Signal Wire Connection (Right Wheel)
brickNano_D11  Geared Motor_SIG brickNano_D12  Geared Motor_DIR

49 Signal Wire Connection (Left Wheel)
brickNano_D6  Geared Motor_SIG brickNano_D7  Geared Motor_DIR

50 Signal Wire Connection (Ultrasonic)
brickNano_D2  Ultrasonic Distance_Trig brickNano_D3  Ultrasonic Distance_Echo

51 Source Code ObstacleAvoiding_1E.ino https://goo.gl/W9t5cE
Copy source code [ObstacleAvoiding_1E.ino] to a folder named [ObstacleAvoiding_1E]

52 Code Explanation Distance Wall (1) Detect distance
(2) (1) Detect distance (2) If less than 20cm, change direction (3) If more than 20cm, go straight (3)

53 Code Explanation (L40~L45)
use pulseIn to measure this time L42~L44: To activate the ultrasonic distance sensor, it need a 10us trigger pulse at Trigger pin. L45: Use pulseIn function to detect the “Time it takes pulse to leave and return to sensor”. This time is the speed of sound (340m/sec) travel from sensor to the wall and back to the sensor. As the result, the distance can be calculated: 1cm pulseIn Time / 2 pulseIn Time = 29us to travel 1cm Distance = = 34000cm/sec 29us 58us

54 Code Explanation (L51~L64)
L51~L59 : use detected distance as a condition. If less than 20cm, stop move first, , move back a little bit, and use random function to decide a direction to turn. L60~L63 : If distance is more than 20 cm, meaning that there is no obstacle ahead, the bot can keep move forward.

55 Code Explanation (Bot Movement-1)
Forward R-Wheel: CK L-wheel : CCK turnRight R-Wheel: CCK L-wheel : CCK turnLeft R-Wheel: CK L-wheel : CK CK: clockwise CCK: counter-clockwise Backward R-Wheel: CCK L-wheel : CK

56 Code Explanation (Bot Movement-2)
Important: you can adjust the value of analogWrite to adjust the speed and balance of the bot.

57 Code Upload (1) Connects USB cable (3) Select Proper COM Port [COMx]
(4) Press [Upload] button (2) Select [Arduino Nano] (5) Done uploading

58 Playing Obstacle Avoiding Bot

59 Test Run

60 Note: Adjust the Movement
130 or 170 Due to mechanical tolerance of the geared motor, the speed value of each motor may not be equal. You may adjust the speed of the wheel to ensure that the forward and backward movement follows the straight line. Take right figure for example, if the Bot shift right in Fowrard movement, you can either (1) reduce the speed value of Right wheel, or (2) increase the speed value of the Left wheel.

61 Note: Additional Brick Post
It is strongly recommend to use additional brick post to stack the geared motor at both side to make a stronger structure.

62 Additional Brick Post You may also use the additional brick post to extend and decorate your Bot

63 Appendix A : Arduino Installation
(1) Visit ( and click SOFTWARE (2) Save file in your computer and follow the instructions to install Arduino IDE in your computer

64 Appendix B : brickNano Installation (1/3)
(1) Connect brickNano to Windows PC with microUSB cable (2) Windows should search device and install the device driver automatically. When success, A [USB Serial Port (COMx)] should and list it in Device Manager.

65 Appendix B : brickNano Installation (2/3)
(3) If windows does not install the driver automatically, please install the driver manually. (3-1) Right click and select Properties (3-3) Browse my computer for driver software (3-4) Browse folder [Arduino/drivers/FTDI USB Drivers] to complete the driver installation. (3-2) Update Driver

66 Appendix B : brickNano Installation (3/3)
(4) When driver installed successfully, the device manager and Arduino IDE should appear the COM Port number for brickNano.

67 Appendix C : Trouble Shooting
The default processor firmware is built with ATmega328B (Old Bootloader). If you encounter a problem during upload, change the Bootloader to upper one (ATmega328P) may help.

68 Reference Getting Started with Arduino
Arduino Tutorial Arduino Programming Language Reference Arduino Playground fayalab Module specification and sample code

69 Technical Support contact us at fayalab@kandh.com.tw K&H MFG CO., LTD.
5F., No.8, Sec. 4, Ziqiang Rd., Sanchong Dist., New Taipei City 241, Taiwan R.O.C. TEL:  FAX: WEB:


Download ppt "NGT-503 : 2-in-1 Remote Bot Obstacle Avoiding Bot"

Similar presentations


Ads by Google