38 ms·
Show HN: ESP32 RC Cars
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.
- hk1337 2y agoThis is really cool. It could be like Goldeneye, slappers only. Just find a better way to slap than bumper cars.
- conductr 2y agoNice work! I’ve been thinking of taking on a similar project and would be curious what’s your experience like with latency? Can you view the video feed and control remotely? My main reservation is the presumption that it would be too laggy for obstacle avoidance at most speeds.
- wslh 2y agoWhat is the approximate price of the car components?
- tga 2y agoFor example, you can get a kit around $32: https://a.aliexpress.com/_Eya0rSM https://a.aliexpress.com/_Eya0rSM
- dimatura 2y agoI put a link above for this kit which is about $50. However, I believe you would also need an ESC for the motor, a suitable one would probably be less than $20.
- numpad0 2y agoIf you really need to cheap out on it, you can remove the wireless chip from an existing RC car and take over the H bridge inputs, or even just tap into the antenna input pin and inject serialized commands. Most 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.
- mattsroufe 2y agoHi, I update the README with the components: 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 https://www.aliexpress.com/item/32830665408.html Electronic speed control: https://www.aliexpress.com/item/1005007716682815.html https://www.aliexpress.com/item/1005007716682815.html Battery holder: https://www.aliexpress.com/item/1005006283625827.html 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 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)
- jtwaleson 2y agoSo cool! I bought the same kit last year and recently bought a esp32 game controller with a tiny display: https://github.com/01studio-lab/pyController https://github.com/01studio-lab/pyController 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.
- t0mas88 2y agoCool! I've made an ESP32 powered RC tank on tracks, controlled with a PlayStation 4 controller over Bluetooth. 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 https://www.youtube.com/watch?v=3Mv_tDY89Zw
- deleted 2y ago[deleted]
- eurekin 2y agoVery impressive! I've never looked into RC builds before - how are they controlled? Do you connect the PS4 controller directly to the esp?
- t0mas88 2y agoYes, the ESP32 has Bluetooth support and there is an open source library to read the inputs from a PS4 controller. So I just wrote a small program to connect to the controller and send the right commands to the motors. I think "traditional" RC people use a separate receiver module that links to their remote instead of doing this in software.
- trzy 2y agoHow was the chassis and steering mechanism built? Any plans to release that design?
- dimatura 2y agoI believe it's this kit: https://www.elecrow.com/4wd-smart-car-robot-chassis-for-arduino-servo-steering.html https://www.elecrow.com/4wd-smart-car-robot-chassis-for-ardu.... It's been around a while, I got one around the time covid started. It's decent quality, although IIRC the front wheels don't have bearings.
- lnsru 2y agoThanks for sharing. I always wanted to use ESP32 to revive old Geotrax trains. Maybe that’s the right project to start with.
- ElectRabbit 2y agoCool project! Love it! :-) 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.
- rkwz 2y agoThis is amazing! Is there a way to make the car recharge at dock like robo vacuums?
- wayvey 2y agoThis is exactly what im needing as well, I would like to make something like this and integrate it into home assistant but haven't had time yet
- unsigner 2y agoThanks for sharing this - this will be an inspiration. 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.
- zapkyeskrill 2y agoIt's live version of Micro Machines! Nice work
- fitsumbelay 2y agothis. is. awesome.
- Abimelex 2y agoFPV car racing incoming!
- Jemm 2y agoWhat is the latency?
- Scene_Cast2 2y agoThe big issue with FPV, and the reason it stayed on analog tech for so long is because of latency. How is the latency for this project?
- actionfromafar 2y agoRelated: https://github.com/wooky/esp32-analog-video-over-wifi https://github.com/wooky/esp32-analog-video-over-wifi and: https://github.com/gyrex/CrystalVideo https://github.com/gyrex/CrystalVideo
- emidoots 2y agoFPV today is largely using ExpressLRS[0], an open protocol for running FPV quads' control links (also using esp32 usually) 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 https://www.expresslrs.org
- the__alchemist 2y agoI will add for those who haven't tried these, as it usually doesn't come across in verbal comparisons: 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.
- mkesper 2y agoI heard people flying analog also use quite a bit more transmitter power than allowed for non-regulated devices to keep things manageable. Do you have any reference what's possible with digital when staying in the allowed regime?
- 123pie123 2y agobefore you get a ESP32 CAM (I love em) consider one with an external antenna it may be wise to read this https://www.reddit.com/r/esp32/comments/r7kqtt/esp32cam_super_fast_frame_rate_when_putting_the/ https://www.reddit.com/r/esp32/comments/r7kqtt/esp32cam_supe... I got fairly bad frame rate until I tried some of the advise
- mattsroufe 2y agoYes, from my experience with this project the external antenna is a must. I've update the README with a link to the one I used.
- Lord_Zero 2y agoCan you recommend an exact model?
- 123pie123 2y agoI'm afriad not, I bought a load of esp32 cams with out the external antenna - hit a problem with the frame rate and fixed it from the advice from the link 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 https://www.aliexpress.com/item/1005001468076374.html - note this does not have a usb connector - you can get them separately
- eurekin 2y agoIn my case it went from a patchy 1mbps to a stable 20mbps right away, according to my router's admin page - right after resoldering the resistor and connecting the antenna. 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 https://imgur.com/a/LJflZ80
- Waterluvian 2y agoI want to make this with my kid but I can’t find the actual hardware as seen. Are those printed parts? Also the wheels and foam. Where would I go about sourcing these parts?
- zoomablemind 2y agoWhat are the battery requirements for such feed combo (RC + FPV + servo)? From experience, how does this translate to play time?
- mattsroufe 2y agoI've never tried running for a really long time but when I was doing testing I would not recharged the batteries for days. I would say an easy 15 to 30 minute. But like I say, I'e never tested. Now I think I will. Thanks
- NetOpWibby 2y agoSweet, now I can build the RC car from Watch Dogs 2.
- deleted 2y ago[deleted]
- idunnoman1222 2y agoA good 2.5 inch RC car is 30 bucks on AliExpress now, A standalone 5.8 GHz analog camera is 25 bucks. Just for those that may be more interested in the outcome than just a fun project to do
- 05 2y agoA standalone (you mean AIO) camera with a builtin VTX is generally even shittier than regular analog, and you still need analog goggles for it. For anyone who doesn’t need prescription glasses or wears contacts, DJI O4 ‘lite’ with the N3 goggles is a much better idea.
- idunnoman1222 2y agoYou don’t need goggles you can just get a receiver for your TV… or any screen.. also Qualify shittier do you mean the range of the antenna? A 2 1/2 inch car it does not go outside, so not relevant. If you mean the camera well buyer beware i guess the ones I got were fine. Also, I thought we were comparing this to a cheap ESP 32 build and not some top-of-the-line digital thing the SP 32 build is gonna have a terrible lag. You’re not actually gonna be able to race your friend with it… my setup is cheap and has low latency. no one is gonna buy top-of-the-line DJI crap to race a 2 inch car around their basement
- 05 2y agoTop of the line would be Goggles 3, N3 is the budget line and it costs less than analog goggles. Maybe with cars it's different, but nobody flies with a screen - the immersion just isn't there..
- mattsroufe 2y agoThanks everyone for the feedback on the project. I hope to keep it going and would love to see some PRs. 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!
- jesprenj 2y agoIt would be quite nice to add a 4G module, allowing you to drive around the city (:
- aleksiy123 2y agoPretty awesome. I was thinking about trying to create some kind of automatic toy for my cat that would avoid obstacles. Maybe this could be the base instead of the one I picked up https://www.aliexpress.com/item/1005007634018076.html https://www.aliexpress.com/item/1005007634018076.html
- t0mek 2y ago12 years ago, when we already had Arduino but no ESP32 yet, I built this thing: https://newton-net-pl.translate.goog/2012/01/robot/?_x_tr_sl=pl&_x_tr_tl=en&_x_tr_hl=pl&_x_tr_pto=wapp 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.
- amenghra 2y agoThis is a fun read if you want to automate the RC car. It's from a couple years ago, there might be easier/better way to achieve similar results today: https://hackaday.com/2021/10/25/fast-indoor-robot-watches-ceiling-lights-instead-of-the-road/ https://hackaday.com/2021/10/25/fast-indoor-robot-watches-ce...
- lostmsu 2y agoDoes anyone know if there is a car kit where you could just install an Android smartphone and have it be the camera + brain?
- 05 2y agoDon’t know of anything readymade, but hacking together a WebRTC video streamer and a WebSerial/WebUSB based control that would forward SBUS control signal to a USB OTG attached MCU seems easily doable.
- GardenLetter27 2y agoI did something similar with Rust and the Steam Deck not long ago - https://github.com/jamesmcm/esp32_wifi_tank https://github.com/jamesmcm/esp32_wifi_tank
- wjan 2y agoIdea to make it more fun:run Yolo vision processing on the client computer to make it drive autonomously.
- aitchnyu 2y agoTangential, I want to build a camera based fish feeder, is there any hardware that can shake fish food pellets and can I use my python knowledge directly?
- jonlucc 2y agoI think you're looking for CircuitPython, which is available on a variety of small boards [0]. Based on my, admittedly, very limited experience, I would strongly consider the Feather line of products from Adafruit [1]; they're compatible with each other, most have CircuitPython support, and they mostly have STEMMA QT ports for simple connections to I2C-based peripherals. [0] https://circuitpython.org/downloads https://circuitpython.org/downloads [1] https://www.adafruit.com/category/943 https://www.adafruit.com/category/943
- alnwlsn 2y agoNow I know what I did wrong with the ESP32-CAM powered cars when I did a very similar project in 2020 - it's was all the antenna.