Show HN: ESP32 RC Cars (github.com)
This is a projected I started that blends both the fun of playing a split screen multiplayer driving game and controlling real rc cars.
The cars can also be controlled via bluetooth gamepads and is meant to be easily hackable.
65 comments
[ 3.0 ms ] story [ 119 ms ] threadMost low-end 27MHz toy RC sets use clones of a well known chipset called RealTek TX2/RX2, and there are Arduino libraries for it. It only takes binary on/off commands for forward/back/left/right/"turbo" at 1Hz or so, which is fun enough for most purposes.
Hi, thanks for the feedback. I have updated the README with the materials I used:
I bought everything for this kit from aliexpress:
Car chassis: https://www.aliexpress.com/item/32830665408.html Electronic speed control: https://www.aliexpress.com/item/1005007716682815.html Battery holder: https://www.aliexpress.com/item/1005006283625827.html 2 18650 3.6v cells or 7.4v battery pack (I have used both, cells are more flexible for other projects) ESP32-CAM: https://www.aliexpress.com/item/1005001468076374.html (Very important to get one with external antenna and and I used the 170 degree fisheye camera) Bluetooth Gamepad (I used a PS4 controller)
When I have some time I'll try to combine them so I can control the car and see the camera feed on the display.
The basic software is very easy to start with, about 20 lines of C using a library for the Bluetooth controller. From there I've added features for easier control. Using two sticks for two tracks works at low speed, but the thing goes close to 20 km/h (I've used two drone motors for it) so then you need a different control method. I ended up with rpm limited direct track control using the "triggers" on the dual shock controller. And more intuitive left stick up/down for throttle, right stick left/right for steering for high speed operation. So now it drives like a normal RC car.
Video of the same 3d print model I used as a basis in action, you can see the speed best from 00:50 onwards: https://www.youtube.com/watch?v=3Mv_tDY89Zw
I've never looked into RC builds before - how are they controlled? Do you connect the PS4 controller directly to the esp?
I think "traditional" RC people use a separate receiver module that links to their remote instead of doing this in software.
We mounted a furby head in one of our robots at work and let it yell swear words at our management.
They (and we) love it.
That project was the source of many code snippets/patterns that have implemented in official products that earned a lot of money.
Everybody knows about FPV quadrocopters used on the battlefield, but there is an increasing focus on terrestrial vehicles. They look nothing like the Boston Dynamics robodogs crossed with Terminators from the mvoies, but are extremely useful in lower-profile "boring" jobs, like laying landmines, exploding landmines, and carrying small amount of supplies to soldiers sheltering somewhere on the frontline.
and: https://github.com/gyrex/CrystalVideo
Video for FPV quads on the other hand is divided: some use analog (mostly because when you lose signal, it's a gradual loss rather than complete loss + a reconnection process), while others use 802.11-based communication which is actually quite competitive. Walksnail Goggles for example use 802.11 for their video links, although not super open/documented people do dig into how it works (see Chris Rosser's work.) Latency is good enough with such setups for fast-paced competitive quad racing, at least
[0] https://www.expresslrs.org
Digital FPV (like DJI's system) looks vastly better than analog. I think the best comparison is: Digital looks like a modern movie, youtube video etc, and analog looks like CCTV footage from the 80s.
I will also clarify on ELRS: It uses ESP32, but it is a thin wrapper around Semtech LoRa (~915Mhz and 2.4Ghz) SX128x and SX126x chips, which are doing the heavy lifting.
With digital, you can go from 30-50km with the proper equipment, noise free environment etc... It looks like the video for that has been taken down. But you can find the discussion here: https://greyarro.ws/t/digital-fpv-dji-vs-hdzero-vs-orqa-vs-w...
The "allowed regime" also differs based on where you live. Iirc 25 mW is the maximum permitted power in Europe. Have to double check. That gives you about 100-500 meter range in an open area.
802.11 is not a good fit for FPV video and trying to use it has held non-proprietary-Chinese video systems back quite a lot.
I'm sure it exists, there probably just not much market for it.
Worse than analogue?
it may be wise to read this https://www.reddit.com/r/esp32/comments/r7kqtt/esp32cam_supe...
I got fairly bad frame rate until I tried some of the advise
for my other projects I did use a ESP32 with an external antenna, but they did not have a camera port
These things are so cheap just buy one and see (unless time is an issue)
edit: the OP did add this link to one https://www.aliexpress.com/item/1005001468076374.html - note this does not have a usb connector - you can get them separately
Resoldering the 0 ohm resistor was like an adventure, but somehow managed to connect the correct pins. The end result looks like following:
https://imgur.com/a/LJflZ80
Just one last thing, if you like the project, the coolest thing you can do for me is let anyone you know looking for a remote developer to hit me up. I am a Ruby-on-Rails developer at heart but would also consider robotics gigs. Thanks!
https://newton-net-pl.translate.goog/2012/01/robot/?_x_tr_sl...
It was made of an old HTC Magic phone, acting as camera+wifi transmitter, connected to Arduino via its serial port and level shifter, to control the servo and a RGB LED. I had a lot of fan with that, even if the connection wasn't really to stable.
Thanks for sharing, maybe it's time to revive the project with the next generation of the microcontroller.