bskdany opened a new pull request, #16087:
URL: https://github.com/apache/nuttx/pull/16087

   ## Summary
   This PR is from CuInSpace.
   
   This PR adds an experimental driver for the Nuvoton 24 bit NAU7802 ADC. The 
driver uses I2C and implements the UORB driver interface from NuttX.
   
   The PR also includes proper documentation for the NAU7802.
   
   ## Impact
   
   The NAU7802 can be used with NuttX.
   
   ## Testing
   
   Testing was done with an Adafruit NAU7802 board attached to a 100kg CZL601J 
loadcell and Raspberry Pi Pico W. 
   The pico had GPIO 0 and 1 reserved for I2C0, it was also powering the 
NAU7802 directly through the 3.3V out pin. 
   
   Each function and control signal was properly tested.
   
   The `uorb_listener` utility was used to receive data from the sensor 
properly.
   
   ```
   nsh> uorb_listener
   
   Mointor objects num:1
   object_name:sensor_force, object_instance:0
   sensor_force(now:11480000):timestamp:11480000,force:13510.000000,event:0
   sensor_force(now:11590000):timestamp:11590000,force:13533.000000,event:0
   sensor_force(now:11700000):timestamp:11700000,force:13502.000000,event:0
   sensor_force(now:11810000):timestamp:11810000,force:13495.000000,event:0
   sensor_force(now:11920000):timestamp:11920000,force:13452.000000,event:0
   sensor_force(now:12030000):timestamp:12030000,force:13493.000000,event:0
   sensor_force(now:12140000):timestamp:12140000,force:13484.000000,event:0
   sensor_force(now:12250000):timestamp:12250000,force:13505.000000,event:0
   sensor_force(now:12360000):timestamp:12360000,force:13428.000000,event:0
   sensor_force(now:12470000):timestamp:12470000,force:13417.000000,event:0
   sensor_force(now:12580000):timestamp:12580000,force:13440.000000,event:0
   sensor_force(now:12690000):timestamp:12690000,force:13455.000000,event:0
   sensor_force(now:12800000):timestamp:12800000,force:13460.000000,event:0
   ```
   
   A calibration script is included in the documentation for manual sensor 
calibration to output the data in grams from a loadcell.
   ```
   nsh> calibrate_script
   Zero point: 13245
   Place weigth on the sensor
   Starting gain calibration
   Weight value: 36160
   Force: 2636.409
   Force: 2636.016
   Force: 2635.848
   Force: 2636.577
   Force: 2633.828
   Force: 2635.118
   Force: 2637.195
   Force: 2637.139
   Force: 2636.297
   Force: 2634.108
   ```
   
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to