|
|
Line 1: |
Line 1: |
− | {{private}}
| + | #REDIRECT [[Kart]] |
− | {{TOC right}}
| + | |
− | | + | |
− | = Hardware =
| + | |
− | | + | |
− | == Material for students ==
| + | |
− | | + | |
− | Give the electronics material to [https://www.hevs.ch/fr/rad-instituts/institut-systemes-industriels/collaborateurs/?fonction=0&keyword=clivaz Cédric Clivaz] about a month before the start of the sommer school.
| + | |
− | | + | |
− | Digital Electronics lab :
| + | |
− | * [http://wiki.hevs.ch/uit/index.php5/Hardware/Stock_Programmer#Microsemi_.28Actel.29 Micorsemi FlashPro Programmers]
| + | |
− | * power cable for programming the FPGAs
| + | |
− | Electronics workshop:
| + | |
− | * power cable to power the cart without accu
| + | |
− | * electronic assembly
| + | |
− | * DC and stepper motors
| + | |
− | * batteries
| + | |
− | * RS232 cables and adapters
| + | |
− | * sensors
| + | |
− | Communication systems lab:
| + | |
− | * Androïd phone
| + | |
− | * USB cable and adapter
| + | |
− | | + | |
− | == Test ==
| + | |
− | | + | |
− | A serial connection to the [[Kart/Bluetooth|control board]]
| + | |
− | can be used to do tests without a Smartphone.
| + | |
− | To test the different functions of the kart, a standard terminal application
| + | |
− | can be used to send individual commands
| + | |
− | found as <code>.hex</code> files in the design files.
| + | |
− | Alternatively the pyKart software <code>I:\Bachelor\SI\Cours\214_SS1\Logiciel\PyKart\</code>
| + | |
− | lets you send individual commands, but can also run a predefined test sequence.
| + | |
− | | + | |
− | == Control board ==
| + | |
− | | + | |
− | The control board has an RS232 interface: DB9 and/or Bluetooth.
| + | |
− | | + | |
− | Power the board:
| + | |
− | {| cellpadding="4" cellspacing="0" border="1"
| + | |
− | ! Cable
| + | |
− | ! Connection
| + | |
− | |-
| + | |
− | | black
| + | |
− | | Ground
| + | |
− | |-
| + | |
− | | white
| + | |
− | | 3.3 V
| + | |
− | |-
| + | |
− | | red
| + | |
− | | 5 V (not necessary for base system)
| + | |
− | |}
| + | |
− | | + | |
− | Program the controller with <code>I:\Bachelor\SI\Cours\214_Pr1\Electronique\03_Control\FPGA\ELN_kart\Controller\busController.pro</code>.
| + | |
− | | + | |
− | === Initial values ===
| + | |
− | | + | |
− | For the students to use, some registers need safe initial values, such as the prescalers.
| + | |
− | The VHDL design should foresee:
| + | |
− | * DC motor prescaler: TBD
| + | |
− | * stepper motor prescaler: TBD
| + | |
− | | + | |
− | === Test ===
| + | |
− | | + | |
− | Check the I2C signals:
| + | |
− | {| cellpadding="4" cellspacing="0" border="1"
| + | |
− | ! Cable
| + | |
− | ! Connection
| + | |
− | |-
| + | |
− | | green
| + | |
− | | SCK
| + | |
− | |-
| + | |
− | | blue
| + | |
− | | SDA
| + | |
− | |-
| + | |
− | | grey
| + | |
− | | freeze (not used yet)
| + | |
− | |}
| + | |
− | Note: you can trig on <code>I/O_13</code> to view the I2C frames.
| + | |
− | | + | |
− | There is a 10 kOhm pullup on the SDA signal to have it rising fast enough.
| + | |
− | | + | |
− | Make an RS232 connection (115200 8N1) to the board and send hex:
| + | |
− | * 55 00 FF FF AA (<code>test-FFFF.hex</code>)
| + | |
− | * 55 00 F0 0F AA (<code>test-F00F.hex</code>)
| + | |
− | Check that the first I2C data bytes switch properly.
| + | |
− | Note that F00F will start with the least significant byte, thus showing 0FF0 on the scope.
| + | |
− | | + | |
− | == DC motor board ==
| + | |
− | | + | |
− | Insert the DC motor interface board in the I2C chain.
| + | |
− | | + | |
− | Program it with <code>I:\Bachelor\SI\Cours\214_Pr1\Electronique\03_Control\FPGA\ELN_kart\DcMotor\dcMotor.pro</code>.
| + | |
− | | + | |
− | === Test prescaler ===
| + | |
− | | + | |
− | Make an RS232 connection to the board and send hex:
| + | |
− | * 55 00 00 01 AA 55 01 00 07 AA (<code>prescaler-0001.hex</code>)
| + | |
− | * 55 00 00 04 AA 55 01 00 07 AA (<code>prescaler-0004.hex</code>)
| + | |
− | | + | |
− | The speed PWM signal should show a square wave at frequencies in a ratio of 1 to 4.
| + | |
− | | + | |
− | === Test PWM ===
| + | |
− | | + | |
− | Send hex:
| + | |
− | * 55 01 00 00 AA (<code>speed-00.hex</code>)
| + | |
− | * 55 01 00 01 AA (<code>speed-01.hex</code>)
| + | |
− | * 55 01 00 0E AA (<code>speed-0E.hex</code>)
| + | |
− | * 55 01 00 0F AA (<code>speed-0F.hex</code>)
| + | |
− | | + | |
− | The speed PWM signal should reflect the different on/off ratios.
| + | |
− | Note that speed <code>0F.hex</code> should provide the maximal speed: signal always '1',
| + | |
− | whilst speed <code>00.hex</code> cannot provide minimal speed and will have a ratio 1 of 8,
| + | |
− | which won't be enough to have the kart rolling.
| + | |
− | | + | |
− | === Test direction ===
| + | |
− | | + | |
− | Send hex:
| + | |
− | * 55 01 00 07 AA (<code>speed-07.hex</code>)
| + | |
− | * 55 01 FF F9 AA (<code>speed-FFF9.hex</code>)
| + | |
− | | + | |
− | The PWM should remain unchanged with an aspect ratio of 50%, but the direction bit should toggle.
| + | |
− | | + | |
− | === Test hardware orientation ===
| + | |
− | | + | |
− | Send hex:
| + | |
− | * 55 05 00 00 AA (<code>orientation-fwd.hex</code>)
| + | |
− | * 55 05 00 01 AA (<code>orientation-back.hex</code>)
| + | |
− | | + | |
− | This should toggle the direction bit.
| + | |
− | | + | |
− | == Stepper motor board ==
| + | |
− | | + | |
− | Insert the [[Kart/stepper_motor_controller#Stepper_motor|stepper motor interface board]] in the I2C chain.
| + | |
− | | + | |
− | Program it with <code>I:\Bachelor\SI\Cours\214_Pr1\Electronique\03_Control\FPGA\ELN_kart\StepperMotor\stepperMotor.pro</code>.
| + | |
− | | + | |
− | === Test prescaler ===
| + | |
− | | + | |
− | Make an RS232 connection to the board and send hex:
| + | |
− | * 55 02 00 01 AA (<code>prescaler-0001.hex</code>)
| + | |
− | * 55 02 00 04 AA (<code>prescaler-0004.hex</code>)
| + | |
− | | + | |
− | The stepper motor coil controls should show a square wave with duty cycle 25% at frequencies in a ratio of 1 to 4.
| + | |
− | | + | |
− | Pull the ''test mode'' button up (on).
| + | |
− | The coil controls should fall at a much lower frequency.
| + | |
− | | + | |
− | === Test Angle control ===
| + | |
− | | + | |
− | Pull the ''test mode'' button up (on).
| + | |
− | | + | |
− | Send hex:
| + | |
− | * 55 02 10 00 AA (<code>prescaler-000x.hex</code>)
| + | |
− | | + | |
− | Press the ''end'' button.
| + | |
− | The motor should stop.
| + | |
− | | + | |
− | Send hex:
| + | |
− | * 55 03 00 08 AA (<code>angle-08.hex</code>)
| + | |
− | * 55 03 00 00 AA (<code>angle-00.hex</code>)
| + | |
− | | + | |
− | The motor will make 8 steps in direction 1-4 and 8 steps in the other direction.
| + | |
− | | + | |
− | === Test hardware orientation ===
| + | |
− | | + | |
− | Send hex:
| + | |
− | * 55 05 00 04 AA (<code>orientation-cw.hex</code>)
| + | |
− | * 55 03 00 00 AA (<code>angle-00.hex</code>)
| + | |
− | * 55 03 00 08 AA (<code>angle-08.hex</code>)
| + | |
− | | + | |
− | The [[Kart/stepper_motor_controller#Stepper_motor|stepper motor]] coils should turn clockwise (1 to 4) after the last command.
| + | |
− | | + | |
− | * 55 05 00 06 AA (<code>orientation-ccw.hex</code>)
| + | |
− | * 55 03 00 00 AA (<code>angle-00.hex</code>)
| + | |
− | * 55 03 00 08 AA (<code>angle-08.hex</code>)
| + | |
− | | + | |
− | The [[Kart/stepper_motor_controller#Stepper_motor|stepper motor]] coils should turn counterclockwise (4 to 1) after the last command.
| + | |
− | | + | |
− | = HDL Student version =
| + | |
− |
| + | |
− | == Student directories ==
| + | |
− | | + | |
− | The source files should be placed in <code>U:\ELN_kart</code>.
| + | |
− | The projects refers to gate libraries found in <code>R:\SYND\Ele_2131\ELN\Labs\Libraries</code>.
| + | |
− | Temporary files are placed in <code>C:\Temp\EDA\<userName>\<designName></code>.
| + | |
− | | + | |
− | == Master data ==
| + | |
− |
| + | |
− | The project is hosted in the Git repository <code>https://gitlab.hevs.ch/course/ElN/eln_kart</code>.
| + | |
− | | + | |
− | == Student data ==
| + | |
− | | + | |
− | The students project is prepared from [https://github.com/hei-synd-2131-eln/eln_kart GitHub].
| + | |
− | | + | |
− | The individual projects can be followed on the [https://classroom.github.com/classrooms/48827851-hei-synd-2131-eln-labs GitHub class assignments].
| + | |
− | | + | |
| | | |
| [[Category:Kart]] | | [[Category:Kart]] |