|
|
(36 intermediate revisions by 4 users not shown) |
Line 1: |
Line 1: |
− | {{private}}
| + | #REDIRECT [[Kart]] |
− | {{TOC right}}
| + | |
| | | |
− | == Control board ==
| + | [[Category:Kart]] |
− | | + | |
− | 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 04 00 00 AA (<code>orientation-fwd.hex</code>)
| + | |
− | * 55 04 00 01 AA (<code>orientation-back.hex</code>)
| + | |
− | | + | |
− | This should toggle the direction bit.
| + | |
− | | + | |
− | == Stepper motor board ==
| + | |
− | | + | |
− | Insert the steppermotor 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 04 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 coils should turn clockwise (1 to 4) after the last command.
| + | |
− | | + | |
− | * 55 04 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 coils should turn counterclockwise (4 to 1) after the last command.
| + | |