AKENC

From DIDEAS Wiki
Jump to: navigation, search

PF Users Navigation:

Edit

experimental results

  • testing #02 (wAM8192b) in #8 - exhibits very low noise, but see odd glitch in hardstop and calculated angle isn't correct

jul 11

  • +-1600 rpm - results in 50 count spread of 13 bit encoder and ~150 counts of motor encoder.
  • +-120 rpm : 3 to 4 count spread (r=0.3)
  • +-250 rpm : 10 count spread (r=0.6)
  • +-425 rpm : 20 count spread (r=0.9)
  • +-575 rpm : 25 count spread (r=1.2)
  • +-910 rpm : 30 count spread (r=1.8)
  • +-1140 rpm : 40 count spread (r=2.2)

datasheets


magnet alignment

  • Place magnet on steel plate - with curved edge on the plate.
  • Allow magnet to roll and find a stable point.
  • Draw a vertical line on the flat surface of the magnet.
    • This line separates the N and S poles.
  • The AKENC firmware is programmed to wrap every 90 degrees. The wrap orientation is the line that connects the corners of the AM8192 chip.
  • Thus as the line drawn onto the magnet surface crosses the chip diagonal, the sensor output will wrap (to be avoided).
  • Thus the center of the range of motion should be parallel to an edge of the chip.

magnet sources

AKENC Series

revisions

  • akenc2b : not yet tested
  • akenc3 : installed in H2
  • akenc3d : not yet tested
  • akenc3m : used for firmware development
  • akenc4a : not yet tested
  • akenb4m : used for firmware development

performance

ADC filter

filter_divisor  std(theta_deg)  std(vel_deg_per_sec)
0  0.1796   30.2963
1  0.1222   21.1447
2  0.0811   13.9105
3  0.0497    8.6148
4  0.0306    5.2020   278 hz
5  0.0193    3.0896    
6  0.0143    2.1606

Communications with MC

  • The MC clocks SSI data in the 10khz ISR. With every 10th ISR, the SSI data is bit banged out.

old

  • The MC clocks data from the AKENC using (a) SSI protocol. The V1 packet length is 40 bits, with position_i16, velocity_i16, and crc_8
  • Many issues arise from the requirement that communication be slow enough that the Pic24 can process it, while also not wasting MC CPU time. The primarly problem results from main loop not looping for intervals of >300uS when processing a message from the SC. SSI uses timeout to find message boundaries, and our message rate is 1khz, with a SSI clock at ~10uS.
  • At present the MC uses polling in its main loop to process messages. Calls to an SSI master statemachine then clock out the data. The SSI statemachine is triggered by a call from the tk_mot 10khz ISR.

ISP / Dataport

  • The 9 pin ISP header is like that of the robot and can connect to a PSER for programming and receiving data.

The dataport uses that standard V2 packet, however the baudrate is non-standard (1Mbaud) and it uses little endian (-L option on wifi_fast).

  • It can NOT connected to a (standard) SWIFI due to its baudrate.
  • The following can be used to receive telemetry from it:

wifi_fast.py -p <SERIAL PORT> -b1000000 -V akenc -L -f xx

VLIST

The following vlist can be use for akenc.vlist:

float ssi_f
float adc1
float adc2
float theta
float theta_i16
float ssi_theta

In the main program "ap_main" is a data structure that is sent over dataport :

typedef struct PACKED {
  float32 ssi;
  float32 i1;
  float32 i2;
  float32 fval1;
  float32 fval2;
  float32 fval3;
} USER_DATAPORT_OBJ_T;

Known issues

firmware

hardware

Media:Example.ogg


akenc3e

program 3e

requirements 3e

  • will output a 16 bit number that represents a 90 degree rotation of a diametrically polarized 4x4mm cylindrical magnet
  • with recommended magnet at 0.5mm, reading 13 MSBs, will have +-1 count of noise. (this is 14 bit per rotation noise free.)
  • red LED
  • blue LED

testing 3e

  • connect to bench fixture
  • apply static magnetic field
  • run AKENC test program, and verify that it has passed
  • verify LEDs are in the correct states

akenc5a

requirements 5a

  • will output a 16 bit number that represents a 90 degree rotation of a diametrically polarized 4x4mm cylindrical magnet

testings 5a

  • connect to bench fixture
  • apply magnetic field
  • run AKENC test program, and verify that it has passed