Continue to Site

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.

  • 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.

Level shifting for ESC

Status
Not open for further replies.

Peter Newman

New Member
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 **broken link removed** 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:
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:
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.
 
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.

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.
 
agreed

upload_2016-8-13_20-15-55.png
 
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.
 
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:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top