Kart/setup

From FSI
(Difference between revisions)
Jump to: navigation, search
(Student data)
(HTTP 301)
 
(14 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{private}}
+
#REDIRECT [[Kart]]
{{TOC right}}
+
 
+
= Hardware =
+
 
+
== 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&nbsp;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 refer to gate libraries found in <code>R:\Modules\SI\2131_ELE\ELN\Labs\Libraries</code>.
+
and temporary files are placed in <code>C:\Temp\EDA\<userName>\<designName></code>.
+
+
== Master data ==
+
+
The project is hosted at the svn repository <code>https://repos.hevs.ch/svn/204_Proj1</code>.
+
+
== Student data ==
+
 
+
The main project is stored on the [https://repos.hevs.ch/svn/204_Proj1 204_Proj1 svn repository].
+
 
+
=== Upload to R for studens ===
+
 
+
{{TaskBox|content=
+
Update the local svn repository from the [https://repos.hevs.ch/svn/204_Proj1 204_Proj1 svn repository].
+
}}
+
{{TaskBox|content=
+
Execute the script <code>/Hardware/FPGA/ELN_kart/saveToR.bat</code>.
+
}}
+
 
+
The sciript:
+
* locally
+
** deletes all intermediate files in the project
+
* on <code>R</code>
+
** deletes the existing data in <code>\FPGA\ELN_kart</code>
+
** copies the local projects to <code>\FPGA\ELN_kart</code>
+
** removes the files and folders not intended for students' eyes
+
** modifies the default view to studentVersion
+
** delete all architectures except studentVersion
+
** creates a compressed file
+
 
+
=== Upload to wiki ===
+
 
+
{{TaskBox|content=
+
Upload the file <code>R:\Modules\SI\204_PR1 (Kart)\FPGA\ELN_kart\ELN_kart.zip</code> to this wiki.
+
}}
+
  
 
[[Category:Kart]]
 
[[Category:Kart]]

Latest revision as of 20:38, 17 September 2024

  1. REDIRECT Kart
Personal tools
Namespaces
Variants
Actions
Navigation
Modules / Projects
Browse
Toolbox