How to cvonfigre RS232 to TTL on ESPeasy?

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
aihysp
New user
Posts: 4
Joined: 07 Oct 2017, 11:08

How to cvonfigre RS232 to TTL on ESPeasy?

#1 Post by aihysp » 27 Dec 2017, 20:52

Hi i have Rs232 serial port converter(ali 1$)
i whuld like to send RS232 commands from nodeMCU
that has ESPEeasy

can anyone tell me how to connect/config

1. where to connect RX/TX? TX>RX? or TX>TX
2. how i send commands?
3. how i configre this device
4. if anyone can give me some exmaple of a command

i understand this is probly a noob Q, its just to send TTL commands but still i have no Clue :)
please help

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to cvonfigre RS232 to TTL on ESPeasy?

#2 Post by TD-er » 28 Dec 2017, 11:50

Make sure the serial port converter outputs only 3.3V.
Usually you connect TX to RX and vice verse.
But if it isn't working, try to switch Rx and Tx in ESPeasy.
What do you want to connect? The NodeMCU alread has an USB to serial adapter included in the board. So you can connect to it via the Arduino IDE, or Serial Monitor in PlatformIO.
List of supported commands in ESPeasy: https://www.letscontrolit.com/wiki/inde ... _Reference

aihysp
New user
Posts: 4
Joined: 07 Oct 2017, 11:08

Re: How to cvonfigre RS232 to TTL on ESPeasy?

#3 Post by aihysp » 28 Dec 2017, 18:26

i am using openhab>node-red

i want to know how to inject by MQTT ON,OFF,Etc
to the prjector i have with RS232
i dont want to use USB.... in the end i want somthing like ESP01 on the projector


so my Q is
what do i need to send in node-red(MQTT)
to make it work?

to what pins?
what kind of commands?

soory i having real trouble getting the hang of this.... :(

TD-er
Core team member
Posts: 8729
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: How to cvonfigre RS232 to TTL on ESPeasy?

#4 Post by TD-er » 28 Dec 2017, 23:24

I know @grovkillen had done some experiments connecting ESPeasy to his projector.
So maybe he can shed some light on this.
But I guess you will also encounter some issues with signal levels on the device side.
RS232 signal levels are way higher than 3.3V, so you'll probably need a level converter to make sure you do not destroy your ESP device.

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: How to cvonfigre RS232 to TTL on ESPeasy?

#5 Post by grovkillen » 29 Dec 2017, 06:48

Yes I've done some experimenting but have not had the time to get it going. I've used the MAX3232 circuit but have not had success in getting my projector responding to my commands (using there "serialsend" command). I need to test with a logic analyzer to see if the MAX3232 is sending anything to the projector. Will also need to try to use a computer instead of only a ESP just to make sure the projector is understanding the RS232 codes.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

LobsterJack
New user
Posts: 1
Joined: 06 Dec 2018, 10:22

Re: How to cvonfigre RS232 to TTL on ESPeasy?

#6 Post by LobsterJack » 06 Dec 2018, 10:30

aihysp wrote: 28 Dec 2017, 18:26 i am using openhab>node-red

i want to know how to inject by MQTT ON,OFF,Etc
to the prjector i have with RS232
i dont want to use USB.... in the end i want somthing like ESP01 on the projector


so my Q is
what do i need to send in node-red(MQTT)
to make it work?

to what pins?
what kind of commands?

soory i having real trouble getting the hang of this.... :(

I don't know, man. Drawing up a projector cots more than a market can offer, and the most severe price comes in the form of time consumed by development. Maybe top engineers can assemble the project in a few days, but 70% waste a weak and have a malfunctioning garbage :\ Just check this $100 projector and you'll save your money and time.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: How to cvonfigre RS232 to TTL on ESPeasy?

#7 Post by Shardan » 06 Dec 2018, 14:22

Hello all,

several problems may stumble on eachother here.

@Grovkillen:
MAX3232 is an inverting line driver - I'm not sure if the Tx/Rx from the ESP isn't already inverted.
I'll check today at evenng or next weekend, what the output of an ESP8266 does, I've a digital scope at hand.

@all
Some things must be considered with RS232.
- Voltage level.
RS232 uses a wide voltage range. Originally it was designed for at least +12..15 V for logical "0" and - 12...15 V als logical "I".
As most PC's used just +/- 5 V RS232 should (!) allow +3..15V and -3..15 V.
But mind the "should"... The ESP offers 3V and 0 V so this might not work with any RS232 device.
That's what serial adapters like the MAX3232 is for.

- Logical level
RS232 is an inverted protocoll! Positive voltage says logically "zero", negative voltage says logically "one".
I've to check what the ESP gives on the serial port, it might be alreday inverted or not.
Without sending any data the TX line should have positive voltage!

- "Specials" with ESP8266
Don't forget to disable the serial log. Serial log will confuse the other side waiting for commands instead logs.
Remember, that even with switched-off log the ESP8266 sends some data on boot that may conflict with your device.
Regards
Shardan

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: How to cvonfigre RS232 to TTL on ESPeasy?

#8 Post by Shardan » 06 Dec 2018, 18:34

Hello again,

just checked the serial out with my DSO.
It recorded the first few bits of a serial transmission on the ESP's TxD pin.
.
ESP_TxD-Out.jpg
ESP_TxD-Out.jpg (74.74 KiB) Viewed 6031 times
.
Obviously the ESP sends already the correct inverted logic signal.
It his on 3,2V when idle and the first edge of the "Start" bit goes to zero.

So the MAX3232 will invert the already inverted signal again which is not the desired signal.
(And obviously i have to recalibrate my DSO probes..... spikes, spikes, spikes....)
Regards
Shardan

Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests