Other Parts Discussed in Thread: TXB0106, TXS0102
Hi,
I'm using Arduino Nano with a Bluetooth Module (RN42) connected on the hardware UART with the TX and RX pins.
I'm using the TXB0102 bidirectional level shifters from Texas Instruments to pass from 5V logic levels to 3.3V logic levels. I'm using a dedicated PCB.
While I'm having no issues with the TX pin, I'm noticing a weird behaviour on RX.
Basically whenever the BT module tries to pull down the voltage at RX, oscillations occur.
This is the picture of what I'm getting when I'm sending the ASCII character 'n':
https://imgur.com/NkxLwFD
and this shows the oscillations I'm getting in greater detail:
https://imgur.com/P4j6hzR
Instead of using the hardware UART, I've then tried to implement a serial port using software serial library on common digital pins and I'm NOT having particular issues:
https://imgur.com/Oe6NiTs
(here I've disabled the internal pull-up but it works even with pullup enabled although the low logic level is higher than 0V but this is explained in the TXB0102 datasheet).
So the problem is on the RX pin used an input. I've read Arduino schematic here:
www.arduino.cc/.../Arduino_Nano-Rev3.2-SCH.pdf
and basically the hardware difference on the RX and TX pins compared to the normal digital inputs is that they're also internally connected to the FT232 USB UART chip and there is a 1K series resistor.
Could you please help me in understanding if this is pure hardware issue and I should have used an other type of level shifter or if it's a software issue in the way the serial library of Arduino is initializing the RX pin? In this case I might try to get some help on the software side on the Arduino message boards.
I've tried to add the pinMode(0,INPUT) line in my code after initializing the serial port (this should also disable the interal pullup resistor) but it doesn't fix the issue.
Thanks for your help!