Difference between revisions of "HANcoder/Training Material/Highwaysurfer"
(→Software) |
|||
(9 intermediate revisions by 3 users not shown) | |||
Line 98: | Line 98: | ||
:* [https://www.conrad.nl/nl/bourns-mf-rht200-0-ptc-zekering-drempelstroom-ih-2-a-16-v-l-x-b-x-h-216-x-94-x-3-mm-1-stuks-1055672.html Mini fuse 2 [A]] | :* [https://www.conrad.nl/nl/bourns-mf-rht200-0-ptc-zekering-drempelstroom-ih-2-a-16-v-l-x-b-x-h-216-x-94-x-3-mm-1-stuks-1055672.html Mini fuse 2 [A]] | ||
:* [https://www.conrad.nl/nl/eska-lp30-500f-ptc-zekering-drempelstroom-ih-5-a-30-v-l-x-b-x-h-144-x-30-x-356-mm-1-stuks-525059.html Mini fuse 5 [A]] | :* [https://www.conrad.nl/nl/eska-lp30-500f-ptc-zekering-drempelstroom-ih-5-a-30-v-l-x-b-x-h-144-x-30-x-356-mm-1-stuks-525059.html Mini fuse 5 [A]] | ||
− | :* [https://www.conrad.nl/nl/royalohm-mf0w4ff1002a50-metaalfilmweerstand-10-k-axiaal-bedraad-0207-025-w-1-stuks-1089968.html Resistor 10 [ | + | :* [https://www.conrad.nl/nl/royalohm-mf0w4ff1002a50-metaalfilmweerstand-10-k-axiaal-bedraad-0207-025-w-1-stuks-1089968.html Resistor 10 [KΩ]] |
− | :* [https://www.conrad.nl/nl/royalohm-mf0w4ff1001a50-metaalfilmweerstand-1-k-axiaal-bedraad-0207-025-w-1-stuks-1089862.html Resistor 1 [ | + | :* [https://www.conrad.nl/nl/royalohm-mf0w4ff1001a50-metaalfilmweerstand-1-k-axiaal-bedraad-0207-025-w-1-stuks-1089862.html Resistor 1 [KΩ]] |
− | :* | + | :* Capacitor 0.33 [nF] |
− | :* | + | :* Capacitor 4,7 [nF] |
− | :* | + | :* Capacitor 22 [nF] |
:* [https://www.conrad.nl/nl/panjit-1n4746a-g-zenerdiode-behuizingssoort-halfgeleider-do-41g-zenerspanning-18-v-1305028.html Zener diode 18 [V]] | :* [https://www.conrad.nl/nl/panjit-1n4746a-g-zenerdiode-behuizingssoort-halfgeleider-do-41g-zenerspanning-18-v-1305028.html Zener diode 18 [V]] | ||
Line 117: | Line 117: | ||
===Software=== | ===Software=== | ||
− | :* [https://nl.mathworks.com/products/simulink.html MatLab | + | :* [https://nl.mathworks.com/products/simulink.html MatLab Simulink®] |
:* HANcoder | :* HANcoder | ||
:* HANtune | :* HANtune | ||
Line 140: | Line 140: | ||
====Cutting==== | ====Cutting==== | ||
− | To get the right dimensions for this DEMO a LaserPro X500 was used | + | To get the right dimensions for the wooden this DEMO a LaserPro X500 was used.<br> |
− | The Solid Works drawings of all the wooden parts are send to a device that runs 'Corel Draw X8' | + | The Solid Works drawings of all the wooden parts are send to a device that runs 'Corel Draw X8'.<br> |
− | The process can be seen in | + | 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. |
+ | <table border="1"> | ||
+ | <table align="right"> | ||
+ | <tr> | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td>[[file:LaserPro_X500.jpg|200px|Click to enlarge image]]</td> | ||
+ | <td>[[file:Corel_Draw_X8.jpg|200px|Click to enlarge image]]</td> | ||
+ | <td>[[file:Laser_cutting.jpg|200px|Click to enlarge image]]</td> | ||
+ | </tr> | ||
+ | </table> | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
− | |||
====L-profile’s and drilling==== | ====L-profile’s and drilling==== | ||
Line 152: | Line 167: | ||
:* 2x460mm 3 holes per plane | :* 2x460mm 3 holes per plane | ||
:* 10x50mm 2 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 | + | 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==== | ====Assembling==== | ||
[[file:Assembly_L-profile.jpg|250px|right|Click to enlarge image]] | [[file:Assembly_L-profile.jpg|250px|right|Click to enlarge image]] | ||
Place the plates with the L-profile against each other and mark the holes.<br> | Place the plates with the L-profile against each other and mark the holes.<br> | ||
− | Do not forget | + | Do not forget which L-profile you use, every profile is slightly different even with the best measurements. <br> |
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. | 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. | ||
Line 245: | Line 260: | ||
=====''Ultrasonic sensor setup''===== | =====''Ultrasonic sensor setup''===== | ||
A piece of sheet metal (500x50 [mm]) is needed to create the bracket for the ultrasonic sensors. This bracket will be clammed on between the bottom panel and the 20x20 [mm] profile.<br> | A piece of sheet metal (500x50 [mm]) is needed to create the bracket for the ultrasonic sensors. This bracket will be clammed on between the bottom panel and the 20x20 [mm] profile.<br> | ||
− | The ultrasonic sensors are screwed on the bracket and the wiring goes thru the slot that is created by the piano hinges up top. | + | The ultrasonic sensors are screwed on the bracket and the wiring goes thru the slot that is created by the piano hinges up top. |
<table border="1"> | <table border="1"> | ||
<table align="right"> | <table align="right"> | ||
Line 298: | Line 313: | ||
Use the same aluminum profiles as the conveyor belt box to attach all the panels to each other. <br> | Use the same aluminum profiles as the conveyor belt box to attach all the panels to each other. <br> | ||
− | On top of the front panel the piano hinges are mounted to create the cover. | + | On top of the front panel the piano hinges are mounted to create the cover. |
To mount the lane change mechanism a bracket is needed. The dimensions of the bracket are located on the drawings.<br> | To mount the lane change mechanism a bracket is needed. The dimensions of the bracket are located on the drawings.<br> | ||
The bracket is laser cut. The slots are used to tension the belt.<br> | The bracket is laser cut. The slots are used to tension the belt.<br> | ||
On the other side, there is a hole for the potentiometer. | On the other side, there is a hole for the potentiometer. | ||
− | For the lane change mechanism, the 2 tooth wheels are fitted, one on the potentiometer that reads the position of the car and the other one on the | + | For the lane change mechanism, the 2 tooth wheels are fitted, one on the potentiometer that reads the position of the car and the other one on the stepper motor that creates the linear movement.<br> |
− | The custom bushings are needed to get the tooth wheels fitted on the | + | The custom bushings are needed to get the tooth wheels fitted on the stepper motor and potentiometer. <br> |
On the bottom of the bridge a switch is mounted to turn on the demo. | On the bottom of the bridge a switch is mounted to turn on the demo. | ||
<table border="1"> | <table border="1"> | ||
Line 317: | Line 332: | ||
</tr> | </tr> | ||
</table> | </table> | ||
− | The custom bushings are needed to get the tooth wheels fitted on the | + | The custom bushings are needed to get the tooth wheels fitted on the stepper motor and potentiometer. <br> |
On the bottom of the bridge a switch is mounted to turn on the demo. | On the bottom of the bridge a switch is mounted to turn on the demo. | ||
Line 344: | Line 359: | ||
</table> | </table> | ||
<br> | <br> | ||
+ | |||
Line 359: | Line 375: | ||
===The electronic circuit=== | ===The electronic circuit=== | ||
− | This is the final version of our electric scheme. Each individual component will be ran down separately validating the choices and verifying the values of resistances and capacitors. <br> Each of the components is are linked in series with the power output of the transformer or 7805. | + | This is the final version of our electric scheme. Each individual component will be ran down separately validating the choices and verifying the values of resistances and capacitors. <br> Each of the components is are linked in series with the power output of the transformer or 7805. |
− | |||
====Power supply==== | ====Power supply==== | ||
− | Most of the components work on 12V. To get the 12V | + | Most of the components work on 12V. To get the 12V a 60 Hz transformer is used. Reasons for this were the low costs compared to a battery.<br> |
− | To power the ultrasonic sensor and the DNF10 sensor we used a | + | To power the ultrasonic sensor and the DNF10 sensor we used a 7805 voltage regulator because it’s the cheapest option available. |
− | ====The | + | ====The switch==== |
[[file:Switch.jpg|200x150px|right|Click to enlarge image]] | [[file:Switch.jpg|200x150px|right|Click to enlarge image]] | ||
− | + | An on/off button is integrated on the ground side of our circuit. The electric scheme shows a button plus coil parallel and a relay powered by the coil in series. A regular button with relay can’t handle the electricity so it had to be powered by a coil. Most switches have this built in so the component only needs to be put in series. | |
− | |||
− | |||
Line 377: | Line 390: | ||
====The stepper motor==== | ====The stepper motor==== | ||
[[file:steppermotor.jpg|200x150px|right|Click to enlarge image]] | [[file:steppermotor.jpg|200x150px|right|Click to enlarge image]] | ||
− | The PM engine will be controlled by a | + | The PM engine will be controlled by a motor driver, in our case the “Easy driver stepper motor driver”. The reason an H-bridge is used, is because the PM needs to be controlled in two directions. An H-bridge can change the direction by switching the poles. Another advantage of an H-bridge is that the protection for peek tensions is already built in. The H-bridge is connected twice with the microcontroller. Once for the direction, and once for the duration and speed. |
− | The | + | |
− | |||
− | Once for the direction, and once for the duration and speed. | ||
====The conveyor belt motor==== | ====The conveyor belt motor==== | ||
[[file:Conveyerbelt motor.jpg|200x150px|right|Click to enlarge image]] | [[file:Conveyerbelt motor.jpg|200x150px|right|Click to enlarge image]] | ||
− | The PM motor is being controlled by the | + | The PM motor is being controlled by a H-bridge, the “Sparkfun Ardumoto - Motor Driver Shield”. <br> A H-bridge was used to protect the motor against peak tensions and make linking it more convenient. The H-bridge is connected twice with the microcontroller. <br> Once for the direction, and once for the duration and speed. |
− | |||
− | |||
Line 392: | Line 401: | ||
====Ultrasonic sensors (SR04)==== | ====Ultrasonic sensors (SR04)==== | ||
[[file:Ultrasonic sensors.jpg|200x150px|right|Click to enlarge image]] | [[file:Ultrasonic sensors.jpg|200x150px|right|Click to enlarge image]] | ||
− | The | + | The ultrasonic sensors are connected to the micro controller twice, once for the micro controller to trigger the sensors and for the sensor output.<br> |
To protect the circuit from voltage peaks from electromagnetic waves caused by the transformer filtering techniques are used. <br> | To protect the circuit from voltage peaks from electromagnetic waves caused by the transformer filtering techniques are used. <br> | ||
− | The filters contain one capacitor and resistance. For each resistance | + | The filters contain one capacitor and resistance. For each resistance 10kΩ is common. In the circuit R4=R5=R6=10kΩ.<br> |
Also, C3=C4=C5. To determine the C values, the filter frequency need to be calculated first.<br> | Also, C3=C4=C5. To determine the C values, the filter frequency need to be calculated first.<br> | ||
To get the filter frequency (F<sub>c</sub>) from the ultrasonic sensor to following recommended measurement cycle(t) of 60 [ms] is used.<br> | To get the filter frequency (F<sub>c</sub>) from the ultrasonic sensor to following recommended measurement cycle(t) of 60 [ms] is used.<br> | ||
Line 400: | Line 409: | ||
− | '''F''' = ''frequency'' <br> '''F''' = 1 / t <br> '''F''' = 1 / 0,06 <br> '''F''' = 16,667 [Hz] | + | '''F''' = ''frequency'' <br> '''F''' = 1 / t <br> '''F''' = 1 / 0,06 <br> '''F''' = 16,667 [Hz] <br> |
+ | |||
+ | '''x''' = ''Filterfactor'' = 50<br> | ||
− | '''F<sub>c</sub>''' = F * x <br> '''F<sub>c</sub>''' = 16,667 * 50 <br> '''F<sub>c</sub>''' = | + | '''F<sub>c</sub>''' = F * x <br> '''F<sub>c</sub>''' = 16,667 * 50 <br> '''F<sub>c</sub>''' = 833 [Hz] |
− | '''F<sub>c</sub>''' = 1 / ( | + | '''F<sub>c</sub>''' = 1 / (2π * R * C) <br> '''C''' = 1 / (2π * R * F<sub>c</sub>) <br> '''C''' = 1 / (2π * 10000 * 833) = 19,1 [nF] |
====VR sensor and DNF10 chip==== | ====VR sensor and DNF10 chip==== | ||
Line 412: | Line 423: | ||
The VR sensor also has a capacitor and resistance to filter.<br> | The VR sensor also has a capacitor and resistance to filter.<br> | ||
To measure the frequentation coming from the VR sensor we need to know the amount of tooth on the gear it measures and its RPM.<br> | To measure the frequentation coming from the VR sensor we need to know the amount of tooth on the gear it measures and its RPM.<br> | ||
− | The RPM is identical to the RPM max of the model craft electronic motor. | + | The RPM is identical to the RPM max of the model craft electronic motor. |
Line 419: | Line 430: | ||
'''N''' = 70 [min-1] = 70/60 = 1,16667 [sec-1] <br> | '''N''' = 70 [min-1] = 70/60 = 1,16667 [sec-1] <br> | ||
− | '''Z''' = 44 <br> '''F''' = N * Z = 1,166667 * 44 = 51,333 [Hz] <br> '''F<sub>max</sub>''' = F * A= 51,333 * 1,5 = 76,9999 [Hz] <br> | + | '''Z''' = 44 <br> |
+ | '''F''' = N * Z = 1,166667 * 44 = 51,333 [Hz] <br> '''F<sub>max</sub>''' = F * A= 51,333 * 1,5 = 76,9999 [Hz] <br> | ||
'''F<sub>c <sub>filter</sub> </sub>''' = F<sub>max</sub> * x = 76,9999 * 50 = 2,85 [KHz] | '''F<sub>c <sub>filter</sub> </sub>''' = F<sub>max</sub> * x = 76,9999 * 50 = 2,85 [KHz] | ||
====Fuses==== | ====Fuses==== | ||
− | A 2 [A] fuse and a | + | A 2 [A] fuse and a 5 [A] fuse is needed in the system for the peak current.<br> |
The 2 [A] fuse that is located under the micro controller will burn when there is more than 2 Amperes <br> | The 2 [A] fuse that is located under the micro controller will burn when there is more than 2 Amperes <br> | ||
in the system because of the risk that the micro controller can’t handle the current. <br> | in the system because of the risk that the micro controller can’t handle the current. <br> | ||
The 5 [A] is needed for the rest of the system that the components won’t burn through. | The 5 [A] is needed for the rest of the system that the components won’t burn through. | ||
+ | |||
+ | ====Potentiometer==== | ||
+ | [[file:Potentiometer.png|200x200px|right|Click to enlarge image]] | ||
+ | The potentiometer is connected to the microcontroller and is powered by the 5V chip. It is also filtered. <br> | ||
+ | Like all the other filters the resistance is 10 kΩ. To get the filter frequency F<sub>c</sub> from the potentiometer a frequency of 30 Hz is used. <br> | ||
+ | The actual frequency will never be close to 30 Hz because the system will need to swap lane 60 times each second. | ||
+ | |||
+ | '''F<sub>c</sub>''' = F * x = 76,9999 * 50 = 1500 [Hz]<br> | ||
+ | '''F<sub>c</sub>''' = 1 / 2π * R * C <br> | ||
+ | '''C''' = 1 / 2π * R * F<sub>c</sub> = 1 / (2π * 10000 * 1500) = 10,6 [nF] <br> | ||
Line 433: | Line 455: | ||
Different electric schemes for each of the components are being used in this chapter. The main scheme can be found above.<br> | Different electric schemes for each of the components are being used in this chapter. The main scheme can be found above.<br> | ||
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 460: | Line 483: | ||
This is because the electricity through these wires is so small that the chances of ground loops here are slim.<br> | This is because the electricity through these wires is so small that the chances of ground loops here are slim.<br> | ||
− | The ground star has been made using a screw and bold | + | The ground star has been made using a screw and bold that compresses multiple wires with spacers in between.<br> |
This way all the wires make contact if the screw is tightened enough. | This way all the wires make contact if the screw is tightened enough. | ||
Line 471: | Line 494: | ||
====The transformer==== | ====The transformer==== | ||
[[file:Transformer.png|200x250px|right|Click to enlarge image]] | [[file:Transformer.png|200x250px|right|Click to enlarge image]] | ||
− | To connect the transformer there are 5 wires | + | To connect the transformer there are 5 wires that need to be connected. The first three wires are from the powerplug.<br> |
− | Connect them according to the symbols on the transformer or according to the picture | + | Connect them according to the symbols on the transformer or according to the picture on the right. |
Line 484: | Line 507: | ||
It’s switched parallel directly with the transformer. Because a PCB is being used, all the connections are made with screw blocks.<br> | It’s switched parallel directly with the transformer. Because a PCB is being used, all the connections are made with screw blocks.<br> | ||
Because there was no Zener diode of 18 V available 3 Zener diodes of 6.5V are linked in series. <br> | Because there was no Zener diode of 18 V available 3 Zener diodes of 6.5V are linked in series. <br> | ||
− | + | The resistances of 32Ω are parallel connected because of the power which needs to be eliminated. SI (source input) and GI (ground input) are directly from the transformer,<br> | |
while SO (source output) and GO (ground output) are connected to the rest of the circuit. | while SO (source output) and GO (ground output) are connected to the rest of the circuit. | ||
====The fuse==== | ====The fuse==== | ||
− | |||
The fuse is just a fuse switched in series. For our design, it’s connected to the ground.<br> | The fuse is just a fuse switched in series. For our design, it’s connected to the ground.<br> | ||
It’s placed on a PCB. Since it’s a two-way fuse it doesn’t matter which way it is connected. | It’s placed on a PCB. Since it’s a two-way fuse it doesn’t matter which way it is connected. | ||
Line 516: | Line 538: | ||
====The low voltage circuit==== | ====The low voltage circuit==== | ||
[[file:Low voltage circuit.jpg|600x150px|right|Click to enlarge image]] | [[file:Low voltage circuit.jpg|600x150px|right|Click to enlarge image]] | ||
− | The second PCB is mostly used to supply the components that run under 4 V instead of 12 V. These are the | + | The second PCB is mostly used to supply the components that run under 4 V instead of 12 V. These are the ultrasonic sensors and the DNF10 chip.<br> |
The DNF chip is connected due the max 9240 specifications. The [-] screw block is connected to the ground while the [12V PS] is connected to the power source.<br> | The DNF chip is connected due the max 9240 specifications. The [-] screw block is connected to the ground while the [12V PS] is connected to the power source.<br> | ||
The combination of the 7805 and the capacitors will create a 5 V power source on the third pin. The capacitors are connected due the specification of the manufacturer.<br> | The combination of the 7805 and the capacitors will create a 5 V power source on the third pin. The capacitors are connected due the specification of the manufacturer.<br> | ||
The [OC] screw block is the output of the chip and is connected to the micro-controller.<br> | The [OC] screw block is the output of the chip and is connected to the micro-controller.<br> | ||
The [USPS] is the ultrasonic sensor power source and is connected to the ultrasonic sensors’ VCC.<br> | The [USPS] is the ultrasonic sensor power source and is connected to the ultrasonic sensors’ VCC.<br> | ||
− | And at | + | And at last the [IVR] is the input of the VR sensor. Be aware that the + side of this output needs to be connected to the proper side of the chip. |
====The micro-controller==== | ====The micro-controller==== | ||
Line 547: | Line 569: | ||
===Input=== | ===Input=== | ||
− | The input gets data from the sensors. For this system, | + | The input gets data from the sensors. For this system, 3 types of sensors are needed to translate the output.<br> |
− | 3 ultrasonic sensors, 1 potentiometer and 1 rotation speed sensor. | + | 3 ultrasonic sensors, 1 potentiometer and 1 rotation speed sensor. The picture below shows how this is done using HANcoder. |
====Position Sensor==== | ====Position Sensor==== | ||
[[file:Position_sensor.jpg|500x200px|right|Click to enlarge image]] | [[file:Position_sensor.jpg|500x200px|right|Click to enlarge image]] | ||
From the potentiometer, we get a certain voltage. If we multiply the voltage by 1/4096 and 1.065.<br> | From the potentiometer, we get a certain voltage. If we multiply the voltage by 1/4096 and 1.065.<br> | ||
− | In combination with the constant we can get the position of the car. | + | In combination with the constant we can get the position of the car. |
− | |||
Line 561: | Line 582: | ||
The output of the rotation sensor is a sinus signal, but in combination with the interface chip it will be a block signal.<br> | The output of the rotation sensor is a sinus signal, but in combination with the interface chip it will be a 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> | 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 573: | Line 594: | ||
Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals. <br> | Ultrasonic sensors emit short, high-frequency sound pulses at regular intervals. <br> | ||
If they strike an object, then they are reflected as echo signals to the sensor. | If they strike an object, then they are reflected as echo signals to the sensor. | ||
− | |||
− | |||
− | |||
Line 586: | Line 604: | ||
+ | ===Algorithm=== | ||
− | |||
− | |||
In Figure 7, we can see the algorithm that deals with the car position, the lane change and the lane selection system.<br> | 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. | The three blocks are the most important part of the algorithm. | ||
Line 595: | Line 612: | ||
In this state flow the car position is detected by the logic. The output is a value 1, 2 or 3.<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. | 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). | ||
− | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | <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. | ||
− | + | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
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> | ||
The block takes the value of the current value minus the value of the desired lane. With the other blocks the on/off for the stepper engine is 1 or 0. The direction is 0 or 1. | The block takes the value of the current value minus the value of the desired lane. With the other blocks the on/off for the stepper engine is 1 or 0. The direction is 0 or 1. | ||
(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> | ||
+ | |||
+ | |||
+ | |||
===Output=== | ===Output=== | ||
====LED==== | ====LED==== | ||
+ | |||
+ | [[file:Output.jpg|600x700px|right|Click to enlarge image]] | ||
+ | |||
This output is for the test led on the Olimexino.<br> | This output is for the test led on the Olimexino.<br> | ||
By changing the frequency, it is possible to see if<br> | By changing the frequency, it is possible to see if<br> |
Latest revision as of 14:18, 31 May 2018
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.