Firmware changes for Rev 4 PCB

Firmware changes for Rev 4 PCB
This commit is contained in:
OneFinityCNC
2021-05-19 15:18:53 -04:00
parent a00c8f7dfd
commit 75bb20b250
3 changed files with 11 additions and 5 deletions

View File

@@ -103,7 +103,7 @@ enum {
#define VOLTAGE_REF_R2 1000
#define CURRENT_REF_R2 137
#define CURRENT_REF_MUL (100.0 * 2700 / CURRENT_REF_R2) // 2700 from datasheet
#define CAP_PRECHARGE_PERIOD 50 // ms
#define CAP_PRECHARGE_PERIOD 2000 // ms
#define REG_SCALE 100
#define AVG_SCALE 3

View File

@@ -369,14 +369,14 @@ static void validate_input_voltage() {
static void charge_caps() {
IO_PORT_SET(SHUNT_PIN); // Disable shunt (hi)
delay(1000);
delay(100);
IO_PORT_SET(PC2_PIN); //Enable pre-charge circuit
delay(CAP_PRECHARGE_PERIOD); //Wait for Vs caps to charge
IO_PORT_CLR(PC2_PIN); //Disable pre-charge circuit
delay(1);
//delay(100);
IO_PORT_SET(MOTOR_PIN); // Motor voltage on
delay(CAP_CHARGE_TIME);
//delay(CAP_CHARGE_TIME);
}