HOME / POSTS / ANALOG DRAWING BOARD
Analog Drawing Board
May 2017 Love
This was a team project I worked on with Nicholas Klugman as our final project for 6.101 - Analog Electronics Lab. Most technology created today is created with the intent of being used by an individual. The way humans interact with technology is highly important and can determine whether or not a product is successful. Because of this, the way in which people interact with technology cannot be overlooked. This project focuses on bridging the gap between technology and a user; providing an easy and familiar way for humans to interact with a product. In this project, a wireless drawing board was created, where a user can draw on a piece of resistive paper and have it displayed on a screen of an oscilloscope. The user interface developed in this project was inspired by a touchpad/drawing board where the user holds a stylus that controls the location of a cursor on a screen. While the goal of interfacing to a real computer was not demonstrated, proof of concept has shown that one can wireless transmit cursor location to a receiver that can decode and make use of the data. The connection between the board and the computer is wireless, using a hybrid of frequency and amplitude modulation. This project has three main elements: the drawing board and the circuitry that drives it (“Drawing Board” and “Drawing Board Driver”), encoding and sending this data wirelessly to a receiver (“Voltage Scaler”, “VCO”, and “Transmitter”), and decoding this information so it can displayed on a screen (“Receiver”, “Frequency to Voltage”, and “Display”)
Pictures are worth 1000 words. Videos are worth even more. Before we go into the details, here is a demo video:
And this one goes into a bit more detail:
High level overview
Figure 1. High level block diagram for the system
A note on signals between modules in the block diagram: A “voltage” label corresponds to a voltage level being transmitted between modules. A “signal” label corresponds to a sine wave (in voltage) being transmitted between modules. A wavy arrow (such as the one between “Transmitter” and “Receiver”) corresponds to an AM waveform between modules.
The drawing board functions as the intuitive user interface in this project.
Figure 2. Drawing board used in this project
Figure 3. Drawing pad configuration
The drawing pad is composed of a piece of resistive paper. This paper has electrodes (bare wires) sewn into it that make an electrical connection with each side. X and Y signals each have two wires; one for ground, and one for + or - 15 volts.
Figure 4. Pencil with wire attached
The stylus is a classic, wooden, No. 2 pencil with the back part shaved away and an electrode connected to the graphite in this location. The pencil is used to “wipe” across the paper, akin to a potentiometer wiper, resulting in a output voltage from the wire attached to the pencil graphite. This voltage varies linearly with the position of the pencil on the paper in both X and Y directions. The pencil also gives a more intuitive feel, by supplying with the user with the same tactile feedback as a normal pencil on paper, unlike normal styluses on capacitive touchscreens.
Initially, IR sensors were going to be used to determine the position of the pencil, however, this idea was discarded due the characteristics of the IR sensors (nonlinearity and limited viewing angles) and because this could result in a reading of any object that may not necessarily be the stylus for the drawing board. Using resistive paper and a No. 2 pencil prevents foreign objects, including the user’s hand, from interfering with the measurements. In this way, this project is robust to “false styluses.”
Drawing board driver
Figure 5. Drawing board driver circuitry
The drawing board driver drives the drawing board such that the output of this stage provides two voltages that can be fed into the next stage (the voltage scaler). There is one data wire (carrying a voltage that switches in polarity) coming from the drawing board, and the drawing board driver must filter this data into two outputs that correspond to the Y data and X data. In our case, data refers to voltage levels. A clever switching scheme (described below) was employed to filter the X voltage from the Y voltage. It is important to note that when making a measurement of the position of the pencil, the power and ground rails of the other axis must be disconnected from the circuit, or else they will influence the measurement taken, which is not desirable. To accommodate this, the drawing board was driven in a pseudo “H-bridge” configuration where the input was a ±15V square wave that had a frequency of approximately 100Hz. When the square wave is positive, the X axis “sees” +15V on one rail and GND on the other. The diodes in series with the Y axis (D4 and D3) are reversed biased in this state, thus the Y electrodes on the board are disconnected from the circuit. When the square wave input swings to -15V, the opposite happens: the Y axis is electrically connected with -15V on one rail and GND on the other with the X electrodes being completely disconnected from the circuit. The figure below provides an illustration of what was just described. Phase 1 is when X voltage is being read and phase 2 is when Y voltage is being read.
Figure 6. Switching states of the drawing board
This switching scheme results in a switching output voltage on the pencil wire. This output voltage is positive (ranging from 0V to +15V) for the X data and negative (ranging from -15V to 0V) for the Y data. Because these voltages differ in polarity, the X and Y voltages can easily be filtered using diodes (D5 and D6 in the schematic) and stored in capacitors (C2 and C3 in the schematic) that filters the 100Hz switching ripple. The 100Hz sampling rate can be increased or decreased using potentiometer R1.
Figure 7. Voltage Scaler
The purpose of this simple module is to scale and add voltage offset to the voltages coming out of the drawing board driver module. If we directly fed our voltages into the voltage controlled oscillator (VCO), an input of zero volts (corresponding to if the pencil is all the way to one side of the paper) would result in a 0hz output from the VCO. This is not desirable as we would not be able to demodulate this signal on the receiving side. Thus we introduce voltage offset to the output of the drawing board driver. Our FM demodulator can only demodulate signals ranging from 3.5kHz to 4.5kHz, so we must ensure that the output of the VCO results in an output signal that ranges from 3.5kHz (when pencil is all the way to one side of the paper) to 4.5kHz (when pencil is all the way to the other side of the paper).
A LM310 acts as a voltage buffer between the output capacitors of the first stage and this stage. The LF353 is configured such that the output voltage can be described by:
Vref (1 + R2/R1) - Vin R2/R1 = Vout
Where R2 is the feedback resistor and R1 is the input resistor. Vref is set by the potentiometer and Vin comes from the LM310 voltage buffer. This adds offset to the output of the drawing board driver and scales the voltages such that the output of the VCO ranges from 3.5kHz to 4.5kHz.
Voltage controlled oscillator
Figure 8. Voltage controlled oscillator circuitry
The purpose of the VCO is to translate the X and Y voltages to a sine wave with characteristic frequency depending on the voltage of the input. Since there are two voltages that need to be converted to a sine wave at a certain frequency, two VCO’s were made; one for X and one for Y.
The backbone of this circuit was taken from a VCO presented in the “The Art of Electronics”, by Horowitz and Hill.
Figure 9. Voltage controlled oscillator from "The Art of Electronics"
The output of the VCO is described by the equation:
By changing the circuit shown in figure 9 to the one shown in figure 8, with an adjustable Vref, more control of the output frequency can be obtained. Thus if the values of R1 and C1 (in figure 9) are not exactly as expected (due to tolerance variances), one may adjust Vref to ensure the output frequency is as desired. In this way, R1 and C1 are used as a course output frequency adjust while Vref is used as a fine output frequency adjust.
Depending on what line you use as your output, the output of the VCO is a square wave or a triangle wave with frequency directly related to the input voltage. For this application, the output would ideally be a pure sine wave, thus low pass filtering on the output was employed to make the triangle wave look more like a sine wave. The triangle wave was used because the harmonic content of a triangle wave is more similar to the harmonic content of a sine wave than a that of a square wave.
Figure 10. Local oscillator circuitry
There are two local oscillators in this project that produce the two carrier frequencies: 470kHz for Y and 535kHz for X. The role of the local oscillator is to create a carrier wave for the amplitude modulated signal to be transmitted. Due to component availability in the lab, carrier frequencies around 455kHz are being used to carry the modulated signal. A variety of circuit configurations were tested before settling on the final circuit - a Colpitts oscillator. The high frequency of this signal prevented the use of certain components/circuits, such as lower speed op-amp (for gain) or a phase shift oscillator. The to achieve the desired carrier frequencies, the inductors were hand wound using cores found in the lab. The carrier frequency can be coarsely adjusted by adding or removing winds of the inductor. Before this signal is sent to the transmitter, an op-amp (LM6132) provides a gain of 10 to the signal.