- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm having problems with IDAC output in the attached project. Output should be a sine wave generated from a 32-point sine wave table in memory, but I'm getting some weird glitches on an external resistor connected to IDAC output. Take a look at the picture I included to see that glitches. In that picture output wasn't connected to an opamp. In my other projects where IDAC and DMA are configured exactly the same way as they are configured here I get a fine-looking sine wave. I tried using different pins and changing IDAC's current range, but it makes no difference. I'm using CY8CKIT-048 PSoC Analog Coprocessor Pioneer Kit. Do you have any ideas on how to fix that?
This project and photos of these glitches are attached below.
Thanks,
Tomislav
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If this is really caused by RF interference, additional steps can be taken for shielding: try to assign extra pins to the left and right of the IDAC output to the GND, so they will serve as a protection shield, do the same for 2MHz PWM clock pins.
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks like a crosstalk between output pins. There is 32 spikes per period - exactly the number of points per wave. So the DMA clock somehow mixes in to the output. I would try to relocate pins, also try adding output buffer. Can not open your project, it requires Analog kit files installed (+100MB?).
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried reloacting pins to all available pins I can set IDAC output to, but same issue appears on every one of them, sometimes even worse. Adding output buffer only makes this problem worse.
But thanks for your effort, I appreciate it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You mentioned that in your other projects the output was fine. Was it on same board? Can you run old projects on that board without issues?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, other projects seem to work fine. They were all made for and ran on the same board and sine wave looks good on other projects so I don't think that's an issue.
I attached screenshots of designs of the projects in which IDAC is used to output a sine wave.
These projects are basically the same, it's just that the project in which sine wave is glitchy (in cnt_1.png) has PWMs and a Timer running, while the other (cnt_2.png) has a Timer and that output looks fine. However, the project in which sine wave looks fine has some other problems and that's why I would like to fix the other one. Both use DMA so I don't believe that is the problem, but I could be wrong.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tomislav,
Schematic looks like a FSK modulator. The major difference I see is that 'cnt_1' project has hi-frequency PWM (~2MHz) is routed outside of the chip, making a good antenna. Does PSoC Analog Coprocessor have a standard digital Mux to switch between PWM_1 and PWM_2 (instead using SMART I/O), so that digital signal between PWMs and Timer would stay inside PSoC?
Try to modify schematic either with MUX or combine gates as shown below.
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it's an FSK modulator.
This PSoC doesn't have any digital multiplexers or logic gates implemented. They can be found under hidden components, but they cause errors while building because they need resources which are not available on this board. Only way to implement logic functions is with SmartIO component as far as I know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe that only options are either use isr-based approach (sig_2) or to fight RF noise produced by PWMs. Use short wires, make shortest loops possible, add small capacitor in parralel with resistor at the IDAC output (~0.01u).
Another option is to use PSoC5 or PSoC4 boards, which has no such issues. Is it too late to buy KIT-059?
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am doing this as a project for my university so I can't change the board I am working on.
I already tried adding a capacitor in parallel with resistor, but it didn't help much, if at all, only thing left is to try to use shortest possible ways to connect the pins as you said, and next week I'll see if that changes anything.
Thanks,
Tomislav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If this is really caused by RF interference, additional steps can be taken for shielding: try to assign extra pins to the left and right of the IDAC output to the GND, so they will serve as a protection shield, do the same for 2MHz PWM clock pins.
/odissey1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Check if you have those glitches at the power pins.
How are you physically measuring? Try with the GND clip instead of the GND lead. My article here is not in English
Tirar a medida como deve ser | Tróniquices
but you can look at the 2 scopeshots of the triangular wave. The wave is being generated using both IDACs of a PSoC4; all the periodic glitches you see on the 1st scopeshot are measurement artifacts, due to using the scope probe's GND lead. When using the GND clip, all of those glitches go away, as can be seen in the 2nd scopeshot. Curiously, the artifacts only start appearing after I connect a serial terminal on the PC to the kit, but nevertheless with the GND clip they are never seen, so it's a measurement problem for sure.