NAU7802 Gain Sample Rate
Materials
Example
Introduction
This example shows how to adjust the specific parameters used in SparkFun NAU7802.
- Gain - The magnitude of amplification. Setting higher gain usually gives higher sensitivity.
- Gain can be set to one of the following values:
NAU7802_GAIN_128- 128xNAU7802_GAIN_64- 64xNAU7802_GAIN_32- 32xNAU7802_GAIN_16- 16x (default gain)NAU7802_GAIN_8- 8xNAU7802_GAIN_4- 4xNAU7802_GAIN_2- 2xNAU7802_GAIN_1- 1x (zero gain)
- Sample Rate - The number of samples taken per second (SPS).
- Sample Rate can be set to one of the following values:
NAU7802_SPS_320- 320 HzNAU7802_SPS_80- 80 HzNAU7802_SPS_40- 40 HzNAU7802_SPS_20- 20 HzNAU7802_SPS_10- 10 Hz (default sample rate)
Procedure
Connect the Load Cell to NAU7802.
Connect the red wire of Load Cell to RED pin (Excitation +) of NAU7802.
Connect the black wire of Load Cell to BLK pin (Excitation -) of NAU7802.
Connect the green wire of Load Cell to GRN pin (Signal +) of NAU7802.
Connect the white wire of Load Cell to WHT pin (Signal -) of NAU7802.
Connect the AMB82-mini to NAU7802.
Connect the VDD33 of AMB82-mini to 3V3 of NAU7802.
Connect the GND of AMB82-mini to GND of NAU7802.
Connect the Pin 12 (I2C_SDA pin) of AMB82-mini to SDA of NAU7802.
Connect the Pin 13 (I2C_SCL pin) of AMB82-mini to SCL of NAU7802.
Note
Download User Guide to understand more on pin definition.
Tip
Depending on your NAU7802 version, some may support 5V+ operating voltage—please check the official website before you connect to a 5V power supply. If your NAU7802 supports 5V+ operating voltage, connecting to V_USB instead of VDD33 tends to have less jitter effect.
The final wiring should look like the diagram below.
Open the example in File -> Examples -> AmebaWire -> NAU7802 -> GainSampleRate
Compile and run the example.
You can try setting different values for Gain or Sample Rate to see the difference. The output above sets Gain to 2x and Sample Rate to 40 Hz (40 SPS). If you set the Sample Rate to 8x, you should see the values doubled.


