ESP-NOW: time to ditch your RC transmitter?

Поделиться
HTML-код
  • Опубликовано: 2 июн 2024
  • Thanks to PCBWay for sponsoring this video! Get $5 of New User Free Credit by following this link - pcbway.com/g/x5f10h
    PCBWay is one of the most experienced PCB manufacturers in China, consider them your one-stop solution that offers PCB fabrication, turn-key PCB Assembly, PCB design, 3D printing, and CNC machining services.
    In this video, I built a custom ESP-NOW remote control, which features an ESP32-S3 board called the T-QT Pro, with a IPS TFT LCD display built-in, and an ESP32-S3 with chip antenna on the back. The range of this ESP-NOW system is roughly 30 metres, but I was only using on-board solutions for the antennas, no 'stick' or 'whip' type antennas which have more gain. In this video, I showed you how I coded a simple UI using the TFT_eSPI library for the remote, and designed the PCB with some spare PS4 joysticks. If you want to see the corresponding receiver to this transmitter board, it is here: • Is this ESP32 antweigh...
    My own remote GitHub:
    github.com/hxelec/antc3code
    PS4 joystick footprint:
    github.com/little-scale/PS4_j...
    Getting started with ESP-NOW article (Random Nerd Tutorials by Rui Santos):
    randomnerdtutorials.com/esp-n...
    0:00 Intro
    1:09 Sponsored section
    1:40 PCB design requirements and joystick theory
    3:47 PCBs from PCBWay + soldering
    4:30 Coding with TFT_eSPI and ESP-NOW
    8:42 Outro
    Hopefully the algorithm will pick this up lol:
    antweight, antweight robot, antweight flipper, antweight 150g, UK antweight, flipper, battlebot, NHRL, battlebots, havoc, robowars, robot wars, combat robotics, combat robot, antweight combat robot, antweight tournament, antweight combat robotics, destruction, robot, arduino, esp32, esp32-c3, esp32c3, esp32s3, esp32-s3, arduino IDE, coding, esp32 based, esp32 project, esp32 arduino, esp32-arduino, microcontroller, MCU, microprocessor, WiFi, Bluetooth, BLE, ESP-NOW, esp32 esp-now, esp-idf, esp-ide, esp32c5, esp32p4, esp32-c5, esp32-p4
  • НаукаНаука

Комментарии • 55

  • @Mad_Catter_
    @Mad_Catter_ 9 дней назад +1

    1:50 We going to just walk right past that freaking sweet one handed reload animation? Bro. It was so realistic I swear.

  • @thepythoncodez
    @thepythoncodez 13 дней назад +5

    Great video! You seriously are underrated

    • @hxtec32
      @hxtec32  13 дней назад

      Thanks so much man!

  • @TheOldKid
    @TheOldKid 8 дней назад +1

    Awesome job

  • @silverback3633
    @silverback3633 13 дней назад +2

    Well done, excellent job creating and explaining it.

  • @gearscodeandfire
    @gearscodeandfire 12 дней назад +1

    Great vid and happy to stumble on your channel!

  • @NezihBenJemia
    @NezihBenJemia 12 дней назад +2

    Great video just discovered your channel

  • @temyraverdana6421
    @temyraverdana6421 12 дней назад +1

    Amazing project and useful video. Thanks so much

    • @hxtec32
      @hxtec32  12 дней назад +1

      Thanks bro.

  • @turnabot7307
    @turnabot7307 13 дней назад +1

    Awesome! Great explanations!!!

  • @mr.kashyapamesara4600
    @mr.kashyapamesara4600 13 дней назад

    Really nice work I recently done my postgrad dissertation with the ESPnow protocol and bunch of esp32.

    • @hxtec32
      @hxtec32  13 дней назад

      Thanks bro. Would love to read it, is it published somewhere?

  • @kiritosan7753
    @kiritosan7753 10 дней назад

    Earned my sub man , keep up the cool work

    • @hxtec32
      @hxtec32  9 дней назад

      Thanks so much :)

  • @ElectroFriedBees
    @ElectroFriedBees 9 дней назад

    Just for the future, the S3 does not 'break out' features to the GPIO. Instead you can assign almost anything to almost any GPIO you want in software (few pins to avoid) and the chip reroutes the signal to the correct pin. You could have skipped the ADC, otherwise great project!

    • @hxtec32
      @hxtec32  9 дней назад +3

      Thanks dude! The key word here is ‘almost’. If you’ve read the ESP32-S3 chip datasheet, you would know that only GPIO1 to 20 can be used for ADC channels, and GPIO 1 to 10 is ADC1, while GPIO 11 to 20 is ADC2. If you read further, you’d see that ADC2 can be used, unless there is an ongoing WiFi connection. To my knowledge, ESP-NOW needs the ESP chip to set itself up as a WiFi station before beginning communication. On the T-QT Pro ESP32-S3 board I have, GPIO 16 to 18 are broken out; this is 3 channels part of ADC2. I need 4 ADC channels (or pins) to read both joysticks, so not only did I not have enough ADC channels, but they were all part of ADC2, which, from my understanding, could not be used during ESP-NOW communication. So, while things like PWM output, I2C pins, and I2S pins can be ASSIGNED to any GPIO as per the datasheet, ADC channels can’t, and instead, GPIO1 to 10 serve as 10 channels of ADC1 which can be used with no restrictions, and GPIO 11 to 20 serve as 10 channels of ADC2 which are restricted in that they can’t be used during an ‘ongoing WiFi connection’. Thanks 😁

  • @jolttsp
    @jolttsp 13 дней назад +1

    Nice work! Esp now information just in time for my own project using it. Well, not really because I don't have any time to work on it til July, but I like to think I'm starting soon 😅
    Btw I'm back in town and got my shirts. Thanks!

    • @hxtec32
      @hxtec32  12 дней назад

      Awesome! Good to hear, thanks so much!

  • @elektron2kim666
    @elektron2kim666 13 дней назад

    I am trying some things with this and it's useful info.

    • @hxtec32
      @hxtec32  13 дней назад

      Cool, hope you do well with it :)

  • @arcticpilotshow4440
    @arcticpilotshow4440 13 дней назад

    Thank you, I like ESP-NOW.

    • @hxtec32
      @hxtec32  13 дней назад

      Thanks 😁

  • @TheOldKid
    @TheOldKid 8 дней назад

    Depending on the range this could be an easier route for my r/c project than going through flysky, arduino, motor controller and such. I have control of 3 motors but 2 that I have to run through arduino has been a nightmare. Finally got a code to at least get fwd and rev but nothing I try gives me a neutral or deadzone.

  • @ahmadhasan3258
    @ahmadhasan3258 12 дней назад +2

    that stock video hahahahahaha

  • @5mxg
    @5mxg 9 дней назад

    Do you happen to know if they corrected espnow, that if you enable encryption you can differentiate received frames between encrypted and unencrypted ones, or drop unencrypted ones completly? As lastly I tested it with encryption enabled you could send unencrypted data and it was passed the same as decrypted ones

  • @Vince_Huang
    @Vince_Huang 11 дней назад

    How do you deal with latency and range issue with espnow? I tried to control a drone with esp now but the signal can be block really easily which makes the overall flight very unreliable

    • @hxtec32
      @hxtec32  10 дней назад

      Haven’t needed to, combat robots are normally driven from ~3 metres away from the transmitter, so not much range is needed. I had about 30m of reliable range, which was enough for me. As someone who hasn’t experienced these issues, all I could say is keep the data packets below 200 bytes for latency issues, and make sure your antennas are high gain and matched properly.

  • @paradiselost9946
    @paradiselost9946 9 дней назад

    still running a 50YR old 36MHz futaba, not about to change yet.

    • @hxtec32
      @hxtec32  9 дней назад

      If it works it works 😂

  • @newmonengineering
    @newmonengineering 12 дней назад

    Is there any way you could measure the latency of this type of setup. I.e. how long after you press go, does it actually move, and how long after you release or stop does it take to begin the deceleration? Awesome video, your doing great. I am just curious to how good or bad this setup is as far as the delay is concerned. Also it would be interesting seeing your methodology to measure a latency, i would like to see what the best method would be to accurately measure the small time it takes.

    • @m4gg197
      @m4gg197 12 дней назад

      the simplest solution would be to send an ESPNOW packet to the receiver and, upon receiving it, send one back to the transmitter. measure the time this all takes on the transmitter and optionally divide it by 2 if you want the latency for only one way. voila.

    • @hxtec32
      @hxtec32  11 дней назад

      haven't measured latency. I can tell you its pretty fast though, I can't notice any lag whatsoever when I'm driving it.

  • @hapsti
    @hapsti 11 дней назад

    ill stick to ELRS, thanks :3 good video

    • @hxtec32
      @hxtec32  10 дней назад

      Yeah I have some work to do with improving the transmitter and range, probably will have to add a really high gain antenna too

  • @zaqwsx28
    @zaqwsx28 13 дней назад

    The problem is where to source high quality gimbals. Xbox joysticks have very large dead zones, and the sticks are very short for precise movements (try to drive figure 8).

    • @JackOHaraEngineering
      @JackOHaraEngineering 13 дней назад

      i know some companies used to sell extenders for the xbox sticks. they'd just pop on top and it made cod easier

  • @bami2
    @bami2 13 дней назад

    That's a great overview, nicely done! Basically everything needed to build a smol combat robot is here, with the hardware side in the previous video and the software here.
    One thing I'm missing though is a safety shutoff? Basically every competition I've seen has a rule that if your bot is moving or has a weapon running, if it loses connection with the transmitter (by just turning it off during a safety check) the bot should stop/brake all motors and become immobile until connection is restored, but I had a quick look at your sources and I don't think you've implemented this. This is quite an important feature for any combat robot as it will not pass safety checks without one!
    You also typo'd the "sesrvo" variable in your receiver script :).

    • @hxtec32
      @hxtec32  13 дней назад +1

      Thanks bro. Oh yeah, I like naming multiple variables that serve for one purpose misspellings. My code is horribly commented and laid out, which is why I split it up by function in the video, and not just saying what each line did since that wouldn’t make sense to people lol. For example, if there are two variables to control / receive data for the servo, I’ll have variables servo and sesvro, or servoo or something. If you take a little look at the receiver program (antrx) in the GitHub, it uses a timer to have a fail safe, if it loses signal the robot will stop after ~300ms or so. Very helpful, you can take a look at that code to get some understanding for that part. Thanks so much for this awesome comment, I really appreciate it.

    • @bami2
      @bami2 13 дней назад

      ​@@hxtec32 Ah I was looking at the antc3 repository where it wasn't implemented yet, but in the antc3code it's there!

    • @hxtec32
      @hxtec32  13 дней назад +1

      @@bami2 lol, thanks mate, I'll try to make it clearer where the code and stuff is

    • @conorstewart2214
      @conorstewart2214 11 дней назад +1

      @@hxtec32 your method of variable naming isn’t great. It might work fine for you now but if you are posting code for others to look at then it just isn’t good. Even just coming back to your own code later can be difficult if you have lots of badly named variables.
      It is definitely worth spending a little longer thinking about it and typing a few more characters and giving the variables meaningful names.

    • @hxtec32
      @hxtec32  11 дней назад

      @@conorstewart2214 true i might do that

  • @robotarenachallenge
    @robotarenachallenge 13 дней назад

    i really suggest to switch from ps4 joystick to ps5 ones (orange ones you used in photos) the ps4 stick have a worse return to centre spring that after some use it will just cause the stick to get stuck, you can 3dprint a case to limit the joystick travel and save the mechanism, but for now on all our loan bots with ps5 ones were fine while i slowly had to replace all the ps4
    only part that espnow is lacking is being able to be used in 2.4ghz polluted areas (rc model faires or so) otherwise we agree it's an awesome protocol!

    • @hxtec32
      @hxtec32  12 дней назад +1

      Thanks so much! Does ESP-NOW have issues in a 2.4GHz polluted environment? I would've thought the MAC addresses and stuff mitigate this a little, but would love to hear from you what kind of interference issues you've been having and how bad they are. Thanks for the tip on PS4 vs PS5 joysticks.

    • @robotarenachallenge
      @robotarenachallenge 12 дней назад

      @@hxtec32 yes it definitely mitigates the issue compared to bluetooth and standard wifi comunication, but it doesn't reach rc transmitter level
      at maker faire event, and demo event at pubs we didnt see any issue, but I had to find an esp wifi channel that is uncommon to be used on modems in my city
      the issues started to show at model expo italy, with definitely more than 100 simultaneously on rc transmitters, espnow range was about 30cm, and it had severe latency and noise causing pretty much uncontrollable movement
      the same issue were shown while is some royal rumble with all our bots so concurrent peers are limited, switching a couple bots to another wifi channel
      while esp-now is not a wifi packet it uses the wifi layer for transportation, this means that we are limited to same frequency/channels and on top of that the wifi layer has an ack packet and resend procedure ans that may cause more latency in some case like the robot having a less powerful antenna on the module and not being able to send the ack back
      for now i've tested every on esp wroom32, s3 and c3, the biggest issue was with s3 transmitter and c3 receiver, it is definitely possible to successfully run an esp robot in some events, but plan some test and if you have issue some esp-now tuning (long range, different wifi channel, different mac) and let us know!

  • @abhishekprasad8151
    @abhishekprasad8151 7 дней назад

    magnetic gyros when

  • @emo666man122
    @emo666man122 10 дней назад

    i came to the same conclusion

  • @BamTehBrent
    @BamTehBrent 13 дней назад +1

    esp wen

    • @hxtec32
      @hxtec32  13 дней назад +1

      ESP who

    • @santynolo
      @santynolo 13 дней назад +1

      esp why

    • @hxtec32
      @hxtec32  13 дней назад +1

      @@santynolo esp what

    • @hxtec32
      @hxtec32  13 дней назад +1

      @@santynolo esp who is an actual thing btw

    • @santynolo
      @santynolo 13 дней назад +1

      @@hxtec32 bruh

  • @3DPrinterDoc
    @3DPrinterDoc 10 дней назад

    This would be perfect for your projects @professorboots