Producing Waveforms using Wave Generator module in the PSLab Android App
This blog will demonstrate how to produce different waveforms using the Wave Generator module in the PSLab android app and view them on the Oscilloscope.
The Wave Generator in PSLab android app is simple to use and has a UI which is similar to physical commodity wave generators. It is capable of producing different waveforms like sine, sawtooth and square wave.
Before getting started with the wave generator we require the following items:
- PSLab device
- An android phone with PSLab app installed in it.
- USB cable (Mini B)
- OTG(On the Go) wire
- Some connecting wires having pins at both ends
Understanding the Wave Generator Pins
Let me briefly explain the use of the pins that are going to be used in the Wave generator module:
S1 and S2 pins
The PSLab device contains two pins (S1, S2) which are capable of producing two independent analog waveforms (sine, sawtooth) having different frequencies and phase offset. The frequency range is from 10Hz to 5Khz.
SQR1, SQR2, SQR3 and SQR4 pin
The SQR1 pin is used for producing the square waveform and all the SQ pins can be used together to produce four different PWM signal having the same frequency. These PWM signal can have a different duty cycle and phase.
CH1, CH2 and CH3 pin
The CH pins are used by the oscilloscope in the PSLab android app to monitor waveform signals produced by the wave generator pins. They can be used together to simultaneously monitor multiple waveforms.
Setting up the Device
We need to connect the PSLab device with the mobile phone as shown in Figure 2 which can be done by following steps:
- Connect a micro USB(Mini B) to the PSLab device.
- Connect the other end of the micro USB cable to the OTG.
- Connect the OTG to the phone.
Now, once the device has been properly connected to the device (which is shown at the top right corner of the app), then in the instruments page scroll down to the Wave Generator card and click on it to open the WaveGenerator activity.
Here you will see a screen like shown in Figure 4 containing two monitors and a controlling panel with lots of buttons. Here the Waveform panel is used to control the S1 and S2 pins whose properties are shown on the left monitor screen and the Digital panel is used to control the SQR pins whose properties are shown on the right monitor screen.
For sine/sawtooth wave:
Connect the S1 pin to the CH1 pin using a connecting wire, then in the Waveform panel select the Wave1 button, choose the type of waveform(either sine or sawtooth), then click on the Freq button to change the frequency of the wave, then use the Seek bar or the up/down arrow buttons to change the value of frequency and then press the set button to set the frequency for the S1 pin as shown below:
Now, click the view button at bottom right corner, this will directly open the Oscilloscope provided by the PSLab android app .
Once the oscilloscope is open, check the CH1 pin from the panel in the bottom and we can see the sine wave in the monitor shown by the screen in Figure 6 and Figure 7
Similarly, if you want to see two sine waves connect the S1 pin to the CH1 and connect the S2 pin to the CH2 channel , choose the wave-type for both pin, set the frequencies for both of the waves, here you can also set the phase difference between the two waves, for setting phase difference first click on Wave2 button it will enable the phase button, then click on the Phase button and set the value of phase with the help of the Seek bar.
For Square Wave
Connect the CH1 pin to the SQ1 pin, after making the connection head over to the Digital panel in the Wave Generator, ensure that the mode is selected to square, now click on the Freq button in the digital panel and set the frequency of the square wave with the help of Seek bar, then click on the Duty button and set the value of duty cycle for the square wave as shown below:
Now, once the square wave has been set click on the view button, the oscilloscope will open then select the CH1 pin and you can see the square wave on the monitor as shown by the screen in Figure 9.
Thus we have produced different waveforms using PSLab wave generator module.
PSLab device pin diagram – https://github.com/fossasia/pslab-artwork/blob/master/Sticker/pslabdesign.png
Youtube Video Screencast for Wave Generator – https://www.youtube.com/watch?v=NC2T5kElWbE&t=1s
You must be logged in to post a comment.