logic level shifting, isolation, and pull up resistors
So I'm planning to use an ESP32 microcontroller as the brains of a new CNC machine running Grbl. The ESP32 uses 3.2 V logic on all pins. I happen to have several of the logic level shifters like in this picture and link:
I plan to use them to convert the 3.3v logic to 5v like this picture. All of the devices on the right side of the last pic would use the same 5V source for signal power
I have a couple questions about them.
1. if used like the last picture, will they also provide isolation between the MCU and whatever is hooked on the right (Switches, motor drivers, prox sensors, etc) ?
2. If they will work for isolation I assume that the grounds should not be connected on the HV and LV sides, otherwise the isolation is at least somewhat defeated. Correct?
3. Some of the pins on the MCU don't have internal pull-up resistors, but it looks to me like adding these would take care of that anyway. Is this correct?
4. Would I be better off using optocouplers? I don't have any but could get some if they are a better option.
Re: logic level shifting, isolation, and pull up resistors
Well. It appears those aren't going to work that well at least for the stepper drivers. I breadboarded them up and while they work, I decided to check the output on my hand me down oscilloscope and what is supposed to be a square wave has the leading edge all rounded over. There signal from the mcu is nice and square but once through the level shifter it isn't. I just ordered some optocouplers so will just use them. I got 6N137 for the stepper signals and pc187 for the rest.
Re: logic level shifting, isolation, and pull up resistors
1: No this will not provide isolation. However, most motor drivers have optocouplers at the inputs.
2: the ground of this board could be connected to each other
3: Yes, you can do that.
4: Yes it's a good idea to use optocouplers for in and output of the MCU