Impedance measurement with microcntroller

Generally impendance is measured through LCR Meters in lab. LCR Meters are very costly (I have seen only agilant products). For amateurs and for low cost product which involve impendance measurement needs an alternative method. What the commercial products contain is of two types fixed frequency and variable frequency type. Both uses a sine wave as excitation to the circuit and the input/output gain and phase relations give the impendance of the load.

For our purpose we can do the same things with some microcontrollers, ANALOG-DEVICE has a number of products for this, the most useful one is AD5933:  1 MSPS, 12 Bit Impedance Converter Network Analyzer

If you choose AD5933 then you have to do nothing just read the impendance data through a I2C protocol on any microcontroller.

  • Otherwise do all the job sinewave generation
  • Reading the output wave (sine wave but it is phase shifted and attenuated by the load impendance)
  • Save the sinewave data or export to PC through serial port
  • Process the data to get the impendance data.

For all the above jobs there are FPGA chips available from ANALOG DEVICES

For sinewave generation upto 50MHz with I KHz steps: AD9835

Phase Detector/Frequency Synthesizer

Phase Detector/Frequency Synthesizer : ADF4002

For Phase detection, gain detection: AD8302

please read the application note AN691(low frequency phase detection) from analog devices

A similar device, also available from Analog Devices, Inc., is the AD5934, a 2.7 V to 5.5 V, 250 kSPS, 12-bit impedance converter, with an internal temperature sensor and is packaged in a 16-lead SSOP.


  • Electrochemical analysis
  • Bioelectrical impedance analysis
  • Impedance spectroscopy
  • Complex impedance measurement
  • Corrosion monitoring and protection equipment
  • Biomedical and automotive sensors
  • Proximity sensing
  • Nondestructive testing
  • Material property analysis
  • Fuel/battery cell condition monitoring


8051 External Memory with keil

Hi friends you must have interfaced memory chips to 8085 or 8086 microprocessor. Same is the case here as both are with 8 bit processing 16 bit address space. In both cases the higher address port is shared with the data port. Means one port dedicated lower byte of address and higher byte of address is goes through a data-address multiplexed chanel.

Here in 8051 P0 is for lower address and P2 used for upper address byte and for data also. The hardware connection is also same as in case of microprocessors. You have to use a latch to latch the higher byte of address .

And the Code….

I had searched a lot both in google and the help pages, but didn’t get anything except the DATA type declaration, but how will it do all the things.

unsigned char xdata datg[32000]; //I had used a 32K byte RAM to save my data.


Do you know about pointers, have u ever tried to store a variable at some specific memory location. (I guess u never tried this), if u have done please mail me the code.

We declare pointers like

Int *ptr ;


Char * ptr;


Unsigned Char * ptr;

Where ptr is the address of the variable. Value of the variable is *ptr is an integear.

But we can’t write

ptr=0x1278; assuming 0x1278 is a memory location. Try it.


Ok u may ask what is the use of pointing to specific location(usually called static pointer). In microcontrollers we have very less memory we can use the memory randomly. It may lead to data segmentation.

After a long search I got two three lines

*datg = (char xdata *) 0x0400;

volatile unsigned int *myPointer = (volatile unsigned int *)0x1234;

#define data (*((char *) 0x0170))    

The first one is quite odd, it doesn’t look like a type declaration statement, rather seems like a assignment statement.



Keil application note