Demonstrational printed circuit

Chapter 5 Demonstrational printed circuit

board

Since nonlinear systems are a difficult subject for analytic investigation, mea- surements of such systems in practice is necessary for understanding their behavior and for the verification of results acquired by numerical simulations. Due to their high sensitivity to changes in initial conditions, quantitative measurements are harder to carry out, as the physical parameters have to be extremely precise to get the exact same results as from simulations. On the other hand, the main char- acteristics can be relatively easy to examine in practice, and as implied in Section

2.2 , they are usually of great importance. Furthermore, the role of practical expe- rience in education is very important, and the spectacular phenomena of nonlinear systems can be serve as an interesting part of the curriculum.

5.1 Implementing differential equations as ana- log circuits

The easiest and most versatile way to measure such systems is to implement them as analog electronic systems, using operational amplifiers. The idea is based on the fact that some mathematical operations (summation, multiplication, divi- sion, integration, etc.) can be done by electronic circuits and analog signals. In order to do so, first we have to draw the block diagram of the ODE, and then build and connect the blocks as circuit elements. For practical reasons, the signal carrying the state of the system will be a voltage signal.

(a) Inverting differentiator (b) Inverting integrator

Figure 5.1. Differentiator and integrator circuit implemented with operational amplifiers and linear passive elements[ 22 ]

The most important block of ordinary differential equations is the differentiation itself. A differentiator can easily be built with an operational amplifier, as it can

be seen in Figure 5.1 (A).

The output of the differentiator amplifier will be

A main issue with the differentiator circuit is that it acts as a high-pass filter, thus introducing a fair amount of noise. Noise should be avoided because of the sensitivity to small changes, therefore differentiation is done by integration in the

feedback loop. The equation of the integrator amplifier in Figure 5.1 (B) is

Z t V in (τ )

V out (t) = −

dτ + V in (0).

0 RC −1

(The inverting and scaling factor should be taken into consideration while

RC

building the circuit.)

Figure 5.2. Weighted summing amplifier [ 22 ] The next basic building block of an analog computer is summation. This can be

done also by using operational amplifiers, as in Figure 5.2 . The summing amplifier

(a) Inverting amplifier (b) Non-inverting amplifier Figure 5.3. Inverting and non-inverting amplifier circuits [ 22 ]

circuit can be used to implement gains too, as the equation describing it is

To set the desired parameters of the equation, we can use simple inverting or non-inverting amplifier circuits (Figure 5.3 ). Their equations respectively are

Changing any of the resistors used in the above described circuits to poten- tiometers, gives us the possibility to adjust the parameters continuously, even during operation.

So far these elements were all linear. Operational amplifiers can also be used to build resistors with negative or piecewise linear characteristics, which is one way to introduce nonlinearity to the system[ 23 ]. Often equations require us to multiply signals. For this, analog multipliers can be used, which are also based on operational amplifiers, but can be bought as ICs. Four-quadrant multipliers, such as AD633 are the most convenient, and are usually necessary. Analog multipliers can also be used to divide or square signals as well as to take squareroots.

Let us take a look at the following linear equation with unit step excitation:

˙x + x = 1(t).

To make the block diagram easier to draw, it is useful to isolate the highest order term:

x = 1(t) − ¨ x−

˙x − x.

Figure 5.4. Simulink block diagram of 5.6

Now we can “translate” the block diagram to the elements described earlier. We need to take into consideration that the integrators also invert the signal, which has to be corrected by an additional operational amplifier.

Figure 5.5. NI Multisim curcuit schematics of 5.6 (Larger size in A.1 )

The schematics of the circuit are described in more detail in A.1 . After building the circuit in Multisim, we can compare the simulation results with the purely mathematical model simulated by Simulink. There is some voltage bias, probably

due to the operational amplifiers, but Figure 5.6 and Figure 5.7 look very similar.

Output voltage (V) 0.2

Time (s)

Figure 5.6. Simulink simuation of 5.6

Figure 5.7. Multisim simuation of the analog circuit of 5.6

5.2 Design of the circuit board

Building the circuit representations of differential equations on non-solder bread- boards can take a long time, especially in case of high order and nonlinear equa- tions. Without the proper designations, it is hard to keep in mind which pins should be connected where, especially for students with less experience. The de- bugging of such circuits is also difficult for the same reasons.

The basic idea behind my circuit board was to make this process simpler. Firstly by placing the most important elements on the board, class time spent on building the circuits can be decreased. Secondly, by connecting the supply and ground pins of ICs, the number of errors made by students can be reduced. Although the voltages and currents in such systems are quite low, taking care of the supply voltages also protects the parts from accidental misconnections.

(a) MCP41 digital potentiometer (b) Custom potentiometer

Figure 5.8. Custom Altium schematics

Thirdly, designated pinholes connected to certain inputs and outputs of ICs and and notations on the board (e.g. capacitor or resistor values) can make the circuit easier to scan for mistakes.

I started the design of the board by choosing the parts for it. The main aspects were price and availability, my experience with them and packaging. As I had to solder the parts myself, I ruled out surface mounted elements. (Later on I realized that I would have saved a lot of space with SOIC packaging, thus it could have been worth the extra time spent on soldering.) I decided that the ICs are to be mounted on sockets, making it easier to replace them, which came in handy later.

For operational amplifiers I chose the TL08x series by Texas Instruments[ 24 ], because it is widely available, cheap and accurate. I also had a few pieces of the dual, DIP packaged version TL082CP. The analog multiplier was an easy choice as these ICs can be really expensive (well over $20 a piece). I chose the AD633JN

by Analog Devices[ 25 ] because it was the cheapest by far, with its price below $10. For digital potentiometers, I bought a simple model from Microchip. The MCP4141[ 26 ] series comes with 129 taps and SPI interface, with which I had some experience before. I did not have any special expectations for the linear passive elements, as precision was not the main goal. I used some scrap parts I had from my internship and some of which I acquired from the University of New Hampshire.

During the design I encountered some minor issues which I was able to overcome relatively quickly. Using Altium Designer turned out to be a good choice, even though getting started took a while. The schematics and footprints of the TL082 and AD633 were easy to acquire; however, I could not find libraries for the digital or analog potentiometers. Therefore, I had to create the schematics for both (Figure

5.8 ). The MCP4141 digital potentiometers came in DIP-8 packaging, thus making

(a) Bourns 3310-Y potentiometer (b) Bourns 3310-P potentiometer footprint

footprint

Figure 5.9. Custom Altium footprints

it easy to assign an already existing PCB footprint. As there were not a lot of connections on the board (because the whole point was to make it customizable), I did not want to conduct a simulation. Therefore no electrical model was assigned to the MCP4141.

For the analog potentiometer, I had to design the footprints as well (Figure

5.9 ). I also assigned the built in a potentiometer simulation model to it, just to get more familiar with the process of creating custom parts. Designing schematics and footprint in Altium seemed complicated the first time, but in fact it is very logical. On the other hand, I did not find the library system very convenient; managing the files was a recurring issue.

The design process is similar to what I have seen in other PCB design softwares. First a circuit schematic is drawn with the parts and the connections, and the footprints have to be assigned to them, too. My schematic became quite big due

to the large number or pinholes (Figure B.1 ). Then the software imports and places the footprints on the blank PCB. The pins can be connected by algorithms but I decided to do it manually, as it seemed necessary because of the large number

of writing on the top layer. The result can be seen in Figure B.2 in Appendix B .

5.3 Building the circuit board

The board was machined with the milling machine in the Department of Elec- trical and Computer Engineering at the University of New Hampshire. The Altium PCB files had to go through a series of conversions until they reached the form that the milling machine was able to interpret. The milling took approximately

5-6 hours, of which about 90 minutes had to be devoted to the bottom side of the board. This did not come as a surprise, as the top side is much more complicated due to the fine writings which had to be milled out of copper. The machine is theoretically able to carve out patterns with a repeat accuracy of 8 mil ≈ 0.2 mm, though the traces should not be closer than 10 mil. I took this into consideration while designing the board, as I set the minimum clearance to 20 mil. However, for the writing I could not allow such a wide clearance, because it would have resulted in too large letters, so the writing had to have a clearance of 10 mil.

The bottom side of the board came out perfectly as it can be seen on B.3 , no corrections had to be done on it whatsoever. On the other hand, the top side came out somewhat worse, as visible on B.4 . The reason was probably that the milling tool became a little worn-out and could not mill as finely as it did on the bottom side. Mostly the writing was affected, but some copper was left between pinholes as well, which I carefully removed with a knife.

Figure 5.10. Copper left between IC pinholes after the milling

The soldering of the board went without major complications. I had a bunch of 10-hole SIP (single in-line package) pin connectors, which I cut down to 2-hole connectors with a utility knife. Unfortunately, I ran out of the pinhole connec- tors, so the board is not completely finished at this moment. However, only one multiplier and the digital potentiometer ICs are not operational, which makes the board sufficient for building.

During the design of the board I made a silly mistake which could have caused a lot of extra work. I connected the supply voltage pins of the operational amplifiers backwards, which I noticed when I first tried to turn on the circuit. Fortunately,

I used a current limiter with the voltage supply, so the ICs stayed intact. The mistake can be seen on the schematics and the PCB layout as well. The repair was easy and fast, as I only had to carve out a little piece of copper and solder two wires in. The result and the current state of the board can be seen in Figure

B.5 .

5.4 Testing the circuit board

I tested the board by building the Van der Pol oscillator described in Chapter 3 . The equation was implemented as described in 5.1 and using [ 1 ]. The equivalent circuit in Multisim can be seen on A.2 . For the simulation in Multisim, I used the built in models associated with the TL08x operational amplifier and the AD633 analog multiplier.

I used the Electronics Explorer Board[ 27 ] as (reference and supply) voltage source and as scope. The board could only provide ±9 V, which is enough to supply the operational amplifiers, but results in inconvenient saturation (see Figure

A.3 ). During the measurement and simulation, I connected the scope to the wrong operational amplifier, thus I measured −x 2 instead of x 2 . This, however, does not change the shape of the solution, just reflects the phase space (Figure A.5 and

A.6 ). Similarly to the Van der Pol circuit, the Lorenz equation can be built on the board too. I implemented the circuit as described in [ 2 ], and measured it with an external scope and external voltage source. The results can be seen in Figure

A.7 and A.8 . Note how the periodic solution became somewhat distorted because of the saturation of the operational amplifier. A difficulty of measuring such circuits lies in the measurement of the adjustable parameters, in this case the potentiometer. For this reason I restricted the evaluation to qualitative comparison with the simulation results. Nevertheless, the circuits showed similar results to the simulation with relatively low noise.