|
|
(45 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>.
| + | |
− | | + | |
− | 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 ration 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.
| + | |