Search the Community

Showing results for tags 'pmodia'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • News
    • New Users Introduction
    • Announcements
  • Digilent Technical Forums
    • FPGA
    • Digilent Microcontroller Boards
    • Non-Digilent Microcontrollers
    • Add-on Boards
    • Scopes & Instruments
    • LabVIEW
    • Other
  • General Discussion
    • Project Vault
    • Learn
    • Suggestions & Feedback
    • Buy, Sell, Trade
    • Sales Questions
    • Off Topic
    • Educators
    • Technical Based Off-Topic Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 13 results

  1. Hello to everyone. First of all let me say that I already posted this question, by mistake, in the 'New users introduction' forum. As I don't know how to move it to another section I decided to start this new thread. In case the administrators consider it necessary I will delete my last post. That said... I recently purchased an pmodIA board for a project we are conducting at work. The main goal is to obtain some resistivity vs frequency spectra for different objects as part of a object characterization problem involving Oil/Gas stuff. I already read the guide that digilent guys provide (http://store.digilentinc.com/pmod-ia-impedance-analyzer/) and I found some C libraries for the AD5933 (https://github.com/analogdevicesinc/no-OS/blob/master/Pmods/PmodIA/AD5933.c and https://github.com/analogdevicesinc/no-OS/blob/master/drivers/AD5933/AD5933.c). I am using a Raspberry Pi 3 Model B to control & communicate with the pmodIA. I based my code on those C libraries I mentioned. In order to use i2c protocol with the raspberry pi I use wiringPi library (http://wiringpi.com/reference/i2c-library/). In my code I have tested everything I've been able to, from all functionalities of the pmod: I get the temperature readings, set the frequency sweep params, make a freq. sweep measurement, etc. I have attached my code to this post (pmodia_test.tar.gz). All functionalities I tested seem to be okay, and everything seems to be working: I get the temperature, I can do a frequency sweep and if I connect the outputs of the pmod to an oscilloscope I can see the frequency sweeping (look at this video I recorded) Now, the thing is that even though everything seems to be WORKING, the result values I am getting back just make no sense AT ALL!!! For calibration purposes I am using a 12k resistor. In my code I first set the gain (X1) and range (2Vpp), I configure the sweep params and start it, then I calculate the gainfactor using that 12k resistor (which I later use on all my calculations), and then I ask the user to change the impedance and put the one that they desire to measure. On the main loop I simply do the frequency sweep, increasing the frequency at each step, calculate the impedance and put this value into an array (Z). I am also using gnuplot to display the results (the values obtained from the pmod are the exact same values that are being plotted using gnuplot, so this is not a display problem, as I checked this). This is when things get weird. These are the results I got for the following tests: The following curve is the IMPEDANCE response for the 12k resistor. At low frequencies there are quite a lot of spikes and high values. Notice that this curve is actually pretty close to the 'open circuit' ones from my first question in this post. The following curve is the MAGNITUDE for that same case. These spikes are caused by the lower value of Magnitude at low frequencies. Now, if I zoom to a range from 15kHz and 1MHz you can see that it actually displays something more reasonable (impedance going from 12k to almost 4k). I repeated the test but now using the 200mVpp output range instead of the 2000mVpp I was using, and the noise appeared back (see following curve). Am I maybe saturating the ADC or something? @D@n suggested me to check the part of my code that reads the data, because that noise or those readings might be related to the way I am handling with the signed/unsigned values stored in the ad5933 registers for the real/imaginary data. This is the part of my code that reads those registers: /****************************************************************************** * @brief Calculate impedance. * * @param gainFactor - Gain factor calculated using a known impedance. * * @param freqFunction - Select Repeat Frequency Sweep. * * @return impedance. ******************************************************************************/ double AD5933_CalculateImpedance(double gainFactor, char freqFunction) { signed short realData = 0; signed short imgData = 0; double magnitude = 0; double impedance = 0; int status = 0; // Repeat frequency sweep with last set parameters AD5933_SetRegisterValue(AD5933_REG_CONTROL_HB, AD5933_CONTROL_FUNCTION(freqFunction)| AD5933_CONTROL_RANGE(currentRange) | AD5933_CONTROL_PGA_GAIN(currentGain), 1); // Wait for data received to be valid while((status & AD5933_STAT_DATA_VALID) == 0) { status = AD5933_GetRegisterValue(AD5933_REG_STATUS,1); } // Get real and imaginary reg parts signed short RealPart = 0; signed short ImagPart = 0; unsigned char byte = 0; int tmp = 0; unsigned char registerAddress = AD5933_REG_REAL_DATA; for(byte = 0;byte < 2;byte ++) { // Read byte from specified registerAddress memory place tmp = wiringPiI2CReadReg8(i2cdevice,registerAddress); printf("\t\tReading from Register Address: 0x%02x...0x%02x\n",registerAddress,tmp); // Add this temporal value to our registerValue (remembering that // we are reading bytes that have location value, which means that // each measure we have we not only have to add it to the previous // register value but we also but do a bitwise shift (<< 8) by 1 byte RealPart = RealPart << 8; RealPart += tmp; // Update value from registerAddress to read next memory position byte registerAddress = registerAddress + 1; } registerAddress = AD5933_REG_IMAG_DATA; for(byte = 0;byte < 2;byte ++) { // Read byte from specified registerAddress memory place tmp = wiringPiI2CReadReg8(i2cdevice,registerAddress); printf("\t\tReading from Register Address: 0x%02x...0x%02x\n",registerAddress,tmp); // Add this temporal value to our registerValue (remembering that // we are reading bytes that have location value, which means that // each measure we have we not only have to add it to the previous // register value but we also but do a bitwise shift (<< 8) by 1 byte ImagPart = ImagPart << 8; ImagPart += tmp; // Update value from registerAddress to read next memory position byte registerAddress = registerAddress + 1; } magnitude = sqrt((RealPart * RealPart) + (ImagPart * ImagPart)); printf("Z = %hi + %hi*i ... |Z| = %f\n",RealPart,ImagPart,magnitude); return magnitude; } For those who aren't familiar with the pmodIA, in order to calculate the impedance you have to read the values of 4 registers: 2 of them to read the real part of the measure (0x94 and 0x95) and the other 2 to read the imaginary part of the measure (0x96 and 0x97). These values are signed, as explained in the datasheet. I realized that the original code I got from github stored these values into unsigned short variables and I changed that to signed short. Now the computation of the magnitude ( sqrt(Real² + Imag²) ) seems to be correct, as well as the values read from the registers. Using this code I can calculate the gainFactor. For the 12k resistor I used, at a frequency of 3 kHz, I get: Real = -79Imag = -35MAGNITUDE = 86.406021gainFactor = (1/ (MAGNITUDE * CALIBRATION_IMPEDANCE) ) = (1/(86.406021 * 12000) ) = 9.64439e-7 I use that gainFactor for all remaining impedance calculations. As an example of how my code seems to be working I copy/pasted the following lines (which are measurements of that 12k resistor at different frequencies). As explained before 0x94 & 0x95 registers contained the SIGNED value of the real part of the magnitude, while 0x96 & 0x97 registers contain the SIGNED value of the imaginary part of the magnitude. So, for instance, If I'm not mistaken, 0xffdf = -33, 0x0015 = 21. Reading from Register Address: 0x94...0xff Reading from Register Address: 0x95...0xdf Reading from Register Address: 0x96...0x00 Reading from Register Address: 0x97...0x15 Z = -33 + 21*i ... |Z| = 39.115214 Impedance read: 3067.859955 ohms (@ 767500 Hz) Reading from Register Address: 0x94...0xff Reading from Register Address: 0x95...0xde Reading from Register Address: 0x96...0x00 Reading from Register Address: 0x97...0x14 Z = -34 + 20*i ... |Z| = 39.446166 Impedance read: 3042.120759 ohms (@ 769000 Hz) Reading from Register Address: 0x94...0xff Reading from Register Address: 0x95...0xdb Reading from Register Address: 0x96...0x00 Reading from Register Address: 0x97...0x11 Z = -37 + 17*i ... |Z| = 40.718546 Impedance read: 2947.060034 ohms (@ 770500 Hz) Reading from Register Address: 0x94...0xff Reading from Register Address: 0x95...0xdf Reading from Register Address: 0x96...0x00 Reading from Register Address: 0x97...0x12 Z = -33 + 18*i ... |Z| = 37.589892 Impedance read: 3192.347538 ohms (@ 772000 Hz) Reading from Register Address: 0x94...0xff Reading from Register Address: 0x95...0xde Reading from Register Address: 0x96...0x00 Reading from Register Address: 0x97...0x12 Z = -34 + 18*i ... |Z| = 38.470768 Impedance read: 3119.251469 ohms (@ 773500 Hz) Reading from Register Address: 0x94...0xff Reading from Register Address: 0x95...0xdc Reading from Register Address: 0x96...0x00 Reading from Register Address: 0x97...0x11 Z = -36 + 17*i ... |Z| = 39.812058 Impedance read: 3014.162156 ohms (@ 775000 Hz) Reading from Register Address: 0x94...0xff Reading from Register Address: 0x95...0xde Reading from Register Address: 0x96...0x00 Reading from Register Address: 0x97...0x10 Z = -34 + 16*i ... |Z| = 37.576588 Extra: This is what happens when I put SEL to GND (same other conditions, and 12k resistor): Some extra information: I am supplying 3V3 to the pmodIA through the raspberry pi. How is it possible that I am getting these results? Is there something wrong with my code? Is my board broken?? Is maybe my settling time for the sweep configuration not right? Do I have to connect the SEL pin to GND or VCC? I would really appreciate your help as I need to finish this experiment in, at least, 1 month. Thank you so much for your attention, and let me know if you need more info. Manu B. Valentin
  2. Hello, I am unclear on whether the PmodIA works with Arduino. If I get the digilent arduino core will I be good to go, or do I need a digilent board to use it? Also, is it possible to modify the pmodia to use it on lower frequencys/impedance so it could be used for batteries? Thank you!
  3. Hi everyone Our senior design team is doing a project and we need to use 3 pmod ia on raspberry pi at the same time. Now I have questions following: 1. Does JA, JB, and JC all support pmod IA 2. I need the way to control three pmod IA, but I pmod IA is not in the design spark pmod supported list. Does that mean I can't use design spark to control pmod IA. 3. Since design spark might not work with pmod IA, I read the question of @mbvalentin, that's the only example of pmod working on raspberry pi I could find, but does the wiringPi still work if I use a hat between pmod IA and Raspberry Pi. Thanks.
  4. Hi there, I bought a couple of pmodia boards very recently, and tried to communicate with it using chipkit u32. I carefully read the manual of ad5933 and pmodia as well (i2c communication stuff in particular). Then, I tried to use the demo code to start talking with it via chipkit u32. However, it did not respond. I checked the code, and figured that it stuck since the status register never gives out a "ready" bit to read temperature, etc. Not matter how I command it to initialize sweep or perform temperature measurement. The output from the status register (0x8F) is always 0111 0000. Then, I switched to an arduino uno. It seems the address pointer can be assigned to different address, and I can write to the desired address, and read them back correctly, e.g., I can send 0x90 to the control register (0x80) for temperature measurement. Then, move the pointer to command register (0x80) to read out "0x90" correctly. Unfortunately, the status register (0x8F) always reads as 0111 0000. I tired many combinations with varying delay time between writing command to 0x80 and reading status register. Unfortunately, the result is the same. It seems to me that the PmodIA is not performing temperature measurement, or frequency sweep at all after my commands. I had great experiences working with diligent boards (Zedboard and zybo), and typically figured out problems by myself. However, this bug frustrated me for almost 5 days. Please advise! Following is the simple code I used to test the communication, and its response from serial monitor. I hope this can help debug. In addition, 12k pull-up resistor is provided for both SDA and SCL as suggested by the AD5933 user manual. pde file in Mpide 0150 #include <WireIA.h> #include <inttypes.h> #include <Wire.h> #include <EEPROM.h> IA testIA; void setup() { Serial.begin(9600); Serial.println("PmodIA Demo"); Serial.println("Press 'r' when ready!!"); while(Serial.read() != 'r'); testIA.IA_init(); testIA.IA_test(); delay(20); testIA.setControlRegister(1,1); testIA.setControlRegister(9,1); delay(1000); uint8_t disp; disp = testIA.readRegisterValue(0x8F); Serial.println(disp,BIN); } void loop() { } Respond from serial monitor PmodIA Demo Press 'r' when ready!! IN test 128 ********** 96 128 45 ********** 128 ********** 9 55 75 ********** 1110000 (the status register 0x8F always gives this value, meaning "not ready")
  5. kayemgray

    PmodIA on chipKIT UC32 issue

    I have been trying to get the pmodIA working with the chipKIT uC32 using MPIDE 0150. After hooking the I2C pins on the pmodIA to the uC32's dedicated I2C pins on J11, Vcc to 5V or 3.3V, etc. , successfully uploading the example sketch to the board and running the IA_Test() function, the session fails to proceed upon trying to interact the pmodIA. I downloaded and installed the associated libraries and such about a week ago. Here is what I've been getting on the serial monitor: PmodIA Demo Press 'r' when ready!! IN test 128 Then nothing else happens, presumably due to the code trying to execute the setRegisterPointer(uint8_t RegAddress) function which I think is the first part involving communication with the pmodIA. Has anyone else been having this issue or has anyone been able to get the two devices communicating? Any ideas on what might be causing it? Thanks in advance.
  6. Hi , I have PmodIA module which im trying to use it to measure water conductivity with arduino uno . I tried to use the example code available IA_Wire but its seems not working for my application . i just need to read the Real Value nothing else . The value im looking to measure is between 100 ohm to 100Kohm . I tried to calibrate the module by using Zcal 100 ohm but had no luck the value is away from what im looking for . Im not sure if im following the right calibration steps which its available on the datasheet. If you could help on easy way to do please post . The code im using is attached for your review . Thank you , Meshal A5933_test.rar
  7. Hello to everyone. I recently purchased an pmodIA board for a project we are conducting at work. The main goal is to obtain some resistivity vs frequency spectra for different objects as part of a object characterization problem involving Oil/Gas stuff. I already read the guide that digilent guys provide (http://store.digilentinc.com/pmod-ia-impedance-analyzer/) and I found some C libraries for the AD5933 (https://github.com/analogdevicesinc/no-OS/blob/master/Pmods/PmodIA/AD5933.c and https://github.com/analogdevicesinc/no-OS/blob/master/drivers/AD5933/AD5933.c). I am using a Raspberry Pi 3 Model B to control & communicate with the pmodIA. I based my code on those C libraries I mentioned. In order to use i2c protocol with the raspberry pi I use wiringPi library (http://wiringpi.com/reference/i2c-library/). In my code I have tested everything I've been able to, from all functionalities of the pmod: I get the temperature readings, set the frequency sweep params, make a freq. sweep measurement, etc. I have attached my code to this post (pmodIA_test.tar). All functionalities I tested seem to be okay, and everything seems to be working: I get the temperature, I can do a frequency sweep and if I connect the outputs of the pmod to an oscilloscope I can see the frequency sweeping (look at this video I recorded) Now, the thing is that even though everything seems to be WORKING, the result values I am getting back just make no sense AT ALL!!! For calibration purposes I am using a 100k resistor. In my code I first set the gain (X1) and range (2Vpp), I configure the sweep params and start it, then I calculate the gainfactor using that 100k resistor (which I later use on all my calculations), and then I ask the user to change the impedance and put the one that they desire to measure. On the main loop I simply do the frequency sweep, increasing the frequency at each step, calculate the impedance and put this value into an array (Z). I am also using gnuplot to display the results (the values obtained from the pmod are the exact same values that are being plotted using gnuplot, so this is not a display problem, as I checked this). This is when things get weird. These are the results I got for the following tests: 1) If I leave the 100k resistor for obtaining the impedance magnitude vs frequency I get the following curve ("100kresistor.png"). Just a noisy set of values, all of which are OVER 2 MEGAOHM. How is that possible, if I am using the same resistor I used to calibrate the pmod, that these results, for that same component, are so unaccurate? 2) (After the calibration with the 100k resistor)... If I place a 10uF capacitor in the connectors, I get the following curve ("Capacitor.png"). Now, the impedance of a capacitor should decrease with frequency according to 1/(2*pi*f*C). The curve I obtained, however, says otherwise. On the other side, the initial value of the impedance (2e+06) is almost the same as in the 100k resistor case, which is very suspicious. And here things get even weirder (at least to me). To connect the pmodIA with my protoboard I am using two SMA pigtails which carry the signals. 3) If I leave the circuit opened (using the pigtails) I get the following curve ("opencircuit.png"). This curve displays a peak at a certain frequency and then a decay (and at the end, it grows again). With an opencircuit I would expect to see, however, and +INF impedance, or a very high value (impedance of the air between the connectors). 4) If I take off the pigtails and repeat the same experience (open circuit) I get the following curve (opencircuit_NO_PIGTAILS.png). The results is almost identical, except that the values are lower. 5) If using the pigtails, I make a shortcircuit between the connectors, I get the following curve (shortcirtuit.png). This curve makes sense (at least a little bit, to me) as it is telling me that the pigtails are acting as inductors (because they are wires) and so that their impedance grows with frequency according to 2*pi*L. 6) If I take off the pigtails and shortcircuit the sma connectors in the pmodIA board directly I get the following curve (shortcircuit_NO_PIGTAILS.png). Again, like in the opencircuit case, the curve is almost identical to the one using pigtails, except that the values are a little bit lower. Some extra information: I am supplying 3V3 to the pmodIA through the raspberry pi. I am NOT connecting the SEL pin to anything (not GND nor VCC). How is it possible that I am getting these results? Is there something wrong with my code? Is my board broken?? Is maybe my settling time for the sweep configuration not right? Do I have to connect the SEL pin to GND or VCC? I would really appreciate your help as I need to finish this experiment in, at least, 1 month. Thank you so much for your attention, and let me know if you need more info. Manu B. Valentin
  8. I soldered on an external 16 MHz clock to the PMod IA, it was sending data out, and the oscillator was clocking at 16 MHz but there was no fluctuation in sensor impedance. I an worried I might have over heated the board or oscillator. What type of solder is used on the solder pads of this board? Katy
  9. Which platforms or Platforms will be best to support the C++ example code for the PMODIA impedance analyzer? Is there and easy modification for using Arduino?
  10. Please, I need information about pModIA impedance analyser. I am using Arduino UNO connected to a pModIA to measure impedance. The Arduino codes work with some modifications of ChipKIT example. My question is how to do the calibration? Could someone send me a picture or schetch showing how to make pModIA connections to the component under test (DUT)? My project is very simple, I just want to measure the impedance of a fixed resistor at different frequencies. I'm having difficulty in understanding the connections and using the pModIA to measure this impedance. The pModIA manuals show no illustration of how to make the connections. For example, I will use only one SMA connector or, simultaneously, both connectors? I need a step by step tutorial. Someone could help me? Thank you.
  11. Roney

    PModIA Impedance Analyser

    Please, I need informations about how to physically connect PModIA to the circuit for impedance measurement. Can someone send-me a schematics? Thanks.
  12. Please, I need informations about how to use, setup, connect, calibrate and configure the PModIA Impedance Analyser in an Arduino Leonardo board. Is there a video tutorial?
  13. yangz3

    Probes For Pmodia

    Hi, I'm about to buy the PmodIA board. I'm wondering where can I get the probes for the board? Thank you.