|
Embedded systems course 2004
|
|
|
Basic topic
The basic topic is Bluetooth Controlled Robot Module (RCM) i.e. your task is to design a control module for a robot.
The robot is a simple two wheel
robot that uses two direct current motors for driving. It can be programmed to drive
autonomously a certain path. A list of driving commands are first downloaded from a
PC to the robot using bluetooth connection, after which the robot will drive automatically
through the program.
![]() The control module is required to contain the following components: - peripheral connector for interfacing to the robot base - some buttons for operating the robot - driver or amplifier IC:s for dc motors - JTAG connector and optionally a D9-programming circuit for programming a real microcontroller. JTAG connection can be used for programming task. ![]() The main connections are presented in the picture above. The minimum requirements for the BCRM system to be built by each group are the following: 1) The driving commands can be uploaded from a PC to the BCRM using bluetooth connection (BT). 2) The robot can autonomously drive the programmed path. 3) IR sensor data can be used to control the robot (robot must react to an obstacle). 4) The robot has a user interface, which is used with buttons and LCD display. The UI is used at least for starting the driving and downloading data from PC. 5) The robot is operable with both battery and external dc-power. The robot control module must be able to understand at least commands for driving forward and backwards a length specified in centimeters and turning an angle specified in degrees. For example a command for driving could be FW25, which takes the robot forward 25 cm or BW04, which takes it bacwards 4 cm:s. Similarly turning could be CW50, which turns the robot 50 degrees clockwise or CC24, which turns the robot 24 degrees counter-clockwise. The command list, which will be uploaded from a PC, will consist of a series of these commands. For example using commands from the previous example, the list could be: FW10 CC90 FW50 CW90 BW10 CW90 FW50 ... The previous commands are just examples. The groups may use them or create their own commands. We suggest you use ASCII commands in order to be able to test them easily with normal terminal programs such as HyperTerminal. However, any commands are allowed, as long as you are able too demonstrate it working. For more information check the full project assignment. Some bits of information for the BCRM construction - The specification of used DC motor ((Micro Motors RH 158-12-30 with Hall-effect encoder)) and the connection diagram . - The gear ratio of the motors is 1:30. The hall sensor gives 3 pulses per motor revolution. - The specification of used infrared distance sensors in here (model GP2D12). - The specification of the bluetooth module is here. - The specification of the ASCII protocol of the bluetooth module is here. - The specification of used LCD display is here and here. - The size of the robot is 270x295 mm. - The diameter of a wheel is 82 mm - The distance from peripheral connector to LCD is 84 mm. Please make sure that your PCB is not overlapping LCD display. - IR-sensors are numbered in the following manner: The sensor number 1 is the one in the front and center of the robot. Numbers 2 through 8 are counted counterclockwise around the robot starting from the sensor number one. - The pinout and description of the peripheral connector is described in Appendix B of the project assignment Here are some additional directives for making the BCRM. Some of them are voluntary, but some are compulsory. These directives should help you design the hardware: 1) (voluntary): Connect the pins of the IR-sensors in the same order as they are numbered in the image at the top of this page. 2) (compulsory): The Bluetooth RTS-, CTS- and Reset-pins must be connected to MCU. 3) (compulsory): Use PWM:s to control the speed of the DC-motors. 4) (voluntary): Use timer0 and timer2 for PWM:s (OC0 and OC2), since they are similar to each other (8-bit timers). 5) (compulsory): Encoders must be used for measuring travelled distance. 4) (voluntary): Connect enc0 to pin int0(PD2) and enc2 to pin int1(PD3). You may also use counterpins T0, T1 and T2, BUT notice that they use the same timer/counter as PWM:s. Thus you cannot use T0 and T2 as counters if you use OC0 and OC2 for PWM:s. About bluetooth TDK's USB Bluetooth adapter has been installed into computer STNET-PC139d in SÄ139. You can test the bluetooth connection by clicking the icon "My Bluetooth Places" on the desktop and then double clicking "Robotti 1" or "Robotti 2" icons while the corresponding robot (1 or 2) has been powered up. If you get a "pairing error" message, close the message and double click the robot icon again. When the connection has been established, a message appears from the bluetooth toolbar icon. Click the icon and input "1234" for the "Bluetooth PIN Code". Now, you should have a virtual serial connection to the desired robot via COM-port 6. You can test a terminal connection to a connected robot by double clicking the "Robotti.ht" Hyper Terminal icon on the Desktop. This will connect the terminal through the COM-port 6 to the robot and you will be able to send/receive characters to/from the robot. |