Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: ESP32 Support ?

  1. #11

    Re: ESP32 Support ?

    Yeah, the "T" is important -- it means "TTL level" which is what you need to guarantee "sensing" a zero and one properly in this case.

    (The "C" means "CMOS level" which requires 0.7*Vin, which ends up at 3.5V for a "one")

  2. #12
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,252
    Images
    27
    Rep Power
    273

    Re: ESP32 Support ?

    The SN74LS241 uses a single 5V supply, so will require a voltage divider on the output that goes to the ESP32 RX pin to ensure it cannot drive the pin in excess of the 3.6V limit of the ESP32. Still sooooo much easier to prototype with a big DIP-20 packaged IC and two thru-hole resistors.

    Edit: since the SN74LS241 is a 3-state output device, just a voltage divider will not really work too well since it will pull the RX pin LOW whenever the RX side of the buffer is disabled (TX-mode; RX output pin in high impedance state) while the UART expects the line to idle at HIGH. Adding a pull-up resistor to 3.3V supply will cause a bit issues as it will be a permanent voltage divider that fights the buffer when trying to pull the RX pin LOW. This can be fixed by using a spare channel on the TX side of the buffer to drive the pull-up resistor always HIGH when in TX-mode and high impedance when in RX-mode. e.g. R_top ~ 4.7kOhm, R_bottom ~ 2.2kOhm, and R_pullup ~ 4.7kOhm. Any values can be used as long as you maintain the ratio: R_top ~ R_pullup ~ 2*R_bottom.

    So, three resistors and one DIP-20 octal buffer with connections:

    Vcc and 2A2 to 5V;
    GND and bottom of RX voltage divider (one pin of R_bottom) to GND;
    1!G and 2G to ESP32 TXEN/DIR pin;
    1A1 and 2Y1 to dynamixel buss;
    1Y1 to top of RX voltage divider (one pin of R_top);
    2Y2 to top of RX pull-up voltage divider (one pin of R_pullup)
    ESP32 RX pin to middle of RX voltage divider (other pin of R_top, other pin of R_bottom, and other pin of R_pullup);
    ESP32 TX pin to 2A1;
    Last edited by tician; 04-15-2018 at 04:37 PM.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  3. #13

    Re: ESP32 Support ?

    There is of course another real simple approach...

    Use one of the ESP32 UARTS and connect it up to one of the UARTS on something like an OpenCM9.04 boards and have it drive the servos

    Or on this forum... Use a Arbotix-m board instead of OpenCM...

  4. #14

    Re: ESP32 Support ?

    A SN74LVC1T45 is totally capable of interfacing with the DXL 5V bus from a 3V part. Use VCCA as 3.3V and VCCB as 5.0V. Wire TX and RX together on the ESP side. (This means you will receive anything you send, which should be fine; you can ignore that in your software.)

    You can get it in SOT-23-6, which is hand-solderable.

  5. #15
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,252
    Images
    27
    Rep Power
    273

    Re: ESP32 Support ?

    Quote Originally Posted by jwatte View Post
    A SN74LVC1T45 is totally capable of interfacing with the DXL 5V bus from a 3V part. Use VCCA as 3.3V and VCCB as 5.0V. Wire TX and RX together on the ESP side. (This means you will receive anything you send, which should be fine; you can ignore that in your software.)

    You can get it in SOT-23-6, which is hand-solderable.
    They already discussed the difficulty finding anything about hardware half-duplex in the manual, and running software half-duplex like the arbotix does will require digging around in the ESP32 Serial object to specifically disable RX functionality during TX. Failure to do so (just wiring both pins together and letting the Serial object work in full-duplex mode) will result in the ESP32 wasting quite a bit time retrieving data as the RX data register will still fill during TX which causes the RX interrupt to be called to push it into the buffer regardless of whether you actually do anything with it.

    The 1T125/1T126 combo is also available in SOT-23-5 and takes advantage of the TXEN pin that is already integrated into the dynamixel library so you don't have to modify the library or try to figure out what was data the ESP32 sent and what was data the ESP32 requested.
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh

  6. Re: ESP32 Support ?

    ahh the 3.3v signal issue strikes again. i will have to look into those buffer ICs ,

    someone really needs to make an esp32 with the possibility for 5v output dangit.


    Quote Originally Posted by tician View Post
    It is pointless to ask whether it actually supports a half-duplex mode on single pin like the Teensy-3.2 because none of the ESP32 pins are 5V-tolerant so it can never be used directly with the TTL dynamixel buss. And RS-485, CAN, LVDS, etc. transceivers always require a full-duplex UART connection even if the buss they connect to is only half-duplex.



    To connect the ESP32 to dynamixels, you will need some buffer ICs to handle the logic level conversion which will also handle the 3.3V full-duplex ESP32 UART to 5V half-duplex dynamixel buss conversion. Select the ESP32 Arduino Serial object of your choice and a Digital pin to toggle direction by controlling the output_enable pins of the buffer ICs (TX when high / RX when low). On my ESP8266 boards, I used 74_1_126 (TX pin->buss when OE high) and 74_1_125 (buss->RX pin when !OE low) buffer ICs in SOT-353 package which is quite small and difficult to correctly assemble when not using a well made stencil. The 74_1_126 would be powered by a 5V supply with the ESP32 TX pin connected to the input (A) pin and the dynamixel buss connected to the output (Y) pin. The 74_1_125 would be powered by the ESP32 VIO supply (likely 3.3V) with the ESP32 RX pin connected to the output (Y) pin and the dynamixel buss connected to the input (A) pin. The direction pin of the ESP32 would be connected to the OE/!OE pin of both the buffer ICs.


    Edit:
    Ooops. Used the wrong buffer IC names. The 74LVC1G125 and 74LVC1G126 that I first posted were the original buffer ICs that I used, but they are not guaranteed to be able to translate up from 3.3V to 5.0V because the lower threshold at 5V for Input High is 3.5V. While they usually work OK, I switched to the SN74LV1T125 and SN74LV1T126 buffers that are guaranteed to work in translating 3.3V to 5V (actually guaranteed to work with input voltages down to 2.03V with a 5V supply).

  7. #17

    Re: ESP32 Support ?

    Will someone make a 5V ESP32 board? I doubt it, for two reasons.
    First, 5V really is on the way out. Very few things are 5V anymore. Main SOC integrators view 3.3V as "legacy" at this point.
    Second, The ESP32 really doesn't have a lot to recommend it over something like the Raspberry Pi Zero W.
    It uses slightly less power when idling (if you make sure to set it in idle mode) and it's slightly cheaper on ebay, but then it has 1/1000th the RAM and fewer capabilities in general, and you get less working software support.
    (The PI W also has the 3.3V problem, of course.)

  8. Re: ESP32 Support ?

    the main reason i am using the esp32 is its ludicrously easy to configure pwm , atm i have a project where i am using it to create 16 bit pwm at a variable frequency between say 1hz - 20khz , the lights are for theater shows and video , you need the variable frequency when certain cameras get led banding and you want to tweak the frequency to match the shutter speed / refresh rate of the camera (this is a very sticky problem).. on top of this i also was using dynamixel servos to move these lights in an arm like fashion to integrate these lights into performances to act as small weird characters in the show that would light performers.. the raspberry pi can indeed do a lot but i dont think that i can handle driving 12 pwm channels at 16 bit with a variable frequency. i am looking at the possibility of using other hardware for the dynamixel control but i also dont see much of a reason why the esp32 cant drive dynamixel servos, also the esp32 is much cheaper than the rasperry pi. i would love dynamixel to make a servo that could be driven by 3.3v .. but until then i still have a need for a microcontroller that can push 5v signals ..

    all that said, thank you to the people on this forum for giving input on this issue its helping a lot to slowly figure this out.

    also lastly , getting the esp32 to run dynamixel servos would also just be cool ,, so at the very least there is that utility

    Quote Originally Posted by jwatte View Post
    Will someone make a 5V ESP32 board? I doubt it, for two reasons.
    First, 5V really is on the way out. Very few things are 5V anymore. Main SOC integrators view 3.3V as "legacy" at this point.
    Second, The ESP32 really doesn't have a lot to recommend it over something like the Raspberry Pi Zero W.
    It uses slightly less power when idling (if you make sure to set it in idle mode) and it's slightly cheaper on ebay, but then it has 1/1000th the RAM and fewer capabilities in general, and you get less working software support.
    (The PI W also has the 3.3V problem, of course.)

  9. #19

    Re: ESP32 Support ?

    As for cost... I believe you can get an RPI Zero (no wifi) for about $5 and the RPI Zero W for about $10...

    So cost is not much of the issue here. Although you probably also have to add an micro SD Card to hold the stuff...

    As for servos that can handle being driven by 3.3v, I have done that for a long time with Teensy 3.2 without additional hardware. For the most part the servos ran just fine with 3.3v signals. However if the servos were to return back a 5v reply, the Teeny 3.2 (and 3.5) are 5v tolerant so it is not an issue. Some other boards like ESP32 are not (likewise for Teensy 3.6)

    Again it may depend on how many of these you are wanting to do... That is, it would not be that hard to create some form of ESP32 shield that adds a buffer chip or chips and a few interface components, maybe a connector or two, plus decide how you are going to power it...

    Or maybe you create a quick and dirty small board like:
    Click image for larger version. 

Name:	UartToDynamixel-SCH.jpg 
Views:	51 
Size:	15.9 KB 
ID:	7198Click image for larger version. 

Name:	Uart2Dynamixel.jpg 
Views:	45 
Size:	50.0 KB 
ID:	7199

    It might need some cleanup... Maybe I did not specify the right 125 and 126 objects... But would be cheap on OshPark. I believe the quick and dirty version here is 1 inch by .4 inch...


    Or if it is more or less a one off thingy, than, it would not be hard to get you up and running using more off the shelf parts...

    Again purchase your ESP32 - $10, Purchase an Open CM9.04A ($10), maybe order the connector kit $5 Maybe pick up the Powered Dynamixel HUB from Trossen and then jumper over from a DXL output on the 904a to HUB... Then you can plug in power to the hub, which also powers 904 and servos...

    Or to make part of this easier, pick up the 904C ($20), which has XL-320 servo connectors...

    Or just use some wire jumpers to connect the two. Connect up one of the UARTS of your ESP32 to The Serial2 of 904A which is setup for http://www.robotis.us/dynamixel-xl-320/ servos...

    If you wish to use other larger servos, than you can jumper from there to Trossen HUB or, I hacked up my own version:
    Click image for larger version. 

Name:	Hub.jpg 
Views:	44 
Size:	84.8 KB 
ID:	7200

    Which has the 6 AX like servo connectors and one XL320 connector to allow me to simply use an XL320 jumper cable to hook the two together... (I also have version like this for new XL430 like connector), which I have not tried out yet.
    Last edited by KurtEck; 04-16-2018 at 09:47 PM.

  10. Re: ESP32 Support ?

    oh wow , i never knew the opencm from robotis was that cheap i checked a long time ago and they had controllers for like $40 which was why i initially tried to get dynamixels to work with arduino mega's which works fine.

    do you know if anyone has tried to get those working with an esp32 before ?

    Quote Originally Posted by KurtEck View Post
    As for cost... I believe you can get an RPI Zero (no wifi) for about $5 and the RPI Zero W for about $10...

    So cost is not much of the issue here. Although you probably also have to add an micro SD Card to hold the stuff...

    As for servos that can handle being driven by 3.3v, I have done that for a long time with Teensy 3.2 without additional hardware. For the most part the servos ran just fine with 3.3v signals. However if the servos were to return back a 5v reply, the Teeny 3.2 (and 3.5) are 5v tolerant so it is not an issue. Some other boards like ESP32 are not (likewise for Teensy 3.6)

    Again it may depend on how many of these you are wanting to do... That is, it would not be that hard to create some form of ESP32 shield that adds a buffer chip or chips and a few interface components, maybe a connector or two, plus decide how you are going to power it...

    Or maybe you create a quick and dirty small board like:
    Click image for larger version. 

Name:	UartToDynamixel-SCH.jpg 
Views:	51 
Size:	15.9 KB 
ID:	7198Click image for larger version. 

Name:	Uart2Dynamixel.jpg 
Views:	45 
Size:	50.0 KB 
ID:	7199

    It might need some cleanup... Maybe I did not specify the right 125 and 126 objects... But would be cheap on OshPark. I believe the quick and dirty version here is 1 inch by .4 inch...


    Or if it is more or less a one off thingy, than, it would not be hard to get you up and running using more off the shelf parts...

    Again purchase your ESP32 - $10, Purchase an Open CM9.04A ($10), maybe order the connector kit $5 Maybe pick up the Powered Dynamixel HUB from Trossen and then jumper over from a DXL output on the 904a to HUB... Then you can plug in power to the hub, which also powers 904 and servos...

    Or to make part of this easier, pick up the 904C ($20), which has XL-320 servo connectors...

    Or just use some wire jumpers to connect the two. Connect up one of the UARTS of your ESP32 to The Serial2 of 904A which is setup for http://www.robotis.us/dynamixel-xl-320/ servos...

    If you wish to use other larger servos, than you can jumper from there to Trossen HUB or, I hacked up my own version:
    Click image for larger version. 

Name:	Hub.jpg 
Views:	44 
Size:	84.8 KB 
ID:	7200

    Which has the 6 AX like servo connectors and one XL320 connector to allow me to simply use an XL320 jumper cable to hook the two together... (I also have version like this for new XL430 like connector), which I have not tried out yet.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Which ROS release for dynamixel support?
    By memmerich in forum ROS - Robot Operating System
    Replies: 2
    Last Post: 02-20-2017, 06:53 PM
  2. Support for Arduino 1.6.0?
    By KurtEck in forum Arbotix, Microcontrollers, Arduino
    Replies: 16
    Last Post: 12-24-2016, 06:47 AM
  3. Arbotix Pro ROS support
    By calmur in forum ROS - Robot Operating System
    Replies: 20
    Last Post: 10-31-2016, 02:35 PM
  4. What is this Horizontal Support Thingy?
    By Fanatic in forum Robotics General Discussion
    Replies: 3
    Last Post: 08-23-2012, 09:21 AM
  5. software support
    By chocobot in forum Humanoids, Walkers & Crawlers
    Replies: 8
    Last Post: 04-03-2007, 02:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •