diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..564499d --- /dev/null +++ b/README.en.md @@ -0,0 +1,78 @@ +
+ +

+ Lire cette page en français + English, page shown +

+ +Launch Track, the launch section + +
+ +The launch section accelerates the train over a few tens of centimetres, instead of hauling it to the top of a hill. A motor drives a pulley, the pulley turns a toothed belt, and a catch car fixed to that belt takes hold of the train, carries it away while accelerating, then lets go. + +The module drives that motor, measures the real belt speed at the encoder, and brings the catch car back to its rest position between two launches. + +Like the other modules, it is configured on first boot through a captive portal, then joins the server over WebSocket. + +**Version 0.1.0** + +01 How it works + +Everything turns on one question: is the catch car where we think it is, and is it really carrying the train? + +An encoder on the pulley shaft answers both. It gives the belt speed, which is what lets the acceleration ramp be followed. And it gives the catch car's position along its travel, which is what lets it be brought back to rest after every launch. + +HOMING: the catch car hunts for its rest position at start-up. IDLE: catch car at rest, zone clear. LOADED: train latched, waiting for clearance. LAUNCHING: acceleration ramp. RELEASED: train gone, the belt slows down. RETURNING: the catch car goes back to rest, then a full cycle to IDLE. FAULT: slip, catch car not found or timeout exceeded, reachable from any state. + +The catch car does not slam back in reverse: the belt slows down over `RAMP_DOWN_MS`, then creeps back at `RETURN_SPEED_PERCENT` until the rest sensor. + +02 Safety + +**No launch is decided locally.** The module carries out an order from the controller, which alone knows whether the track downstream is clear. + +**The catch car has to be at rest before a train is accepted.** If it is not, it will latch in the wrong place, or not at all. That is the whole reason for the `HOMING` state at start-up. + +**Two timeouts bound the operation.** `LAUNCH_TIMEOUT_MS` declares a fault if the exit is never seen, `RETURN_TIMEOUT_MS` if the catch car never finds its rest position again. + +**Slip cuts everything.** If the speed measured at the encoder drifts lastingly from the command by more than `SLIP_TOLERANCE_PERCENT`, the catch car is sliding along the train instead of carrying it. Pushing on wears the belt, rounds the teeth, and ends up damaging the train's latching piece. + +03 Hardware + +Outputs: GPIO 25 motor PWM for belt speed, GPIO 26 motor direction, GPIO 27 motor enable, GPIO 2 ready LED for the LOADED state, GPIO 4 fault LED for the FAULT state. Inputs: GPIO 34 encoder channel A for speed and position, GPIO 35 encoder channel B for direction of rotation, GPIO 32 catch car rest sensor, GPIO 33 train presence sensor, GPIO 36 exit sensor. + +04 Settings + +LAUNCH_SPEED_PERCENT: target speed at the end of the ramp. RAMP_UP_MS: the character of the launch, short and brutal or long and gradual. RAMP_DOWN_MS: deceleration after the release. RETURN_SPEED_PERCENT: return speed to rest. SLIP_TOLERANCE_PERCENT: the gap tolerated before calling it slip. LAUNCH_TIMEOUT_MS: the delay past which an exit never seen becomes a fault. + +Too short a ramp makes the catch car slip, or strains the latch. It is the first setting to revisit if the launch lacks bite. + +05 Bringing it up + +First copy [`include/env.h.example`](include/env.h.example) to `include/env.h` and fill it in: fallback portal credentials, the module identity and its secret. That file is not in git, and without it the firmware does not compile. + +Requires [PlatformIO](https://platformio.org/) inside Visual Studio Code. + +```bash +pio run # build +pio run -t upload # upload the firmware +pio run -t uploadfs # upload the portal to LittleFS +pio device monitor # serial console, 115200 baud +``` + +1. Power the module. It creates a WiFi access point. +2. Connect to it and open `http://192.168.4.1`. +3. Enter the target network. +4. The module reboots, joins the network and announces itself to the server. + +The credentials stay in the module's memory, never in the repository. + +06 Ecosystem + +The pinout, the parameters and the state machine are laid down in `src/main.cpp`. What remains to be written is reading the encoder on interrupt, the speed loop, slip detection and telemetry. + +The common base for every module is the [WiFi Manager](https://github.com/Microcoaster/MicroCoaster_WifiManager). The other way of giving the train its energy is the [Lift Hill](https://github.com/Microcoaster/Lift-Hill). The driving is done from the [WebApp](https://github.com/Microcoaster/MicroCoasterWebApp). + +--- + +MicroCoaster · Author: Cybertrist diff --git a/README.md b/README.md index 8bee351..4088b51 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@
+

+ Français, page affichée + Read this page in English +

+ Launch Track, zone de lancement
diff --git a/docs/en/banniere.png b/docs/en/banniere.png new file mode 100644 index 0000000..ad0a635 Binary files /dev/null and b/docs/en/banniere.png differ diff --git a/docs/en/schemas/brochage.png b/docs/en/schemas/brochage.png new file mode 100644 index 0000000..8b9f2a0 Binary files /dev/null and b/docs/en/schemas/brochage.png differ diff --git a/docs/en/schemas/etats.png b/docs/en/schemas/etats.png new file mode 100644 index 0000000..d82f93c Binary files /dev/null and b/docs/en/schemas/etats.png differ diff --git a/docs/en/schemas/reglages.png b/docs/en/schemas/reglages.png new file mode 100644 index 0000000..8941abc Binary files /dev/null and b/docs/en/schemas/reglages.png differ diff --git a/docs/en/sections/s01.png b/docs/en/sections/s01.png new file mode 100644 index 0000000..4b9bd53 Binary files /dev/null and b/docs/en/sections/s01.png differ diff --git a/docs/en/sections/s02.png b/docs/en/sections/s02.png new file mode 100644 index 0000000..50ddd68 Binary files /dev/null and b/docs/en/sections/s02.png differ diff --git a/docs/en/sections/s03.png b/docs/en/sections/s03.png new file mode 100644 index 0000000..29737f2 Binary files /dev/null and b/docs/en/sections/s03.png differ diff --git a/docs/en/sections/s04.png b/docs/en/sections/s04.png new file mode 100644 index 0000000..1019eed Binary files /dev/null and b/docs/en/sections/s04.png differ diff --git a/docs/en/sections/s05.png b/docs/en/sections/s05.png new file mode 100644 index 0000000..f34f0e4 Binary files /dev/null and b/docs/en/sections/s05.png differ diff --git a/docs/en/sections/s06.png b/docs/en/sections/s06.png new file mode 100644 index 0000000..fc68067 Binary files /dev/null and b/docs/en/sections/s06.png differ diff --git a/docs/langues/en-off.png b/docs/langues/en-off.png new file mode 100644 index 0000000..77ea9ec Binary files /dev/null and b/docs/langues/en-off.png differ diff --git a/docs/langues/en-on.png b/docs/langues/en-on.png new file mode 100644 index 0000000..c9dbf28 Binary files /dev/null and b/docs/langues/en-on.png differ diff --git a/docs/langues/fr-off.png b/docs/langues/fr-off.png new file mode 100644 index 0000000..41f4335 Binary files /dev/null and b/docs/langues/fr-off.png differ diff --git a/docs/langues/fr-on.png b/docs/langues/fr-on.png new file mode 100644 index 0000000..4e1cb47 Binary files /dev/null and b/docs/langues/fr-on.png differ