Difference between revisions of "HANcoder/Training Material/Highwaysurfer"
Line 428: | Line 428: | ||
For clarification, some pictures are mirrored to make them correspond with the pictures from the back side.<br> | For clarification, some pictures are mirrored to make them correspond with the pictures from the back side.<br> | ||
If a part is marked with red it’s not involved in the electric scheme. | If a part is marked with red it’s not involved in the electric scheme. | ||
+ | |||
+ | |||
Line 554: | Line 556: | ||
With the 'timer input get' block out of the HANcoder library it is possible to get the frequency out of the block signal.<br> | With the 'timer input get' block out of the HANcoder library it is possible to get the frequency out of the block signal.<br> | ||
If you multiply the frequency by: 2*Pi*0.04*(1/44) it will give the speed of the roll as an input for the algorithm. | If you multiply the frequency by: 2*Pi*0.04*(1/44) it will give the speed of the roll as an input for the algorithm. | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 562: | Line 569: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 581: | Line 577: | ||
+ | ===Algorithm=== | ||
+ | In Figure 7, we can see the algorithm that deals with the car position, the lane change and the lane selection system.<br> | ||
+ | The three blocks are the most important part of the algorithm. | ||
+ | For detecting the position of the car, a potentiometer is used. In the input, the value from the potentiometer is transformed to meters.<br> | ||
+ | In this state flow the car position is detected by the logic. The output is a value 1, 2 or 3.<br> | ||
+ | The algorithm uses the value to determine which part of the next state flows is used. | ||
+ | <table border="1"> | ||
+ | <table align="center"> | ||
+ | <tr> | ||
+ | <th>Figure 7</th> | ||
+ | <th>Figure 8</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>[[file:Main algorithm.jpg|600x200px|right|Click to enlarge image]]</td> | ||
+ | <td>[[file:Car position.jpg|right|600x200px|Click to enlarge image]]</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | <table border="1"> | ||
+ | <table align="right"> | ||
+ | <tr> | ||
+ | <th>Figure 9</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>[[file:Lane selection system.jpg|600x200px|right|Click to enlarge image]]</td> | ||
+ | </tr> | ||
+ | </table> | ||
− | |||
In Figure 9, the lane selection system is shown. With the values from the car position detection one of the three state flows is selected.<br> | In Figure 9, the lane selection system is shown. With the values from the car position detection one of the three state flows is selected.<br> | ||
The multiport switch gives a lane (1,2,3) that is desired to go to. If all the lanes are blocked, the StopBelt output will be 1(Boolean). | The multiport switch gives a lane (1,2,3) that is desired to go to. If all the lanes are blocked, the StopBelt output will be 1(Boolean). | ||
Line 603: | Line 624: | ||
− | [[file:Lane selection system 1.jpg|600x200px|right|Click to enlarge image]] | + | <table border="1"> |
+ | <table align="right"> | ||
+ | <tr> | ||
+ | <th>Figure 10</th> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>[[file:Lane selection system 1.jpg|600x200px|right|Click to enlarge image]]</td> | ||
+ | </tr> | ||
+ | </table> | ||
This is the state flow when the current lane is lane 1, as shown in Figure 10. The three lanes have a logic connected in a triangle. <br> | This is the state flow when the current lane is lane 1, as shown in Figure 10. The three lanes have a logic connected in a triangle. <br> | ||
This means if the car is in lane 1, it’s possible to go to either lane 2 or lane 3. For the other state flows, please look at the software. | This means if the car is in lane 1, it’s possible to go to either lane 2 or lane 3. For the other state flows, please look at the software. | ||
Line 619: | Line 648: | ||
− | + | ||
− | |||
The logic for the rotation direction of the stepper engine is shown in Figure 11. The value of the desired lane and the current lane are compared by a plus minus block.<br> | The logic for the rotation direction of the stepper engine is shown in Figure 11. The value of the desired lane and the current lane are compared by a plus minus block.<br> | ||
Line 626: | Line 654: | ||
(Figure 12) | (Figure 12) | ||
− | + | <table border="1"> | |
− | + | <table align="center"> | |
− | + | <tr> | |
− | + | <th>Figure 11</th> | |
− | + | <th>Figure 12</th> | |
− | + | </tr> | |
− | + | <tr> | |
− | + | <td>[[file:Stop belt.jpg|600x200px|right|Click to enlarge image]]</td> | |
− | + | <td>[[file:Output_block.jpg|750px|right|Click to enlarge image]]</td> | |
− | + | </tr> | |
− | + | </table> | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Revision as of 13:56, 19 June 2017
General overview
A car runs on a conveyor belt and can run on three different lanes.
When an obstacle is detected in the path of the car,
the car will switch a lane to avoid a collision.
It is possible to block all three lanes, but then the car will stop.
This demo is built up from different subsystems.
The mechanical, the electrical and the software.
All these systems are also divided into the sub-components.
Mechanical:
The construction of the total demo assembly is divided in 3 separate sub-assembly’s:
the housing components, the lane change mechanism and the conveyer belt.
Electrical:
The electrical components are connected by soldering and screw terminals.
The power supply from the wall socket goes directly into the transformer
that generates the correct power supply for the components such as the H-bridge
that controls the conveyer belt motor, the microcontroller,
stepper-motor and the ultrasonic sensors.
Software:
The software is also divided into 3 separate systems: the input, algorithm and output.
The input gives the values that the algorithm need to create the output.
The algorithm decides what happens with the belt. When there is an obstacle the car will switch lanes,
if all 3 lanes are blocked the belt will stop.
Introduction
The HAN-AR have two model based development tools, HANcoder and HANtune, that they would like to promote. In order to do this a new demonstration model was required.
This is what the project team Highway Surfer has created.
The model will showcase the abilities of the tools and will act as an eye catcher at tech fairs and conferences that the HAN-AR attends.
With the help of this document people who are interested in recreating this project or start their own projects will be able to see what the steps involved are,
the materials required and the capabilities of the tools, HANcoder and HANtune.
This project was started with the help a template. This template can be downloaded from the following link:
On this wikipage, you can find the building process for the mechanical parts, the wiring and other processes for the electronics and the logic for building the software algorithm.
To make it easy for the consumer, we have an easy to understand order list with relevant links.
Materials Required
Hardware parts
Local hardware store:
- 5.5 [mm] multiplex
- Aluminum L-profile 20X20 [mm]
- Bolts, nuts
- PVC tube (80mm diameter x 1m length)
- Grip material for the PVC tubes
- Conveyor belt
- Axes
- End pieces’ roll (wood)
Online webshop:
- Bearings
- Gears/pullies and belts, for the drivetrain and lane change mechanism:
Electrical
Online webshop:
- Olimexino STM-32 board
- Stepper motor-driver
- Ardumoto - Motor Driver Shield
- Transformer
- Transistor 7805
- Female power connector for Olimexino
- 6x Screw terminal block 1.50 [mm²]
- Mini fuse 2 [A]
- Mini fuse 5 [A]
- Resistor 10 [KΩ]
- Resistor 1 [KΩ]
- Capacitor 0.33 [nF]
- Capacitor 4,7 [nF]
- Capacitor 22 [nF]
- Zener diode 18 [V]
Sensors
Actuators
Software
- MatLab-Simulink
- HANcoder
- HANtune
HANcoder and HANtune are available at OpenMBD. (On the website is a download manual for all the software.)
Mechanical
For the mechanical design the dimensions can be found in the CAD 2D drawings, which can be downloaded from the website [link here]. When all the parts are cut, they can be assembled. In the exploded views in this document the exact order of assembly is explained.
Conveyor belt base
Housing
To build the housing of the conveyor belt you need following items:
- 3x multiplex plates of 1220x610mm with a thickness of 5,5 [mm].
- Blueprints of the individual panels for the dimensions.
- Saw or something to cut the wood.
- Bolts(m5)
- L-profile(3000x20x20 [mm])
- Measuring tape
- Wood drill
Cutting
To get the right dimensions for the wooden this DEMO a LaserPro X500 was used.
The Solid Works drawings of all the wooden parts are send to a device that runs 'Corel Draw X8'.
The process can be seen in the pictures below. We chose this option to get a cleaner finish. Of course, there are other ways to get the panels to the right dimensions.
L-profile’s and drilling
The following L-profiles need to be cut- 2x540mm 5 holes per plane
- 4x100mm 2 holes per plane
- 2x460mm 3 holes per plane
- 10x50mm 2 holes per plane
Some holes need to be drilled in the L-profiles to match the bolts, for this DEMO 5mm. Be aware that the holes in the two planes are not on top of each other.
Assembling
Place the plates with the L-profile against each other and mark the holes.
Do not forget which L-profile you use, every profile is slightly different even with the best measurements.
Continue by drilling the marked holes in the wood and assemble the parts with bolts and nuts. Start from the bottom and work all the way up.