Difference between revisions of "HANcoder/Training Material/Highwaysurfer"
Line 353: | Line 353: | ||
==Electronical== | ==Electronical== | ||
− | In this chapter, the electronical building process is explained. In the first subchapter connecting all the sensors and actuators to the Olimexino micro controller. The second subchapter contains the installation of the electronics in the demo. | + | In this chapter, the electronical building process is explained. In the first subchapter connecting all the sensors and actuators to the Olimexino micro controller.<br> |
+ | The second subchapter contains the installation of the electronics in the demo. | ||
===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. Each of the components is are linked in series with the power output of the transformer or 7805. (PICTURE 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. (PICTURE ELECTRONIC CIRCUIT) |
====Power supply==== | ====Power supply==== | ||
− | Most of the components work on 12V. To get the 12V we used a 60hz transformer. Reasons for this were the low costs compared to a battery. To power the ultrasonic sensor and the DNF10 sensor we used a 7805voltage regulator because it’s the cheapest option available. | + | Most of the components work on 12V. To get the 12V we used a 60hz transformer. Reasons for this were the low costs compared to a battery.<br> |
+ | To power the ultrasonic sensor and the DNF10 sensor we used a 7805voltage regulator because it’s the cheapest option available. | ||
====The switches==== | ====The switches==== | ||
− | We have attached an emergency button and on off switch to the ground of the. Both of the buttons power a coil what opens a relay. The emergency button relay is closed by default, while thee on off switch is open by default. This is because in rest and with the emergency button pressed there should not be any electricity through the system. | + | [[file:Switch.jpg|200x150px|right|Figure 12]] |
+ | We have attached an emergency button and on off switch to the ground of the. Both of the buttons power a coil what opens a relay.<br> | ||
+ | The emergency button relay is closed by default, while thee on off switch is open by default.<br> | ||
+ | This is because in rest and with the emergency button pressed there should not be any electricity through the system. | ||
+ | |||
+ | |||
+ | |||
+ | |||
====The stepper motor==== | ====The stepper motor==== | ||
− | The PM engine will be controlled by a H bridge, in our case the “Ardumoto - Motor Driver Shield”. The reasoning we chose for an H-bridge is that the PM needs to be controlled in two directions, an H-bridge can change the direction by switching the poles easily. Other advantages of an H-bridge are that the protection for peek tensions is already build in. The H-bridge is connected twice with the micro controller. Once for the direction, and once for the duration and speed. | + | [[file:steppermotor.jpg|200x150px|right|Figure 12]] |
− | + | The PM engine will be controlled by a H bridge, in our case the “Ardumoto - Motor Driver Shield”. <br> | |
+ | The reasoning we chose for an H-bridge is that the PM needs to be controlled in two directions, an H-bridge can change the direction by switching the poles easily.<br> | ||
+ | Other advantages of an H-bridge are that the protection for peek tensions is already build in. The H-bridge is connected twice with the micro controller.<br> | ||
+ | Once for the direction, and once for the duration and speed. | ||
====The conveyor belt motor==== | ====The conveyor belt motor==== | ||
− | The PM motor is being controlled by the micro controller with PWM duty cycle. We used a P channel MOSFET to switch the motor on and off again. To protect the MOSFET we used a 1kO resistance. To manage outflow in case the MOSFET is turned off we used a high 10kO resistance. | + | [[file:Conveyerbelt motor.jpg|200x150px|right|Figure 12]] |
+ | The PM motor is being controlled by the micro controller with PWM duty cycle. We used a P channel MOSFET to switch the motor on and off again.<br> | ||
+ | To protect the MOSFET we used a 1kO resistance. To manage outflow in case the MOSFET is turned off we used a high 10kO resistance. | ||
+ | |||
+ | |||
+ | |||
====Ultrasonic sensors (SR04)==== | ====Ultrasonic sensors (SR04)==== | ||
− | The Ultrasonic sensors are connected to the micro controller twice, once for the micro controller to trigger the sensors and for the sensor output. | + | [[file:Ultrasonic sensors.jpg|200x150px|right|Figure 12]] |
− | To protect the circuit from voltage peaks from electromagnetic waves caused by the transformer filtering techniques are used. The filters contain one capacitor and resistance. For each resistance 10kO is common. In the circuit R4=R5=R6=10kO. Also, C3=C4=C5. To determine the C values, the filter frequency need to be calculated first. | + | 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 get the filter frequency (F<sub>c</sub>) from the ultrasonic sensor to following recommended measurement cycle(t) of 60 [ms] is used. These values are found in the specifications of the ultrasonic sensors.<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 10kO is common. In the circuit R4=R5=R6=10kO.<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> | ||
+ | These values are found in the specifications of the ultrasonic sensors.<br> | ||
Line 384: | Line 405: | ||
====VR sensor and DNF10 chip==== | ====VR sensor and DNF10 chip==== | ||
− | The configuration of the chip has been given, and the values of R8, R9 and C7 are in the specifications. The configuration converts a sinus wave into a block wave. It only has one output towards the micro controller. | + | [[file:VR sensor.jpg|200x150px|right|Figure 12]] |
− | The VR sensor also has a capacitor and resistance to filter. | + | The configuration of the chip has been given, and the values of R8, R9 and C7 are in the specifications.<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. | + | The configuration converts a sinus wave into a block wave. It only has one output towards the micro controller. |
+ | 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> | ||
The RPM is identical to the RPM max of the model craft electronic motor. (PICTURE VR SENSOR) | The RPM is identical to the RPM max of the model craft electronic motor. (PICTURE VR SENSOR) | ||
Line 398: | Line 421: | ||
====Fuses==== | ====Fuses==== | ||
− | A 2 [A] fuse and a 7,5 [A] fuse is needed in the system for the peak current. The 2 [A] fuse that is located under the micro controller will burn when there is more than 2 Amperes in the system because of the risk that the micro controller can’t handle the current. The 5 [A] is needed for the rest of the system that the components won’t burn through. | + | A 2 [A] fuse and a 7,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> | ||
+ | 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. | ||
===Installation=== | ===Installation=== |
Revision as of 14:03, 7 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
In the Appendix, a detailed order list has been attached. However, a simple list is added in each subchapter to tender to specific parts.
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 [KO]
- Resistor 1 [KO]
- Capacitor 0.33 [µF]
- Capacitor 4,7 [µF]
- Capacitor 22 [µF]
- Zener diode 18 [V]
- Wall socket (220 ~ 230 [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 this DEMO a LaserPro X500 was used which can be seen in figure 1.
The Solid Works drawings of all the wooden parts are send to a device that runs 'Corel Draw X8' which can be seen in figure 2.
The process can be seen in Figure 3. 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, see figure 4.
Assembling
Place the plates with the L-profile against each other and mark the holes.
Do not forget witch 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.