0

enter image description here

enter image description here

enter image description here

my serial connection prints rubbish, but it systematic, so it's not just random as you see on image 1, any help would be appreciated

other info:

the first image of the serial monitor of COM6 is my own serial connection, image nr. 2 is the serial monitor of COM4 which already uses the onboard serial to USB the last image shows how I made my own serial connection

the 2 black cables are providing around 4 volts, I know these are not necessary cause the USB already provides 5 volts and ground

and oh ye, normally the USB on the last image would be connected to my pc ofc

1
  • 1
    Is that a USB to RS232 adapter there? RS232 != UART. Also it risks killing your target device through incorrect voltages being applied.
    – Majenko
    Jul 21, 2019 at 11:14

2 Answers 2

0

You're using a USB to RS-232 adaptor. That is wrong.

RS-232 is not (electrically) the same as UART. Not only is the logic inverted, but it uses ±10V NRZ signalling.

That means that when the UART expects a 3.3V HIGH signal the adapter is sending it a -10V signal. When it's expecting a 0V LOW signal it's being sent a +10V signal.

So yes, it's gibberish - it's getting the opposite of what it expects to see - and the excess and negative voltages risk damaging your ESP. Fortunately the currents involved are usually so low that it doesn't damage it straight away, but with prolonged use you can probably kiss your ESP goodbye.

Disconnect that dongle immediately and get a proper USB to UART adapter.

2
  • Or implement a RS232 to UART adapter by using the MAX232
    – chrisl
    Jul 21, 2019 at 11:22
  • @chrisl The MAX232 is probably what's inside there, so you'd be doubling it up and making a "double negative" scenario ;) Pretty wasteful on components and things. Best to do things properly. But yes, you could do that if you are psychotic enough...
    – Majenko
    Jul 21, 2019 at 11:23
0

Just check the code by running on all different Baud-rates (in the serial monitor) ..It should normally work on the rate u have declared in the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.