Newsletter List 


Welcome to ICAP/4 Consumer! This is Intusoft’s analog and mixedsignal simulation offering for the consumer marketplace, soon available through Fry’s Electronics and orderable directly through Intusoft. The software furnishes many of the features of the ICAP/4 Rx offering, less capability such as indepth interactive modification of components and multiple schematic configurations. Design size is limited to around 100 components and features 3,000+ simulation models of a variety of parts. Its parts browser, simulation, and waveform viewing are all easy to use, as with all ICAP/4 packages. A New User’s tutorial gets you up and running in minutes. Combined with a more extensive operation manual, it’s all that’s needed to tackle many types of electronic design. ICAP/4 Consumer is ideal for the hobbyist, student, electronic professional, adult education instructor, engineer, and science fair enthusiast. ICAP/4 Consumer retails for $249. 


"Intusoft released its 8.x.11 software for the ICAP/4 analog, mixedsignal and mixedsystems SPICE simulation tool suite on October 13th, 2004. 8.x.11 adds to its previous 8.x.10 success by providing several operability enhancements for design entry, simulation and design verification. Two new convergence algorithms, ICSTEP and GEQFREQ, are an integral part of 8.x.11, primarily targeted for design involving feedback using cascaded highgain amplifiers. ICSTEP has also been an integral aspect in the creation and simulation of complex custom IC models.

An electronic circuit will be constructed using the ICAP/4 package that counts the turns of a rotating shaft. Counting shaft revolutions is a common problem. From a car odometer to a model robot, the problem is frequented in many realworld instances.
Figure 1: When Speed varies with time, it is necessary to integrate Speed to get the proper angle. Fortunately, you don’t need to do any work to get the sine/cosine functions because there is already a model in the ICAP/4 library that does all the work for you. It’s called Voltage Controlled Oscillator (VCO), and it performs integration using a builtin Laplace function. The sine/cosine functions are made with behavioral elements. The model is described in detail in http://www.intusoft.com/nlhtm/nl67.htm#costas. The application for that Newsletter (link) was a 900 MegHz communications receiver. Here, the same model is used but with frequencies below 1Hz! 

Marking the shaft with an alternating black and white pattern, shown in Figure 2, allows an optical photo sensor to monitor shaft rotation. Figure 2: A simple optically readable pattern However, if the rotation direction is also needed, another sensor is usually added. Another pattern can also be added. The new pattern shown below (Figure 3) has the black and white stripes staggered. This arrangement is known as quadrature coding. If motion I is in the “forward” direction, then a 01 (blackwhite) transition in the “I” channel when the Q channel is false (black) is counted as a clockwise revolution. Conversely, a 10 transition counts as a counterclockwise revolution. The logic reverses based on the quadrature channel so you can get 2 pulses for 1 pattern cycle. Figure 3: Adding a second pattern and sensor let’s you count rotation in 2 directions. Another way of building the quadrature signals is to stagger the sensors along a single pattern as shown in Figure 4. If half the shaft is painted white and the other half is painted black, separating the sensors by 90 degrees gives the desired result. The 90degree separation places one of the signals in quadrature with the other. Figure 4: Staggering the sensors along a single pattern also works. For shafts that are rotating the radial distance from the center of the shaft is given by r = x^2 + y^2. At an angle, A, y = r*sin(A) and x=r*cos(A). But with A, the shaft angle changes with respect to time. For a constant RPM, A increases with time just like the distance you drive at a constant speed. But the speed can increase or decrease, so you must integrate speed to obtain the correct angle. The VCO model is used to integrate the speed input and get the sine/cosine signals. The reflected optical signal has a cosinetapered waveform because the illumination is a disc shaped light beam. As the pattern passes across the illuminating disc, the reflected light gradually changes from one state to the other with a cosinelike shape. The disc gets larger as the distance between the sensor and target pattern is increased and the spatial risetime increases. If the light beam disc diameter is known along with the shaft diameter, then the spatial “risetime” of the reflected signal can be calculated as follows:
Now it is possible to have the pattern repeat in order to increase resolution. Yet, Arise is unaffected. But Arise will set an upper limit on the number of times the pattern can be repeated. Putting it all together in Figure 5. Figure 5: The complete encoder model and its symbol. The ICAP/4 library models for VCO and inverterx do exactly what is needed. VCO was developed for communications modulation and demodulation, while inverterx was made as a soft transition cosine shape limiter. The parameters passed into the model are:


So far, the project design has focused on getting an electrooptical interface that can act as a signal generator to test the project design. From the beginning, the I and Q signals are modeled with slow risetimes. Something must be done to sharpen these risetimes so they can be used as the clock for an up/down counter. Reviewing the available optical reflection sensors, there are some that have hysteresis limiters builtin. Hysteresis is a form of positive feedback that sharpens risetimes. The OMRON EESY413 is one such device. It was modeled using a previously developed optoisolator with its optical path broken to output incident light and receive reflected light. Its current transfer ratio (CTR) was adjusted based on manufacturers data. Hysteresis was added using a SPICE3 behavioral switch. Initially it wasn’t known if the risetime of the device was as fast as required, but it was tested in the lab and found adequate for use as a clock for CMOS devices. It’s now an ICAP/4 library item.
Figure 6: Logic states for cw and ccw rotation. The logic states have been shaded to show groupings that are useful. The cyan colored groups represent “exclusive or” patterns, while the brown shade shows “exclusive or not” groupings. By inspection we can write:
There are three basic Boolean operations. In engineering they are called AND, OR and NOT. Mathematicians call them intersection, union and negation, and use symbols that aren’t on your keyboard to represent them. Sticking with engineering notation, we’ll define the following operations:
The exclusive or is encountered frequently enough to deserve its own operator; we’ll use xor. Table 1: Results for two input combinations And2 = A & B = (An + Bn)n Figure 7: The complete decoder using the encoder model for testing. Figure 8: The up/down counting pulses with a rotation reversal at 15 seconds. The up/down pulse widths are very short, so to see then using an oscilloscope, you must trigger on one of the I or Q signal edges and expand the trace to 100 microseconds. 

Before moving on to the up/down counter and display circuitry, let’s make a side trip to see how the technology that’s been used here applies to several other applications. The exclusive OR is the basis for digital addition. It’s fundamentally the sum of two bits. But from an analog perspective, if you let a logic “one” be defined as +1, and a logic “zero” as –1, then the exclusive OR is actually the product of the inputs. Using that property, taking two signals that are at the same frequency, but phase shifted, like the I and Q signals in the decoder, then the average value of the exclusive OR is proportional to the phase shift. That means that an analog phase detector can be formed using an exclusive OR and filtering the output with a low pass filter to get phase. When the signal to noise ratio is fairly high in a communications channel, you can limit the signal, turning it into a binary data stream. Then, an exclusive OR can be used to detect phase or frequency encoded signals. Of course, you don’t really need +1 and –1 for logic levels, but using this thought process simplifies the math. Using CMOS for the logic is advantageous because the logic one and zero values are at the power supply rails, providing analog accuracy.
Table 2: Sensitivity Note: For radio and optical applications c = 3*10^8 meters/second, for sound in the atmosphere, c is about 300m/sec (lots of pressure and temperature variation). The optical detector is extremely sensitive and is being used by LIGO, the Laser Interferometer Gravitational Wave Observatory. Similarly, a fiberoptic coil can be used to detect vibration and/or rotation, making a sensitive microphone of a gyroscopic rotation sensor. The technique can be used to measure position from a GPS signal with accuracy on the order of 2cm (1/25th of a wavelength). Acoustic applications include ultrasound and sonar systems. Some very simple equations blossom into an astonishing array of applications. Taking the math one step further leads to 3dimaging systems and hologram construction; but that’s for another time. 
To complete the project, the up/down pulses need to be counted and displayed. For an inexpensive standalone application it was decided to use CMOS logic. Alternatively, you could interface directly with your computer using a PIC (Programmable IC) connected to a USB port. A CD40192 Binary Coded Decimal (BCD) up/down counter accumulates 10 pulses per stage. It easily cascades to get the count as large as you want; our design used three stages to accumulate up to 1000 quarter turns. The BCD output is displayed by first decoding each digit to drive a 7 segment display. The sevensegment display is a LITEON LSHD7503. It’s connected to the CD4511B Decoder using 470 ohm resistors that can be purchased in a 16 pin Dual inline package (DIP). The parts can be interconnect using a Printed Wiring Board (PWB), soldering or wire wrapping. If you use a PWB, your probably want to use the Small Outline IC (SOIC) packages otherwise DIP packages are easier to work with. Figure 9: One of 3 stages of the counter and readout display 

Construction of Tesla Coils is described in a variety of ways on the Internet. What’s in common is a large diameter coil with a very large stepup turns ratio. Nicoli Tesla, who invented the Tesla Coil, used the breakdown of a spark gap to drive the primary. However, modern power electronics give us a much better set of analysis tools and hardware components to couple energy more efficiently into the coil.
Figure 10: Resonance measure at 228.9kHz, loaded with a 15pf scope probe, leaves 9.3p for the actual coil. Interestingly, the resonance without the scope probe is 373kHz, which is a period of 2.67u. That’s very close to 4 times the propagation delay of the coil (900 turns * pi * 3.5 1n /12in = .824u). So we could calculate Cp=1/(L*(2*pi/(4*Td))^2. Using that method, we get 14pf.
Figure 11: The equivalent circuit of the Tesla coil and its primary using SPICE coupled inductors. The method of constructing the primary must now be considered. The primary needs to use larger wire (smaller AWG) than the secondary. This is because the current is larger in the primary, and the power loss is proportional to the current squared times the resistance. Unfortunately, at higher frequencies, current tends to flow on the outside region of the conductor; this is known as the skin affect. You can use Intusoft’s demo Magnetics Designer software to find the AC resistance of various wire sizes vs. frequency.
The selfinductance of the primary and secondary was measured using an inexpensive LCR meter. The coupling coefficient was calculated by shorting the primary and measuring the secondary inductance. SPICE has builtin models for coupled inductors. It requires the open circuit inductance value for each winding, plus a coupling coefficient that’s greater than 0 and less than 1. Simulations were run with the primary shorted, varying k (the coupling coefficient) until the simulation agreed with the measurement. Notice how simulation replaced development of algebraic equations.
If Lm >> (L1 + L2/(N*N)), then the following preserves the open and short circuit simplification properties Figure 12 However, this is not the case for the Tesla Coil. Figure 13 shows the Y model. Unfortunately the math results in a negative inductance and the physical insight is lost in the mathematics. Figure 13: The SPICE coupled inductor and its equivalent circuit: Lm = 140u, Le= 120u, N=31.2 Because the coupling coefficient is so low, the primary selfinductance tends to short out the driving signal. However, if a series/parallel set of capacitors is used to couple energy, then the input impedance will increase at resonance, thus achieving decent power transfer efficiency. The LCC configuration shown in Figure 14 was chosen to match the Tesla Coil impedance with the halfbridge power capability. The bridge transistors can switch 14 amps at 400 Volts. If the design is setup to output around 250 watts with a 200 Volt input, then an extra boost converter can double the voltage and multiply the power by 4. Figure 14: The complete Tesla Coil Model with the circuitry using Cp and Cs to couple energy from V2 to Vtesla. If Cp+Cs is made constant, the smaller values of Cs will reduce the required input current, but increase the voltage. That’s how the Tesla Coil is matched to the half bridge capability. When Cs+Cp is reduced, the voltage at Vfeedback will increase and cause greater stress on the capacitors.
Cs was formed using 10, 10nf polypropylene capacitors: 2 parallel banks of 5 in series. Cp was formed using 15, 22nf polypropylene capacitors: 3 parallel banks of 5 in series. That furnishes a primary RMS current capability of 2.8 amps; that’s less than the MOSFET capability, so it will be necessary to limit operational time to avoid over heating.
Table 3: Trading off capacitor values verses stress and performance When operating at the proper frequency, the parallel capacitor eliminates inductive spikes when the transistors turn off. Figure 17 illustrates this using the third case in Table 3. The trick is to adjust the resonant current phase such that the voltage will switch to the opposite power rail when the current is turned off. Then, the voltage across the opposite MOSFET will be zero when the other transistor switches ON. These values allow IRFP450 MOSFETS to operate at about 400 VDC input while delivering 1kw. Cs and Cp are selected to stress the capacitor and MOSFETS to their limits at the highest input voltage.
Figure 15: Connecting capacitors in seriesparallel combination gets the desired current and voltage rating. Figure 16: This shows the load current and half bridge output when the drive frequency is 363.956kHz, Cs=4n, Cp=13n. The tesla coil can be operated at one of 2 resonant frequencies. Figure 17 shows the smallsignal transfer function of the Tesla Coil. Figure 17: The Tesla Coil exhibits 2 resonant frequencies, the second being preferred.
When the Tesla Coil starts up, the voltage increases until plasma streamers form. These streamers extend the effective area of the load capacitor, increasing its capacitance and at the same time dissipating power. The small signal transfer function is shown in Figure 18 for a simulated plasma discharge. Figure 18: Plasma discharge lowers the second resonant frequency; either frequency produces an acceptable operating point. The smallsignal transfer function of the half bridge circuit and its driver are shown in Figure 19. The half bridge driver has a .5usec delay. Part of that delay is used keep both drivers off during switching transitions. It eliminates power shootthrough caused by having both the upper and lower driver turned on at the same time. The delay is simulated using a transmission line to get the transfer function using an AC analysis. Figure 19: Small signal transfer function is shaped for selfoscillation at either resonant frequency by reversing the feedback polarity. A selfoscillation situation occurs when there is positive feedback at the oscillation frequency, and negative feedback at DC to stabilize the operating point. It turns out that either of the resonant frequencies can be selected by coupling some of the output voltage back into the circuits input. Reversing the feedback polarity selects one of the resonant peaks. Figure 20: The Bode plot shows that the selfoscillation frequency can be adjusted over a 95degree range by adding phase lead. Finally, the compensation is designed using opamps. The feedback signal is limited using diodes to keep the opamps within their specified operating region. Figure 21: Compensation for selfoscillation using opamps Driving the halfbridge: The resonant current results in a reverse current polarity in the halfbridge transistors of Figure 22 below. The negative voltage increases the driver boost voltage and can damage the driver if negative voltage is lower than 5 volts. This condition is prevented by using a clamping circuit at the driver output. Several windings on a small MPP core yield the desired resistance (core loss provides the resistance). Alternatively, you could use a noninductive resistor. You can rewire it to connect the sweep generator to the input to see what happens as the drive frequency changes. Figure 22: Halfbridge driver output needs to be clamped to prevent excessive boost voltage. Increasing the voltage: The tesla coil needs up to 400 volts, but the offline rectifier barely produces 200 volts. To get the increased voltage, a boost regulator is needed as shown in Figure 23. Figure 23: A simple unregulated boost circuit increases the output. The boost converter has the following inout relationship if the inductor always conducts current.


Are you an ICAP/4 user that’s never gone through the Getting Started guide? Here are some useful features that can speed up the design process, for which new users, or even experienced ones may be unaware.
IsEd5
IntuScope
