EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: matt_c on July 17, 2020, 11:03:41 am

Title: 3.3V to 5V logic level converter - Simple - or is it?
Post by: matt_c on July 17, 2020, 11:03:41 am
I have a 3.3V microcontroller (SparkFun SAMD21 Mini) I would like to interface with the 5V logic inputs on a motor controller board https://electromen.com/en/products/item/motor-controllers/brushless-dc-motor/EM-347A/ (https://electromen.com/en/products/item/motor-controllers/brushless-dc-motor/EM-347A/)

The motor controller board inputs state they require 4V minimum. Plus these inputs have 10kΩ pull down resistors on some of them except speed and torque control which have 100k.
I plan on using PWM for the speed and torque control.

Which voltage level conveter would be most suitable?

Originally I was going to go with a bidirectional MOSFET level shifter, with 1k pullup on the 5V side, however it's a lot of seperate components for the 4 channels I need (start, direction, speed, torque). So a single chip would be more convenient.

I was thinking a 74HCT244 Buffer/Line Driver may work in one direction.
Or perhaps txb0104 or txs0104, but I'm not sure would be able to drive the motor controller input above 4V with the 10k pull down resistors.
What does everyone think?
Title: Re: 3.3V to 5V logic level converter - Simple - or is it?
Post by: Siwastaja on July 17, 2020, 12:24:08 pm
Any 74HCT you have around. A buffer obviously, or an inverter if you swap the polarities in software, and so on.

These parts use 5V supply, and output 0V and 5V levels, being CMOS parts. T in the part name means TTL-compatible input levels, and with TTL input levels, 3.3V is reliably '1', which is exactly what you want.

Special level shifters offer features like bidirectionality which you do not want here.

For the analog inputs, you can RC filter the PWM, but the response won't be fast. I'd assume they filter the inputs on the motor controller, as well, though, to prevent torque ripple caused by noisy inputs.

Title: Re: 3.3V to 5V logic level converter - Simple - or is it?
Post by: David Hess on July 18, 2020, 12:34:51 am
74HCT logic would be the simplest although technically any 5 volt TTL logic should work with a pull-up on the output.  A common base bipolar transistor with pull-up would also work fine.  I have sometimes used optocouplers for level shifting which has the advantage of galvanic isolation.