I want to connect my esp32 with Arduino UNO that's why I have to run my Arduino at 3.3 v so while searching on google someone suggested replacing 16 MHz crystal with 8 MHz but I have 12 MHz crystal.
So can I use that 12 MHz to run Arduino at 3.3 v
if there is any other way please let me know
Eventually the communication works without a level shifter - find out yourself. The 5V TX should be connected to the 3.3V RX with a voltage divider, the other direction may work with a direct connection.
Powering by USB is wrong, and flashing will not work properly when something else is connected to RX/TX. Disconnect the 3.3V device while connected to USB and everything is fine.
DrDiettrich:
Eventually the communication works without a level shifter - find out yourself. The 5V TX should be connected to the 3.3V RX with a voltage divider, the other direction may work with a direct connection.
Voltage divider -is- a level shifter. It's the most current wasting kind too. A diode and a pullup resistor make better for almost the same cost.
avanishpratap:
I want to connect my esp32 with Arduino UNO that's why I have to run my Arduino at 3.3 v so while searching on google someone suggested replacing 16 MHz crystal with 8 MHz but I have 12 MHz crystal.
So can I use that 12 MHz to run Arduino at 3.3 v
if there is any other way please let me know
Thanks in advance
You can also make a stand-alone AVR chip "Duino" that runs at 3.3V (not super sure about stable 12MHz) and connects directly to to the ESP32.
Are you connecting via serial or SPI port?
If I have a 5V signal going to a 3V chip I can put a diode in that wire to stop 5V going to the 3V chip. On the 3V side I put a 4K to 10K resistor to charge the wire on that side of the diode when 5V is present and -not- getting through so that 3V is present and HIGH on the 5V side has 3V HIGH on that side. And when the 5V becomes 0V it sucks the 3V pullup through the diode and both sides see 0V.
Unlike the voltage divider this leveler only loses current when the 5V side is LOW instead of all the time. Serial logic is reversed, HIGH at idle and 0 signals, the diode & pullup serves it well.
3V TX works on a 5V serial RX, needs no leveling. With serial you only level 1 pin. With SPI you level 3 (MOSI, SCLK and Select) but it's faster.
Wawa:
Generally a dumb idea.
Sounds like you are trying to pull a Lamborghini along with a donkey.
Can't you use only the ESP32.
+1 to that!
And the UNO is always a poor choice. If you really wanted to interface at 3.3 V, you would just get a 3.3 V Pro Mini. But an ESP32 with port expanders if required, is the only sensible approach.