ZX1/2 laser readout system

Features

Implemented features (random order):

  • analog readout through ADS
  • digital readout (serial port)
  • led/LCD
  • USB com to PC (115200 8N1)

To be implemented features:

  • Threshold settings in ADS?
  • threshold setting in ZX2
  • threshold processing for ZX1
  • ZX1/2 identification
  • Tune1/2/zero sequencing

Schematic

I/O list

Robot controller connector (ToRobotCtrl):

Pin µC meaning
1 gnd Signal reference
2 DAC_out(P2.2) Dac output from µC to robot controler, scaled down from 5 to 3.3V levels
3 Dig out (P2.6) Digital output from µC to robot controler, scaled down from 5V to 3.3V levels
4 Dig in (P2.5) Digital input from robot controller to µC, somehow protected
5 Analog out ZX output scaled up to reach 3.3V levels (from 4-20mA)
6 Digital out Comparison of previous signal against threshold set with R1, 3.3V levels
7 5V in (optional) Optional 5V input from robot controller
TO CORRECT: R1 should be called P1, ToRobotCtrl should have a Jx name

USB connector:

  • Standard µUSB-B connector, can be used to power the µC and all the 5V islands on the board. Thanks to power supplies monitoring, the board can report main power supplies are off.

Power supplies:

  • Main 15-24V supply, Phoenix connector: will power the ZX sensors and the board itself (5V+12V regulators), resettable fuse protected (500mA)
    pin meaning
    1 gnd
    2 15 to 24V in, 500mA max

Jack power connector: alternative to the main 12-24V connector, mostly useful for development and debugging. Parallel to other connector and protected using the same fuse. Not expected to provide 24V to J6 connector. * Auxiliary 12V connector: will bypass the 12V regulator for direct 12V powering from robot controller, resettable fuse protected (500mA)

pin meaning
1 gnd
2 Not connected
2 12V in, 500mA max
pin meaning
shield gnd
tip (inside +) 15 to 24V in, 500mA max
  • 5V is derived from the +12V power rail
  • USB can also supply the +5V rail as backup supply. In normal conditions, the Schottky diode will prevent this.
  • 12V regulator can provide 350mA, it requires a heatsink
  • 5V regulator is expected to provide 75mA max.

ZX1/2 connector: is DB15 connector used to connect ZX sensors to board:

pin ZX1 ZX2(wire color) µC Meaning
1 gnd(blue) gnd(blue)   main gnd for sensor
2 judgement1(white) low threshold(gray) P0.6 first comparator output
3 tune2(pink) reset/bank1(red) P4.1  
4   error output(yellow) P0.3 only for ZX2
5 laser off(red) laser off (pink) P0.2  
6 analog out+(black) analog out+(black) to ADS111x+/P3.5

this 4-20mA signal is going through 100Ω resistor then is differentially digitized by the ADS111x,

also signal is scaled to 3.6V and wired to µC

7 zero(purple) zero(orange) P5.0  
8 judgement2(green) high threshold(white) P0.7  
9 tune1(orange) timing/bank0(purple) P4.0  
10   pass(green) P3.6 only for ZX2
11 analog out -(black shield) analog out -(black shield) to ADS111X - GND for analog out, substracted by ADS111x and differential amplifier
12-14       NC
15 +12V(brown) +12V(brown)   sensor main supply
ZX must be configured for 4-20mA output

DB9 serial connector for ZX2: used for digital communication to ZX2 sensor. It only features RX and TX with RS232 levels. Serial configuration is 38400bauds, 8N1 protocol.

pin meaning ZX meaning µC
2 TX RX (P3.0)
3 RX TX (P3.1)
5 gnd gnd

µC I/O list

pin port meaning oddities
28 P0.0 SWDIO programmer port
29 P0.1 SWDCK programmer port
30 P0.2 Laser off to ZX  
31 P0.3 Error reading from ZX  
32 P0.4 I²C SCL I²C for ADS111x
33 P0.5 I²C SDA I²C for ADS111x
34 P0.6 judgement 1/low from ZX  
35 P0.7 judgement 2/high from ZX  
48,1-6 P1[0-6] Parallel LCD display  
7 P1.7 LCD backlight PWM is on PWMn output
10 P2.0 RX from computer wired to MCP2221 TX
11 P2.1 TX to computer wired to MCP2221 RX
12 P2.2 DAC output to robot controler Should be able to reach 12b resolution with configurable Vref
13 P2.3 Push button called "up" requires internal pull-up
14 P2.4 Push button called "down" requires internal pull-up
15 P2.5 Digital signal from robot controller (pin4) 3.3V input
16 P2.6 Output to robot controller (pin3) scaled down to 3.3V levels
17 P2.7 Bypass capacitor for ADCs and Vref  
20 P3.0 RX from ZX2 sensor TX ZX/RX crossed on board
21 P3.1 TX to ZX sensor RX "
22 P3.2 5V monitor resistive divider by 11 (R57/58), might be replaced by VDDA/2 input to ADC
23 P3.3 12V monitor resistive divider by 11 (R52/55)
24 P3.4 Vin monitor resistive divider by 11 (R51/54)
25 P3.5 output from diff amplifier (ZX output) is 1.5*100*(4-20mA) V
26 P3.6 Pass from ZX2  
27 P3.7 ADC Alert from ADS111x for better ADS read timing
37 P4.0 Tune1/timing/bank0 to ZX  
38 P4.1 Tune2/reset/bank1 to ZX  
39 P5.0 Zero output to Zx  
40 P5.1 LED1  
41 P5.2 Key ok/LED2 switch in // with LED
42 P5.3 Dip switches for configuration see table below

Dip switches thresholds:

dip2(MSB) dip1(LSB) threshold
0 0 >3V
0 1 >2V&&<2.5V
1 0 >2.5V&&<3V
1 1 <2V
Reading is done through the CSC_ADC that is ratiometric to +5V supply.

ADS111x configuration

Both ADS1114 and ADS1115 can be used in this project as only diff channel 0 is used. ADS1113 and ADS1118 might be compatible (to check)

The 4-20mA (which goes a bit beyond those limits) is fed to a high accuracy 100Ω resistor (R23), followed by antialising filter to prevent spectrum folding at digitization.

ADC itself is configured as such:

  • MUX=000 (AINp=AIN0, AINn=AIN1)
  • PGA=001 (4.096V range). 2.048V range can also be used, but then measurements will be caped to 10.72mm unless scaling is configured in ZX sensor
  • COMP_QUE=11 (comparators disabled, at least for the moment)

ADS111x has address 0b1001000 on the I²C bus.

Design files

Test procedure

Assembly documents/BOM

FW design

Main concept

This FW is based on 3 layers:

  1. HW interface with sensors, especially:
    • Digital readout of ZX2 (serial port)
    • Analog readout of ZX1/ZX2 through ADS111x ADC (I2C readout of ADC)
    • Analog readout of ZX1/ZX2 through µC ADC
    • Analog readout scaled for robot controler
    • Threshold applied to analog signal for robot controler
  2. Processing layer:
    • will handle all threshold, internal conversions and processing of raw data from HW
    • Also, producing output to the robot controller is part if this layer
  3. Communication layer to computer:
    • will handle all data transfers from/to computer, especially:
    • threshold settings
    • error and reliability management/debugging
    • system configuration the generate I/O to computer and robot controller

HW interactions

Detailed description

Protocol

Configurations

The MCP2221A has to be custom configured for proper system identification and also because of one input that is expected to be ADC input that is configured as digital output in factory configuration.

Main changes in configuration are:

  • Self-powered
  • Descriptor: MCP2221 ZXx readout
  • Manufacturer: YGA/IIHE/2022
  • GP3 = ADC3 input (very important, will prevent the analog output from differential amplifier to have correct voltage)
  • ADC VRM=4.096V

Although configuration is done by HID commands that are cross-platform, Microchip provides an utility GUI to configure the MCP2221. Connection from analog readout to GP3 was added to the design as backup access to measurements from the MCP2221's ADC(10b). This measurement can de done independently from the µC running on the board. This is the reason for GP3 configuration as ADC.

MCP2221A configuration:
MCP2221_conf.png

Known bugs and oddities

* Set ALLOWTOPICVIEW = AllAuthUsersGroup

-- YannickAllard - 2022-06-21

Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatrar AltiumProject.rar r1 manage 403833.1 K 2022-06-22 - 15:19 AliKhalilzadeh Altium designer projects
Unknown file formatxlsx ListOfComponents.xlsx r1 manage 13.0 K 2022-06-22 - 15:01 AliKhalilzadeh List_of_the_components
PNGpng MCP2221_conf.png r1 manage 30.5 K 2022-07-04 - 14:35 YannickAllard MCP2221A configuration
PDFpdf PCB_design_file.pdf r1 manage 7605.3 K 2022-06-22 - 14:51 AliKhalilzadeh PCB dedign file
PDFpdf Smart_Test_Results.pdf r1 manage 265.9 K 2022-06-22 - 14:56 AliKhalilzadeh Aisler test results
JPEGjpg io.JPG r1 manage 73.0 K 2022-06-22 - 14:47 AliKhalilzadeh Input/Outputs pins of the microcontroller
JPEGjpg io2.JPG r1 manage 92.5 K 2022-06-22 - 14:47 AliKhalilzadeh Input/Outputs pins of the microcontroller
PDFpdf shematic_pdf.PDF r1 manage 1466.4 K 2022-06-22 - 14:35 AliKhalilzadeh Schematic
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r3 - 2022-07-04 - YannickAllard
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback