Close
0%
0%

2016 Ford F150 nightly automatic locking

ESP32-powered auto-lock for 2016 F-150s. Uses NTP time sync and a high-torque servo to ensure your truck is secured nightly at 10 PM.

Similar projects worth following
0 followers
Never wonder if the truck is locked again. This ESP32-powered device physically presses a spare 2016 Ford F-150 key fob every night at 10 PM. By using NTP (Network Time Protocol) via Wi-Fi, it ensures the vehicle is secured without needing to tap into the truck's wiring or CAN bus.

The build is housed in a 100x60x25mm project case. Inside, a solderable breakout board provides a rock-solid platform. For efficiency, a DROK mini buck converter is soldered to the bottom of the board, feeding a dedicated 3.3V rail to the ESP32, while the 5V 2A input powers the high-torque servo. A 3-pin internal header allows for easy servo disconnection, with all excess wiring coiled neatly inside for a clean look.

The mechanical interface features a custom 3D-printed mount and fob tray, secured to the case lid with double-sided foam tape. This ensures the standard servo horn hits the "Lock" button with perfect alignment every time. It’s a reliable, non-invasive smart home upgrade.

Design & Implementation

The "Air-Gapped" Security Philosophy

The primary goal was to automate a 2016 Ford F-150 without modifying the vehicle's hardware. By using a spare key fob, the project remains completely non-invasive. If I sell the truck or change vehicles, I simply swap the fob and the 3D-printed tray.

Power Delivery & Efficiency

Reliability was a major concern for a device meant to run 24/7.

  • Dual-Rail Setup: I used a 5V 2A wall adapter as the primary source.
  • Under-Board Buck Converter: To save space and keep the top of the breadboard clean, I soldered a DROK Mini Buck Converter to the bottom of the solderable breadboard.
  • Fixed Voltage: I configured the DROK for a fixed 3.3V output to power the ESP32 logic rail. This prevents the "noise" or voltage sag from the servo (on the 5V rail) from causing the ESP32 to brown out during the 10 PM trigger.

Mechanical Assembly

The physical build is divided into two parts: the logic enclosure and the mechanical interface.

  • The Base: A standard 100x60x25mm black project box.
  • The Mount: I designed a custom 3D-printed tray that holds the Ford F-150 fob in a fixed position. The servo is integrated into this same mount to ensure the standard plastic horn is perfectly aligned with the "Lock" button.
  • Vibration Dampening: The 3D-printed assembly is attached to the case using double-sided foam tape. This not only secures the mount but also absorbs the torque kickback from the servo, ensuring the "press" is consistent.

Programming & OTA Workflow

Because the project board lacks a built-in USB port, I used a USB-to-ESP01 adapter to bridge the TX/RX/GND pins for the initial flash.

  1. Bootstrap: I pushed a basic sketch to enable ArduinoOTA.
  2. Wireless Calibration: Once assembled and closed, I used the 20-second boot test logic. This allowed me to update code via Wi-Fi and watch the servo actuate 20 seconds later to verify the physical alignment without needing to plug in a cable.

Internal Cable Management

To maintain a "finished product" feel:

  1. All excess servo wiring is coiled neatly inside the case.
  2. I soldered a 3-pin male header directly to the breakout board.
  3. To service the unit, I simply open the lid and unplug the servo—no dangling wires or external mess.

Software Logic

The ESP32 uses the WiFi.h and time.h libraries to connect to an NTP server. On boot, it grabs the current epoch time and then checks every second if the local time matches 22:00:00. When triggered, the servo moves to the calibrated posPress angle, holds for 1000ms, and returns to posIdle.

Servo_truck_locker.txt

Arduino IDE code

plain - 2.95 kB - 03/13/2026 at 15:46

Download

servo_truck_locker.stl

Standard Tesselated Geometry - 137.78 kB - 03/13/2026 at 15:44

Download

servo_truck_locker.f3d

fusion - 188.51 kB - 03/13/2026 at 15:44

Download

  • 1 × Espressif ESP32 IOT ESP-WROOM-32D microcontroller
  • 1 × Solderable Breadboard & ESP32 Breakout Solderable Breadboard & ESP32/ESP8266/ESP01 Module Breakout - with 3.94" x 2.375" x 1.875" (100x60x25mm)
  • 1 × DROK DC-DC Mini Buck Converter DROK DC 5V Power Converter, 5pcs Mini Voltage Buck Regulator DC 4.5-20V 12V 9V Step Down to 5V Reducer Transformer Board 3A 10W Adjustable Fixed Volt Output Step-Down Power Supply Stabilize
  • 1 × High-Torque Metal Gear Servo
  • 1 × 5V 2A DC Power Supply

View all 8 components

  • 1
    Build Instructions

    Step 1: Configure the Power Supply

    Before soldering the ESP32, prepare the DROK Buck Converter.

    • Locate the "ADJ" trace on the back of the module and cut it carefully with a hobby knife.
    • Bridge the two pads marked 3.3V with a blob of solder.
    • Verify with a multimeter that the output is exactly 3.3V when 5V is applied to the input.

    Step 2: The "Under-Board" Assembly

    To save space in the 100x60x25mm case:

    • Solder the configured DROK converter to the bottom of the solderable breadboard.
    • Route the 3.3V output to the board's designated 3.3V rail and the 5V input to the 5V rail.
    • Solder the ESP32-WROOM-32D to the top of the board, ensuring it is powered by the 3.3V rail.

    Step 3: Initial "Bootstrap" Programming

    Since there is no USB port, you must use the USB-to-ESP01 adapter:

    • Connect the adapter’s TX to RX, RX to TX, and GND to GND on the breakout board.
    • Put the ESP32 into bootloader mode (usually by holding the Boot button while powering on or grounding GPIO 0).
    • Use the Arduino IDE to flash the provided sketch. Crucial: Ensure your Wi-Fi credentials and OTA password are set correctly in this first flash.

    Step 4: Mechanical Integration & Wiring

    • Solder a 3-pin male header to the board. Connect the signal pin to GPIO 18, and the power pins to the 5V and GND rails.
    • Drill a small hole in the project case lid.
    • Pass the servo wire through the hole, plug it into the internal header, and coil the excess wire neatly inside the case before snapping the lid shut.

    Step 5: Fob Mounting & Calibration

    • Use double-sided foam tape to attach your 3D-printed tray/servo mount to the exterior of the case lid.
    • Place the Ford F-150 fob into the tray.
    • The 20-Second Test: Power on the unit. You have 20 seconds to watch the alignment. Use the OTA network port in the Arduino IDE to tweak posPress and posIdle wirelessly until the button press is firm but doesn't stall the motor.

    Final Tip for Success

    If the servo "twitches" too much on startup, ensure your 5V power supply is a true 2A adapter. The ESP32 and Servo sharing a ground is fine, but the high-torque motor needs that amperage overhead!

View all instructions

Enjoy this project?

Share

Discussions

Does this project spark your interest?

Become a member to follow this project and never miss any updates