Skip to content

A low-cost tracked vehicle with a ESP32-CAM module, which can be controlled via WIFI with an Open Source Android app ESPHomeRC.

Notifications You must be signed in to change notification settings

rnauber/ESPHomeRC-Snowmobile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RC Snowmobile

TL;DR: I build a low-cost tracked vehicle with a ESP32-CAM module, which can be controlled via WIFI with an Open Source Android app ESPHomeRC.

snowmobile_lq.mp4

The Hardware

Bill of Materials

You need:

  • an ESP32-CAM module like this

  • a platform with tracks and motors like this

  • an H-bridge module like the MDD3A

  • 2-4 Li-Ion 18650 batteries like these and a holder

The Assembly

Connect the H bridge to the ESP32 like this:

ESP Pin H Bridge
GPIO14 M1A
GPIO15 M1B
GPIO12 M2A
GPIO13 M2B
5V 5V
GND GND

       

       

The Firmware

The firmware is completely open and easily hackable. It is based on . You just describe your setup in a yaml file and a firmware will be generated.

Preparation

Install

Build and upload

Get a 3.3V USB to serial adapter (like this) and connect it:

ESP Pin ... to
GPIO0 GND
3.3V 3.3V
VCR RX
VCT TX
GND GND
esphome run snowmobile.yaml 

The software

Then you can control your vehicle with this Open Source Android app ESPHomeRC.

An example for the javascript controller running on your android device is given here:

outp = {};
outp.display = "Hi from everest controller, I am running because " + 
                inp["reason"] + " at " + inp["timestamp_ms"] + " ms";
        
if (typeof i == "undefined") {
    i = 0;
}

i++;
outp.display += " i=" + i +"\n";
//outp.log="log " + i + "  " + inp.user.x + " " + inp.user.y; 

var fwd = inp.user.y * 2.0 ;
fwd = Math.max(Math.min(1.0, fwd), -1.0); //limit to +-1.0

var lr = inp.user.x;
if (Math.abs(lr) > 0.3)
  lr = lr * 1.5;
else
  lr = 0.0;
  
var left = fwd + lr;
var right = fwd - lr; 

outp.hbridge = [
               {"index":0, "strength": -left * inp.user.aux0 , "brake":false}, 
               {"index":1, "strength": -right * inp.user.aux0, "brake":false},
               {"index":2, "strength":  inp.user.aux1, "brake":false},
];

outp.user = {};
outp.user.aux_labels=["vmax", "light"]; // aux0 = vmax, aux1=light
outp.user.interval_ms = 10000 ;// regular interval to call this script, 0 means as fast as possible...

About

A low-cost tracked vehicle with a ESP32-CAM module, which can be controlled via WIFI with an Open Source Android app ESPHomeRC.

Topics

Resources

Stars

Watchers

Forks