HANcoder/Training Material/Highwaysurfer

From OpenMBD
Jump to: navigation, search
Rendering assem.jpg

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 of some templates. These templates can be downloaded to

In this document, 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:

  • Wall socket (220 ~ 230 [V])

Sensors

Actuators

Software

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.
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 (ADD PICTURE FROM WIKI DOCUMENTATION)
  • 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. (ADD PICTURE FORM DOCUMENTATION)

Rollers

To build the rollers the following parts are needed:

  • PVC pipe Ø 80 [mm]
  • Threaded rod M10 for axles ~ 600 [mm]
  • Wood ~ 40 mm thick enough for 4 blocks
  • Bearings 2x: inner-Ø 10mm, outer-Ø 22mm
  • Tooth wheel (powered side), ABS-ring (tension side).
  • Some strips of rubbery material (EPDM) the get the friction needed for the belt.

(ADD EXPLODED VIEWS FROM WIKI DOCUMENTATION)

Assembling

Cut 2 pieces of PVC to a length of 450mm. (3x PICTURES FROM WIKI DOCUMENTATION) Drill the 4 roller blocks and put them into the lathe to machine them to their final form as seen on the drawings. (3x PICTURES FROM WIKI DOCUMENTATION) When that is finished place the bearings in the blocks and glue the blocks into the PVC pipe. For the powered side the tooth wheel is pressed in and for the tension side the ABS-ring is pressed around it. For friction between the belt and PVC pipe a couple of strips of rubbery material (EPDM) are glued around it. (2x PICTURES FROM WIKI DOCUMENTATION)

Conveyor belt

Items needed:

  • 1500*450 [mm] strong and bendable fiber (this demo: 80%PVC and 20% polyester)
  • Thread and a needle or a sewing mill

Test fit the conveyor belt around the rollers which are placed at a minimum width. Mark some spots on the overlapped part which you can see circled in picture(?). Remove the conveyor belt and align it back on the spots so you can stitch it together with a needle or a sewing mill. (ADD PICTURE OF BELT)

Bridge Assembly

Housing

The housing assembly for the bridge has the same procedure as the conveyor belt box. On the front panel of the bridge, the ultrasonic sensors are mounted. Extra parts needed are: - 500x50 sheet metal bracket for the 3 ultrasonic sensors - 2x piano-hinge (for easy excess to the lane change mechanism) - Toggle switch

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. The ultrasonic sensors are screwed on the bracket and the wiring goes thru the slot that is created by the piano hinges up top.

(INSERT PICTURE BRACKET, AND PICTURE FINISHED WITH SENSORS)

Lane change mechanism

Within the bridge the lane change mechanism located. To create this, you need the following items: - Wooden bracket to hold everything together - 20x20 aluminum profile - M5 screws and nuts - Step motor - Toothed belt 5m (10 mm wide) - 2x Tooth wheel with spline - 2x custom bushings - Potentiometer - 2x Threaded bushing - Link from bike chain. - 4x m4 screws and nuts - Wire rod - Model car

Assembling

Use the same aluminum profiles as the conveyor belt box to attach all the panels to each other. On top of the front panel the piano hinges are mounted to create the cover. (ADD 2 PICTURES: HINGES AND PROFILES)

To mount the lane change mechanism a bracket is needed. The dimensions of the bracket are located on the drawings. The bracket is laser cut. The slots are used to tension the belt. On the other side, there is a hole for the potentiometer. (ADD PICTURES LCM BRACKET, 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 step motor that creates the linear movement. The custom bushings are needed to get the tooth wheels fitted on the step motor and potentiometer. On the bottom of the bridge a switch is mounted to turn on the demo. (ADD EXPLODED VIEW LCM)

The clamp that is used to hold the car is made from sheet metal and a threaded bushing. The pieces of sheet metal are cut and clammed together with the chain links around the belt with the m4 screws and nuts. (3x PICTURES OF LCM CHAIN-CLAMP)

Drill a hole in the roof of the model car and place the threaded bushing. Then a piece of wire rod is used to connect the car to the clamp on the belt. (2x PICTURES OF THE MODEL CAR)

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.

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)

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.

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. (PICTURE SWITCHES)

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. (PICTURE STEPPER 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. (PICTURE BELT MOTOR)

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. 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. To get the filter frequency (Fc) 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.


F = frequency
F = 1 / t
F = 1 / 0,06
F = 16,667 [Hz]

Fc = F * x
Fc = 16,667 * 50
Fc = 8833 [Hz]

Fc = 1 / (2pRC)
C = 1 / (2pRFc)
C = 1 / (2p*10000*833) = 19.1 [µF]

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. The VR sensor also has a capacitor and resistance to filter. 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 RPM is identical to the RPM max of the model craft electronic motor. (PICTURE VR SENSOR)

Nmaxmotor = 53 RPM at 12V To simulate the increases of voltage a maximum RPM of 70 at > 12V is used.
N = 70 [min-1] = 70/60 = 1,16667 [sec-1]
Z = 44
F = N * Z = 1,166667 * 44 = 51,333 [Hz]
Fmax = F * A= 51,333 * 1,5 = 76,9999 [Hz]
Fc filter = Fmax * x = 76,9999 * 50 = 2,85 [KHz]

Fusses

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.

Installation

(ADD PICTURES FROM DOCUMENTATION)

Software

The software is split up in 3 main parts. The input, the algorithm and the output. Each of these can be edited in the HANcoder software by double clicking the blocks. In the input block the inputs of the sensors are defined. In combination with the Simulink blocks it is possible to translate the sensor output to an input for the algorithm. Take in mind that the input for the algorithm needs to be in SI –units, this is to make the calculations easier.

Input

For this system, we need to translate the output of 3 types of sensors. 3 ultrasonic sensors, 1 potentiometer and 1 rotation speed sensor. In the next part, the Simulink models of all the sensors are explained.

Ultrasonic Sensors

Potentiometer

From the potentiometer, we get a certain voltage. If we multiply the voltage by 1/4096 and 1.065. In combination with the constant we can get the position of the car.

Rotation speed sensor

The output of the rotation sensor is a sinus signal, but in combination with the interface chip it will be a block signal. With the 'timer input get' block out of the HANcoder library it is possible to get the frequency out of the block signal. 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.



Appendix