Sempre in laboratorio ho trovato abbandonato questo strumento che mi e' stato detto essere uno spettroradiometro UV-VIS-NIR a cui anni prima era stato rubato il pc con il software
Una ricerca su internet non ha dato frutti (ovviamente niente manuali cartacei disponibili) e la ditta costruttrice ha detto che non fornisce assistenza su strumenti cosi' vecchi. Mi e' stato detto che e' stato riposto funzionante
Dentro c'erano due cavi, un DB9 ed un DB25 ..indicativamente un cavo parallelo ed uno seriale...il problema e' che connessi al PC il seriale si presenta come un interfaccia FTDI mentre il parallelo si presenta con Cypress Semiconductor
Indagando
(base) luca@HW27747:~$ lsusb -v -d 04b4:8613
Bus 001 Device 003: ID 04b4:8613 Cypress Semiconductor Corp. CY7C68013 EZ-USB FX2 USB 2.0 Development Kit
Negotiated speed: High Speed (480Mbps)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
idVendor 0x04b4 Cypress Semiconductor Corp.
idProduct 0x8613 CY7C68013 EZ-USB FX2 USB 2.0 Development Kit
bcdDevice 0.04
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x00ab
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 1
bNumEndpoints 6
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 2
bNumEndpoints 6
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 3
bNumEndpoints 6
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 255 Vendor Specific Subclass
bInterfaceProtocol 255 Vendor Specific Protocol
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 1
Transfer Type Isochronous
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 255 Vendor Specific Class
bDeviceSubClass 255 Vendor Specific Subclass
bDeviceProtocol 255 Vendor Specific Protocol
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Non si tratta di un cavo parallelo ma di una porta EPP (Enhanced parallel port) -> USB
Curiosamente collegando il cavo EPP si accende anche il led dell'alimentazione indipendentemente dal fatto che il trasformatore 12 V sia collegato o no
In pratica le porte EPP dentro al connettore hanno un chip con un firmware. Non hanno una flash memory per cui ogni volta per poterla utilizzare bisogna iniettare il firmware...iniziano i problemi
A questo punto ho provato ad aprire il dispositivo in cerca di indizi
Internamente si trova una scheda millefori con alcuni componenti discreti...molto probabilmente saldata a mano e relativa allo stadio di alimentazione, una scatola nera in cui entra la fibra ottica e quindi dovrebbe essere lo spettrometro ed una scheda collegata con una flat ed al db25 in cui ci sono alcuni integrati relativi a pilotare due canali paralleli. Nessuna scritta, nessun codice
Sul connettore DB 25 c'e' la scritta Stellarnet che guarda caso e' una ditta americana che produce prodotti di spettroscopia...l'idea e' che sia un prodotto della Stellarnet ribrandizzato dalla ditta italiana di Pisa
Contattata la ditta Stellarnet ha confermato che e' un suo prodotto denominato EPP200 rimosso da una scatola Black-Comet (in origine sulla scatola doveva esserci il numero seriale ed i parametri di calibrazione del sensore). Mi hanno anche fornito la possibilita' di scaricare il software Legacy (e' un po' fuorviante perche' ci sono due driver..uno per il software SpectraWiz ed uno per pilotare lo strumento tramite Python)..il software e' disponibile dalla ditta dietro firma di un agreement sulla non distribuzione
Ho trovato utile anche il progetto https://github.com/shugaa/estrella (vecchio di 18 anni!!!) che con qualche modifica tramite AI e' risultato compilabile ed utilizzabile su Linux (versione modificata)
Il problema principale e' che sono riuscito una sola volta ad accendere il led Light In ed in modo fortuito senza riuscire a ripetere le stesse condizioni...in pratica l'elettronica e' attiva ed arrivo a leggere il sensore ma vedo solo la dark current e non leggo la luce che proviene dalla fibra ottica
La cosa interessante e' che alcuni pixel dell'array sono in una zona che non e' raggiunta dalla luce deviata dal reticolo e quindi sono sempre in condizione di buio..in questo modo possono essere usati per effettuare una correzione della dark current in deriva termica. Si vede nel grafico dello spettro precedente che c'e' un salto tra 125 DN e 255 DN...quelli a 125 DN sono i pixel schermati. La rampa discendente da 350 a 430 nm e' un effetto dei sensori a trasferimento di carica. I picchi verso l'alto corrispondono ad "hot pixels" ovvero pixel dell'array piu' sensibili
Il dispositivo non ha uno shutter meccanico. Notizia da verificare indica la presenza di un CCD Sony ILX511
Alla fine mi sono arreso quando mi sono reso conto che il trasformatore che e' stato dato e' un 12V/1A mentre il dispositivo richiede 12V/1.5V
Anche se avessi preso il controllo dello strumento poi ci sarebbe stato il problema di trovare i coefficienti di calibrazione
Una prima calibrazione e' quella per la centratura delle bande in lunghezza d'onda per i coefficienti del polinomio di dispersione ...si prende una lampada con picchi di emissione nota come Hg-Ar e si plottano sulle x il numero di pixel (EPP2000 ha 2047 bande) mentre sulle y le lunghezze d'onda reali dei picchi di emissione
si calcola quindi la curva di regressione dove C1 e' il termine lineare (tra 0.4 e 0.8 nm/pixel), C2 e' il termine quadratico (tra 10-4 e 10-5 nm/pixel), C3 e' l'intercetta...C4 e' considerabile trascurabile
Sul mio spettrometro la corrente di dark nelle mie prove e' intorno a 120 unita'. Attenzione che la dark current ha due componenti, una fissa dovuta all'elettronica ed una variabile rispetto alla durata del tempo di integrazione per deriva termica. Quindi la misura della dark current deve cambiare quando si cambia il tempo di integrazione
Per avere la calibrazione spettrometrica dopo si deve prendere una lampada alogena calibrata e regolare il tempo di integrazione al 75-80% della dinamica del sensore (margine entro cui il CCD risponde ancora in maniera lineare). Deve essere quindi effettuata una calibrazione banda per banda
S = conteggi grezziD = conteggi dark
K = fattore di trasferimento radiometrice
t_int = tempo integrazione





