Introduction: Oscilloscope Display

There is always a need of a display unit  in every electronics project, students use LEDs, LCDs, or any other display devices for that. I thought of using an oscilloscope for such a purpose, so I went to my college's electronics lab, but I found that my college have oscilloscopes which only support 'electronic waves' as input, i.e. no separate horizontal and vertical sync signal could be provided to it. In other projects, students display the images using 2 inputs [hor. and vert. signal]. Well I took it as a challenge, to use the same oscilloscope to display whatever I wanted to, because many students will face the same difficulty, so I came up with a new project.

How to use an oscilloscope as a display device, by using only one wave-input channel?
the one and only difficulty with this project is that you can't send a wave back in the time, nor can you send 2 different voltages in one channel at the same time, and nor can we skip some pixels, i.e. a wave can't be discontinuous(whatever the voltage is on the channel, the oscilloscope will show it on the screen anyway),  so there was a need of some trick to use this type of oscilloscope.
I have used a simple trick in which the image is divided into horizontal slides[ROWS] and those slides are converted it into waves, display one of the slide for a fraction of second on the oscilloscope, then display another slide and so on, if we do that in a loop, at a very high speed, then human eye wont recognise it as different waves and it will look like a single image.
so the first and the most simple step is to divide the image into slides, or you can say rows of zeros and ones...
for this we just need a bitmap of the image, for example , the letter 'A' can be represented as following in the bitmap.

0]  0  0  0  1  0  0  0
1]  0  1  0  0  0  1  0
2]  1  0  0  0  0  0  1
3]  1  1  1  1  1  1  1
4]  1  0  0  0  0  0  1
5]  1  0  0  0  0  0  1

then, we have to convert each row into a wave, as shown below...
https://www.instructables.com/file/FDRQJUPHTIWJMDC/

the purpose of converting each row into a particular wave is that if we show the above 6 waves in an oscilloscope one after another at a very high speed, then it would appear as...
https://www.instructables.com/file/FTD0FATHTIWJMIL/

Now you have a good idea about the theoretical concept of the project, and next step is implementing this concept, for this many hardware can be used, or it can be simply done by a DAC, but the problem with a DAC is that configuring the DAC for each wave is costly, and to get good pixels we need to save the clock cycles and send the date as fast as we can, so I designed a simple circuit specifically for this purpose, it is a very simple circuit, it uses one Demultiplexer, one Hex inverter(because the Demux gives inverted output), and a few potentiometers to adjust the position of each slide individually. The schematic diagram of the circuit is as following-

https://www.instructables.com/file/FICBI8EHTIWJMIQ/

this circuit is very easy to use, but before you know how to use it, you should know how to 'see the waves' corresponding to its rows, every row generates a digital wave, the difference is that for every row, the voltage level of 'one' is different, i.e. the first row's digital wave have the highest voltage level, you just have to select the voltage level of the ones with the help of the select lines of the Demux, [we have used 6 different voltage levels for 6 slides] and you can adjust the voltage level of each row with the help of the potentiometers [the voltage level of zero's is same for all the rows].
Now all you have to do is for each row, select the level from the select lines, i.e. A,B,C pins in the Demux IC, and send the data of the row, from the G1 pin.
You can easily design your circuit for this schematic diagram, I designed the circuit which includes the microcontroller with the above components, and the circuit is very handy to use, but you can do the same job by a computer's parallel port, which will be a better option as you will get high speed clock with it. Remember, the  higher is the clock pulse, the higher will be the pixel quality of the image on the oscilloscope screen.

https://www.instructables.com/file/FKOR4PFHTIWJMGG/

Now comes the coding part, this hardware is very easy to program, the nested loops below does all the major part, since the algorithm for this code is quite easy, I have decided to explain it in the code itself, as following...

i => points to the row number
j => number of times a row is to be displayed
k => points to particular cell of a row

//infinite loop, value of 'i' goes in a loop from 0 to 6, infinite times
for(i=0; ;i=(i+1)%6)
{
//this sets the pins of the port 'P1', for the selection of the row[voltage level]
P1OUT=i; 
//this loop is for displaying each row 10 times, which why the next row will be displayed as a separate row, or else all the rows will be concatenated[one after another], instead of getting overlapped[one on another]
for(j=0;j<10;j++)
{
//this loop displays the pixels from the row, checks if the bit is 0 or 1, and sends the data accordingly, notice that the bitmap grid, which I used in my project is of 9 bits long, but the loop runs 20 times[20 pixels are displayed], this is to avoid over lapping between the images, as the bitmap will be displayed many times on the screen, since we displayed each row 10 times[10 images side by side]
  for(k=0;k<20;k++)
  {
   if(k<9) //the grid limit
   {
    //if the pixel is 1, then set the bit
    if(arr[i][k]) P1OUT|=BIT3;
    //else reset it
    else  P1OUT&=~BIT3;
   }
   clock_delay(); //the delay/length of a pixel on the screen
   P1OUT&=~BIT3; //after displaying one pixel, turn it off anyway
  }
}
}

for better understanding, the below diagram shows the work done by each loop to display the bitmap -

https://www.instructables.com/file/FHCPLU8HTIWJMIM/

although the same work can be done in many ways, but I decided to show this to gain a better understanding of pixels. For this project I used MSP430 microcontroller, this is because of many reasons, but the best reason is that it has an internal clock, and its frequency can be adjusted by the user, in my project I used the frequency ~15MHz. More the clock frequency is, the faster will be data sent, more pixels we get on the screen.
Beside this, another technique of sending data faster is by using the synchronous data transfer mode of the microcontroller, which will send the bits serially each in one clock cycle, this will save a lot of time which is wasted in comparing each bit in the bitmap, and taking the corresponding actions.
And in the end, the most important step is to adjust the oscilloscope according to our needs, and to synchronize it well with our circuit, so you have to adjust the vertical position, the horizontal position, the height [voltage level], the width [time interval] of the waves accordingly to get a good image.
With my project, I was able to display 'HI' on the screen as shown in the figure below-

https://www.instructables.com/file/FBJSXT6HTIWJMGJ/

There is a slanted line after each pixel, this occurs because in practical the clock pulse doesn't just be at 2 levels, it shows some retardation, which can be removed[almost] by a better circuitry, and choosing better time delays in the loops.
This project can be useful in many ways, for example, the circuit which is used, is very cheap, and can be built in less than $2, which is very good for students, economically.
Beside this, it can be very useful technique for the projects which use wireless video transmission, as the video signal can be sent just over one channel, and the encoding is very simple, so there is no need of a separate video converter, you can directly send the output of the circuit to a wireless module, for example, an RF module, and receive the signal and show the data directly in the oscilloscope, whereas, ordinarily students use the combined wireless video module, which is very costly.
and since the signal we are sending is a digital signal(but with different levels of 1's) the errors can be detected and removed more effectively, from the signal at the receiving end.
Along with all the above uses, this project helps to understand how we can display images on screens, and how we can design our own display module...

Attachments