I started to make my own electronics for Faxitron MX-20 Machine. I only get electronics, X-Ray generator and X-Ray sensor, so I have to put something inside my won box.
I don't have software of any kind, so i have to write my own. First step was to make USB Hub, one channel wil go to sensor, second channel to FT2232H Controller as UART ( and second IC channels goes to stepper drivers for
CBCT turning table)
After that, i had to write my own software for Hamamatsu 12x12 X-Ray sensor. That was quite a difficult task, but i was able to make it happen. I was able to do that in Visual Basic, it uses generic Hamamatsu DCAM-API DLL inside system32 (when you install drivers)
/?action=dlattach;attach=386374;image)
Operation is simple. Connect USB to HUB, it detects if FT2232H and C9732DK-11, after that, you wait for 60s warmup ( x ray tube or something, timer is inside x ray controller ) And you just set time and kV, and press take a picture. It automatically sends command to enable x ray source, you should (2.5s is ramp-up to 35kV, only at this point x ray is stable based on sense output on x ray tube)
put into remote mode: (do this first !!!!)
Dim mx20(5) As Byte '
mx20(0) = &H21
mx20(1) = &H4D
mx20(2) = &H52
mx20(3) = &HD
PORT.Write(mx20, 0, 4)
This is how you set exp time and voltage:
mx20(0) = &H21
mx20(1) = &H54
mx20(2) = &H30 + Fix(NumericUpDown1.Value / 100)' time 0.1 to 999.9
mx20(3) = &H30 + Fix(NumericUpDown1.Value / 10) Mod 10
mx20(4) = &H30 + Fix(NumericUpDown1.Value) Mod 10
mx20(5) = &H30 + ((NumericUpDown1.Value * 10) Mod 10)
mx20(6) = &HD
UART_Status = FT_Write_Bytes(UART_Handle, mx20(0), 7, BW)
Sleep(100)
mx20(0) = &H21
mx20(1) = &H56
mx20(2) = &H30 + Fix(NumericUpDown2.Value / 10) ' Voltage 10-35
mx20(3) = &H30 + NumericUpDown2.Value Mod 10
mx20(4) = &HD '
Enabling X-Ray source via UART message is also easy, just few special characters: '0x21+0x42+0x0D and after short delay 0x43
mx20(0) = &H21
mx20(1) = &H42
mx20(2) = &HD
UART_Status = FT_Write_Bytes(UART_Handle, mx20(0), 3, BW)
Sleep(50) ' 50ms Delay
mx20(0) = &H43
UART_Status = FT_Write_Bytes(UART_Handle, mx20(0), 1, BW)
It was so bad design to put 500W power supply, it even needs load to work. That is madness. All you need is isolated 24V 1A for x ray ( it is uses all interlocks, and is enabled by relay on J7 connector )
12V 1.3A (main electronics)
-12V 0.05A (opamps +RS232 ?)
5V 0.5A (MCU electronics)
5V 5A (Hamamatsu sensor)
Now, controller electronics looks old, and very complicated. Since i will be using computer, it would be better just connect x ray head to my own electronics, so i spend all tay figuring out controller connector to x ray source.
It is IDC20, and it has control, sense and other signals prescient, just have to figure out what is what.
IDC20 pins 1,2,3,4,12,13 are connected to opamp outputs inside x-ray head electronics. I only understand that 12pin is kV sense output to MCU board (1v=10kV), and 3pin is I sense, or it looks like this, with transfer function of:
10kV-> 0.208mA -> 0.61V
15kV-> 0.201mA -> 0.90V
20kV-> 0.192mA -> 1.19V
25kV-> 0.183mA -> 1.46V
30kV-> 0.175mA -> 1.76V
10kV-> 0.165mA -> 2.05V
IDC20 10PIN is also strange, MCU is supplying voltage, with a transfer function of ( every time, not only when x-ray is on)
10kV = 1.330V
20kV = 2.333V
30kV = 3.116V
35kV = 3.548V
Update: It has something to do with focusing. disconnecting yield blurry images. Maybe could be tuned separately for better picture, so must keep on DAC.
For output that change state when x ray is on, i have few of them:
PIN5 is connected to MCU via 330R resistor ( mcu supplying 5V when enabling x ray )
PIN7 is connected to MCU via 2k2 resistor ( mcu supplying 5V when enabling x ray , another 12V relay for 24V that is main power for HV supply)
PIN9 is connected to DAC that supplying setpoint voltage from 1V (10kV) to 3.5V (35kV ) again, only when x-ray is on.
PIN11 is connected to DAC, it is supplying 2.7V only when x-ray is on (no mater on set voltage or time)
PIN10 looks like getting 10V from x-ray head, it is connected to potentiometer top input on high voltage power supply. still need to figure out why.
PIN15 and PIN17 is unconnected ( hooray:) )
PIN 14, PIN18, PIN19, and PIN20 are ground
Now I have to try to make my own driver on simple PCB, and we will see how it works. This will enable to buy MX-20 systems on ebay, and just ask to send sensor and x ray source, and i will be able to control everything

This post is mainly to remind myself, what i did so i don't loose it