Forum Replies Created
-
AuthorPosts
-
Edwin Blom
ParticipantMany thanks Matthias. D7 was always unused on this controller hence the mistake remained unnoticed. Thanks for the quick response!
Edwin Blom
ParticipantMatthias,
Great toy indeed. It was working before but this year I ‘optimised’ my lay-out to use only 4 MLC instead of 6 and maybe that caused some issues.
By the way, very happy with firmware 1.2.2. Seems faster. Also, using a ESP32S3 for MTC4BT seems to improve the response time of train stops. many thanks for all your workEdwin Blom
Participant// Number of servos
#define NUM_SERVOS 1TServoConfiguration servoConfiguration[NUM_SERVOS] =
{
{
.pin = D0,
.pinType = 0,
.detachAfterUsage = true
},
};// LED WIRING CONFIGURATION
// LEDs are used in signals, level crossing lights or bascule bridge lights
// As an example, 2 LEDs are required for a light signal with 2 aspects// Number of LEDs
#define NUM_LEDS 6TLEDConfiguration ledConfiguration[NUM_LEDS] =
{
{
.pin = D1,
.pinType = 0
},
{
.pin = D2,
.pinType = 0
},
{
.pin = D3,
.pinType = 0
},
{
.pin = D4,
.pinType = 0
},
{
.pin = D5,
.pinType = 0
},
{
.pin = D6,
.pinType = 0
}
};// SENSOR WIRING CONFIGURATION
// Sensors are generally used to indicate that a train have reached a specific position on the layout
// Special forms are remote and virtual sensors (see below)// Number of sensors connected or connectable to the controller
#define NUM_SENSORS 1// A special form of a sensor is the “remote sensor”
// Remote sensors are not electrically connected to this controller, they are triggered via Rocrail commands.
// Remote sensors can be used for level crossings in Autonomous Mode.
// Set REMOTE_SENSORS_ENABLED to true to generally enable remote sensors.
// If you do not control a level crossing in Autonomous Mode with this controller, set to false!
#define REMOTE_SENSORS_ENABLED falseTSensorConfiguration sensorConfiguration[NUM_SENSORS] =
{
{
.pin = D7,
.pinType = LOCAL_SENSOR_PIN_TYPE,
.remoteMattzoControllerId = -1
},
};// STATUS LED WIRING CONFIGURATION
// Digital output pin to monitor controller operation (typically a LED)
// Set to false if no status LED is installed
const bool STATUS_LED_PIN_INSTALLED = true;
// If installed, the pin controlling the status LED
const uint8_t STATUS_LED_PIN = D8;
// If installed, set to true to flip high/low state of the status led pin
const bool STATUS_LED_REVERSE = false;
// Power level of the status LED (0..1023)
// Recommended max. power levels: white: 800, blue: 600, green: 500, yellow: 350, red: 300
const int STATUS_LED_POWER = 600;// ****************************
// LOGICAL OBJECT CONFIGURATION
// ****************************// SWITCH CONFIGURATION
// Number of switches
#define NUM_SWITCHES 0TSwitchConfiguration switchConfiguration[NUM_SWITCHES] = {};
// SIGNAL CONFIGURATION
// Number of signals
#define NUM_SIGNALS 2
// Maximum number of signal aspects (e.g. 2 for red/green, 3 for red/green/yellow etc.)
#define NUM_SIGNAL_ASPECTS 2
// Number of signal LEDs (usually equal to NUM_SIGNAL_ASPECTS)
#define NUM_SIGNAL_LEDS 2
// Maximum number of servos for form signals (e.g. one for the primary and another one for the secondary semaphore)
// If no form signals are used, just set to 0
#define NUM_SIGNAL_SERVOS 0TSignalConfiguration signalConfiguration[NUM_SIGNALS] =
{
// signal 0: light signal with 2 aspects, controlled via Rocrail ports 1 and 2
{
.aspectRocrailPort = {3, 4},
.aspectLEDPort = {2, 3},
.aspectLEDMapping = {
{true, false},
{false, true}},
.servoIndex = {},
.aspectServoAngle = {},
.overshootSensorIndex = -1
},
// signal 1: light signal with 2 aspects, controlled via Rocrail ports 1 and 2
{
.aspectRocrailPort = {5, 6},
.aspectLEDPort = {4, 5},
.aspectLEDMapping = {
{true, false},
{false, true}},
.servoIndex = {},
.aspectServoAngle = {},
.overshootSensorIndex = -1
}
};// LEVEL CROSSING CONFIGURATION
// General switch for level crossing (false = no level crossing connected; true = level crossing connected)
#define LEVEL_CROSSING_CONNECTED true// Number of boom barrier servos configured for the level crossing
#define LC_NUM_BOOM_BARRIERS 1// Number of signals configured for the level crossing
#define LC_NUM_LEDS 2// Number of level crossing sensors
#define LC_NUM_SENSORS 0// Number of tracks leading over the level crossing
#define LC_NUM_TRACKS 1TLevelCrossingConfiguration levelCrossingConfiguration =
{
.rocRailPort = 1101,
.servoIndex = {0},
.bbClosingPeriod_ms = 3500,
.bbClosingDelayPrimary_ms = 0,
.bbClosingDelaySecondary_ms = 1250,
.bbOpeningPeriod_ms = 3500,
.bbAnglePrimaryUp = 0,
.bbAnglePrimaryDown = 60,
.bbAngleSecondaryUp = 180,
.bbAngleSecondaryDown = 90,
.ledIndex = {0, 1},
.ledFlashingPeriod_ms = 750,
.ledsFading = true,
.sensorIndexBoomsClosed = 0,
.sensorIndexBoomsOpened = 1,.autonomousModeEnabled = false,
.trackReleaseTimeout_ms = 30000,
.sensorConfiguration =
{}
};Edwin Blom
ParticipantThanks for the advice Joos. I have implemented your tips. Number of crashes has reduced 🙂 but not fully eliminated. I cannot easily change my sensor position, it’s a compact layout all with ballasted tracks on MILS. I will try for one block to use the entry sensor as a enter+in and see if that helps but I guess I am really waiting for the update as outlined by Matthias. Thanks again.
Edwin Blom
ParticipantJoos,
Thanks for the response. I have now been able to configure all the trains in a single MTC4BT controller and not using MTC4PU controllers anymore.
The “full ignore” of the stop signal has not re-appeared but I still have a lag before a stop signal arrives when a sensor is being activated. This weekend I will carefully check RocRail settings and see if this might be the issue. Will keep you posted.Edwin Blom
ParticipantIt’s been a while and I have setup my winter village (pics will follow when finished). I have three trains (4 hubs) running on MTCPU (last year firmware) and one train running on MTC4BT. All trains still have the problem with (not) responding to stop commands. Has anyone been able to resolve this? Many thanks in advance.
Edwin Blom
ParticipantJoost,
Sometimes it’s immediately and sometimes after minutes. It’s random; for example today one of the three controllers responded immediately whereas the other two suffered from the delays.
Edwin Blom
ParticipantJoost,
I am using these
https://www.hobby-en-modelbouw.nl/website/index.php?Show=Search&KeyWord=76141#filter:1278a9335f3e0bcd6938c1109f7c4bccregards,
Edwin -
AuthorPosts
