1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

Level shifting for ESC

Discussion in 'Arduino' started by Peter Newman, Aug 13, 2016.

  1. Peter Newman

    Peter Newman New Member

    Joined:
    Aug 12, 2016
    Messages:
    10
    Likes:
    0
    Location:
    Canberra Australia
    Hello I am currently trying to modify a quadcopter flight control (FC) board that is designed to drive brushed coreless motors via an ESC. The problem that I am having is the the Atmega32U4 on the FC is running at 3.3v but the KISS ESC's are expecting a 5v logic signal. It has been suggested that I need a level shifter such as this but am just wondering if there is another simple circuit that I can implement to test the validity of this suggestion because it will take me a while to procure the suggested level shifter. Thanks in advance for any suggestions
     
    Last edited: Aug 22, 2016
  2. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,057
    Likes:
    541
    Location:
    AZ 86334
    G'Day Mate. I've been to Canberra...

    If you have a BSS123, you could build SparkFun's circuit. You can substitute small (low gate capacitance) NFETs for the BSS123 (like a 2N7002) provided that they have a threshold voltage of < ~2V.

    If you can get a small NPN switching transistor like the 2n3904, here is an alternative you can try. It is not bidirectional, though.

    386.png
     
    Last edited: Aug 13, 2016
    • Like Like x 1
  3. Peter Newman

    Peter Newman New Member

    Joined:
    Aug 12, 2016
    Messages:
    10
    Likes:
    0
    Location:
    Canberra Australia
    Mike is it, well you are one up on me cause I have never been to Arizona :) but I would love to visit the States someday

    Thanks for the reply I might give your NPN level shifter example a try. I do not require bi directional seeing as it is a PWM signal for motor speed control via an Electronic Speed Controller. Only being a rank amateur electronics hack, with the emphasis on amateur and hack, I think that I have a 2n3904 laying around so I am halfway there. I will let you know how I go and great diagrams you have done there for me. Much appreciated.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Nigel Goodwin

    Nigel Goodwin Super Moderator Most Helpful Member

    Joined:
    Nov 17, 2003
    Messages:
    39,234
    Likes:
    641
    Location:
    Derbyshire, UK

    As it's only one way (3.3V out feeding 5V in) then you almost certainly don't need any conversion at all, 5V inputs happily accept 3.3V signals.
     
    • Like Like x 1
  6. Tony Stewart

    Tony Stewart Well-Known Member Most Helpful Member

    Joined:
    Aug 31, 2012
    Messages:
    3,151
    Likes:
    281
    Location:
    Richmond Hill , ON Canada near Toronto
  7. MikeMl

    MikeMl Well-Known Member Most Helpful Member

    Joined:
    Mar 17, 2009
    Messages:
    11,057
    Likes:
    541
    Location:
    AZ 86334
    Except that what Tony posted points out the folly of expecting a 3.3V output to have much noise margin when driving a CMOS input pin of a chip powered with 5.0V. Note that Vih is required to be >0.6*Vcc which is 3.0V, leaving only 300mV of noise margin, and only if the driving pin is otherwise lightly loaded, and can drive all the way to 3.30V.
     
  8. Tony Stewart

    Tony Stewart Well-Known Member Most Helpful Member

    Joined:
    Aug 31, 2012
    Messages:
    3,151
    Likes:
    281
    Location:
    Richmond Hill , ON Canada near Toronto
    I believe the actual** input threshold is 50%Vcc, so with 60%Vcc worst case for Vih and nominal 3.3/5= =66% this provides 16% nominal margin and min. 10% margin if complying to 60% Vcc spec limit,

    ( I.e. not 0% margin )

    Input leakage spec is low and if internal pullup is enabled, R=20kΩ to 50kΩ, this also asserts open state and helps on Vih immunity.

    Vol is not an issue with Atmel,Zout=100Ω at 3V .

    Therefore there should be no problem for 5V logic to drive 3.3V logic from ATtiny to ATtiny.
    I don't anticipate a loading issue with internal pullup.
     
    Last edited: Aug 13, 2016

Share This Page