Skip to content

Commit

Permalink
dyno now has a belt reduction to move encoder off-axis
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeferguson committed Jan 10, 2025
1 parent 96b4d13 commit 35522ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/dyno/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,10 @@ ADS8684<SPI1_BASE, adc_cs, adc_reset, spi1_read_dma, spi1_write_dma> adc;
DAC121<SPI2_BASE, dut_dac_cs> dac;

// Encoder is AMT102-V, set to 2048PPR = 8192CPR
// Belt reduction is 74:21
#include "encoder.hpp"
Encoder<TIM3_BASE> absorber_enc;
#define ABSORBER_CPR 8192.0f
#define ABSORBER_CPR 8192.0f * 21.0f / 71.0f
#define TO_RADIANS (2.0f * 3.141592653589793f)
#define VELOCITY_FILTER_COEFF 0.3f

Expand Down

0 comments on commit 35522ad

Please sign in to comment.