1 2 3 Previous Next 42 Replies Latest reply on Nov 2, 2012 3:23 AM by sachin.taneja

    develop oscillioscope and signal generator using psoc3 kit

    sachin.taneja

      hello  to everyone i want to develop oscillioscope and signal generator using psoc3 kit and want to display on my laptop using any program. i have very basic knowledge about psoc.Request to all forum member please help me to design this project

        • 1. Re: develop oscillioscope and signal generator using psoc3 kit
          sachin.taneja

          i have only basic idea about the adc and the dac converter to convert input signal into digital and display it on computer via program or dump into file and plot it using matlab

             

           

             

          tell me how can i generate various analog waves in the psoc and route it to analog pins to use it as a signal generator for testing purpose.

             

          please help me out to develop this idea into a working project

          • 2. Re: develop oscillioscope and signal generator using psoc3 kit
            philip.nielsen

            Scope Part

               

             

               

            The PSOC-030 has a 20 Bit ADC. You can purchase 24 bit ADC if you need more accuracy. I would start with the onboard 20 bit ADC. After you configure the 20 bit ADC! Then comes the fun part. You need to creat a time base versus voltage. You have many forms of communication on board the Cypress Psoc 3-030. There is SPI, I2C, RS232, RS485 and USB. I dont know how you are going to display the information? Ther are beatiful LCD displays on the market. Cypress even provides the library for graphic LCD displays. You need to provide your requirements in more detail. How fast do you want to capture data. Does it exceed the Cypress master clock? My suggestion would be to sit back and look at the whole picturee before you start. Cypress has made the coding very user friendly. But first creat your project in detail before you start coding.

               

            Signal generators are easy to creat. I wouls suggest an external keyboard. Say a 4 by 4 matrix. Set your clock at some time base and read in your matrix number one at a time. Set up a parameter to read each number. Also set a rul base for youe case statement. Ex: F,100,2 This would be read by the Psoc as Frequency case followed by actual frequency then voltage amplitude. 

            • 3. Re: develop oscillioscope and signal generator using psoc3 kit
              user_1377889

              Well, 20 bits are good, 24 bits are even better.... Truly???

                 

              Having an accuracy of about 2 percent would only require 8 bits of precision for the ADC when estimating the overall errors. Wouldn't that be enough for an oscilloscope? You may send the sampled data to a USBUART to connect to your laptop and have the signals displayed there.

                 

              I would start with a logic-analizer and not with a scope. The reasons are obvious, you can digitize 8 channels in parallel and code all logic states in a single byte. Triggering your analizer is relatively easy.

                 

              When you are through with that, PSoC side and Windows side, you have got a functional framework which you can use to implement some analog capabilities as analog triggering and at last analog measuring.

                 

              This is not a 3-days-at-weekend project, you'll have to put some thoughts in. What language (what compiler) are you choosing for the windows-side?

                 

              But when you start with logic-analizer and while programming everything keeping in mind that you are going to implement analog signals as well you will choose your data-structure more flexible.

                 

              We are here in PSoC3 forum, but the "Need for Speed" makes me thinking if it wouldn't be better to choose a PSoC5 especially because of the much larger amount of sram that comes with that chip and having a couple of KB to buffer some values makes (your) life easier.

                 

              Start small, think big, code flexible and the world is yours!

                 

              Bob 

              1 of 1 people found this helpful
              • 4. Re: develop oscillioscope and signal generator using psoc3 kit
                user_78878863

                Funny - I did both parts in the past :)

                   

                Let me start with the oscilloscope part: the PSoC3 itself is fast enough, but the ADC is way too slow for a useful oscilloscope. You really want to have the fast SAR ADCs of the PSoC5. Read about ADC and DMA, look at the demo projects provided by Cypress - they give you all the needed building blocks.

                   

                You may want to look at http://www.cypress.com/?id=3312&conID=235 - this was my contest entry which implemented an oscilloscope (together with a logic analyzer).

                   

                For the PC side of things, you may want to reuse what already exists. The OLS client under http://www.lxtreme.nl/ols or the SigRok project are good starting places. (I for myself used the OLS client)

                1 of 1 people found this helpful
                • 5. Re: develop oscillioscope and signal generator using psoc3 kit
                  user_78878863

                  Now for the signal generator part. Read about the DAC and DMA. Look for the WaveDAC8 component - it basically gives you the basic building blocks you need. Then read about DDS and NCOs, if you want to refine your solution further.

                     

                  You may want to look at http://www.cypress.com/?rID=50106&cache=0 - there you find a basic project which may do what you need. If have it in a further advanced state (esp. better frequency resolution), but it is not in a state to publish it right now.

                  • 6. Re: develop oscillioscope and signal generator using psoc3 kit
                    user_14586677

                    Some thoughts -

                       

                     

                       

                    1) What is your target BW for the scope, eg. what Nyquist rate are you going to need ?

                       

                    Most likely you will need SAR, PSOC5, to get anything meaningful in BW. PSOC3 Delsig

                       

                    shows 384KPS which then = your Nyquist rate. So your analog rate, becomes 1/2 that. You

                       

                    of course can use equivalent time sampling, but then there is a ton of other issues, like

                       

                    sampling noise, etc..

                       

                    2) One of the biggest challenges in a low frequency scope is all the code base to make it usable.

                       

                    Win.net comes to mind for the "meat, GUI" portion of the design, unless you are going to use a

                       

                    display attached to PSOC. Then your MIP needs go way up handling that.

                       

                    3) A fast way of getting a basic display w/o writing hardly any code is this freebe,

                       

                     

                       

                    http://www.selmaware.com/stampplot/index.htm

                       

                     

                       

                    You can use a number of com schemes and send the data to it and with simple scripts it

                       

                    will format and plot. This would allow you to get an analog scope up and running very

                       

                    quickly.

                       

                    4) As previously mentioned, storage allows a DSO to measure and look for many complex

                       

                    criteria, like a dropped pulse, 6 pulses in a row inside a window,.........PSOC 3 kind of limited

                       

                    in how much RAM you can commit, an eval of stack performance would have to be made

                       

                    and its requirements.

                       

                     

                       

                    Just some thought, Dana.

                    1 of 1 people found this helpful
                    • 7. Re: develop oscillioscope and signal generator using psoc3 kit
                      user_14586677

                      For signal generator -

                         

                       

                         

                      1) Your limit is tied to settling time of the VDAC component, or IDAC with outboard fast

                         

                      OPAmp. Either way 250 KPS for 4V output. divide that by the size of the waveform table

                         

                      you are going to use to create the waveform, and signal rate drops dramatically. Thats why

                         

                      effective sig gens based on DDS principles are clocking in the 100's of Mhz.

                         

                       

                         

                      2) Table size determins harmonic suppression in the waveform generated. A key spec

                         

                      for analog work. An 8 bit table somewhere <= 40 db of suppresion.

                         

                       

                         

                      3) You need offboard amp to be able to drive 50 ohms, PSOC cannot do that.

                         

                       

                         

                      4) I have done digital generation on PSOC, trains of pulses, width, PW, freq programmable, as

                         

                      well as N burst capability. Fairly simple. 1 Mhz kind of stuff and below. Still not 50 ohm capable.

                         

                       

                         

                      There are a myriad of other considerations, these are just some.

                         

                       

                         

                      Regards, Dana.

                      • 8. Re: develop oscillioscope and signal generator using psoc3 kit
                        user_78878863

                        The Nyquist ratio is only suitable if you can repeatedly scan the same signal. Otherwise, the scan rate should be at least 10 times the frequency of your signal. (Image a sine wave, were you have only 2 dots per wave - not very usable, isn't it?) With the limited memory of the PSoC, you cannot sample repeatedly, just one-shot measurements (BTDT).

                        • 9. Re: develop oscillioscope and signal generator using psoc3 kit
                          user_78878863

                          One way to improve the voltage range of the DAC as well as its speed is to use a PGA with it - just connect it as output buffer to a VDAC. But since you will need an external amplifier anyways, you way want to skip that.

                          • 10. Re: develop oscillioscope and signal generator using psoc3 kit
                            user_14586677

                            Thats correct, you have to oversample to get what Nyquist does not preserve, scale.

                               

                             

                               

                            Thats what Wavelets are for, a new (actually old) way of looking at freq and amplitude as a f(t).

                               

                             

                               

                            But equivalent time sampling can occur very close to Nyquist, but only for periodic

                               

                            waveforms.

                               

                             

                               

                             

                               

                            Regards, Dana.

                            • 11. Re: develop oscillioscope and signal generator using psoc3 kit
                              ki.leung

                              Would like to know how to do wavelet transform with PSOC. Actually would love to have more DSP application notes from Cypress. Not sure if any one tried FFT with PSCO?

                              • 12. Re: develop oscillioscope and signal generator using psoc3 kit
                                ki.leung

                                Just found that there is a new DFB assember component and the DFB v2 allows custom coeffecicents. Can't wait for Application notes using these components..:-)

                                1 of 1 people found this helpful
                                • 13. Re: develop oscillioscope and signal generator using psoc3 kit
                                  sachin.taneja

                                  thanks to all CDC members for such a good discussion

                                     

                                  summary of oscillioscope:

                                     

                                  i take input of any waveform on any analog pin of psoc kit and fed it to ADC(20/24 bit) then sampled data is send to pc via UART and dump it to a file.firstly i am not aiming to develop any application on window side.i am dumping UART sampled data to txt file and plot it using MATLAB.

                                     

                                  please help me out that how can i achieve this whole process

                                  • 14. Re: develop oscillioscope and signal generator using psoc3 kit
                                    user_78878863

                                    As I said: read about the ADC and DMA components. The are multiple applicastion notes (and even sample projects) using the DMA to gather ADC data and store it into RAM. Then you can use the UART (or better the USBUART) component to send the data to the PC.

                                       

                                    Did you look at the links? This sample project already does nearly everything you want to have.

                                    1 2 3 Previous Next