Difference between revisions of "ELDER Project"
m (→Onboard GUI) |
(Motor board section added) |
||
Line 8: | Line 8: | ||
− | + | [[Image:elder_main-system.png|thumb|300px|center|ELDER's main system architecture]] | |
− | + | ||
− | + | ||
− | + | ||
=== Project members === | === Project members === | ||
Line 19: | Line 17: | ||
− | === | + | === Files and links === |
In order to help the development of this project and the team's communication, a wiki and a subversion repository have been created. Links are bellow. | In order to help the development of this project and the team's communication, a wiki and a subversion repository have been created. Links are bellow. | ||
* [http://www.mp-net.fr/elder Wiki] ''Note that the wiki might be updated during the next days''. | * [http://www.mp-net.fr/elder Wiki] ''Note that the wiki might be updated during the next days''. | ||
* [http://www.mp-net.fr/elder/svn SVN repository] | * [http://www.mp-net.fr/elder/svn SVN repository] | ||
+ | |||
'''Notes about the Subversion repository''' | '''Notes about the Subversion repository''' | ||
Line 28: | Line 27: | ||
* The actual software files are located at "svn-elder/projects/elder_sw/armadeus" | * The actual software files are located at "svn-elder/projects/elder_sw/armadeus" | ||
− | + | ||
+ | ==== Students project reports ==== | ||
* '''PaulM''': Motion control, Beacon positioning system, High level software, Motor board: [http://syoctax.free.fr/Elder/Elder_report_paul.pdf PDF] | * '''PaulM''': Motion control, Beacon positioning system, High level software, Motor board: [http://syoctax.free.fr/Elder/Elder_report_paul.pdf PDF] | ||
* '''Sebastien''': Mechanical design, Power Board, Daughter board, GUI: [http://syoctax.free.fr/Elder/Elder_report_seb.pdf PDF] | * '''Sebastien''': Mechanical design, Power Board, Daughter board, GUI: [http://syoctax.free.fr/Elder/Elder_report_seb.pdf PDF] | ||
+ | |||
== Detailled informations == | == Detailled informations == | ||
Line 39: | Line 40: | ||
− | [[Image:elder_pic-daughterboard.png|600px| | + | [[Image:elder_pic-daughterboard.png|thumb|600px|center|ELDER's main boards (APF27 connected to the daughter board)]] |
+ | |||
====Introduction==== | ====Introduction==== | ||
Line 46: | Line 48: | ||
Modules can also be plugged on it according to the robot needs and be interfaced with the Armadeus FPGA or the daughter board’s own microcontroller. | Modules can also be plugged on it according to the robot needs and be interfaced with the Armadeus FPGA or the daughter board’s own microcontroller. | ||
Therefore each year, small boards can be developed in line with the project theme and the chosen mechanical solutions. | Therefore each year, small boards can be developed in line with the project theme and the chosen mechanical solutions. | ||
+ | |||
====Requirements==== | ====Requirements==== | ||
Line 66: | Line 69: | ||
====System design==== | ====System design==== | ||
− | [[Image:Elder_Daughter_board_sch.png|600px|center| | + | [[Image:Elder_Daughter_board_sch.png|600px|center|Daughter board system description]] |
+ | |||
=====Microcontroller===== | =====Microcontroller===== | ||
Line 73: | Line 77: | ||
But after two weeks of trying to make a programmer for this type of microcontroller without success, a PIC32MX has finally been selected instead. | But after two weeks of trying to make a programmer for this type of microcontroller without success, a PIC32MX has finally been selected instead. | ||
− | [[Image:Elder_daughter_board_mic.png|600px|center| | + | [[Image:Elder_daughter_board_mic.png|600px|center|thumb|Daughter board main microcontroller, with its associated components]] |
+ | |||
The PIC32 is a 32 bits microcontroller architecture family from Microchip, and the PIC32MX575F512H has the following features: | The PIC32 is a 32 bits microcontroller architecture family from Microchip, and the PIC32MX575F512H has the following features: | ||
Line 91: | Line 96: | ||
=====Fan control===== | =====Fan control===== | ||
− | [[Image:Elder_fan_control.png|300px|center| | + | [[Image:Elder_fan_control.png|300px|center|thumb|Fan control circuit]] |
+ | |||
The [[Armadeus]] board, daughter board, power board and plug-in modules are all mounted in a same box. | The [[Armadeus]] board, daughter board, power board and plug-in modules are all mounted in a same box. | ||
Line 102: | Line 108: | ||
A freewheeling diode is also putted between the fan’s terminals, in order to protect it from being damaged by instant high voltages generated by the inductive property of the motor. | A freewheeling diode is also putted between the fan’s terminals, in order to protect it from being damaged by instant high voltages generated by the inductive property of the motor. | ||
+ | |||
=====Encoders interface===== | =====Encoders interface===== | ||
− | [[Image:Elder_encoders_sch.png|500px|center| | + | [[Image:Elder_encoders_sch.png|500px|center|thumb|Encoders interface circuit]] |
+ | |||
The encoders are used to measure accurately the distance traveled by the robot, it gives 1024 ’ticks’ for each wheel revolution. | The encoders are used to measure accurately the distance traveled by the robot, it gives 1024 ’ticks’ for each wheel revolution. | ||
Line 113: | Line 121: | ||
As a result, it plays a double role as converting the differential input in a single output, and as converting a 5V input to a 3.3V output which is acceptable for the FPGA or the microcontroller. | As a result, it plays a double role as converting the differential input in a single output, and as converting a 5V input to a 3.3V output which is acceptable for the FPGA or the microcontroller. | ||
+ | |||
=====Modules sockets===== | =====Modules sockets===== | ||
− | [[Image:Elder_module_pinout.png|500px|center| | + | [[Image:Elder_module_pinout.png|500px|center|thumb|Module pin-out]] |
+ | |||
Each module can access to a 5V and 12V power supply generated from the power board, and a 3.3V logic supply generated by the daughter board. | Each module can access to a 5V and 12V power supply generated from the power board, and a 3.3V logic supply generated by the daughter board. | ||
Line 122: | Line 132: | ||
Three of six modules have 8 GPIO each directly mapped to the Armadeus board’s FPGA, and the 3 others have these available GPIO linked to the PIC32MX microcontroller’s ports. | Three of six modules have 8 GPIO each directly mapped to the Armadeus board’s FPGA, and the 3 others have these available GPIO linked to the PIC32MX microcontroller’s ports. | ||
+ | |||
=====Program===== | =====Program===== | ||
Line 130: | Line 141: | ||
This one has been developed in order to test if microcontroller was working, according to the configuration bits. | This one has been developed in order to test if microcontroller was working, according to the configuration bits. | ||
This test has been successful, now need to be debugged the UART and the CAN bus. | This test has been successful, now need to be debugged the UART and the CAN bus. | ||
+ | |||
======PIC12F====== | ======PIC12F====== | ||
Line 140: | Line 152: | ||
*after 60°C, the fan remains at 100% speed | *after 60°C, the fan remains at 100% speed | ||
− | [[Image:Elder_fan_characteristic.png|500px|center| | + | [[Image:Elder_fan_characteristic.png|500px|center|thumb|Relation between the temperature and the fan’s PWM duty cycle]] |
+ | |||
There is also a blinking LED, to be sure the microcontroller is correctly running. | There is also a blinking LED, to be sure the microcontroller is correctly running. | ||
− | ===Onboard GUI=== | + | |
+ | === Motor board === | ||
+ | The role of this board is to provide a safe and reliable interface between the logic driver device and motors. It has to meet the motors requirement ([[MFA970D161]]). The diagram bellow shows motors board inputs/outputs. | ||
+ | |||
+ | |||
+ | [[Image:elder_motor_board_diagram.png|600px|center|Motor board architecture]] | ||
+ | |||
+ | |||
+ | ==== System design ==== | ||
+ | |||
+ | ===== Isolated logic driver ===== | ||
+ | The protection and voltage translation stage is done by using optocouplers. There are small devices that contain a diode and a photo-transistor. When the diode emits light, the photo-transistor becomes saturated and the logic level at its output is pulled high. Otherwise, the transistor is blocked and the logic level is low. The main advantage is to not have any electrical link between the input and the output. So if a short-circuit happens, the optocouplers might be destroyed but not the logic behind it. | ||
+ | The illustration bellow presents how optocouplers are polarized on the motor board. The reference used is [[FOD617]] from Fairchild semiconductor. | ||
+ | |||
+ | |||
+ | [[Image:elder_motor_board_opto.png|300px|center|thumb|Motor board optocoupler isolation]] | ||
+ | |||
+ | ===== Power stage ===== | ||
+ | The main devices that drive the motors are two full H-bridge drivers. These devices allow the motor to turn backward or forward at different speeds (controlled by using a | ||
+ | Pulse Width Modulation – PWM). The chosen devices are the [[LMD18200]] from National Semiconductor. They can drive 3A and have a current sensing output. Two capacitors are simply connected between outputs and boostraps pins, as shown on the figure below. | ||
+ | |||
+ | |||
+ | [[Image:elder_motor_board_hbridge.png|300px|center|thumb|Motor board hbridge circuit]] | ||
+ | |||
+ | |||
+ | |||
+ | === Onboard GUI === | ||
[[Image:Elder_onboard_gui.jpg|800px|right|alt=Onboard GUI]] | [[Image:Elder_onboard_gui.jpg|800px|right|alt=Onboard GUI]] |
Revision as of 10:37, 30 June 2010
Contents
Project overview
ELDER (Embedded Linux Development for Robotics) Project is a robotic team which participated to the French robotic cup in May 2010. The team used an Armadeus APF27 + APF27Dev boards. This involved to work on both hardware and software designs. One of the goal of this project is to evolve and some parts are still under development.
The main features provided by the APF27 were:
- Robot location computation (X,Y,Orientation), done in hardware by the FPGA
- Robot motion control, done by the FPGA as well
- Multithreading program for high level implementations: path-finding, A.I., gui manager, CAN manager etc.
Project members
This project is actually the work of two students in last year of their Master in Engineering at the University of Strathclyde.
- PaulM
- Sebastien
Files and links
In order to help the development of this project and the team's communication, a wiki and a subversion repository have been created. Links are bellow.
- Wiki Note that the wiki might be updated during the next days.
- SVN repository
Notes about the Subversion repository
- The actual FPGA firmware files are located at "svn-elder/projects/fpga_fw"
- The actual software files are located at "svn-elder/projects/elder_sw/armadeus"
Students project reports
- PaulM: Motion control, Beacon positioning system, High level software, Motor board: PDF
- Sebastien: Mechanical design, Power Board, Daughter board, GUI: PDF
Detailled informations
Daughter board
Introduction
The aim of the daughter board is to interface the APF27 board ( which is used for the intelligence and the motion control) with everything else on the robot such as sensors, actuators, servos, motors, etc... Modules can also be plugged on it according to the robot needs and be interfaced with the Armadeus FPGA or the daughter board’s own microcontroller. Therefore each year, small boards can be developed in line with the project theme and the chosen mechanical solutions.
Requirements
The electrical and mechanical requirements are:
- 100 x 160 mm board : the board has to be the same size as Armadeus board in order to be stacked over it.
- 45 x 45 mm plug-in modules (up to 6 can be plugged) with on each:
- 3.3V logic supply
- 5V and 12V power supply
- CAN Bus
- UART (serial transmission)
- 8 GPIO
- Encoders interface
- Motors interface (PWM and directions)
- Fan control
The daughter board is meant to become a ’mother board’ on which can run the motion control (PID) and the intelligence of the robot.
System design
Microcontroller
The choice of the microcontroller was based on the requirements, and first an MSP430 from Texas Instrument was chosen. But after two weeks of trying to make a programmer for this type of microcontroller without success, a PIC32MX has finally been selected instead.
The PIC32 is a 32 bits microcontroller architecture family from Microchip, and the PIC32MX575F512H has the following features:
- Max Speed: 80 Mhz
- 10-bits ADC 16 channels
- 5 PWM outputs
- 5 timers
- 53 I/O pins
- 6 UARTS
All this features were enough to fit to the requirements, moreover, this chip could be acquired for free, with the Microchip free samples process.
Note that the microcontroller is also interfaced with the CAN bus, and the implementation is the same as described before for the power board. A LED has been putted on a free pin at the end, which is useful to debug or to make the first ’led blinking test’ for example.
Fan control
The Armadeus board, daughter board, power board and plug-in modules are all mounted in a same box.
This configuration generate heat which has to be cooled by a fan in order to have correct performances.
A small dedicated microcontroller is used to realize this function, which again has been chosen from the Microchip manufacturer. It is a PIC12F683 which is small (8 pins), has got an ADC for the temperature reading and a PWM output for the fan speed setting.
The fan is driven by a MOSFET which is triggered by the PWM, and gives the possibility to apply a 12V supply voltage directly on it.
A freewheeling diode is also putted between the fan’s terminals, in order to protect it from being damaged by instant high voltages generated by the inductive property of the motor.
Encoders interface
The encoders are used to measure accurately the distance traveled by the robot, it gives 1024 ’ticks’ for each wheel revolution.
These ticks are transmitted via two channels A and B, which both are differential outputs of the encoder.
In order to treat these signals, AM26LV32 differential line receiver are used. This kind of chip can be supplied with only 3.3V however it accepts 5V inputs, which is the minimum supply level for the encoders.
As a result, it plays a double role as converting the differential input in a single output, and as converting a 5V input to a 3.3V output which is acceptable for the FPGA or the microcontroller.
Modules sockets
Each module can access to a 5V and 12V power supply generated from the power board, and a 3.3V logic supply generated by the daughter board.
It also has the possibility to use the CAN bus or an UART from the PIC32MX.
Three of six modules have 8 GPIO each directly mapped to the Armadeus board’s FPGA, and the 3 others have these available GPIO linked to the PIC32MX microcontroller’s ports.
Program
PIC32MX
At this stage of the project, there is no module which has been realized, so the only program running on the PIC32MX is blinking led code. This one has been developed in order to test if microcontroller was working, according to the configuration bits. This test has been successful, now need to be debugged the UART and the CAN bus.
PIC12F
For the PIC12F which control the fan, the program is very simple, there is a main loop in which the ADC is read, and this value determines the PWM duty cycle. The relation between the temperature and the duty cycle value is shown in the figure below , where three phases can be seen:
- before 30°C, the fan is stopped.
- between 30°C and 60°C the speed of the fan is linearly increasing according the temperature. An initial offset is required to start the fan’s motor.
- after 60°C, the fan remains at 100% speed
There is also a blinking LED, to be sure the microcontroller is correctly running.
Motor board
The role of this board is to provide a safe and reliable interface between the logic driver device and motors. It has to meet the motors requirement (MFA970D161). The diagram bellow shows motors board inputs/outputs.
System design
Isolated logic driver
The protection and voltage translation stage is done by using optocouplers. There are small devices that contain a diode and a photo-transistor. When the diode emits light, the photo-transistor becomes saturated and the logic level at its output is pulled high. Otherwise, the transistor is blocked and the logic level is low. The main advantage is to not have any electrical link between the input and the output. So if a short-circuit happens, the optocouplers might be destroyed but not the logic behind it. The illustration bellow presents how optocouplers are polarized on the motor board. The reference used is FOD617 from Fairchild semiconductor.
Power stage
The main devices that drive the motors are two full H-bridge drivers. These devices allow the motor to turn backward or forward at different speeds (controlled by using a Pulse Width Modulation – PWM). The chosen devices are the LMD18200 from National Semiconductor. They can drive 3A and have a current sensing output. Two capacitors are simply connected between outputs and boostraps pins, as shown on the figure below.
Onboard GUI
The APF27 board can be interfaced with graphical LCD display and its associated touch screen.
During the matches, the robot has to be completely autonomous, without a computer plugged to it.
A simple graphical user interface has been developed in order to be able to display any type of useful informations on the robot such as:
- The battery level
- The time left during the matches
- The position of the robot on the game table
- The number of points the robot has scored
On this screen, there is also a console to display miscellaneous messages.
The touch screen allows the user to be interactive with the robot, to browse menu and ask the robot execute an action. This can be useful just before the matches to check if everything works properly.
The LCD is directly interfaced with the SDL library. This library can be used in C language to develop multimedia application on various platforms.
More information comming soon