RF-Positioning-System V0.1
by Max Heinekamp
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1
12
13#ifndef CONFIG_H
14#define CONFIG_H
15
16#include "Ethernet.h"
17
18// SCPI parser command-hash width. The Vrekrer SCPI parser's default hash type (uint8_t) has
19// only 256 possible values; with ~35 registered commands spanning a multi-level tree, hash
20// collisions are a real risk. Confirmed: under uint8_t, "CONFigure:MOTor" itself hashes to
21// exactly 0, which the parser's own code treats as its "no tree base set" sentinel, silently
22// breaking every command registered under that entire branch (RMScurrent, HOLDcurrent,
23// MICROsteps, SPEED, ACCELeration and their queries). Must be defined before
24// Vrekrer_scpi_parser.h is first included anywhere in the project (this file is included
25// ahead of the parser everywhere it's used).
26#define SCPI_HASH_TYPE uint16_t
27
29// DEVICE INFORMATION //
31
32#define DEVICE_MANUFACTURER "EMES"
33#define DEVICE_NAME "RF-Positioning-System"
34#define DEVICE_VERSION "1.0.0"
35#define DEVICE_SERIAL "001"
36#define POWER_GOOD_PIN 26 // Output from the eFuse, not currently used
37
38// SCPI server settings
39#define SCPI_PORT 5025
40#define IP_ADDRESS "192.168.0.55"
41#define MAC_ADDRESS { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }
42#define ERROR_QUEUE_SIZE 10
43
44// Ethernet module settings
45#define ETHERNET_RESET_PIN 25
46
47// Hardware reset control
48#define RESET_CONTROL_PIN 4 // GPIO pin to pull EN low for hardware reset
49
50// Stepper motor settings
51#define STEPS_PER_REV 200
52#define MOTOR1_STEP_PIN 15
53#define MOTOR1_ENABLE_PIN 32
54#define MOTOR2_STEP_PIN 13
55#define MOTOR2_ENABLE_PIN 12
56#define MOTOR_SERIAL_PORT Serial1
57#define R_SENSE 0.11f
58#define STEP_DELAY 4 // Was 160
59#define RMS_CURRENT 1600 // in mA
60#define HOLD_CURRENT 8 // as a fraction /32 of RMS_CURRENT
61#define MICROSTEPS 16 // 1/16th microstepping
62#define STEPPER1_ADDRESS 0
63#define STEPPER2_ADDRESS 1
64#define AXIS1_GEAR_RATIO 1
65#define AXIS2_GEAR_RATIO 6
66#define AXIS2_DIR_CHANGE_CAL_FACTOR 3 // degrees to drive for backlash compensation
67#define SPEED 1000 // in steps/s
68#define ACCELERATION 5000 // in steps/s^2
69
70
71#endif // CONFIG_H