Hi,
I'm using Arduino Nano with a Bluetooth Module (Microchip RN42) connected on the hardware UART with the TX and RX.
I'm using the TXB0102 bidirectional level shifters from Texas Instruments to pass from 5V logic levels to 3.3V logic levels.
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':
and this shows the oscillations I'm getting in greater detail:
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:
So the problem is on the RX pin used an input. I've read the schematic here:
and basically the hardware difference 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.
Now I'd like to ask if there is a way to fix this and make the RX pin behave like the other digital pins.
Do I have to change something in the serial library?
I've tried to add the pinMode(0,INPUT) line in my code after initializing the serial port (this should also disables the interal pullup resistor) but it doesn't fix the issue.
Being on a PCB I'm pretty limited on hardware options and for this project I need to use the hardware UART anyway, so I'd like to understand if I can fix this through software or if I have to make hardware changes (like changing the type of level shifter).
Thanks for your help!