Emg 2009

From DIDEAS Wiki
Revision as of 17:34, 30 September 2010 by Ceb (talk | contribs) (PIC32 connections)
Jump to: navigation, search

Edit

PIC32 connections

  • The Pic32 (v1) contains 5 total serial ports (of which 1 is SPI and 4 are UART).
    • The SPI port (PX1) and ISP port (PISP1) share serial signals; thus only one may be used.
  • The programming port is PISP1, is located on the bottom side, is 9 pin 1mm header, and is colored purple, black, red
    • For the EMG firmware this port no longer contains STDIO,
    • Connect to the Microchip programmer via a PSER
    • A special cable is used to interface the PSER programmer to the ISP port. Specifically the Tx signal must be cut.
  • STDIO is routed to PSW1 (EMG firmware ).
    • Use a serial port program with "4x" baudrate (460,800). "do_serial.py <port number>" works well.
  • SWIFI / dataport telemetry is routed to PSW2 (EMG firmware )
    • Connect a Pser or SWIFI (MC port)
    • wifi_fast.py -p <port number> -V p32_emg -f xx
  • In the future robots / motor controllers may be connected the connectors PMC(1/2) and PSC(1/2). This allows the Pic32 to receive data from the controller, and to send the motor commands.

PIC32 firmware

  • source code location [1]
  • Use the project p32_emg.mcp


issues

  • ISP UART and SPI are shared. Need to move ISP UART to different port.
  • this sharing also means that the MISO pin can be also driven by the ISP UART Tx signal. This appears to over drive the MISO signal - meaning that it is lost.


reading samples

The 24 bit ADC sequentially samples the n (upto 8) channels at upto ~20khz. When the conversion is complete, it is read via SPI and placed into a queue.

Samples can be read with:

ADS1258_DATA_T *ptr = ads1258_dequeue();
if (ptr) printf("%2.2x %2.2x %8.8x\n", ptr->status, ptr->channel, ptr->data);

filtering

The analog filter is a single pole LPF @ 800 hz, thus additional filtering may be required.

serial numbers

  • 1 : hand build by CEB 100mA @ 15V
    • offset ~-200
    • Vcc 3.542e6
    • temp 1.046e6
    • gain 7.8589e6
    • ref 9.865e5
  • 2 : Ltronics 9-25-2010 50mA @ 15V
    • offset ~-1700
    • temp 1.032e6
    • gain 7.8672e6
    • ref 9.804e5


  • 3 : Ltronics 9-25-2010
    • Doesn't work. Verified has clock.
    • found 3 open pins on ADS1258. Fixed.

dsPIC firmware

dsPIC firmware development:

  • Use the workspace:

https://svn.media.mit.edu/r/biomech/trunk/prostheticsteam/code/cbarn/trunk/dspic_shared/hal_dev/hal_dev.mcw

  • and select the project:

https://svn.media.mit.edu/r/biomech/trunk/prostheticsteam/code/cbarn/trunk/dspic_shared/hal_dev/test_ads1258.mcp

spiemg1 SCH/PCB

  • 8 channel PRE-AMP style EMG amplifier with SPI interface
  • SCH [2]
  • SCH for 3.3V switcher : [3]
  • SCH for 5.4V switcher : [4]

assembly instructions

  • Start by assembling the 3.3V switching regulator and then testing it by verifying 3.3V at TP7. This module has reference designator in the 80s and physical reside in a tight location of the top side of the PCB.
  • To power the 3.3V switcher you'll need to apply ~5V to V.PROT from a ~100mA current limited supply. A successful test is the output of 3.3V, with nothing getting hot. To apply power, you may wish to install P1, F1, and D1 and use one of my power pole to 1.25mm adapters.
  • Next assemble the 5.4V switcher (refdes 90s) and test with ~7V. Verify ~5.4V at TP6.
  • Assemble the -5V switcher (UN1 and support components) and test with ~7V. Verify ~-5V at TP10
  • Assemble the +- 2.5V linear regulators (UA1, UA2, and support). Verify +-2.5V at TP8 and TP12.
  • Assemble the ADC voltage reference (UR1, UR2 and support). For UR2 use REF3312 in the kit. Verify at TP18 that you see -1.3V WRT to GND, or 1.2V WRT to the -2.5V.
  • At this point, it should be safe to assemble the primary IC US1 and the remainder of the PCB.


paconn1 SCH/PCB

  • 8 channel PRE-AMP connector PCA
  • SCH [9]
  • PCB TOP SIDE [10]
  • PCB BOT SIDE [11]
  • BOM [12]
  • BOM text [13]

known issues

  • silk screen for PACONN1 doesnt show connector orientation
  • V.FUSED net isn't driven on EMG
  • Pin 1 of the 2x10 connectors is on the right side.

previous

EMG09

future

  • Passive electrode amp: AD8228 PDF
  • Linear Tech LTC2053 : PDF
  • TI ADS1298 for bio amps : PDF