The required tap_threshold value changes with the distance traveled
during each sensor sample. So, probing at a higher speed would
require a higher tap_threshold and a lower sampling rate would also
require a higher tap_threshold. To avoid future issues with this
scaling, change the code to automatically scale the requested value by
speed and samples per second.
As a result of this automatic scaling, existing user configurations
will need to change. It is hoped that existing configurations will
have a value that is sufficiently low that they will reliably get an
error until they can recalibrate.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Print near the origin lead in to fast motor movements, therefore the
movement needs to be scaled down. The start of the scaling is done via
a rotation velocity limit from the config.
Signed-off-by: Nils Hensch <nils.hensch@gmx.de>
Adds two checks to prevent config settings which could lead to div-by-zero errors in specific circumstances:
- `raw_dia1` and `raw_dia2` must be different to prevent a possible exception in `adc2_callback`
- `max_difference` must be less than `default_nominal_filament_diameter` to prevent a possible exception in `extrude_factor_update_event`
Doc is also updated.
Signed-off-by: Ben Lye ben@lye.co.nz
Adds a toggle to enable or disable flow compensation based on the
filament width sensor readings without disabling the sensor entirely.
Useful on printers where the hall effect sensor is too inaccurate to
helpfully adjust the extrusion multiplier, but is good enough to act as
a filament runout sensor.
The new setting defaults to true to preserve the existing sensor
behavior.
Existing width sensor G-Code commands are updated to optionally enable
and disable flow compensation and to show the state of the sensor and
command outputs are normalized.
Also includes updates to the relevant doc pages.
Signed-off-by: Ben Lye ben@lye.co.nz
Add a new EddyParameterHelper to override ProbeParameterHelper.
Only use the printer.cfg lift_speed, samples, sample_retract_dist,
samples_result, samples_tolerance, and samples_tolerance_retries
settings for normal probe operations. Don't use these defaults when
using a "METHOD" set to "scan", "rapid_scan", or "tap". Each of these
probing mechanisms is distinct and it's unlikely a user could
meaningfully set a default for all of them.
Don't set sample_retract_dist when using "scan" and "rapid_scan"
modes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Theoretically a "tap" probe should detect the exact point that the
nozzle contacts the bed. In practice, however, there can be a
systemic bias that one may wish to account for. This bias may be due
to backlash, thermal expansion, a detection bias, or similar issues.
Add a new tap_z_offset config parameter to allow users to specify an
offset.
Also, update the Z_OFFSET_APPLY_PROBE command to support modifying
this value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The config option 'z_offset' name is confusing as its behavior is
notably different from how other probe hardware uses 'z_offset'.
Rename to 'descend_z' to make its behavior more clear.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Allow the "tap_threshold" to be overriden during PROBE type commands.
This makes it easier to calibrate an initial tap_threshold.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This adds host and firmware support for the Bosch BMI160 IMU. It includes support for both SPI and I2C communication protocols.
The firmware implementation includes a specific SPI wake-up sequence (dummy read) required to switch the sensor interface mode reliably. Validated on Linux MCU (SPI) and RP2040 (I2C) with stable 1600Hz ODR.
Signed-off-by: FranciscoStephens <francisco.stephens.g@gmail.com>
Use SOS filters + derivative filter to generate dF/dT on mcu.
Feed that to the MCU's trigger_analog peak detection.
Interpret peak time as a tap event
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
- Document AHT15 and AHT30 sensor support
- Update sensor_type options (AHT1X, AHT2X, AHT3X)
- Add note about some AHT20 working with AHT1X sensor type
Signed-off-by: Lev Voronov <minicx@disroot.org>
This also enables arbitrary using names for primary carriages
with generic_cartesian kinematics.
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* tests: Added a regression test for generic_cartesian kinematics
* kinematics: An intial implementation of generic_cartesian kinematics
* generic_cartesian: Refactored kinematics configuration API
* generic_cartesian: Use stepper instead of kinematic_stepper in configs
* generic_cartesian: Added SET_STEPPER_KINEMATICS command
* generic_cartesian: Fixed parsing of section names
* docs: Generic Caretsian kinematics documentation and config samples
* generic_cartesian: Implemented multi-mcu homing validation
* generic_cartesian: Fixed typos in docs, minor fixes
* generic_cartesian: Renamed `kinematics` option to `carriages`
* generic_cartesian: Moved kinematic_stepper.py file
* idex_modes: Internal refactoring of handling dual carriages
* stepper: Refactored the code to not store a reference to config object
* config: Updated example-generic-cartesian config
* generic_cartesian: Restricted SET_STEPPER_CARRIAGES and exported status
* idex_modes: Fixed handling stepper kinematics with input shaper enabled
* config: Updated configs and tests for SET_DUAL_CARRIAGE new params
* generic_cartesian: Avoid inheritance in the added classes
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* Add gram scale features to load_cell
* Convert sensor counts to grams and make this available via unix socket and object status
* Basic GCodes for tearing and reading the load cell
* Guided Calibration
* Diagnostic gcode to check the health of the load cell
* Update load_cell Documentation
* Add API server load_cell/dump_force endpoint
* Update [load_cell] config with calibration fields
* Add G-Code commands for working with load cells
* Add status reference for load_cell objects
Signed-off-by: Gareth Farrington <gareth@waves.ky>
Added a temperature sensor configuration for ADS1103, ADS1104, ADS1105, ADS1113, ADS1114 and ADS1115 chips that can be used to add Analog to Digital Conversion capability to machines that don't have that on their own. Like Raspberry Pi's or if more analog input pins are needed than the chip provides like for RP2040. Generally they can be used for any analog input, but the typical use case is for temperature measurement. This code also has been written with temperature measurement in mind and not as a general ADC.
Signed-off-by: Konstantin Koch <korsarnek@gmail.com>
Signed-off-by: Jack Wakefield <jackwakefield@protonmail.com>
This adds a new resonance test method that can help if a user has some mechanical problems with the printer.
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
This commit adds automatic calculation support for compensating X and Y axis twist in the axis_twist_compensation module.
Signed-off-by: Jorge Apaza Merma <yochiwarez@gmail.com>
This commit implements support for the Y-axis in the axis_twist_compensation
module. This update enables the module to handle corrections for printers
with a twisted Y rail.
Signed-off-by: Jorge Apaza Merma <yochiwarez@gmail.com>
* fix type comparison bug that stopped the sensor from initializing
* correct mismatch between docs and code for `sample_rate` (fixed to work same as hx71x)
* add input_mux, pga_bypass and vref options
* update configuration reference & fix typo
Signed-off-by: Gareth Farrington <gareth@waves.ky>
* Create the load_cell host module skeleton to create the sensors and start taking samples.
* Add support for the HX717 and HX711 ADC sensors.
Signed-off-by: Gareth Farrington <gareth@waves.ky>