Stage 2 — Batcave V1
From Prototype to Product
With the remote signal decoded in Stage 1, the V1 integrates a GPS module and packages everything into a printable enclosure that lives on the dashboard.
Components
| Part | Source |
|---|---|
| Wemos D1 Mini (ESP8266) | Amazon |
| 433 MHz Transmitter | Aukru TX module |
| GPS TTL Module (VK2828U7G5LF) | Amazon |
| 3D-Printed Case | Thingiverse #3721793 |
The Circuit

The RF transmitter connects to D0, GND, and VCC (3.3 V). The GPS module is wired via SoftwareSerial:
| GPS Pin | Color | ESP8266 Pin |
|---|---|---|
| EN | Yellow | VCC (3.3 V) |
| VCC | Red | VCC (3.3 V) |
| GND | Black | GND |
| RX | Green | D6 (SW Serial TX) |
| TX | Blue | D7 (SW Serial RX) |
The Firmware
Source: git repository
Finite-State Machine
The firmware is modelled as a state machine using the arduino-fsm library. Transitions are defined as (current state, next state, signal) triples — clean, predictable, easy to extend:
fsm.add_transition(&state_initial, &state_send_signal, SEND_SIGNAL_EVENT, NULL);
fsm.add_transition(&state_initial, &state_got_gps, GOT_GPS_EVENT, NULL);Timed transitions handle timeout cases automatically without additional polling code.
Main Workflow

Persistent State (EEPROM)
A key requirement is the morning-leave scenario: the device needs to know it is parked inside the garage after the engine is turned off so it can open the door on next startup.
Whenever the GPS fix changes or the car crosses the geofence perimeter, the following flags are written to EEPROM:
at_home— whether the car is currently within the home geofencegps_lost— whether GPS fix was lost (i.e., inside an enclosed space)
On boot: at_home == true && gps_lost == true → car is in the garage → send open signal immediately.
The Enclosure
Designed in Fusion 360 and printed in transparent PLA so the indicator LEDs glow through the shell.


STL files are published on Thingiverse: thing:3721793
Future Plans
The GPS module in the car opens up a range of follow-on ideas:
- Cloud telemetry — stream GPS tracks to a backend for storage and visualisation
- Electronic driver’s log — auto-generate mileage records from trip data
- LoRaWAN gateway — install a gateway on the rooftop and transmit via The Things Network instead of WiFi