Theo Verelst Local Diary Page 21

The same holds as for my tripod and other diary pages: nothing on this page may be copied or changed and distributed except that the page as a whole may be printed or otherwise transfered in unchanged form,  mentioning the original URL and global page reference, and that holds for everyone on the globe and beyond, including so called 'christians' and self-appointed 'Secret Services'.

(alt)   Tripod Home   Local
Diary list (Secure)   Tripod Diary List   Previous Diary

Dec 30 2004, 20:26

Well, that's when I started this page, and started to get some pictures together, and processing them for web use, mainly reducing the size, cutting them, and making them a bit sharper, adapting saturation and contrast, and always adjusting the JPEG compression level so that the pictures look ok but are as compressed as possible, and as a progressively coded picture, so that it can first be seen in course resolution while the accurate pixels load. Putting 5 megapixels on a web page with current monitor technologies' average resolution makes little sense. Also, the current server which serves this page normally has a bandwidth to you of about 3/4 megabit/sec, which is cool enough for even normal ADSL viewers, but a few megabytes per picture would make a page very long to load.

Currently, I strive for about 50K or so per medium size picture, which loads quick enough, and then I don't really pay attention to how many pictures there are on a page, assuming a patient modem user or a little loading time for a dsl or higher viewer, though sometimes this gets out of hand, like on the previous local diary page, where I've gone overboard on the number of images, so the page load is probably very long overall.

This page I time I'd show some of the electronic I'm doing. which is a pretty old thing to do, since I was a student assistant in university it's been a while, though. And this time, it's advanced modern analog and digital I'm after, and I'm a bit learning myself, though that's hardly the expression, I know most of the things I'm currently doing, except some practicalities, and the new area to some extend is High Frequency electronics. That field isn't quite new for me, too, I made 3 meter (FM band) transmitters in high school, not very advanced ones, but I had some idea of what I was doing, and they worked. Also, I've tried out fairly high frequencies (up to 60 MHz or so) with digital logic circuits before, on breadboards, years ago, which was about the limit I found at the time.

So high enough frequencies is a challenge, which might to day be considered the Gigaherz range, which I haven't touch upon practically myself yet, but a hundred megaherz is nice, too, which is quite possible with contemporary parts like Xilinx digital chips, which should work up to 100 á 200 Megaherz external speed.

On chip speeds is another matter, like on the blackfin (running a 600 megaherz) but real wire connections are not trivial anymore for such high frequencies. Of course I have been dealing with high frequency components coming from EMP (electromagnetical pulses), for instance with the USB AD/DA converter, which in it's 'official' version has little SMD choke coils or ferrite material to damp HF pulses, for instance when connecting the converter unit up to other equipment.

As I said many principles aren't new for me, such as grounding, loops, shielding, coil-like circuits, and wires and planes forming capacitances, but when frequencies get high, transmission effects and magnetical coupling become important, and they have the habit of making circuits a lot harder to interpret and troubleshoot.

For the moment I was looking at one of my free sample AD convetrers, which should convert 2 Mega Samples per second, which is not extreme anymore at all, but this chip should be able to give 16(!) bits of accuracy with that speed, that is 10 times faster than 196 KS/s, the highest studio or soundcard audio sampling frequency normally in use.

As I knew beforehand, it would take effeort to actually get these 16 bits, to begin with it is effectively only 13.5 bits or so resolution, meaning the lowest bits need averaging to actually get to 16 bits, but then the liniarily should be pretty ok, amd no codes missing. As it turned out, a not particulalry involved setup on a converter board to be able to connect to pins half a millimeter (!) apart, shows clear limitations of for instance placing some antiglitch capacitors at a distance from the chip pins, and using long unshielded wires, and in fact using a lot less decoupling capacitors than the official typical application or evaluation board circuit diagram would.

In fact I've asked for new samples after I blew up one sample of the ADS8411 chip I described on my previous local diary page on the same setup, and in fact now I got two of the higher grade ones worth about $30 a piece when one would buy a thousand of them, which I soldered on the adapter board (it's a Conrad one, though I've seen there exist also 'schmartboards' from a califormian company) in place of the old one, which I removed with some effort by a little trick of slicing the pins of with a small sharp hobby knife by pressing down on the top of the pins. The new one just like the old gives me about 8 usefull bits of converted data, depending of course on the source of the input voltage, which is of course not good enough for its normal specs at all, not even close.

This picture shows the setup:

on the right, the AD converter chip which is the little black centimeter small square connected over the converter PCB lines to the periferial pins, where there are wires to the breadboard below, capacitors (the red blocks) and the flatcable to the Xilinx board input connector.

On the breadboard, there are a supply regulator chip to go from a regulated 5 VOlt supply coming into the board on the right to a 3.3 Digital output pin supply voltage, making the CoolrunnerII chip happy with the AD converter output logic levels, while the AD core is fed with 5 Volts analog circuitry supply voltage.

I think that's where it somehow went wrong with the first chip, because when measuring on the small chip pins with a pointy probe I made a shortciruit in one of the supplies at some point, and after I had connected the board up with the 3.3 Volt supply of the Xilinx board, it somehow has started to pull quite some current, and I found out after a while the little chip package was cooking hot, and after that not really working well anymore. Well, that was a bummer, I didn't even really mess up much, but something must have gone wrong. So I thought I'd ask for new, higher grade samples, which I promply got after 3 or 4 days, from the US, which is nice.

Of course, I though I wouldn't be fooled twice, so I though about strict enforcement of the data from the chips' Absolute Maximum Ratings, also during power up, and preferably also under unforeseen shortcircuit conditions, so I came up with a better supply layout, and some almost good enough setups to let the voltage difference between the 3.3 and 5V supply never become more than the maximum 2.5 volts, in fact by using a heavy transistor and some modern heavy high speed Scotty high frequency diodes and a base emittor diode which simply clamp the voltge difference to less then 2.3 Volts even under shortcircuit currents of 1 amp or higher, and pretty quickly so, and hopefully also when the supply decoupling capacitors of the 5V supply are charging the circuits on the downslope of a shortcircuit. A fast and heavy current diode also prevents all too much reverse voltage buildup when not the 3.3 but the 5V supply is shorted, though not strictly within the absolute maximum ratings, which dictate a max reverse voltage of 0.3Volts, while the diode may easily allow 0.7 V but at least its limited. Of course I'd be able to come up with a circuit which allows less reverse voltage, but that is not trivial enough, and its tricky to make such circuits completely reliable, not current limited (with respect to large decoupling capacitors) and fast enough, to prevent spikes which surge over the limit anyhow.

I've delved into the latest supply regulator chips from TI, and found some NMOS pass transistor based extremely low drop ones, with also very low supply ripple, needing no external capacitors which are good for safe power supply sequencing, for which I've asked samples, too. I might use them at some point, also for audio circuits with low ripple voltage supply.

For those (hihi) which also want to experiment with this technology, don't forget ESD is dangerous for these chips, so you must ground yourself and your workspace in fact, too, to prevent electrostatic discharge from ruining your IO pin circuits subtly.

So does it work now? It seems so, but as I said, it pretty noisy! Now that is nothing special, even an 8 bit AD with a bit of wires connected isn't completely quiet in the sense of +/- 1/2 LSB stable, as I remember from experience from 25 years ago making a AD converter box myself for the school computers. Also the below 12 bits Analog devices microcontroller AD converter is not stable when a unshielded wire is connected to its input of a little length and even when the little stamp board is only measuring its little potmeter voltage it isn't all quiet in 8 or 9 bits, though probably battery feeding it makes it so, if I remember correctly.

The above image shows the ground connection wire from the adaptor PCB with the ADS8411 and also it's + input wire, connected to ground with a 1 kilo ohm resistor (in this case not a metal film one). Under these conditions, like in the above image, with a clock pulse coming from a low frequency CMOS schmitt trigger based oscilator, and a simple decoupled internal reference voltage for the AD converter, the output can be shown on a 5x7 dot matrix display driven by the Xilinx, which is automatically multiplexed to display some moving patterns to show the display drive circuitry works, and to display a 4x4 bit pattern showing 16 input bits of the connector pins where all 16 output bits of the AD converter are connected to.

The above image shows the result for the above circuit topology: all lower left corner 4x4 led dots are on, which means all 16 input bits are 0, corresponding to the 0 Volt input. The bits are organized as rows of columns, where the left column contains the highest valued 4 topmost bits, with the MSb in the upper left corner of the 4x4 block (not taking into account the highest row of 4 dots, which are fixed to 1 to test the display).
In the following setup, the input has been given a voltage of about 3.3/2 Volts by a voltage divider of two 1k resistors dividing the 3.3 volt regulated digital supply:

The above image shows one of the resulting binary codes, in this case the highest 8 bits are 01100101, in decimal 101, while we'd want a code according to the input voltage of (3.3/2)*2^16/4.096 or in the case of regarding the 8 nost significant bits: (3.3 Volt input voltage / 2) / 4.096 Volt reference voltage * 256 = 103, which is within the 5% resistor tolerance from the observed value! The lower 8 least significant bits are too noisy, as can be seen from the next picture, taken a little time after the above, from the same circuit with the same input voltage:

The next circuit is the other extreme of the analog to digital converter input voltage: 5V which is above the maximum input of 4.096 Volts:

Which leads to the anticipated all ones output binary pattern (0xFFFF), the higherst value:

The noise patterns in the middle example are semi random, though it appears there are certain prefered patterns when visually inspected, at least there are no stuck or shortcircuited output bits, they all vary. As I said, the voltages are only basically decoupled, while in the manufacturers data sheets, there are seperate, preferably closesy placed decoupling capacitors for each of the supply pins, also for pins which carry the same voltage, and then in the evaluation board, there are even 3 (!) values of parallel capacitors (instead of the common 10 or 100 microFarad parallel with 0.1uF) per pin! That, and the use of good ground planes, short distance of the capacitors to the pins and shielding should make more bits relevant and noise free, like the 13.5 or so which should be relevant according to the datasheet.

Well, at least it works, and quite properly it seems thus far. It's just very disturbance sensitive, which is natural, 16 bits is a very big dynamic range, check out the relevant bits on your soundcard before jumping to conclusions, those 20 bit converters don't give you a real dynamic range of 2^20 --> 120dB, do they? Or even more hilarious, 24 bits, which should give you 144dB equivalent dynamic range. I haven't seen a single one yet which actually does that. Thats a smallest step of 1 / 16 millionth of the maximum input voltage, pretty darn hard to even analogly buffer, let alone amplify. But they are nice challenges, and this chip then can do its work not with 44.1 or even 192 kilosample per second, but 2MEGA samples per second!

That makes it more sensitive to high frequency disturbance, the input circuit takes a sample in a time of what is it, about 100uSec, and then decouples and starts doing a succesive approximation of the sampled charge on a equivalent of a 25 pF capacitor, so that capacitor must be charged with a 16 bit accurate value... And all variations in supply while the internal digital circuitry starts pounding away to finish only 400nanoSeconds later will influence the SAR value coming out. 13 bits means that a variation of 0.01% will already change a relevant bit. That's a small variation, and high hgh frequencies, little capacitive or inductive couplings start to contribute more and more, like the pulses coming from the 'start convert' clock.

So what to do about all this? Well, an important thing to do in general for these kinds of convertors is to filter the output, which is quite reasonable in the case of an audio converter, which can average a couple of dozen of values, gaining more than a few bits of accuracy, assuming the noise has decent normal distribution. The great advantage of this setup is that the resulting audio signal is sampled so much above the Nyquist rate, that it is most likely very easy to prevent most any aliasing errors at all, 50 times the highest normal audio frequency allows filtering of lets say frequencies higher then a few hundred kiloherz, and then the phase error and the remaining aliasing products can both stay very low.

A major advantage is also the possibility to make a very low latency audio (or other) AD - process - DA loop, because of the very much higher sampling frequency than in normal audio converters. This is because the reconstruction digital and/or analog filter, and the phase problems and pass band behaviour of the anti aliasing filters don't make it necessary to have at least a 1 or a few 44.1kHz samples latency, but only a 50th or so of this very minimum 1 sample (or more) latency. For near field listening (or for instance a headphone feedback) , and most especially for synthesizer applications where a circuit can be put in a loop which feeds back the DA converted output to the AD input, this is an essential property. No one can use ordinary sampled signal processing blocks with analog inputs and outputs in a voltage controlled analog synthesizer setup, and as well as everybody knows that digitally simulated analog synthesizer blocks are not very close to the original, soundwise, because of sampling problems. Also delays of non-submultiples of 44.1 or 48 or 96 or 192 kHz are a lot harder to make with traditional AD/DA converters, and to make a semi-continuous delay based on 2MS/s is a lot easier, even though more memory might be involved: memory is cheap nowadays and often readily available, like the few hundred dollar blackfin DSP boards have 32 or 64 megabytes of reasonably fast dynamic memory. Also, this converter is a simple 'start conversion' triggered device: it doesn't even require an exteral clock signal but only a start convert pulse, which then 400nS later leads to a new sampled output value, so changing the sampling frequency is easy and uncomplicated, and the high sampling frequency should make sure no aliasing or input filtering problems need to take place when sampling with a moderatly varying frequency.

When digital signal paths (like for equalisation) are combined with analog signals grom the same source, a conventional AD/DA setup makes the mix exhibit high frequency phase differences, which makes the frequency response very wrong, and can lead to (comb) phasing effects and distortion increase. The same for effect channels in mixer setups, which are always limited to a fixed minimal delay which is not good for added phasing and chorus effects, which require in that case that the direct signal also be delayed.

The tendency in modern mixers is that the whole signal path becomes digital, which is possible of course, but not exactly cheap or technically pleasing: the AD and DA conversion are seldom really transparent, especially when good high quality HiFi norms are searched for. That tendency of course makes the above considerations not needed, but the effect is that every signal fed into the mixer is delayed a bit which is certainly not always preferable. And in fact, depending on the desired quality, it can be argued that a reconstruction filter which is required for any DA conversion for 44.1 KHz samples might need up to a second or so filtering time for perfect audio quality of the whole audio range. Thats a long delay for a live setup.

Finally, the above circuits should be shielded for 50 Herz mains interference, too, which is obvious: an audio amplifier of that physical layout would also pickup mains hum, as I was reminded of when testing my cookie box shielded audio AD DA converter based on the Burr Brown / Texas Intruments PCM2906 chip, which shows a background noise on a program acting as digital VU meter which is much higher than the perceived noise level because a small 50 Herz hum spoils the measurement. Hence: the metal cookie box. Modern printed circuit boards tend to become smaller and smaller, which helps prevent such electromagnetical interference, and also the use of multiple layers (which one cannot make oneself) on PCBs can make sensitive signals shielded on the PCB.

It is possible to have a practically high dynamic range though, lets take the dynamic range of a microphone, and compare signal strengths with audio power amplifier output levels, than the wires from the microphone can be seen to have lets say a level of about 1 milliVolt, with lets say a modest 60dB lower noise floor (except for spurious transients), while a power amp outputs a voltage of about 25 Volts or so, which is 25000 times higher, so the lowest level differs about 25000000 (25 million) times from the highest in the same system. That's over 146 dB voltage dB difference. But: without a digital pulse factory at micrometers or millimeters or a few centimeters away from the wires picking up those pulses, and those audio disturbances aren't measured as if the spectrum has the range or sensitivity of a GSM antenna.

So what's next? Well, handy enough the AD converter can neatly be connected up to the Xilinx, which can also be connected to the blackfin DSp EZLITE board, for which I've programmed decent and fast interface code already, which appears to work fine, so nothing (except getting the noise level down) is in the way of doing some signal processing on a interesting contemporary AD converter signal. Meanwhile I've also asked TI and received samples of various types of high quality OpAmps, amoung which what they claim to be the worlds best audio opamps (very low distortion, low noise, good other audio properties) and some very fast low noise and some balanced input and output operation amplifiers, partwise taken from the Texas Instruments Evaluation board schematics for a very high quality audio AD converter (another type: sigma delta converter, stereo 24 bits, over 110dB S/N and under -100dB distortion (!), up to 200 kS/s DSD super audio signal option) and from the 8411 evaluation board. A solid, high output current, accurate, low noise drive opamp should be a good addition to get some of the disturbance signals down.

A oscilloscope

As I wrote on my previous local diary page, I got a little stamp microcontroller board at a workshop which can be programmed over a serial port (which most computers have), and works quite well, and in fact is one of the most advanced and fast microcontrollers around, if not the fastest. The chip itself in this case very small, but it has a 16/32 bit ARM RISC processor at 45 MHz and 45 Mips (IIRC) and 64 KB flash and 8 kB ram.

From the workshop, I also got the gnu compiler integrated in a Keil IDE, which works well, and the programming works fine in C thus far.

One of the examples from the workshop which I of course liked was to use the serial port connection and the 1 megasample per second 12 bit AD converter of the mircocontroller chip and a visual basic program on the PC to display a regularly updated graph of the signal. A seperate comparator pin can be used as a trigger, so the little things works as an oscilloscope, though of course only up to 500 KHz

In this image the stamp board is shown, with on the middle right just visible a little crocodile clamp which is the input signal to both the trigger pin and the AD input, and in this case also connected to the little pot on the upper right oof the board, to set DC level.

Above, the PC window is shown with a signal connected to the 'scope' input coming from a multiplexed 5x7 DOT LED display on the Xilinx board from the previous page. The ''stoops' are repeated when the display refres start with the first for row again, and the stoops themselves come from various rows of leds having a varying number of leds on, which loads the column signal with varying current making up for different voltage level on a resistor in the display circuit.

I've also tried a non step signal from a triange wave of a schmitt trigger based clock signal, which looked fine, too, so the scope seems to work.

It's not so trivial to get a 12 bit noise free signal from an AD converter in general. The blackfin boards audio 20 or 24 bit (I don't recall by heart)  AD gets a bit over 16 bits noise free I've tried, which on itself is good, remember that 16 bits is a range of 0 to 65536 values, so one step between two consequtive values.

So then we're all back where I was also when I was lets say 13, where I knew a lot about shielded wires, grounding (and grounding loops), and shielding of circuits to make them oscilate or pickup disturbance, mainly 50 Hz hum. For a design like a microphone to speaker level ampilfier, that is not easy to design, really not.


I webcammed a building site:

in the above image, the plastic cover of the whole webcam, which was outside, was wet with rain, which makes the image not very good.
On the top of the image, the extra covering is visible, which is like a little roof extending before the cam to cover it from the rain, but the wind was wrong, and it still got wet.

The next image is wiped clean and I rearranged the top cover, and the plastic bag which sealed off the whole cam from outside moist and frost effects:

Better. I sometimes have this sort of image with about 5 frames per seconds real time available at check it out, and see the trucks and cranes at work, or me at work or...

Binary image compression challenge

I''ve done something with a tcl Wiki contest called the "Binary image compression challenge" to make images compressed. I didn't do all to much, but I tried a bitmap form of a little text image, which was good with gzip with -best option, and I thought I'd try the new JPEG2000 challange, because I'd seen example code for the blackfin DSP, though I tried a public domain windows version of a coder. I later heard on a electronics conference that te AD people made the jpeg2000 into a succeshfull video coder. In this challenge I found it didn't give the best results.

My page is "Binary image compression challenge - Theo Verelst's entry".


This place was called 'the moose' in dutch when I was regularly in Delft in the past, and has been renamed to speakers. How appropriate. Except the speakers they made suck bad, from what I heard...

Anyhow it was a relevant political subject meeting whith clear christian influences from one speaker, and at least some serious interaction, that never hurts, I'd say.

Europe ?

Well, in general, no thank you, but not as bad as holland by far, as far as I can tell. Last years I've been to belgium, france, luxembourg, germany and switserland, and none of these are even near the level of fascism and horrible control sickness of the 'netherlands' (holland). both meaning something low or hollow.

I noticed this sign in the Hague:

 I made this pictture of a gouvenrment building in Holland. The assignment is to tell me what this project means, and what's wrong with this picture (maybe I'll write it on my next diary page), because it is quite really a picture of that project, but it's not allright....

I only know of the book 'the bonfire of vanities', but that seems hardly a appropriate name for a gouvernment project.

Child abuse?

Well, I should say I hope not, but frankly I'd think its more the children which are getting away from that than that I would give any child in holland a dime (which I don't own, stricktly speaking, as far as I know) for their chances to be normally well treated. Horrible.

Seeing ghosts, having troubles with delusions? No, I don't think I'm crazy, I just observe and listen and keep my eyes open when I meet people with children, and I don't like a thing about it in Holland, my perceptions are only horrible.

The above is from what used to be a well known magazine I think, which I happened to read in Leiden University literary library, where a woman supposedly somehow got convinced she had sexually abused as a child, and now again became 'convinced' that that is really not true after all. Yeah, right.

At leat they make fun of the jesuits.

Dutch telecom development over the last decade

Miserable, I'd say, witnessable from this offer for practical university work:

what a total rubbish. Seriously.

I worked there in fact, first as stage, too, and then a month and a half or so to finish the work on a (miserably) paid basis, that was just before I found the financial bliss (for as far as that was made possible..) of giving Unix courses for a middle sized software company!

An uncle of mine which I saw at birthdays long ago at the time ('86 or so), who worked at the main telecom lab in holland already agreed with me at the time that they really made *nothing* anymore that was really high level worthwhile, and that course has its fruits, that is obvious.

Not worth anyones serious scientific offers, really.

Pictures again ?

Well, ehhr, yeah, why not, some good pictures, that doesn't hurt either, I just don't make money with it now, it's pure hobby, like all the other things, although more than a few things could be quite high level professional, but it isn't. Wonder why, in this country. bleh....

So I made this fairly high quality (Hewlett Packard) pickture in Tours (in the middle of France), and had it printed in a very cheap way at a very cheap store, and the result looks quite cool, worth lighting out with a Conrad 10Watt halogen light fed by a computer supply: