代做MEC 5882/6882 – Instrumentation, Sensing and Monitoring Lab 3 – Micro Servo Lab代写留学生数据结构程序

MEC 5882/6882 - Instrumentation, Sensing and Monitoring

Lab 3 - Micro Servo Lab

Laboratory Handout

Lab 3 - Micro Servo Lab constitutes 8% of your unit mark in total. To complete this lab, you are required to complete all the six (6) tasks instructed in this lab handout over two laboratory sessions in Week 7 (Part A of the handout) and Week 8 (Part B of the handout).

Introduction - What is SONAR?

SONAR or Sound Navigation and Ranging was initially used to locate objects underwater. SONAR is also being routinely used in-air for robot navigation and large-scale high-resolution seafloor mapping.

SONAR systems are often categorised into two types: active and passive. Passive systems use an array of hydrophones (a microphone designed to be used underwater) to passively “listen” to the noise emitted from objects. Active systems on the other hand actively send out acoustic pulses and wait for the echoes reflected from the objects.

The purpose of this laboratory experiment is to implement an actuating mechanism in combination with the ultrasonic distance measuring module you developed in the previous lab to measure angular displacement. In this lab, you are required to develop an in-air SONAR system which has the capability of measuring distances to multiple objects over 180° span and map the measurements with respect to angle.

Learning Outcomes

By the end of this laboratory experiment, you will have the knowledge and tools:

1.  To understand the basic Arduino Digital I/O functions.

2.  To control a micro-servo using Arduino.

Development Kit

You will be provided with the following equipment for the duration of the lab:

•    1 × Arduino Uno with USB cable,

•    1 × breadboard,

•    1 × ultrasonic module (HC-SR04),

•    1 × ultrasonic sensor mounting bracket,

•    1 × computer with Arduino IDE,

•   Additional electronic wiring as required,

•    1 × micro-servo.

IMPORTANT - Before you begin:

•    It is crucial to connect the ultrasonic sensor to the ground (GND) terminal before connecting the circuit to the power source to avoid damaging the hardware.

•   The testing area should not be less than 0.5 m2  and the surface of the object should be as smooth as possible to increase the accuracy of the results.

•   The digital pins 0 (RX) and 1(TX) are used for serial communication. Please do not use these pins for any other communication.

General Hints

•    Draw a schematic of the system and your concept before starting. This will help to ensure that you can efficiently complete the tasks.

•    Many Arduino example sketches are available; use them to build up your system. Consider what your task is at a basic level and find similar projects/tasks.

•    Make sure you select the correct board type of Arduino in the IDE.

Required Tasks

Please complete the following task in order, and make sure to save your work as it will be reused in future sessions.

Part A - Week 7

Task 1 – Servo Control

In this task, you are required to complete the connections between the micro-servo and Arduino and develop a program for the Arduino to control the servo.

Connect the ultrasonic module to the correct pins of Arduino:

• PWM pin (orange) of the micro-servo should be connected to digital I/O pins of Arduino.

• Connect VCC (red) from micro-servo to 5V on Arduino

• GND (brown) of micro-servo to GND pin on Arduino.

• Define the pins in your program according to your connections

Implement your own Arduino program (Visit Arduino Website for reference):

• Define your servo object and attach the servo using servo attach() function in the setup code.

• Define initial angle of the servo, servoPosition = 0.

• For every time step dt, increase servoPosition and update it to your servo using servo write() function.

• When the servo completes a half circle (i.e. 180°), reset its position and repeat the process.

• Print the servo position through the serial port at every time step.

By completing this task, your program must be able to rotate the servo over 180° span repeatedly.

Task 2 – Ultrasonic Module Integration

Connect the ultrasonic module to the Arduino. Integrate the distance measurement code you completed in Lab 1 – Microcontroller Programming to your servo control loop.

Print the measured distance together with the servo position through the serial monitor at every time step.

Hint: the time step dt is directly related to the pulse repetition frequency in Lab 1. Remember to set this value accordingly in order to get the correct measurements.

By completing this task, your program must be able to return the measured distance and the servo position, while the servo motor is sweeping over 180° repeatedly. Record this data in the table provided on page 6.

Time Step                            Measured distance (cm)                            Servo position (Degrees)

1                                                                                                                        0

2                                                                                                                       10

3                                                                                                                       20

.                                                                                                                         .

.                                                                                                                         .

N                                                                                                                      180

Task 3 – Data Page

After completing Task 1 to 2, please call the lab supervisor to check your setup and demonstrate the recorded data.



热门主题

课程名

mktg2509 csci 2600 38170 lng302 csse3010 phas3226 77938 arch1162 engn4536/engn6536 acx5903 comp151101 phl245 cse12 comp9312 stat3016/6016 phas0038 comp2140 6qqmb312 xjco3011 rest0005 ematm0051 5qqmn219 lubs5062m eee8155 cege0100 eap033 artd1109 mat246 etc3430 ecmm462 mis102 inft6800 ddes9903 comp6521 comp9517 comp3331/9331 comp4337 comp6008 comp9414 bu.231.790.81 man00150m csb352h math1041 eengm4100 isys1002 08 6057cem mktg3504 mthm036 mtrx1701 mth3241 eeee3086 cmp-7038b cmp-7000a ints4010 econ2151 infs5710 fins5516 fin3309 fins5510 gsoe9340 math2007 math2036 soee5010 mark3088 infs3605 elec9714 comp2271 ma214 comp2211 infs3604 600426 sit254 acct3091 bbt405 msin0116 com107/com113 mark5826 sit120 comp9021 eco2101 eeen40700 cs253 ece3114 ecmm447 chns3000 math377 itd102 comp9444 comp(2041|9044) econ0060 econ7230 mgt001371 ecs-323 cs6250 mgdi60012 mdia2012 comm221001 comm5000 ma1008 engl642 econ241 com333 math367 mis201 nbs-7041x meek16104 econ2003 comm1190 mbas902 comp-1027 dpst1091 comp7315 eppd1033 m06 ee3025 msci231 bb113/bbs1063 fc709 comp3425 comp9417 econ42915 cb9101 math1102e chme0017 fc307 mkt60104 5522usst litr1-uc6201.200 ee1102 cosc2803 math39512 omp9727 int2067/int5051 bsb151 mgt253 fc021 babs2202 mis2002s phya21 18-213 cege0012 mdia1002 math38032 mech5125 07 cisc102 mgx3110 cs240 11175 fin3020s eco3420 ictten622 comp9727 cpt111 de114102d mgm320h5s bafi1019 math21112 efim20036 mn-3503 fins5568 110.807 bcpm000028 info6030 bma0092 bcpm0054 math20212 ce335 cs365 cenv6141 ftec5580 math2010 ec3450 comm1170 ecmt1010 csci-ua.0480-003 econ12-200 ib3960 ectb60h3f cs247—assignment tk3163 ics3u ib3j80 comp20008 comp9334 eppd1063 acct2343 cct109 isys1055/3412 math350-real math2014 eec180 stat141b econ2101 msinm014/msing014/msing014b fit2004 comp643 bu1002 cm2030
联系我们
EMail: 99515681@qq.com
QQ: 99515681
留学生作业帮-留学生的知心伴侣!
工作时间:08:00-21:00
python代写
微信客服:codinghelp
站长地图