mini steampunk RC/WIFI 3D printed car [Update: now FPV w ESP32 CAM]

Hi,

I have been working on a mini rc/wifi car design for a while. It has a separate body/frame so other bodies can be designed in the future. Current body is similar to a 1908 buick model 10 runabout.

The mini car is only about 5 inches long. (There is also a bigger version about 8 inches long) I believe all the parts are small enough to print on a Monoprice Mini-Delta (110 mm) but I haven't tried yet. I am planing to release the STL files, code, parts list soon as I stop making changes. :slight_smile:

Currently it is using a pro mini to control lights based on the PWM signals from the RC receiver. The RC receiver can be swapped for WIFI nodeMCU. (Still working on nodeMCU code).

I post project updates on my facebook page a couple of times a week. Was hoping some of you might stop by and leave comments/questions/suggestions.

After the prototype is sorted out, I plan to make howto video in multiple parts and put that on YouTube and written howto on my website. (I hope to do that but I might become bored if nobody else likes the project and move on to something else).

It is fun running such a small car. It has been a challenge to design/make. I hope some of you will find enjoyment with the project.

Facebook page

https://www.facebook.com/checkmate.metal.art.and.fabrication

latest video:

https://www.facebook.com/checkmate.metal.art.and.fabrication/videos/328137337865887/

Can you post details here for people (like me) who don’t use Facebook.

…R

Thanks for your interest in the project. :slight_smile:

I am extremely busy so if I don't hear from anybody on Facebook or YouTube I just assume nobody is interested.

I updated the car design. It now has a ESP-32 CAM for the WIFI and streams back video to phone/pc. I modified the ESP32-CAM sample code and added sliders and buttons to control the car.

So, it may be the worlds smallest DIY 3D printed fully functional FPV phone controlled car. ... with working lights and sound.

It has 4 main tasks running in FreeRTOS on the pro-mini to control servos, LEDs, sound, and it monitors power of the LIPO battery so it won't over discharge the LIPO.

I posted an updated photo of the car and the latest test circuits including the WIFI camera to Facebook today. So, really it does exist. :slight_smile:

I completed an RC controlled prototype without the latest camera camera/WIFI updates. The newer design has an updated frame and body with a lot of fixes compared to the original prototype. It will make it easier to swap out the body for another body. CAD is mostly done... working on printing/assembly/final code.

I have a custom circuit board all soldered up and tested with working WIFI/Camera and software firmware. It will be able to work with either an RC receiver or a WIFI module depending on code loaded. Hardware is setup on the board to work either way.

I have a YouTube channel. (I just haven't posted there lately because it is too much work making videos that I can't get anybody to watch and subscribe to or comment on). I might make a series of videos showing the whole build process for this car... or not. Right now probably not because I literally get no feedback from anybody about anything... leaving me to believe people have near zero interest in what I am doing.

Here is latest pic on Facebook uploaded it to my website if people can't see on Facebook ...

There is a quarter sitting on top of the car to give better idea of size.

checkmatearts:
I updated the car design. It now has a ESP-32 CAM for the WIFI and streams back video to phone/pc. I modified the ESP32-CAM sample code and added sliders and buttons to control the car.

I have ordered a couple of the ESP32-cam modules with a view to using them to control model trains.

Can you post your revised code, or a link to it please?

...R

I post project updates on my facebook page a couple of times a week. Was hoping some of you might stop by and leave comments/questions/suggestions.

Very cool project. I am not on FB. You might get more views if you post the project on hackaday.io and/or hackster.io.

I will be doing a major overhaul of my website at checkmatearts.com. So, I will post the code and other stuff there. I can upload code in a zip file and post a link here. Below is an update picture. It was hard to see the camera in there so I added red arrows. On the right side is the updated frame from the underside compared to the first protytype. It now has steering knuckles with kingpins and tie rods.

PS - @Robin2 model train idea is cool. I have something in the works for that also. I designed a 3d printed air engine to power it. I also make solenoid engines and clocks and e-bike stuff, and... :slight_smile:

Some very good RC vehicle modelling here and here - especially the mechanical stuff.

My ESP32-CAMs should arrive today or tomorrow. I think I have figured out how the code is done.

...R

Kewl stuff. :slight_smile: I have a 1/4 scale live steam traction engine in the barn.

I think my little car is about 1/30 scale so would fit in to a "G scale setting". Looks like a 1908 Buick.

I only recently discovered Arduinos. You have a lot of experience here so probably won't have difficulties with the code. Still will post the ESP32 CAM code when I get a chance to clean it up a bit.

checkmatearts:
I have a 1/4 scale live steam traction engine in the barn.

Bet it smells wonderful

...R

smells like burning coal, oil and steam. :slight_smile: needs arduino for..... ? .... profit.

Not sure if it is any use but I have written the following very basic Python3 program to covert a HTML file into the HEX text style that is used by the ESP32-CAM camera-web-server example.

#!/usr/bin/env python3

# very basic program to convert HTML file to HEX text representing the contents of the Gzipped HTML

print() 
print("====PackHtml.py=====")
print()

#=================

import fileinput
import struct

from sh import gzip # sh needed to be installed with pip3

#=================
    # file names are hard-wired - too lazy to make a better user interface
inputFileName =  "indexTrain.html"
gzFileName =     "indexTrain.html.gz"
outputFileName = "indexTrain.h"

#=================
    # first compress the file
    # keep the input file, force overwrite of existing out file, put Name of file inside the GZ
gzip("-k", "-f", "-N", inputFileName) 

#=================
    # now convert the bytes in the GZIP to hex text
gzFile = open(gzFileName, 'rb')
outFile = open(outputFileName, 'w')

hexCount = 0
byteCount = 0

    # first write header lines for the .h file as required by the C++ code that will use it
outFile.write("#define index_ov2640_html_gz_len NNNN\nconst uint8_t index_ov2640_html_gz[] = {\n")

    # deal with each byte
while True:
        # go through the compressed file byte by byte
    gzData = gzFile.read(1)
    if  len(gzData) == 0:
        break
    else:
            # unpack the byte
        unpacked = struct.unpack('>B', gzData)
        hexStr = "0x%0.2X, " % unpacked
        # ~ print ("%s  %s" %(unpacked, hexStr))
        outFile.write(hexStr)
        hexCount += 1
        byteCount += 1
        if hexCount >= 16:
            outFile.write("\n")
            hexCount = 0
            
    # write a closing }; to finish off the C++ code
outFile.write("\n};")
outFile.close()

#=================
    # open the .h file in a text editor and replace the NNNN with the following number
print(" === Done  %s bytes ===" %(byteCount))

IMHO it's a lot simpler than using the cyberchef website for the conversion - as recommended on some website I found.

...R

The ESP32-CAM board measures about 40mm x 28mm which is bigger than I had imagined from looking at pictures of it. To fit it upright in an 00 gauge train it is necessary to stand it on its short edge. However that puts the camera on its side.

I have discovered that I can include CSS code to get the browser to rotate the video 90 degrees which solves the problem.

------Later ---
Bugger. With the image rotated the 28mm side fits inside the width of the train but the 40mm side is too tall. It won't fit vertically in an 00 gauge train. I will have to make an 0-16.5 narrow gauge demo.

I wonder if it is possible to get an extension strip to locate the camera further away from the PCB. My Googling has not found anything.

...R

Hi Robin2,

I ended up using a method similar to what this guy did for the code...

I had to de-solder the pin headers from the cam board to get it to fit in my car. I soldered the wiring to the board only for pins I need. I even put a hinge connecting the roof to the body so I can flip the roof back and gain access to the programming connections of the cam and pro mini modules without taking anything out of the car.

I have the camera ribbon cable held at a 90 deg angle to the board so the board is in the ceiling of the car and the camera is hanging down.

The camera code sample has switches for horizontal and vertical flip and a lot of other configuration settings so I left all of that in place as a settings panel.

Thank you for the python code. I looked at that cyber chef stuff also but quickly determined that my life would be a lot easier just to ditch all the conversion stuff completely.

-Jim

checkmatearts:
determined that my life would be a lot easier just to ditch all the conversion stuff completely.

How did you do that?

And another thing ... can you get your ESP web page (with controls and video) to appear on the browser on your phone?
I can't and I particularly want to.

...R

That photo I posted a few posts back with the RC transmitter has my ESP32 CAM prototype circuit in the foreground. That circuit has esp32 cam connected to the lights, sound and motors that my car uses.

This picture shows the interface running on my phone with the prototype test circuit (rubber frog held above the camera)...

This is a link to that other guys video I mentioned ...

if you look there I think you will find he posted his code. There are a bunch of links in the YouTube description. I am not ready to post my code or describe how it all works yet.


PS - I don't know a single person in the real world who I could explain how this works to even if I tried. I learned it on my own with nobody to talk to about it. I have no baseline to work from to understand what other people know or don't know about anything. I will need to write a tutorial to establish a baseline reference so I can answer questions.

Thanks. I will take the time to study all that carefully.

...R

I have tried that guy's code but it still won't show the video on my Android phone. The controls all show up but I suspect they don't do anything.

Using the unzipped HTML does make life easier. I have just put it in a separate .h file using the same format as in the demo.

I can control my train with my version of the code but I have to use my PC as the controller which is a PITA.

Perhaps I will find some inspiration (or advice) tomorrow :slight_smile:

...R

hmmm...

have you tried setting up your phone as a WIFI access point ("mobile hotspot")?

that way the phone is supplying the address for the server in the esp32.

  • Jim

checkmatearts:
have you tried setting up your phone as a WIFI access point ("mobile hotspot")?

That's the normal way I use the phone - it is my link to the internet.

But things are the same if I set the ESP32-cam as an access point.

By the way I have another project in which I use a browser as a GUI based on a Python server on my PC and it works fine on the phone. Which is why I was expecting the ESP-cam project to work on the phone.
...R