Zero G Weight Support Device assists patients struggling with walking by providing weight support to practice and improve mobility. It combines advanced mechanical engineering and electronic control systems, offering a safe and effective rehabilitation tool. This device helps patients build strength and confidence in their walking abilities.
The zero gravity lifting device is designed to counteract gravity, allowing objects to be lifted and manipulated with minimal effort. It uses a load cell to measure tension, processes this information through a PID controller, and adjusts a stepper motor's velocity to achieve the desired effect.
- ATmega328P microcontroller
- HX711 load cell amplifier
- Stepper motor
- Custom PCB
- Real-time weight measurement using HX711 load cell amplifier
- PID control algorithm for smooth and accurate motor control
- Stepper motor control for precise movements
- Millisecond time tracking for accurate derivative calculations
The project is developed using WinAVR for the ATmega328P microcontroller.
- Initialize USART, millisecond timer, and interrupts
- Initialize and calibrate the HX711 load cell amplifier
- Set up the PID controller
- Enter the main loop:
- Read weight from the load cell
- Calculate weight change rate (derivative)
- Process through PID controller
- Control stepper motor based on PID output
- The PID constants (P_FACTOR, I_FACTOR, D_FACTOR) may need tuning for optimal performance
- The DELAY_MICROSECONDS constant in the stepper motor control can be adjusted to change motor speed
- The HX711 calibration process is crucial for accurate weight measurements
This custom library provides functions for interfacing with the HX711 load cell amplifier. Key functions include:
HX711_init()
: Initialize the HX711 moduleHX711_read()
: Read raw data from the HX711HX711_set_scale()
: Set the scale factor for weight conversionHX711_tare()
: Set the tare weightHX711_get_units()
: Get weight readings in desired units
This lightweight library provides millisecond-level timing capabilities, which are crucial for calculating the rate of change in weight. Key functions include:
millis_init()
: Initialize the millisecond timermillis_get()
: Get the current millisecond countmillis_reset()
: Reset the millisecond count to 0
The main program integrates all components and implements the control logic. Key features include:
- PID controller implementation
- Stepper motor control
- Weight derivative calculation
- Debug output via USART
- HX711 Data (DT) pin connected to PC4
- HX711 Clock (SCK) pin connected to PC3
- Stepper motor STEP pin connected to PD6
- Stepper motor DIR pin connected to PD7
The load cell requires calibration for accurate weight measurements. The current code uses a calibration factor of 222138.f, but this may need adjustment based on your specific load cell and setup.
For optimal performance, you may need to tune the following parameters:
- PID constants (P_FACTOR, I_FACTOR, D_FACTOR)
- DELAY_MICROSECONDS for stepper motor speed
- SCALING_FACTOR for PID calculations
The code includes debug output via USART. You can monitor this output to see real-time information about:
- Weight derivative
- PID controller output
Use this information to help with tuning and troubleshooting.
Potential areas for future development include:
- Implementing a user interface for easy control and monitoring
- Adding limit switches or other safety features
- Incorporating different lifting modes or profiles
- Implementing wireless control or monitoring capabilities
Contributions to improve the code or extend the functionality are welcome. Please ensure you follow good coding practices and thoroughly test any changes.
This project uses libraries with specific licenses:
- The millisecond tracking library is licensed under GNU GPL v3.
- Check the licensing terms for other components before use or distribution.
For questions or issues related to this project, please open an issue in the project repository or contact the project maintainers.
Remember to always prioritize safety when working with lifting devices and follow all relevant safety guidelines and regulations.