maruel / bolide-esp8266

A automatisable 40$ wifi enabled race car :car:
Apache License 2.0
12 stars 2 forks source link

A 40$ wifi enabled race car 🚗

Idealized Actual
Bolide logo Bolide actual

No internet connectivity is needed, this isn't InternetOfShit.

Design

An ESP8266 connects to a MQTT server and waits for commands. It also runs a web server serving a MQTT client web UI (try it online!) that you can install as an App on your iOS or Android phone or tablet.

bolide-esp8266 uses the Homie MQTT convention so you can control it via any MQTT enabled automation service like Home Assistant, openHAB, or internet based services like IFTTT, if you really feel the urge to connect stuff to the internet. ¯\_(ツ)_/¯

Hardware

BOM: 36$USD, including shipping, with a lot of left overs.

Power âš¡

The system runs at 2 or 3 different voltages:

There's three options for motor voltage:

  1. Power the motors at 5V. It will move slowly but you can upgrade later.
  2. Use a DC-DC step down power converter (>=1A) (1$USD; 2$USD for 5pcs) and run the motors at high voltage then generate a 5V from it. You may want/need to add a capacitor accross the lines to stabilize the voltage.
  3. Use two different power sources, one 5V, one >5V. This has the side benefit of making voltage for the ESP8266 to be more stable.

There's many options for power sources:

  1. Wired 5V~12V wallwart (3$USD) and female adaptor (0.50$USD).
    • You may have one lying around from an old dead electronic device!
  2. AA batteries; 4x 1.5V (Alkaline) gives 6V, 6x 1.2V (Eneloop) gives 7.2V. AAA are likely not able to push enough Amps.
  3. 5V USB power bank (<2$USD). Even the cheapest colored round ones will be fine as the ESP8266 draws around 100mA. The cheapest ones won't be enough for the motor but high qualities ones (the ones rated for 2A) will be fine.
  4. 2x 3.7V LiPo batteries to give 7.4V:
  5. 2x 3.2V LiFePo4 batteries to give 6V:
    • Similar to LiPo batteries, but not suspectible to explosion. The 6V level is too high to power the WeMos without burning the RT9013 voltage regulator. They are available in both 14500 (AA format) and 18650, I recommend branded batteries.
    • I wouldn't be surprised if we see cellphones with LiFePo4 batteries in 2017. I said it here first! :)

Confused? 😕

Keep it simple and start with a USB power bank to power the WeMos and 4x AA Alkaline batteries to power the motors.

Be aware

Wiring

Use the breadboard and the breadboard wires to connect everything:

Wiring schematics

Click on the image to edit the schema in EasyEAD!

Permanent soldering

Once you confirmed it to work, you may want to solder the L293D to reduce the overall size:

Software

âš : anyone on the local network and see and inject commands. The ESP8266 is not powerful enough to do TLS/SSL reliably.

Flashing

  1. Connect the ESP8266 via USB.
  2. Copy config_sample.json to data/homie/config.json and edit as documented:
    • device name and id
    • Wifi SSID and password
    • MQTT server host name, port, user and password (optional)
    • Another option is to use the manual configuration mode but I don't recommend it.
  3. Run: ./flash_all.sh at a bash prompt.

The ESP8266 takes less than a second to boot.

Contributing

I gladly accept contributions via GitHub pull requests, as long as the author has signed the Google Contributor License.

Before we can use your code, you must sign the Google Individual Contributor License Agreement (CLA), which you can do online. The CLA is necessary mainly because you own the copyright to your changes, even after your contribution becomes part of our codebase, so we need your permission to use and distribute your code. We also need to be sure of various other things—for instance that you'll tell us if you know that your code infringes on other people's patents. You don't have to sign the CLA until after you've submitted your code for review and a member has approved it, but you must do it before we can put your code into our codebase. Before you start working on a larger contribution, you should get in touch with us first through the issue tracker with your idea so that we can help out and possibly guide you. Coordinating up front makes it much easier to avoid frustration later on.