AD5933 Arduino Library Quick Guide - WuMRC/drive GitHub Wiki
- How to install the library
- Copy /drive/AD5933_Lib/AD5933_Custom Folder into .../Arduino/libraries/ (Only AD5933_Custom)
- Click Menu - Sketch - Import Libraries - Add Library...
- Choice the folder ".../AD5933_Custom".
- Done. Just
#include "AD5933.h"
and#include<Wire.h>
- Quick Instruction
- at the setup()
1. Add the initialization code "Wire.begin();"
2. Set the setting for external clock. "AD5933.setExtClock(true/false);"
3. Reset AD5933. "AD5933.resetAD5933();"
- at the loop()
1. You need to follow the procedure described in the datasheet of AD5933 to guarantee the accurate result without any bugs. (Fig 28, 22/40) 2. Please set all variables to ensure the proper operation of AD5933.
(Start Frequency, Increment, Number to increment, Settling Cycles, Temperature, Sweep Voltage, PGA Gain...)
AD5933.setStartFreq(50000);
AD5933.setIncrementinHex(1);
AD5933.setNumofIncrement(2);
AD5933.setSettlingCycles(0x1FF, 4);
AD5933.getTemperature();
AD5933.setVolPGA(0,1);
c. Obtain the gain factor with "AD5933.getGainFactor(4700);"
d. Declare double type array, and Obtain measurement with "AD5933.performFreqSweep(double,double*);"
A. Acknowledge
- Reference: https://github.com/open-ephys/autoimpedance/tree/master/code/ardunio
- I referred and inspired by the Github code above.
- I understand and get some of the idea how the flow goes and applied into some functions in my code.