-
Notifications
You must be signed in to change notification settings - Fork 0
devel-hm/laser_controller
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Problem Description
Create a design for a laser control system which drives a laser with a simple sine wave.
This system has the following requirements:
1. a waveform is transmitted through an external DAC
1. The waveform is 1K samples at 1MSPS
2. the start of this waveform should be synchronized to an external hardware trigger
2. A 1MHz ADC acquires data periodically to be used to update the transmitted waveform
1. This acquisition should be synchronized (perhaps with some delay) with the
transmitted waveform
3. Process the ADC data to validate the transmitted waveform
1. calculate amplitude, mean, and frequency of the waveform
2. output boolean signal if the waveform is within spec
4. Calculate and apply new waveforms based on given parameters
1. input will be amplitude and frequency of the waveform,
2. a new waveform should be a sin wave at the specified frequency and amplitude.
5. An asynchronous interface to a controlling microcontroller
1. This exposes the following functionality
1. waveform parameters
1. target amplitude,
2. target frequency
3. acceptable deviation tolerance
2. Initial / default waveform
1. amplitude,
2. frequency
3. acceptable deviation tolerance
3. start & stop commands
Design
======
1) Applicaiton will initialize control broadcast channel(tokio channel), reciever of this channel will be with both DAC and ADC interface
2) Application will initialize DAC config data channel to initialize with default DAC sample array
3) Application will support trigger over control channel and also start/stop, amplitude and frequency change over control channel
4) Application will create DAC data channel that drives laser and provides input to ADC, this will be broadcast channel as well.
Status
=====
- [ ] DAC interface is working
- [ ] ADC interface is working, but not tested fully
- [ ] DAC and ADC interface have cargo test support but not yet fully integrated.
- [ ] run cargo test to verify all tests pass.
- [ ] not tested configuring default sample array for DAC.
Missing Features
================
- [] deviation tolerance support
- [] both sampling loop are not adaptive to MSPS and also need better partitioning of recv channel data and tick. Tokio ticks are not accurate but simulated for actual hardware implementation this should be improved.
- [] integration test application should work, i expect issues with ADC as i am not sure how to accurately imlement it. In my experience i have interfaced ADC device where i read value of it and add quantization error correction to it, but not sure
how quantization should be applied, few wiki pages and google does show zero crossing based approach but i am not implementing in the interest of time.
- [] i have not implemented any error handling for the application.
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published