Products > Embedded Computing

Fast hardware interface for adc & dac on a raspi

(1/6) > >>

Amper:
Hi,
im still working on building a scanning controller for my SEM, the first prototype works for a few months now but im at the limit of what a small ATmega can do.

The scan controller is there to output two Voltages for controlling the X and Y position of the electron beam like in any old Oscilloscope. The Voltages are scanned like a TV signal and the Detector usually produces an analog Voltage that has to be read back for each pixel measured.

The Microscope can handle speeds up to normal Video signal at 30 fps with decent resolution but for a high quality image (>1000x1000px) there is several seconds available because of the electron physics involved so the task is not all that crazy.

Now my controller does all this using only one atmega328 and two OPs but this limits me on one hand by the adc speed, the dac resolution and most importantly the transmission speed via the serial interface to my computer that handles the actual image generation and further processing in python.

Something id really like ist just to skip the entire slave controller thing and put DAC and ADC on the raspis gpio but this will not work because everything is timing critical (im open to suggestions though if i messed out on something). So id like to connect an external relatively dumb microcontroler to the raspi, taking the "drive to xy and take a measurement" outside and just returning the pixel value. Either by actually transmitting the coordinates every time or for fast mode sending some short signal to just increment the position after setting the image size before starting the scan.
This will also be limited by the interface between the controller and the raspi. What paths could i choose here? SPI is the best choice i can think of right now.

To give some more specific numbers of what i imagine:
DAC: 2x 14-16 bit
ADC: 1x 14-16 Bit
Slow scan: at least 1500x1500px in 2-5s
Fast scan: 500x500px in 1s
XY Mode: Controlling the beam freely without having to scan by a specific pattern (for lithography)
Data will always end up on a linux machine to be used in python, the closer to that it is generated the better.

An example of what the atmel talking via uart does in 5min so faar:


mawyatt:
First off....Wow your own SEM...congratulations :-+

How do you coat the subjects? Nice images BTW, please identify.

SPI from the RPi can be configured for various speeds, maybe SPI could be fast enough to directly control the DAC and ADC?

Best,

Amper:
Hi & thanks :)

Yes, it can be used to control the adc and dac directly but timing is an issue, especially unpredictable timing like when the cpu does stuff randomly. Since image quality is the optimization goal and the analog part will behave differently with different timings i dont really want to risk it. One path may be first setting the coordinates, waiting for the dacs and then  taking a measurement but the waiting to be on the safe side will throw speed out of the window that i think i will need.

The images are a wasps jaws, a dental implant and the surface of the implant in closeup.

mawyatt:
Wonder if you could use the RPi pigpio hardware output along with the CS to "trigger" the ADC which should produce a stable period. We've experienced the RPi variation in I/O due to internal RPi operations and used the hardware pigpio as an alternative pulse output, we found it stable and accurate in period. So thinking if you used this pigpio to trigger the ADC, results should be a stable sampling period.

BTW how to you coat the subjects, thought subjects need to be "conductive" for SEM?

Best,

Amper:
Mhm, like triggering with a fixed delay after the CS of the second DAC has come back from setting new values and then reading the adcs gesults whenever the pi is ready for it? Does the pi have some sort of hardware interrupt on the gpio?
I mean, its not only the period that has to be stable, its also (actually more importantly) the timing between setting new values and measuring.

Ah sry, i overlooked your conductivity question at first.
i dont :D
i had a borrowed sputter coater for a while but i had to give it back after several months. I tried building my own but actually making one is much harder than the internet suggests, there is a ton of parameters taht need to be figured out mostly by trial and error, like pressures, geometries, materials, current, voltage, power supply impedance and output capacitance, gas and so on. You can just get lucky and nail it if you get the geometry right but well, i didnt. Also gold sputters much better than lets say copper but a >50mm diameter gold plate is an investment i dont want to make before knowing it will work :D

So right now im stuck with conductive samples but its surprising how many things do conduct at 30kV and just a few nA current.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version