- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a shunt monitor using an A7840 isolating amplifier to monitor the current of a DC load.
I want the Sigma Delta data converter to double as a device that records current and acts as a circuit breaker.
Currently, I have the Sigma Delta putting the current (amps) samples into memory using the DMA. When the numbers exceed a certain value, I want an interrupt to fire triggering a GPIO flag that will light an LED. The interrupt will also remove current from the load.
What is the best way to code this? I could use a comparator but I am using the A7840 which has a small offset that I am using code to calibrate out. Also, its output is differential. For optimum accuracy, I think code is the best way, unless someone has another idea.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the sample rate relatively low use an ISR that looks at each sample
and trigger code based on your breaker condition.
You could also use DMA to place sample in a control reg(s) and use compare logic
to issue a HW breaker.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The control registers are 8 bits. 16 bits is coming from the ADC. How do you merge the two together, pull data from the DMA and connect two control registers to a comparator block?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe I miss something here, but: the values that the ADC delivers to the DMA are not software-corrected. So that means you will have the same offset there as you would have with a comparator.
Why don't you use a comparator, and provide its trigger level via a DAC? That way you can correct the offset it in software too...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
And as a side-note: on the PSoC4 you could use the Sequencing SAR which has a limit-detection feature.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
He is using PSOC 5LP, Seq SAR limited to 12 bits.
Here are some ap notes on A/D (and other) using DMA, AN61102 in particular.
http://www.cypress.com/documentation/application-notes/an52705-psoc-3-and-psoc-5lp-getting-started-d... AN52705 Getting Started with DMA
http://www.cypress.com/documentation/application-notes/an84810-psoc-3-and-psoc-5lp-advanced-dma-topi... AN84810 PSoC® 3 and PSoC 5LP Advanced DMA Topics
http://www.cypress.com/documentation/application-notes/an61102-psoc-3-and-psoc-5lp-adc-data-bufferin... AN61102 PSoC® 3 and PSoC 5LP - ADC Data Buffering Using DMA
http://video.cypress.com/video-library/search/dma/ Videos on DMA
https://www.youtube.com/results?search_query=dma+psoc Videos on DMA (some overlap)
Regards, Dana.