An STM32 HAL example of reading the Avia Semiconductor HX711 24-bit ADC for load cells / weight scales / tensometric beams.
Source: HX711 Datasheet
In the example MOSI is used as CLK to produce the required number of cycles/pulses for HX711. It enables straightforward use of DMA just by calling HAL_SPI_TransmitReceive_DMA().
Don't worry 🙂 Just hit Alt-K to generate /Drivers/CMCIS/ and /Drivers/STM32G4xx_HAL_Driver/ based on the .ioc file. After a couple of seconds your project will be ready for building.
Before:
After:
- MOSI as CLK for HX711: My original idea, i.e. not copied from other sources. It doesn't mean that I'm the first one to do it this way - probably I'm not. I just didn't came across such a solution in other projects known to me.
- OLED: stm32-ssd1306 (MIT license)
Build your own home laboratory/workshop! Get inspired by ControllersTech, DroneBot Workshop, Andreas Spiess, GreatScott!, ElectroBOOM, Phil's Lab, atomic14, That Project, Paul McWhorter, and many other professional hobbyists sharing their awesome projects and tutorials! Shoutout/kudos to all of them!
Warning
Control engineering - do try this at home ❗
190+ challenges to start from: Control Engineering for Hobbyists at the Warsaw University of Technology.
Stay tuned!