- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I am trying to wrap my head around a potential smartio use:
Goal: Deterministic cycling between three GPIO signals that control isolated FETs to toggle between three voltage levels on *one* output pin. To avoid shorts, only one signal may be high, and a dead time between switching would be helpful. In the end I'd like to have a function that enables the smartio voltage cycling like cycle_voltage(count,ontime,deadtime);
Signal pins: SIG_GND, SIG_MID, SIG_HIGH -> controlling the external 0V, 75V, 135V switching in my application:
SIG_HIGH=1 ________ 135V
| |
SIG_LOW=1 _______| | ______... 75V
| | |
SIG_GND=1 ____| |______ | 0V
Desired toggle behavior: 100-500uS signal high, then 0-1uS dead time, then signal high for next SIG_ pin.
Questions:
- I want to 1) cycle and 2) control signal high time for each signal and dead time from firmware. How do I think of this problem in terms of Chip inputs, clocks and perhaps chained LUTs?
- Can I link the SAR ADC's EOS trigger to start the smartio cycling?
- Alternatively, would it be possible in smartio to start the ADC on the first voltage cycling and snapshot scan every X cycles?
Thanks!
Solved! Go to Solution.
- Labels:
-
PSoC 6 MCU
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To have repeatable deterministic timing one can use DMA writing to the port from cyclical RAM buffer. It is quite deterministic if there are no other concurrent DMA.
PS. Looks like an ion mobility sensor..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I am not quite sure about the requirement with Smart IO here. How do you want the LUT to be configured ?
Regarding the second and third question, ADC trigger input can be an be driven by an LUT output if you see the configuration. This way it can be used to trigger a conversion.
Best Regards,
Vasanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the input.
I'd like to implement the switching logic without CPU intervention, to avoid jitter. This is important because it would change timings in our sensor.
I basically want a logic table that quickly switches 3 output pins given two inputs: The clock and the input state. Clock would be 2-4 kHz, which is the required switching frequency for the ion shutter.
I am not sure whether smartio is helpful here. What would you use to be as close to deterministic switching as possible? With software GPIO switching we see ~0.5 - 1 uS delay between switching one pin high and one pin low depending on the microcontroller. What is the best way to quickly switch a pattern of pins in your eyes?
Thanks,
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To have repeatable deterministic timing one can use DMA writing to the port from cyclical RAM buffer. It is quite deterministic if there are no other concurrent DMA.
PS. Looks like an ion mobility sensor..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I will explore that route.
Great guess! It’s a GC-IMS. We’re trying to integrate as many functions as possible into the psoc. We want to avoid an FPGA solution. Feature set is controlling heating, solenoid switching, ion shutter operation, elution and drift time measurement and of course the ADC. Then we use a in-browser interface to manage the data and unify the GC and IMS timing dimensions. We want to use it for food audits.
If you don’t mind asking, do you have experience in writing sensor firmware? We are looking for freelancers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dirk,
I built a GC-IMS some 20 years ago. It didn't make me rich. As one of the potential applications was also meat quality control. There is nothing new under the sun...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wise words 🙂