Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908,...

8
SREDNJA ŠKOLA MATE BLAŽINE LABIN P R A C T I C A L A S S I G N M E N T 6 th international competition Labin, May 10 th -13 th 2018 Author: Ivica Komadina, military electrical engineer

Transcript of Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908,...

Page 1: Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P).

SREDNJA ŠKOLA MATE BLAŽINE LABIN

P R A C T I C A L A S S I G N M E N T

6th international competition

Labin, May 10th-13th 2018

Author: Ivica Komadina, military electrical engineer

Page 2: Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P).

PRACTICAL ASSIGNMENT FOR BALKAN JUNIOR COMPETITION 2018

BALKAN JUNIOR 2018 2 Srednja škola MATE BLAŽINE LABIN

“BALKAN KARIĆ“ a) Mobile robot kit components

1. 2WD Robot raider Car Kit for Arduino 2. DC 18650 6800mAh Super Rechargeable Lithium-ion Battery 3. Waveshare 5-ch ITR20001 infrared tracker sensor 4. HC-SR04 Ultrasonic Sensor Distance Measuring Module 5. DMDG Mounted Holder for HC-SR04 Ultrasonic Sensor 6. DIY Steel Ball Universal Wheel for robot 7. APM 2.5 PVC + ABS 7pin Connection Cabel 8. DuPont Cable 20 cm 4pin Male to Female 9. 5.5x2.1 Female DC Power Plug Connector 10. 1602A 16x2 lines Black character LCD module 11. I2C - interface LCD1602 2004 LCD Adapter (optional – Slovenian colleagues'

suggestion) 12. 830 point Solderless Breadboard 13. LM2596 20083 Adjustable Voltage Regulating Module (optional) 14. Integrated circuit L293D (driver) 15. Integrated circuit LM339 (4x comparator) (optional) 16. Arduino Nano V3.0 ATmega 328P microcontroller (recommendation)

When assembling the mobile robot use the components from the list. The usage of L293D as the motor driver and the LCD module as assistance in modulation is mandatory. Assemble the parts on the attached breadboard. LM339 (2 pieces) can be used as comparators and LM2596 module if you do not have 5V stabilizer and you have a built-in microcontroller module. Microcontroller can be any 8-bit microcontroller (for example Microchip PIC16F877A, STMicroelectronics STM8L101K3, Silicon Lab C8051F2xx, Cypress CY8C21434, Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P). Do not use ARM Cortex which is a 32-bit microcontroller because all the microcontrollers should be equal which can not be fully followed. In the attached material is also Arduino Nano V3.0 (which I recommend)! Besides the components from the list other passive components (resistors, condensators, switches, push buttons, screws, nuts, LED diodes) can be used, but you have to obtain them yourselves. Assuming that the majority of you will use ARDUINO UNO which is cheap (it costs around 15€), additional shields must not be used with the goal of attaching additional electronic componetnts by wires (conductors) on the breadboard itself! The programmimg should be done in programming language C for microcontrollers. Contestans have 180 minutes for the mobile robot wiring, programming and practice. In the attached picture (picture 1) you can see the mobile robot kit before the practical part of the assignment. The photographs of one of the possibilities of mobile robot assembly are also attached (Balkan_karic.rar). Experience has shown that Duracell batteries (4x1.5V) run out fast due to the electricity consumption of around 120 mA. Therefore, the LM2596 stabilizer voltage depletes very fast below 5V. The reason lies in the too small input-output voltage difference. This could have an effect on the mobile robot performance. The same also

Page 3: Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P).

PRACTICAL ASSIGNMENT FOR BALKAN JUNIOR COMPETITION 2018

BALKAN JUNIOR 2018 3 Srednja škola MATE BLAŽINE LABIN

happens if we supply electricitiy to the breadboard using 30 Arduino Nano pin. When assembling the mobile robot batteries (4x1.5V) can be avoided and Accu battery (12V), stabilizer LM2596 and a switch can be used for the supply of electricity to the breadboard itself as shown on the attached photographs. Batteries (4x1.5V) can be used as a backup.

Picture 1

b) “Balkan Karić“ track The practical part is performed on the track below (white matte base/black matte lines). The width of each line is 15 mm. The track can be assembled by gluing the tiles (192x192) printed in A4 format. Attached to the file is also a PDF file linefollowtiles.pdf. Track for all the teams (8 teams) will be professionally printed and every team will practice on their own track. The dimensions of the track are 1345x2305 mm. In the practical part time will be measured by electronic gates which will be transferred from one workstation to the next. The gate is 300x100 mm wide and 250 mm high. In order to assemble the track for practice (map on picture 2), 84 tiles (sheets of paper) need to be printed out in the following order: #2 - 23 sheets #8 - 6 sheets #14 - 2 sheets #3 - 7 sheets #9 - 2 sheets #15 - 4 sheets #4 - 1 sheet #11 - 25 sheets #17 - 2 sheets #5 - 1 sheet #12 - 5 sheets #25 - 1 sheet #7 - 1 sheet #13 - 4 sheets total: 84 sheets (7x12)

Page 4: Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P).

PRACTICAL ASSIGNMENT FOR BALKAN JUNIOR COMPETITION 2018

BALKAN JUNIOR 2018 4 Srednja škola MATE BLAŽINE LABIN

ASSEMBLY MAP (BALKAN KARIĆ)

Picture 2.

Page 5: Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P).

PRACTICAL ASSIGNMENT FOR BALKAN JUNIOR COMPETITION 2018

BALKAN JUNIOR 2018 5 Srednja škola MATE BLAŽINE LABIN

BALKAN KARIĆ TRACK El.gate

Picture 3.

Page 6: Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P).

PRACTICAL ASSIGNMENT FOR BALKAN JUNIOR COMPETITION 2018

BALKAN JUNIOR 2018 6 Srednja škola MATE BLAŽINE LABIN

c) Practical part scoring (200 points total)

The practical part of the Balkan karić competition consists of 4 laps (rounds). The track containing all the roadblocks and electronic gate is shown on picture 3. The first lap doesn't have any roadblocks (wooden cube 100x100x100). The next three laps have two roadblocks each. Roadblock 1 should be passed from the left side. Any displacement of the cube done by the mobile robot substracts 1 point and every succesful detour adds an extra 1 point! There are a total of 5 cubes. Cube number 5 is always (in every lap) in the field 7D. The order of passing the following lap for all the teams is determined before each lap. It is important to finish the entire lap. Points are also won for the time needed to finish a lap. Time will be measured by electronic gates as precise as 1 second. Start and finish line are in the field 12A! When the mobile robot has been programmed and when the team is ready to be judged, they call the members of the judging comitee (the judges) who determine the order of laps and start judging. Prior to every lap, each team has 3 minutes to adjust mobile robot sensors (without programming). Mobile robot is placed at the start position and by pressing the start button (or reset) it starts moving following the line. An IR-sensor detects mobile robot's passing through electronic gates and starts the countdown (min:sec). The ultimate goal is to pass all the tiles in the given order and come back to start position where the mobile robot stops. Elapsed time is recorded in a table for each team. Scoring will be done at the end. 5 points will be substracted if the mobile robot doesn't stop at the finish line on its own. Mobile robot's LCD display can show various settings, but mobile robot should be able to measure and display the distance from the roadblock at the finish line. 5 points will be substracted if the mobile robot doesn't display the distance from the roadblock at the finish line. 1st lap – All listed sheets should be passed. Each sheet missed deducts 1 point.

10A 9A 8A 7A 6A 5A 4A 3A 2A 1A 1B 1C 1D 1E 1F 1G 2G 3G 4G 5G 6G 7G 8G 9G 10G 10F 10E 10D 10C 10B 10A

2nd lap – (roadblocks I and II). Each sheet missed deducts 1 point. Each roadblock passed adds 1 point.

10A 9A 8A 7A 6A PR 4A 3A 2A 2B 2C 3C 3D 4D 5D 5E 6E 7E 8E 8D 9D 10D 10C 10B 10A

3rd lap – (roadblocks I and III). Each sheet missed deducts 1 point. Each roadblock passed adds 1 point.

10A 9A 8A 7A 6A PR 4A 3A 2A 1A 1B 1C 1D 2D 3D 4D 5D 5E 6E 7E 8E 8D 9D 10D 10C 10B 10A

Page 7: Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P).

PRACTICAL ASSIGNMENT FOR BALKAN JUNIOR COMPETITION 2018

BALKAN JUNIOR 2018 7 Srednja škola MATE BLAŽINE LABIN

4th lap – (roadblocks I and IV). Each sheet missed deducts 1 point. Each roadblock passed adds 1 point.

10A 9A 8A 7A 6A PR 4A 3A 2A 1A 1B 1C 1D 1E 1F 1G 2G 3G 4G 4F 4E 5E 6E 7E 8E 8D 9D 10D 10C 10B 10A

Speed scoring (time needed to finish a lap):

Place 1st 2nd 3rd 4th 5th 6th 7th 8th Points 20 17 14 11 8 5 2 0

POINTS: 1st lap: 31 points 2nd lap: 25 points + 2 points if you do not touch the roadblock 3rd lap: 27 points + 2 points if you do not touch the roadblock subtotal = 120 points 4th lap: 31 points + 2 points if you do not touch the roadblock + 4 x 20 = 80 points Total = 200 points Note: Every team should provide for the competition its own laptop, assembled mobile robot (Balkan karić), 5 cubes (100x100x100), a measuring instrument and other necessary tools.

Page 8: Zadatak BalkanJuniorC eng - ssmb.hr · Renesas 78KOS/KA1 series, Zilog Z80 series, NXP MC68HC908, ATMEL ATmegaX8PA or of course the most popular ARDUINO UNO ATMega 48A/PA/88A/168A/328/P).

PRACTICAL ASSIGNMENT FOR BALKAN JUNIOR COMPETITION 2018

BALKAN JUNIOR 2018 8 Srednja škola MATE BLAŽINE LABIN

Spare parts can be found in the following links (if needed): Spare parts (https://www.aliexpress.com and http://www.dx.com) I2C modul for LCD1602 display https://www.aliexpress.com/item/IIC-I2C-Interface-LCD1602-2004-LCD-Adapter-Plate-Free-Shipping-Dropshipping/32475302265.html?spm=2114.10010108.1000013.2.572db66eBFOA5z&traffic_analysisId=recommend_2088_1_90158_iswistore&scm=1007.13339.90158.0&pvid=08b2bd77-6a20-4034-b3eb-c894ebe2f2c9&tpp=1 Balkan Karic - kit http://www.dx.com/p/2wd-robot-raider-car-kits-for-arduino-153021#.WmIboVWnGM8 Spare wheels and motor https://www.aliexpress.com/item/Free-shiping-Deceleration-DC-motor-supporting-wheels-a-smart-car-chassis-motor-robot-car-wheels/32276151728.html?spm=a2g0s.8937460.0.0.KmMJ6O Waveshare 5-ch tracking sensor https://www.aliexpress.com/item/Tracker-Sensor-Robot-Infrared-Line-Tracking-Module-5-ch-ITR20001-T-Infrared-Detector/32770320096.html?spm=2114.search0104.3.16.93585e19xshLE&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10344_10068_10342_10343_10313_10059_10340_10341_10534_100031_10084_10604_10083_10103_10307_10615_10301_10303_10142,searchweb201603_6,ppcSwitch_5&algo_expid=13aca54f-17ec-469f-8d89-9d48b2e97a71-2&algo_pvid=13aca54f-17ec-469f-8d89-9d48b2e97a71&transAbTest=ae803_4&priceBeautifyAB=1 HC-SR04 ultrasonic sensor https://www.aliexpress.com/item/HC-SR04-Ultrasonic-Module-Ultrasonic-Sensor-HCSR04-Distance-Measuring-Module-for-PICAXE-Microcontroller-Arduino-UNO-HC/32552796600.html?spm=2114.search0104.3.23.72095247RdCAa0&ws_ab_test=searchweb0_0,searchweb201602_3_10152_10151_10065_10344_10068_10342_10343_10313_10059_10340_10341_10534_100031_10084_10604_10083_10103_10307_10615_10301_10303_10142,searchweb201603_6,ppcSwitch_5&algo_expid=36537d7b-a81b-4ddb-8a54-d1d4813361ad-3&algo_pvid=36537d7b-a81b-4ddb-8a54-d1d4813361ad&transAbTest=ae803_4&priceBeautifyAB=1