NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
Moderators: grovkillen, Stuntteam, TD-er
NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
Sorry for the question, but I'm pretty new to ESPEasy:
I have a Benq W1070+ projector which I'd like to turn on and off via RS232, and a Logitech Z-5500 which I need to control via Infrared (for which I've purchased the Wemos IR shield).
Is it possible to do both with a single ESPEasy unit on a Wemos D1 mini (4M) or will I need to separate units.
I have a Benq W1070+ projector which I'd like to turn on and off via RS232, and a Logitech Z-5500 which I need to control via Infrared (for which I've purchased the Wemos IR shield).
Is it possible to do both with a single ESPEasy unit on a Wemos D1 mini (4M) or will I need to separate units.
Last edited by Wookbert on 27 Nov 2020, 21:05, edited 1 time in total.
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
If you get the ESP to communicate via RS232 with your beamer, then I don't see any reason why it should not work with IR and RS232 at the same time.
I think the first part is the hardest.
One thing that may be an issue is that you should not use Software Serial along with IR as both act on interrupts.
Better use an hardware Serial port.
I think the first part is the hardest.
One thing that may be an issue is that you should not use Software Serial along with IR as both act on interrupts.
Better use an hardware Serial port.
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
Sorry, but I really have almost no knowledge on this whole stuff: What’s the difference? Software Serial uses some of the GPIO pins and emulates the serial protocol in Software, while Hardware Serial uses the UART pins (which has what kind of downsides/consequences?)
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
Software Serial can use almost any combination of GPIO pins (only a few exceptions)
On ESP8266 there are only 2 HW serial ports:
- Serial0
- Serial1
Serial1 can only send data, no RX, so hardly usable.
Serial0 typically uses GPIO 1 and 3, the same pins you use to flash it.
Serial0 can also be configured to swap pins 1&3 to 13&15.
GPIO-15 does need an extra PNP transistor to make sure it doesn't get pulled up during boot, or else the ESP may not boot if something is connected.
Advantage of using HW serial is that it does handle it all incoming traffic without relying on interrupts.
IR receiving does rely on interrupts too, so it may interact with Software Serial (causing missing bits)
On ESP8266 there are only 2 HW serial ports:
- Serial0
- Serial1
Serial1 can only send data, no RX, so hardly usable.
Serial0 typically uses GPIO 1 and 3, the same pins you use to flash it.
Serial0 can also be configured to swap pins 1&3 to 13&15.
GPIO-15 does need an extra PNP transistor to make sure it doesn't get pulled up during boot, or else the ESP may not boot if something is connected.
Advantage of using HW serial is that it does handle it all incoming traffic without relying on interrupts.
IR receiving does rely on interrupts too, so it may interact with Software Serial (causing missing bits)
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
The interrupts on the Software Serial leads to which problem exactly? Delayed execution (how man ms in worst case?) or no execution (missed commands)?
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
Software Serial and receiving data from IR use interrupts with the same priority.
And I assume both may disable interrupts temporarily when receiving a sequence of data to make sure they get at least that message.
So on receiving data either one may block the other.
Not sure if sending data via SW serial is also blocking, but I would not be surprised if it were to make sure timing requirements are met.
And I assume both may disable interrupts temporarily when receiving a sequence of data to make sure they get at least that message.
So on receiving data either one may block the other.
Not sure if sending data via SW serial is also blocking, but I would not be surprised if it were to make sure timing requirements are met.
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
Oh, I’ve just realized that I might have created some confusion: I actually have no intention to send commands via IR and RS232 at the exact same time. Sorry for the misleading Topic title. I only want to use the same Wemos D1 mini, to be able to send commands both via IR and RS232, but not in parallel.
Correct me if I'm wrong, but that means that the SW serial related interrupts are actually not a problem.
Correct me if I'm wrong, but that means that the SW serial related interrupts are actually not a problem.
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
If the Ir and serial are never being processed at the same time (SW serial sending or receiving) then I don't think there will be a problem.
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
Am I correct, that regardless whether I use SW or HW serial, that if I need a proper RS232, I'll need a RS232-TTL board, like discussed here?
Search-Link AliExpress
Search-Link AliExpress
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
You mean a level converter?
It is better to use it if the signal levels are not at the same level as the ESP uses.
Some devices indeed need to have the signal levels at levels higher than 3v3.
For those you better use such a level converter.
It is better to use it if the signal levels are not at the same level as the ESP uses.
Some devices indeed need to have the signal levels at levels higher than 3v3.
For those you better use such a level converter.
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
I've meanwhile figured out — don't forget I'm still a NOOB — how the IR part works:
By sending e.g http://10.0.1.88/control?cmd=IRSEND,NEC,10EF58A7 I can increase the volume of my nearby Logitech Z5500 surround system. So far, so good.
I've also received a couple of those MAX3232-RS232-TTL Converters for my goal to control the BENQ W-1070+ projector using the very same ESP8266 unit.
Question now is how to connect and configure that in addition to my IR setup?
By sending e.g http://10.0.1.88/control?cmd=IRSEND,NEC,10EF58A7 I can increase the volume of my nearby Logitech Z5500 surround system. So far, so good.
I've also received a couple of those MAX3232-RS232-TTL Converters for my goal to control the BENQ W-1070+ projector using the very same ESP8266 unit.
Question now is how to connect and configure that in addition to my IR setup?
- Hardware-wise RX gets wired to TX, and TX to RX? (Plus VCC and GND of course.)
- What to do in software, in the ESPEasy Web-UI?
Re: NOOB Question: ESPEasy Infrared Remote and Serial RS232 controller at the same time?
FYI, here is the serial protocol of my BenQ W-1070+ (same protocol across all printer).
The W-1070+ has a 9-pin D-Sub as described on p. 4. Serial commands are ASCII and on p. 8.
The W-1070+ has a 9-pin D-Sub as described on p. 4. Serial commands are ASCII and on p. 8.
Who is online
Users browsing this forum: No registered users and 29 guests