Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
5 years, 10 months ago.
How to use opamp and set gain for STM32-F303RE?
I need to set gain on my ADC inputs (reading a strain gauge) - is this possible using MBED or am I better off biting the bullet and using CubeMX?
1 Answer
5 years, 10 months ago.
Hello Shane,
I'd suggest to connect the strain gauge to a HX711 module (24-Bit Analog-to-Digital Converter (ADC) for Weigh Scales available on eBay for less than $1) for example as shown here. The HX711 module is equipped with a low-noise programmable gain amplifier and that will allow you to set the gain and process the data with one of the HX711 user libraries available for Mbed targets, for example:
https://os.mbed.com/users/megrootens/code/HX711/docs/tip/classHx711.html
https://os.mbed.com/users/padte/code/HX711/file/a2666eae3d06/HX711.cpp/